コード例 #1
0
  /**
   * Create a Dynamic tree. The code comes from the GWT show case :
   * http://gwt.google.com/samples/Showcase/Showcase.html#!CwTabPanel
   */
  @SuppressWarnings("deprecation")
  private DecoratedTabPanel createTabPanel() {
    // Create a tab panel
    DecoratedTabPanel tabPanel = new DecoratedTabPanel();
    tabPanel.setWidth("400px");
    tabPanel.setAnimationEnabled(true);

    // Add a home tab
    String[] tabTitles = {"Home", "GWT Logo", "More info"};
    HTML homeText =
        new HTML("Click one of the tabs to see more content. <br/> You can drag me now !");
    tabPanel.add(homeText, tabTitles[0]);

    // Add a tab with an image
    /*
     * VerticalPanel vPanel = new VerticalPanel(); vPanel.add(new
     * Image(Showcase.images.gwtLogo()));
     */
    // TODO add gwt logo
    VerticalPanel vPanel = new VerticalPanel();
    vPanel.add(new com.google.gwt.user.client.ui.Image(Image.INSTANCE.gwtLogo()));
    tabPanel.add(new com.google.gwt.user.client.ui.Image(Image.INSTANCE.gwtLogo()), tabTitles[1]);

    // Add a tab
    HTML moreInfo = new HTML("Tabs are highly customizable using CSS.");
    tabPanel.add(moreInfo, tabTitles[2]);

    // Return the content
    tabPanel.selectTab(0);
    tabPanel.ensureDebugId("cwTabPanel");
    return tabPanel;
  }
コード例 #2
0
ファイル: GwtWidgets.java プロジェクト: veltzer/demos
 private void addTabPanel() {
   DecoratedTabPanel tPanel = new DecoratedTabPanel();
   tPanel.setWidth("450px");
   for (int i = 1; i <= 5; i++) {
     Widget tabContent = new TabPanelSampleContent(i);
     String tabLabel = "Panel " + i;
     tPanel.add(tabContent, tabLabel);
   }
   tPanel.selectTab(0);
   tPanel.setAnimationEnabled(true);
   RootPanel.get("tab-panel").add(tPanel);
 }
コード例 #3
0
ファイル: BizIrtk.java プロジェクト: sumi/irtk5-old
 public void loadTopHoriPanel() {
   final Irtk irtk = new Irtk();
   bizPanel.setWidth("100px");
   bizPanel.setAnimationEnabled(true);
   vendorPanel.add(revenueButton);
   bizPanel.add(vendorPanel, "Revenue");
   irtk.topHoriPanel.add(bizPanel);
   RootPanel.get("topPanel").add(bizPanel);
   revenueButton.addClickHandler(
       new ClickHandler() {
         public void onClick(ClickEvent event) {
           //  RootPanel.get("flexTable").remove(irtk.flexTable);
           // irtk.flexTable.removeAllRows();
           //  RootPanel.get("flexTable").add(irtk.flexTable);
           dialogBox.setText("Testing");
         }
       });
 }