本文整理汇总了Java中com.extjs.gxt.ui.client.widget.TabItem.add方法的典型用法代码示例。如果您正苦于以下问题:Java TabItem.add方法的具体用法?Java TabItem.add怎么用?Java TabItem.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.extjs.gxt.ui.client.widget.TabItem
的用法示例。
在下文中一共展示了TabItem.add方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTab
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的package包/类
@Override
public void addTab(String tabTitle, final Widget tabView) {
final TabItem tabItem = new TabItem(tabTitle);
tabItem.addListener(Events.Select, new Listener<ComponentEvent>() {
@Override
public void handleEvent(ComponentEvent be) {
fixTabViewHeight(tabView, tabItem);
}
});
tabItem.add(tabView);
Window.addResizeHandler(new ResizeHandler() {
@Override
public void onResize(ResizeEvent event) {
fixTabViewHeight(tabView, tabItem);
}
});
fixTabViewHeight(tabView, tabItem);
tabPanel.add(tabItem);
}
示例2: ReportPanel
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的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);
}
示例3: onRender
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的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();
}
});
}
}
示例4: doStart
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的package包/类
public void doStart() {
for (TabItem item : advanced.getItems()) {
CIModel model = (CIModel)item.getData("model");
item.removeAll();
Frame f = new Frame();
item.add(f);
f.setUrl(getStartURL(model));
item.layout();
}
}
示例5: addTab
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public final void addTab(final String tabTitle, final Widget tabView, final Listener<ComponentEvent> listener) {
final TabItem tabItem = new TabItem(tabTitle);
tabItem.addListener(Events.Select, listener);
tabItem.add(tabView);
tabItem.setScrollMode(Scroll.AUTO);
tabPanel.add(tabItem);
}
示例6: SettingsTab
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的package包/类
public SettingsTab(){
TabItem authTab = new TabItem("Auth Settings");
authTab.setHideMode(HideMode.OFFSETS);
authTab.add(new AuthPanel());
add(authTab);
TabItem settingsTab = new TabItem("Timesheet Settings");
settingsTab.setHideMode(HideMode.OFFSETS);
settingsTab.add(new TimesheetSettingsPanel());
add(settingsTab);
}
示例7: ToolsTab
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的package包/类
public ToolsTab(){
TabItem fixRateTab = new TabItem("Fix Rate's Tab");
fixRateTab.setHideMode(HideMode.OFFSETS);
fixRateTab.add(new ExternalRatePanel());
add(fixRateTab);
}
示例8: doRightPanel
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的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;
}
示例9: setupArticleContent
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的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());
}
示例10: updateModel
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的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();
}
示例11: initUI
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的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();
}
示例12: setupGeneralInfo
import com.extjs.gxt.ui.client.widget.TabItem; //导入方法依赖的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());
}