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


Java TabPanel.addStyleName方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.TabPanel.addStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java TabPanel.addStyleName方法的具体用法?Java TabPanel.addStyleName怎么用?Java TabPanel.addStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.TabPanel的用法示例。


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

示例1: 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);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:59,代码来源:GalleryList.java


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