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


Java Tree.addTextItem方法代码示例

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


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

示例1: createMailItem

import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
 * Create the {@link Tree} of Mail options.
 *
 * @param images the {@link Images} used in the Mail options
 * @return the {@link Tree} of mail options
 */
@ShowcaseSource
private Tree createMailItem(Images images) {
  Tree mailPanel = new Tree(images);
  TreeItem mailPanelRoot = mailPanel.addTextItem("[email protected]");
  String[] mailFolders = constants.cwStackPanelMailFolders();
  addItem(mailPanelRoot, images.inbox(), mailFolders[0]);
  addItem(mailPanelRoot, images.drafts(), mailFolders[1]);
  addItem(mailPanelRoot, images.templates(), mailFolders[2]);
  addItem(mailPanelRoot, images.sent(), mailFolders[3]);
  addItem(mailPanelRoot, images.trash(), mailFolders[4]);
  mailPanelRoot.setState(true);
  return mailPanel;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:20,代码来源:CwStackPanel.java

示例2: createMailItem

import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
 * Create the {@link Tree} of Mail options.
 * 
 * @param images the {@link Images} used in the Mail options
 * @return the {@link Tree} of mail options
 */
@ShowcaseSource
private Widget createMailItem(Images images) {
  Tree mailPanel = new Tree(images);
  TreeItem mailPanelRoot = mailPanel.addTextItem("[email protected]");
  String[] mailFolders = constants.cwStackLayoutPanelMailFolders();
  addItem(mailPanelRoot, images.inbox(), mailFolders[0]);
  addItem(mailPanelRoot, images.drafts(), mailFolders[1]);
  addItem(mailPanelRoot, images.templates(), mailFolders[2]);
  addItem(mailPanelRoot, images.sent(), mailFolders[3]);
  addItem(mailPanelRoot, images.trash(), mailFolders[4]);
  mailPanelRoot.setState(true);
  return mailPanel;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:20,代码来源:CwStackLayoutPanel.java

示例3: createStaticTree

import com.google.gwt.user.client.ui.Tree; //导入方法依赖的package包/类
/**
 * Create a static tree with some data in it.
 *
 * @return the new tree
 */
@ShowcaseSource
private Tree createStaticTree() {
  // Create the tree
  String[] composers = constants.cwTreeComposers();
  String concertosLabel = constants.cwTreeConcertos();
  String quartetsLabel = constants.cwTreeQuartets();
  String sonatasLabel = constants.cwTreeSonatas();
  String symphoniesLabel = constants.cwTreeSymphonies();
  Tree staticTree = new Tree();

  // Add some of Beethoven's music
  TreeItem beethovenItem = staticTree.addTextItem(composers[0]);
  addMusicSection(beethovenItem, concertosLabel,
      constants.cwTreeBeethovenWorkConcertos());
  addMusicSection(
      beethovenItem, quartetsLabel, constants.cwTreeBeethovenWorkQuartets());
  addMusicSection(
      beethovenItem, sonatasLabel, constants.cwTreeBeethovenWorkSonatas());
  addMusicSection(beethovenItem, symphoniesLabel,
      constants.cwTreeBeethovenWorkSymphonies());

  // Add some of Brahms's music
  TreeItem brahmsItem = staticTree.addTextItem(composers[1]);
  addMusicSection(
      brahmsItem, concertosLabel, constants.cwTreeBrahmsWorkConcertos());
  addMusicSection(
      brahmsItem, quartetsLabel, constants.cwTreeBrahmsWorkQuartets());
  addMusicSection(
      brahmsItem, sonatasLabel, constants.cwTreeBrahmsWorkSonatas());
  addMusicSection(
      brahmsItem, symphoniesLabel, constants.cwTreeBrahmsWorkSymphonies());

  // Add some of Mozart's music
  TreeItem mozartItem = staticTree.addTextItem(composers[2]);
  addMusicSection(
      mozartItem, concertosLabel, constants.cwTreeMozartWorkConcertos());

  // Return the tree
  return staticTree;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:46,代码来源:CwTree.java


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