本文整理汇总了Java中com.google.gwt.user.client.ui.TabPanel.selectTab方法的典型用法代码示例。如果您正苦于以下问题:Java TabPanel.selectTab方法的具体用法?Java TabPanel.selectTab怎么用?Java TabPanel.selectTab使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.TabPanel
的用法示例。
在下文中一共展示了TabPanel.selectTab方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: NumberNetUI
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
/**
* Instantiates a new number net ui.
*/
public NumberNetUI()
{
super();
sharedInstance = this;
tabPanel = new TabPanel();
TableManager tableManagerTab = new TableManager();
tabPanel.add(tableManagerTab, tableManagerTab.getTitle(), false);
TargetSetterPanel targetSetterPanel = new TargetSetterPanel();
tabPanel.add(targetSetterPanel, targetSetterPanel.getTitle(), false);
// ProjectionControl projectionControlPanel = new ProjectionControl();
// tabPanel.add(projectionControlPanel,
// projectionControlPanel.getTitle(), false);
ExpressionView ev = new ExpressionView();
tabPanel.add(ev, ev.getTitle(), false);
tabPanel.selectTab(0);
add(tabPanel);
}
示例2: DatabaseControlUI
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
/**
* Instantiates a new database control ui.
*/
public DatabaseControlUI()
{
super();
sharedInstance = this;
tabPanel = new TabPanel();
tabPanel.setWidth("270px");
studentAdminPanel = new StudentAdministationPanel();
tabPanel.add(studentAdminPanel, studentAdminPanel.getTitle(), false);
classSelectionPanel = new ClassSelectionPanel();
tabPanel.add(classSelectionPanel, classSelectionPanel.getTitle(), false);
tabPanel.selectTab(0);
add(tabPanel);
}
示例3: asWidget
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
/**
* @return this editor as a Widget.
*/
public Widget asWidget() {
VerticalPanel panel = new VerticalPanel();
panel.add(new ContentGroupLabel(Singleton.MESSAGES.label_serviceDetails()));
panel.add(new ContentDescription(Singleton.MESSAGES.description_serviceDetails()));
panel.add(createImplementationDetailsPanel());
TabPanel tabs = new TabPanel();
tabs.setStyleName("default-tabpanel"); //$NON-NLS-1$
tabs.getElement().setAttribute("style", "margin-top:15px;"); //$NON-NLS-1$ //$NON-NLS-2$
tabs.add(createGatewayDetailsPanel(), Singleton.MESSAGES.label_gateways());
tabs.add(createThrottlingDetailsPanel(), Singleton.MESSAGES.label_throttling());
tabs.addBeforeSelectionHandler(new BeforeSelectionHandler<Integer>() {
@Override
public void onBeforeSelection(BeforeSelectionEvent<Integer> event) {
_toolstrip.doCancel();
}
});
panel.add(tabs);
tabs.selectTab(0);
return panel;
}
示例4: makeParentVisible
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
private void makeParentVisible(Widget widget) {
if (widget == null) {
return;
}
Widget parent = widget.getParent();
if (parent == null) {
return;
}
makeParentVisible(parent);
if (parent instanceof DeckPanel) {
DeckPanel deckPanel = (DeckPanel) parent;
int widgetIndex = deckPanel.getWidgetIndex(widget);
deckPanel.showWidget(widgetIndex);
TabPanel tabPanel = (TabPanel) deckPanel.getParent().getParent();
tabPanel.selectTab(widgetIndex);
}
}
示例5: PanelChat
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
public PanelChat() {
setWidth("800px");
add(new Label("簡易チャット(設定画面から表示をON/OFFできます)"));
if (SharedData.get().isAdministoratorMode()) {
final TabPanel panel = new TabPanel();
panel.setAnimationEnabled(true);
panel.add(new LazyPanel() {
@Override
protected Widget createWidget() {
return new PanelRealtime();
}
}, "リアルタイム");
panel.add(new LazyPanel() {
@Override
protected Widget createWidget() {
return new PanelPast();
}
}, "過去ログ");
panel.selectTab(0);
add(panel);
} else {
add(new PanelRealtime());
}
}
示例6: TabPanelExample
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
public TabPanelExample() {
super("Tab Panel");
TabPanel tabs = new TabPanel();
tabs.add(new Button("One"), "One");
tabs.add(new Button("Two"), "Two");
tabs.add(new Button("Three"), "Three");
tabs.add(new Button("Four"), "Four");
tabs.selectTab(0);
add(tabs);
}
示例7: GalleryList
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
/**
* Creates a new GalleryList
*/
public GalleryList() {
gallery = GalleryClient.getInstance();
gallery.addListener(this);
galleryGF = new GalleryGuiFactory();
selectedApps = new ArrayList<GalleryApp>();
// Initialize UI
galleryGUI = new FlowPanel();
galleryGUI.addStyleName("gallery");
appTabs = new TabPanel();
appRecent = new FlowPanel();
appFeatured = new FlowPanel();
appPopular = new FlowPanel();
appSearch = new FlowPanel();
appTutorial = new FlowPanel();
appRecentContent = new FlowPanel();
appFeaturedContent = new FlowPanel();
appPopularContent = new FlowPanel();
appSearchContent = new FlowPanel();
appTutorialContent = new FlowPanel();
searchText = new TextBox();
// HTML segment for gallery typeface
HTML headerExtra = new HTML(
"<link href='http://fonts.googleapis.com/css?" +
"family=Roboto:400,300,100' rel='stylesheet' type='text/css'>");
galleryGUI.add(headerExtra);
// Add content to panels
appFeaturedTab = new GalleryAppTab(appFeatured, appFeaturedContent, REQUEST_FEATURED);
appRecentTab = new GalleryAppTab(appRecent, appRecentContent, REQUEST_RECENT);
appSearchTab = new GalleryAppTab(appSearch, appSearchContent, REQUEST_SEARCH);
appPopularTab = new GalleryAppTab(appPopular, appPopularContent, REQUEST_MOSTLIKED);
appTutorialTab = new GalleryAppTab(appTutorial, appTutorialContent, REQUEST_TUTORIAL);
// don't think we need because in regular addgallerytab below
// Add panels to main tabPanel
appTabs.add(appRecent, "Recent");
appTabs.add(appTutorial,"Tutorials");
appTabs.add(appFeatured, "Featured");
appTabs.add(appPopular, "Popular");
appTabs.add(appSearch, "Search");
appTabs.selectTab(0);
appTabs.addStyleName("gallery-app-tabs");
galleryGUI.add(appTabs);
// Initialize top-level GUI
VerticalPanel panel = new VerticalPanel();
panel.setWidth("100%");
panel.add(galleryGUI);
initWidget(panel);
}
示例8: onModuleLoad
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
@Override
public void onModuleLoad()
{
Map<String, String> availableAppNamesToClassName = new HashMap<String, String>();
availableAppNamesToClassName.put("Number Net", "synergynet3.apps.numbernet.NumberNet");
availableAppNamesToClassName.put("Gravity Sim", "synergynet3.activitypack1.table.gravitysim.GravitySim");
availableAppNamesToClassName.put("Early Years", "synergynet3.apps.earlyyears.applications.stickerbook.StickerbookApp");
SynergyNetAppSystemUI appSystemUI = new SynergyNetAppSystemUI();
appSystemUI.setDelegate(this);
appSystemUI.setKnownApplicationNamesWithClasses(availableAppNamesToClassName);
ProjectorControlPanel projectorControlUI = new ProjectorControlPanel();
DatabaseControlUI databaseControlUI = new DatabaseControlUI();
databaseControlUI.setDelegate(this);
MediaControlUI mediaControlUI = new MediaControlUI();
final RootPanel rootPanel = RootPanel.get();
tabPanel = new TabPanel();
tabPanel.add(appSystemUI, "Apps");
tabPanel.add(projectorControlUI, "Projectors");
tabPanel.add(mediaControlUI, "Tables");
tabPanel.add(databaseControlUI, "Students");
rootPanel.add(tabPanel);
tabPanel.selectTab(0);
SynergyNetWebService.Util.getInstance().test("", new AsyncCallback<Void>()
{
@Override
public void onFailure(Throwable caught)
{
// System.out.println("unwoot");
}
@Override
public void onSuccess(Void result)
{
// System.out.println("woot");
}
});
}
示例9: TemplateViewScreen
import com.google.gwt.user.client.ui.TabPanel; //导入方法依赖的package包/类
public TemplateViewScreen() {
super();
/*
if (true) {
styleTwo();
return;
}
*/
vPanel = new VerticalPanel();
/*
HorizontalPanel editPanel = new HorizontalPanel();
HTML edit = new HTML("[<a href='javascript:;'>edit</a>]");
edit.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
getBaseEntryScreen().showScreen(OneCMDBModelCreator.EDIT_TEMPLATE_SCREEN, objectType, new Long(0));
}
});
editPanel.add(edit);
editPanel.setCellHorizontalAlignment(edit, HorizontalPanel.ALIGN_RIGHT);
editPanel.setWidth("100%");
*/
infoPanel = new VerticalPanel();
infoPanel.setStyleName("mdv-form");
infoPanel.setWidth("100%");
attributeScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
referenceScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
instancesScreen.setBaseEntryScreen(OneCMDBModelCreator.get());
tab = new TabPanel();
tab.add(infoPanel, "Info");
tab.add(attributeScreen, "Attributes");
tab.add(referenceScreen, "References");
tab.add(instancesScreen, "Instances");
instancesScreen.setNewSupport(true);
tab.addTabListener(this);
tab.selectTab(1);
//vPanel.add(infoPanel);
vPanel.add(tab);
dockPanel.add(vPanel, DockPanel.CENTER);
dockPanel.setCellHeight(vPanel, "100%");
dockPanel.setSize("100%", "100%");
//ScrollPanel p = new ScrollPanel(dockPanel);
//p.setAlwaysShowScrollBars(true);
initWidget(dockPanel);
}