Java 类com.google.gwt.user.client.ui.DecoratedStackPanel 实例源码

项目:Peergos    文件:CwStackPanel.java   
/**
 * Initialize this example.
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
  // Get the images
  Images images = (Images) GWT.create(Images.class);

  // Create a new stack panel
  DecoratedStackPanel stackPanel = new DecoratedStackPanel();
  stackPanel.setWidth("200px");

  // Add the Mail folders
  String mailHeader = getHeaderString(
      constants.cwStackPanelMailHeader(), images.mailgroup());
  stackPanel.add(createMailItem(images), mailHeader, true);

  // Add a list of filters
  String filtersHeader = getHeaderString(
      constants.cwStackPanelFiltersHeader(), images.filtersgroup());
  stackPanel.add(createFiltersItem(), filtersHeader, true);

  // Add a list of contacts
  String contactsHeader = getHeaderString(
      constants.cwStackPanelContactsHeader(), images.contactsgroup());
  stackPanel.add(createContactsItem(images), contactsHeader, true);

  // Return the stack panel
  stackPanel.ensureDebugId("cwStackPanel");
  return stackPanel;
}
项目:swarm    文件:CwStackPanel.java   
/**
 * Initialize this example.
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
  // Get the images
  Images images = (Images) GWT.create(Images.class);

  // Create a new stack panel
  DecoratedStackPanel stackPanel = new DecoratedStackPanel();
  stackPanel.setWidth("200px");

  // Add the Mail folders
  String mailHeader = getHeaderString(
      constants.cwStackPanelMailHeader(), images.mailgroup());
  stackPanel.add(createMailItem(images), mailHeader, true);

  // Add a list of filters
  String filtersHeader = getHeaderString(
      constants.cwStackPanelFiltersHeader(), images.filtersgroup());
  stackPanel.add(createFiltersItem(), filtersHeader, true);

  // Add a list of contacts
  String contactsHeader = getHeaderString(
      constants.cwStackPanelContactsHeader(), images.contactsgroup());
  stackPanel.add(createContactsItem(images), contactsHeader, true);

  // Return the stack panel
  stackPanel.ensureDebugId("cwStackPanel");
  return stackPanel;
}