当前位置: 首页>>代码示例>>Java>>正文


Java Tabpanel类代码示例

本文整理汇总了Java中org.zkoss.zul.Tabpanel的典型用法代码示例。如果您正苦于以下问题:Java Tabpanel类的具体用法?Java Tabpanel怎么用?Java Tabpanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Tabpanel类属于org.zkoss.zul包,在下文中一共展示了Tabpanel类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addRoundTab

import org.zkoss.zul.Tabpanel; //导入依赖的package包/类
private Tab addRoundTab(Round r) {
	Tab tab = new Tab(LangUtils.getMessage(LangEnum.ROUND)+" "+r.roundNumber);
	tab.setId("round"+r.roundNumber+"Tab");
	tab.setParent(singleTabbox.getTabs());
	
	Tabpanel panel = new Tabpanel();
	panel.setId("round"+r.roundNumber+"Panel");
	panel.setParent(singleTabbox.getTabpanels());
	
	Include inc = new Include("single_round.zul");
	inc.setDynamicProperty("round", r);
	inc.setId("round"+r.roundNumber+"Include");
	inc.setParent(panel);
	
	return tab;
}
 
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:17,代码来源:IndexComposer.java

示例2: createComponentTabs

import org.zkoss.zul.Tabpanel; //导入依赖的package包/类
/**
 * Creates a components tabbox within the 
 * group for the specified element. 
 * @param group
 * @param panel
 */
protected void createComponentTabs(Element[] arrTabs)
{
	if ((config == null) || (arrTabs == null))
		return;
	
	
	// create the Tabs to accomodate the tab groups
	for (int i = 0; i < arrTabs.length; i++)
	{
		// get the next 'group' iDOM Element
		Element elementTab = arrTabs[i];

		// create the tab that displays the group name
		Tab tab = new Tab(elementTab.getAttribute("name"));
		
		
		tabbox.getTabs().appendChild(tab);
		
		// create a panel for the group tab
		Tabpanel panel = new Tabpanel();
		
		
		tabbox.getTabpanels().appendChild(panel);
		
		// add the predefined visual components to the tab
		addComponentsToTab(elementTab, panel);
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:35,代码来源:DesignerElements.java

示例3: agregarTab

import org.zkoss.zul.Tabpanel; //导入依赖的package包/类
/**
 * Funcionalidad para agregar un tab al tabbcontrol 
 * @param titulo Titulo del tab
 * @param id Identificador unico para no permitir mas de una instancia
 * @param zul Uri del archivo zul
 */
private void agregarTab(String titulo, String id, String zul, Map<String, Object> arguments) {
	if(arguments==null){
		arguments = new HashMap<String, Object>();
	}
	Tabpanel tabpanel = new Tabpanel();
	Tab tab = new Tab(titulo);
	tab.setId(id);
	//Validar que el tab no este instanciado
	if(getTb_tabbox().hasFellow(id)){
		Messagebox.show("Ya esta abierta la ventana!");
		return;
	}

	tab.setClosable(true);
	tab.setSelected(true);
	if (getTb_tabbox().getTabs() == null){
		getTb_tabbox().appendChild(new Tabs());   
		getTb_tabbox().appendChild(new Tabpanels());   
	}

	getTb_tabbox().getTabs().appendChild(tab);
	//Agrgar argumento para el id
	arguments.put("tabularIndex", tab.getIndex());
	getTb_tabbox().getTabpanels().appendChild(tabpanel);
	getTb_tabbox().invalidate();

	//Crear el nuevo tab y su respectivo panel
	Executions.createComponents(zul, tabpanel, arguments);
}
 
开发者ID:zerstoren1234567,项目名称:PruebaDesarrollo,代码行数:36,代码来源:MenuPrincipalHorCtl.java

示例4: addResultTab

import org.zkoss.zul.Tabpanel; //导入依赖的package包/类
private void addResultTab(Ranking ranking){
	System.out.println("Adding result for round "+ranking.roundNumber);
	Tab tab = new Tab(LangUtils.getMessage(LangEnum.RESULT)+" "+ranking.roundNumber);
	tab.setId("ranking"+ranking.roundNumber+"Tab");
	
	tab.setParent(resultTabbox.getTabs());
	Tabpanel panel = new Tabpanel();
	panel.setId("ranking"+ranking.roundNumber+"Panel");
	panel.setParent(resultTabbox.getTabpanels());
	
	Include inc = new Include("ranking.zul");
	inc.setDynamicProperty("ranking", ranking);
	inc.setId("ranking"+ranking.roundNumber+"Include");
	inc.setParent(panel);
}
 
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:16,代码来源:IndexComposer.java

示例5: addComponentsToTab

import org.zkoss.zul.Tabpanel; //导入依赖的package包/类
/**
 * Retrieves the predefined visual components
 * declared within the iDOM and attaches them 
 * onto the specified tab panel 
 * @param elementTab The iDOM description of the
 * tab element
 * @param tabpanel The panel where the components 
 * will be attached to
 */
private void addComponentsToTab(Element domTab, 
							    Tabpanel tabpanel)
{
	if ((config == null) || (domTab == null) || (tabpanel == null))
		return;

	// get the components defined for this tab, 
	// directly from the iDOM document
	Element[] arrComponents = config.getElements("component", domTab);
	
	if (ArrayUtils.isEmpty(arrComponents))
		return;
	// create the list with components items
	Listbox list = new Listbox();
	list.setWidth("100%");
	list.setHflex("1");
	list.setVflex("1");
	list.setDroppable("false");
	
	// create the Tabs to accomodate the tab groups
	for (int i = 0; i < arrComponents.length; i++)
	{
		try
		{
			// get the next 'group' iDOM Element
			Element domComponent = arrComponents[i];

			// get the <class>, <image> and <tooltip> values
			// directly from the iDOM document
			Element domClass = config.getElement("class", domComponent);
			Element domImage = config.getElement("image32", domComponent);
			Element domTooltip = config.getElement("tooltip", domComponent);
			Element domName = config.getElement("name", domComponent);
			
			if (domClass == null)
				continue;
			
			// create the component's image and attach it onto
			// the panel, according to its iDOM description
			ElementInfo component = new ElementInfo(domClass.getText(), 
					domName.getText(), domTooltip.getText(), domImage.getText());
			ComponentListItem item = new ComponentListItem(component);
			list.getItems().add(item);
		}
		catch (Exception e)
		{
			// if something is missing, just move on
			continue;
		}
	}
	tabpanel.appendChild(list);
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:62,代码来源:DesignerElements.java


注:本文中的org.zkoss.zul.Tabpanel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。