• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TabPanel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ReportPanel

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
public ReportPanel(){
	this.setHeaderVisible(false);
	TabPanel folder = new TabPanel(); 
	folder.setHeight(700);
	
	TabItem hourReportTabItem = new TabItem( myConstants.hour_report()); 
	TabItem departmentReportTabItem = new TabItem( myConstants.department_report()); 

	hourReportTabItem.add(new HourUserReport());
	departmentReportTabItem.add(new DepartmentReport());
	
	folder.add(hourReportTabItem);
	folder.add(departmentReportTabItem);
	
	add(folder);
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:17,代码来源:ReportPanel.java


示例2: onRender

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
	ContentFile mdr = new ContentFile();
	String mdrConf = item.getParams().get("mdrConfig");
	if (mdrConf == null) {
		mdrConf = CMDBSession.get().getConfig().get(Config.OneCMDBWebService);
	}
	mdr.setPath(mdrConf);
	
	super.onRender(parent, index);
	setLayout(new FitLayout());

	TabPanel tab = new TabPanel();
	TabItem overviewItem = new TabItem("MDR Overview");
	overviewItem.setLayout(new FitLayout());
	overviewItem.add(new MDROverview(mdr, this.permissions));
	
	TabItem detailTab = new TabItem("MDR Details");
	detailTab.setLayout(new FitLayout());
	detailTab.add(detail);
	
	tab.add(overviewItem);
	tab.add(detailTab);
	
	add(tab);
	layout();
	
	if (getParent() instanceof Window) {
		 ((Window)getParent()).addListener(Events.BeforeClose, new Listener<BaseEvent>() {

			public void handleEvent(BaseEvent be) {
				HelpInfo.abort();
			}
		 });
	 }
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:37,代码来源:MDRViewWindow.java


示例3: tab

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
/**
 * Builds a new {@link TabPanel} with default transparent background.
 * 
 * @param stylenames
 *          (optional) Style names added to the panel content component.
 *          {@code null} values are ignored.
 * @return The {@link TabPanel} instance.
 * @see TabPanel
 */
public static TabPanel tab(final String... stylenames) {

	final TabPanel panel = new TabPanel() {

		@Override
		protected void onRender(final Element target, final int index) {
			super.onRender(target, index);

			if (ClientUtils.isNotEmpty(stylenames)) {
				for (final String stylename : stylenames) {
					if (ClientUtils.isBlank(stylename)) {
						continue;
					}
					getLayoutTarget().addStyleName(stylename);
				}
			}
		}
	};
	
	panel.addStyleName("sigmah-tab-panel");

	panel.setBorderStyle(false);
	panel.setBodyBorder(false);

	return panel;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:36,代码来源:Panels.java


示例4: doRightPanel

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
private TabPanel doRightPanel(){
	TabPanel folder = new TabPanel(); 
	
	TabItem assignmentTab = new TabItem("Assignment Detail"); 
	assignmentTab.setWidth(724);
	assignmentTab.setHeight(600);
	assignmentDetailPanel = new  AssignmentDetailPanel();
	assignmentTab.add(assignmentDetailPanel);
	folder.add(assignmentTab);
	
	TabItem usersTreePanelTab = new TabItem("Users Statistic");
	usersTreePanelTab.setHideMode(HideMode.OFFSETS);
	usersTreePanelTab.setWidth(724);
	usersTreePanelTab.setHeight(600);
	
	
	userDepartmentReportContentPanel = new UserDepartmentReportContentPanel();
	
	usersTreePanelTab.add(userDepartmentReportContentPanel);
	folder.add(usersTreePanelTab);
	
	
	TabItem usersAssignmentTab = new TabItem("Users Assignments"); 
	usersAssignmentTab.setHideMode(HideMode.OFFSETS);
	usersAssignmentTab.add(doUserAssignmentContentPanel());
	folder.add(usersAssignmentTab );
	
	TabItem reportTab = new TabItem("Department Report"); 
	reportTab.setHideMode(HideMode.OFFSETS);
	reportTab.setWidth(724);
	reportTab.setHeight(600);
	departmentReportContentPanel = new  DepartmentReportContentPanel();
	reportTab.add(departmentReportContentPanel);
	folder.add(reportTab);
	
	return folder;
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:38,代码来源:DepartmentPanel.java


示例5: setupPanelLayout

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
@Override
protected void setupPanelLayout() {
	formPanel.setHeaderVisible(false);
	formPanel.setBodyBorder(false);
	formPanel.setPadding(0);
	//formPanel.setLayout(new FitLayout());
	TabPanel tabs = new TabPanel();
	tabs.setAutoHeight(true);
	formPanel.add(tabs);
	setupGeneralInfo(tabs);
	setupArticleContent(tabs);
	
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:14,代码来源:ArticlePanel.java


示例6: setupArticleContent

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
private void setupArticleContent(TabPanel tabs){
	TabItem content = new TabItem();
	content.setStyleAttribute("padding", "10");
	tabs.add(content);
	content.setText(Resources.constants.Article_tabgeneral());
	FormLayout fl = getFormLayout();
	fl.setHideLabels(true);
	content.setLayout(fl);
	HtmlEditor contentField = ArticleForm.getContent();
	contentField.setHeight(300);
	content.add(contentField, lfd());
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:13,代码来源:ArticlePanel.java


示例7: initUI

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
protected void initUI() {
	// Layout Fields.
	setLayout(new BorderLayout());  
	
	List<ColumnConfig> internalAttr = new ArrayList<ColumnConfig>();
	List<ColumnConfig> ciAttr = new ArrayList<ColumnConfig>();
	/*
	for (AttributeColumnConfig aConfig : gridConfig.getColumnConfig()) {
		ColumnConfig cfg = EditorFactory.getColumnConfig(aConfig, false);
		if (aConfig.isInternal()) {
			internalAttr.add(cfg);
		} else {
			ciAttr.add(cfg);
		}
	}
	*/
	
	LayoutContainer internalPanel = getForm(internalAttr, 2, LabelAlign.LEFT);
	LayoutContainer ciPanel = getForm(ciAttr, 3, LabelAlign.TOP);
	
	ContentPanel internalCp = new ContentPanel(); 

	internalCp.setLayout(new FitLayout());
	internalCp.setAutoWidth(true);
	internalCp.setAutoHeight(true);
	internalCp.setHeading("Internal Attributes");  
	internalCp.setCollapsible(true);
	internalCp.add(internalPanel);
	
	
	ContentPanel attrCp = new ContentPanel();
	
	ToolBar toolbar = new ToolBar();
	attrCp.setTopComponent(toolbar);
	toolbar.add(new FillToolItem());
	toolbar.add(new TextToolItem("Ok"));		
	toolbar.add(new TextToolItem("Cancel"));
	attrCp.setLayout(new FitLayout());
	attrCp.setScrollMode(Scroll.ALWAYS);
	attrCp.setLayoutOnChange(true);
	attrCp.setCollapsible(true);
	attrCp.add(ciPanel);
	attrCp.setHeading("Attributes");
	
	TabPanel infoTab = new TabPanel();  
	descriptionTab = new TabItem("Description");
	descriptionTab.setStyleName("property-panel-background");

	infoTab.add(descriptionTab);
	
	historyTab = new TabItem("History");
	historyTab.setStyleName("property-panel-background");
	infoTab.add(historyTab);
	
	
	BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);  
    centerData.setMargins(new Margins(0, 5, 0, 5));  
       
    /*   
    BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH);  
    northData.setSplit(false);  
    northData.setCollapsible(true);  
    northData.setMargins(new Margins(5));  
    */
    BorderLayoutData southData = new BorderLayoutData(LayoutRegion.SOUTH, 0.3f);  
    southData.setSplit(true);  
    southData.setCollapsible(true);  
    southData.setMargins(new Margins(5));  
	
    LayoutContainer fieldCont = new LayoutContainer();
    fieldCont.setLayout(new RowLayout());
    fieldCont.add(internalCp, new RowData(1,-1));
    fieldCont.add(attrCp, new RowData(1,1));
    
    
    add(fieldCont, centerData);
	add(infoTab, southData);
	
	layout();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:81,代码来源:CIValueForm.java


示例8: updateModel

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
protected void updateModel(CIModel model) {
	this.modelBase = model.copy();
	this.modelLocal = model;
	center.removeAll();
	center.setHeading("Template " + model.getAlias());
	
	TabPanel panel = new TabPanel();
	center.add(panel);
	
	{
		TabItem attr = new TabItem("Attributes");
		attr.setLayout(new RowLayout());

		attr.add(getToolBar(), new RowData(1,-1));

		CIIdentityForm idForm = new CIIdentityForm(model);
		idForm.setPermission(permission);
		attr.add(idForm, new RowData(1, -1));
		attributeGrid = new AttributeGrid(mdr, model, rootType, rootReferenceType);
		attributeGrid.setPermission(permission);
		attr.add(attributeGrid, new RowData(1, 1));

		ContentPanel defaultPanel = new ContentPanel();
		defaultPanel.setHeading("Default values for " + model.getAlias());
		defaultPanel.setLayout(new FitLayout());
		defaultValueGrid = new EditableSingleCIGrid(mdr, model);
		defaultValueGrid.setPermissions(permission);
		defaultPanel.setHeight(120);
		defaultPanel.add(defaultValueGrid);
		attr.add(defaultPanel, new RowData(1,-1));

		panel.add(attr);

	}
	{
		TabItem refs = new TabItem("References");
		refs.setLayout(new FitLayout());
		CITemplateReferenceTree tree = new CITemplateReferenceTree(mdr, modelBase);
		tree.setPermission(permission);
		refs.add(tree);
		panel.add(refs);
		
	}
	center.layout();
	layout();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:47,代码来源:CIModelInternalBrowser.java


示例9: initUI

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
protected void initUI() {
	// Temple browser...
	// Template Reference browser.
	setLayout(new FitLayout());
	
	
	ContentPanel panel = new ContentPanel();
	panel.setHeaderVisible(false);
	panel.setLayout(new FitLayout());

	TabPanel tab = new TabPanel();
	panel.add(tab);
	tab.setTabPosition(TabPanel.TabPosition.BOTTOM);
	
	TabItem treeItem = new TabItem("Design");
	TabItem xmlItem = new TabItem("Source");
	tab.add(treeItem);
	tab.add(xmlItem);
	
	final QueryGraphTree tree = new QueryGraphTree();		
	treeItem.add(tree);	
	
	final TextArea area = new TextArea();
	ContentPanel sourcePanel = new ContentPanel();
	sourcePanel.setHeaderVisible(false);
	sourcePanel.setLayout(new FitLayout());
	sourcePanel.add(area);
	ToolBar bar = new ToolBar();
	bar.add(new TextToolItem("Update", new SelectionListener<ToolBarEvent>() {

		@Override
		public void componentSelected(ToolBarEvent ce) {
			String text = area.getText();
			GWT_GraphQuery query = GWT_XMLQueryGraphParser.parse(text);
			GWT_GraphTreeItem item = QueryGraphTreeBuilder.buildTree(query);
			tree.setGraphTreeItem(item);
		}
		
	}));
	sourcePanel.setTopComponent(bar);
	xmlItem.setLayout(new FitLayout());
	xmlItem.add(sourcePanel);
	
	add(panel);
	layout();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:47,代码来源:QueryEditorWidget.java


示例10: initialize

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void initialize() {

	gridRequiredElements = new Grid<FlexibleElementDTO>(new ListStore<FlexibleElementDTO>(), getRequiredElementsColumModel());
	gridRequiredElements.setAutoExpandColumn(FlexibleElementDTO.LABEL);
	gridRequiredElements.getView().setForceFit(true);

	// Phases tab panel
	tabPanelPhases = new TabPanel();
	tabPanelPhases.setPlain(true);
	tabPanelPhases.setTabScroll(true);
	tabPanelPhases.setAnimScroll(true);
	tabPanelPhases.addStyleName(X_BORDER_PANEL);
	tabPanelPhases.addStyleName(WHITE_TAB_BODY);

	// Toolbar
	toolBar = new ToolBar();
	toolBar.setAlignment(HorizontalAlignment.LEFT);
	toolBar.setBorders(false);

	buttonSavePhase = Forms.button(I18N.CONSTANTS.projectSavePhaseButton(), IconImageBundle.ICONS.save());
	buttonActivatePhase = Forms.button(I18N.CONSTANTS.projectClosePhaseButton(), IconImageBundle.ICONS.activate());
	buttonPhaseGuide = Forms.button(I18N.CONSTANTS.projectPhaseGuideHeader(), IconImageBundle.ICONS.info());

	buttonActivatePhase.setEnabled(false);
	buttonSavePhase.setEnabled(false);
	buttonPhaseGuide.setEnabled(false);

	toolBar.add(buttonActivatePhase);
	toolBar.add(new SeparatorToolItem());
	toolBar.add(buttonSavePhase);
	toolBar.add(new SeparatorToolItem());
	toolBar.add(buttonPhaseGuide);

	// Tab item main panel
	panelProjectModel = Layouts.border(false, PROJECT_CURRENT_PHASE_PANEL);
	panelProjectModel.setBorders(false);

	panelSelectedPhase = Layouts.fit(false);

	requiredElementContentPanel = new ContentPanel(new FitLayout());

	requiredElementContentPanel.add(gridRequiredElements);
	panelProjectModel.add(requiredElementContentPanel,
		Layouts.borderLayoutData(LayoutRegion.WEST, Layouts.LEFT_COLUMN_WIDTH, Margin.HALF_RIGHT, Margin.HALF_BOTTOM, Margin.HALF_LEFT));

	final ContentPanel cp2 = Panels.content(I18N.CONSTANTS.phaseDetails(), Layouts.fitLayout());
	cp2.setScrollMode(Scroll.AUTOY);
	cp2.setTopComponent(toolBar);
	cp2.add(panelSelectedPhase, Layouts.fitData(Margin.HALF_TOP, Margin.HALF_RIGHT, Margin.HALF_BOTTOM, Margin.HALF_LEFT));

	panelProjectModel.add(cp2, Layouts.borderLayoutData(LayoutRegion.CENTER, Margin.HALF_RIGHT, Margin.HALF_BOTTOM));
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:57,代码来源:PhasesView.java


示例11: getTabPanelPhases

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public TabPanel getTabPanelPhases() {
	return tabPanelPhases;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:8,代码来源:PhasesView.java


示例12: setupGeneralInfo

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
private void setupGeneralInfo(TabPanel tabs){
	TabItem general = new TabItem();
	general.setStyleAttribute("padding", "10");
	tabs.add(general);
	general.setText(Resources.constants.Article_tabgeneral());
	FormLayout fl = getFormLayout();
	general.setLayout(fl);
	TextField<String> nameField = ArticleForm.getNameField(Resources.constants.Article_fltitle());
	nameField.setFieldLabel(Resources.constants.Article_fltitle());
	general.add(nameField, sfd());
	articleCatList = ArticleForm.getArticleCat("Article Category");
	articleCatList.addSelectionChangedListener(new SelectionChangedListener<BeanObject>(){

		@Override
		public void selectionChanged(SelectionChangedEvent<BeanObject> se) {
			BeanObject selectedItem = se.getSelectedItem();
			if(selectedItem.getString(IArticleCategory.TYPE).equals("2")||selectedItem.getString(IArticleCategory.TYPE).equals("4")){
				final MessageBox msgBox = new MessageBox();
				msgBox.addCallback(new Listener<MessageBoxEvent>(){
					public void handleEvent(MessageBoxEvent be) {
						articleCatList.clearSelections();
					}

	            });
				msgBox.setModal(true);
				//msgBox.setTitle("GCShop Warning...");
				msgBox.setMessage(Resources.messages.Article_selectCatWarning());
				msgBox.show();
			}
		}
		
	});
	articleCatList.setFieldLabel(Resources.constants.Article_flcategory());
	articleCatList.setStore(articleCat);
	general.add(articleCatList, sfd());
	MyRadioGroup isOpenField = ArticleForm.getIsOpen();
	isOpenField.setFieldLabel(Resources.constants.Article_flisOpen());
	general.add(isOpenField, tfd());
	MyRadioGroup articleTypeField = ArticleForm.getArticleType();
	articleTypeField.setFieldLabel(Resources.constants.Article_fltype());
	general.add(articleTypeField, tfd());
	TextField<String> authorField = ArticleForm.getAuthorField();
	authorField.setFieldLabel(Resources.constants.Article_flauthor());
	general.add(authorField, tfd());
	TextField<String> authorEmailField = ArticleForm.getAuthorEmail();
	authorEmailField.setFieldLabel(Resources.constants.Article_flemail());
	general.add(authorEmailField, sfd());
	TextField<String> keywordField = ArticleForm.getKeyword();
	keywordField.setFieldLabel(Resources.constants.Article_flkeyword());
	general.add(keywordField, tfd());
	
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:53,代码来源:ArticlePanel.java


示例13: getTabPanelPhases

import com.extjs.gxt.ui.client.widget.TabPanel; //导入依赖的package包/类
TabPanel getTabPanelPhases(); 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:2,代码来源:PhasesPresenter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TimeSeries类代码示例发布时间:2022-05-23
下一篇:
Java DirectoryDownloader类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap