Package com.smartgwt.client.widgets.tab

Examples of com.smartgwt.client.widgets.tab.Tab


    banner.setBackgroundRepeat(BkgndRepeat.NO_REPEAT);
    main.addMember(banner);

    TabSet tabs = new TabSet();

    Tab tab1 = new Tab("Default Ribbon");
    tab1.setPane(getExample1());
    tabs.addTab(tab1);

    Tab tab2 = new Tab("Tabbed Ribbon");
    tab2.setPane(getExample2());
    tabs.addTab(tab2);

    Tab tab3 = new Tab("Custom Ribbon Widgets");
    tab3.setPane(getExample3());
    tabs.addTab(tab3);

    Tab tab4 = new Tab("Custom Ribbon Style");
    tab4.setPane(getExample4());
    tabs.addTab(tab4);

    main.addMember(tabs);
    main.draw();
  }
View Full Code Here


      public void execute(GetClientUserDataResponse response) {
        RibbonInfo info = (RibbonInfo) response.getInformation();
        for (RibbonBarInfo tabInfo : info.getTabs()) {
          RibbonBarLayout ribbon = new RibbonBarLayout(tabInfo, mapWidget);
          ribbon.setBorder("0px");
          Tab tab = new Tab(tabInfo.getTitle());
          tab.setPane(ribbon);
          tabs.addTab(tab);
        }
      }
    });
  }
View Full Code Here

    }
  }

  private void showSample(SamplePanel panel, String name, String icon) {
    String tabId = panel.getId() + "_tab";
    Tab tab = mainTabSet.getTab(tabId);
    if (tab == null) {
      tab = new Tab();
      tab.setID(tabId);
      String imgHTML = Canvas.imgHTML(icon, 16, 16);
      tab.setTitle("<span>" + imgHTML + "&nbsp;" + name + "</span>");
      tab.setPane(panel);
      tab.setCanClose(true);
      mainTabSet.addTab(tab);
    }
    mainTabSet.selectTab(tab);
  }
View Full Code Here

    mainTabSet.selectTab(tab);
  }

  private void showIntroductionTab() {
    IntroductionTab sample = new IntroductionTab();
    Tab tab = new Tab();
    tab.setID(sample.getId() + "_tab");
    String imgHTML = Canvas.imgHTML("[ISOMORPHIC]/geomajas/geomajas_desktopicon_small.png", 16, 16);
    tab.setTitle("<span>" + imgHTML + "&nbsp;" + I18nProvider.getSampleMessages().introductionTitle() + "</span>");
    tab.setPane(sample.getViewPanel());
    mainTabSet.addTab(tab);
  }
View Full Code Here

    TabSet tabs = new TabSet();
    tabs.setWidth(400);
    tabs.setHeight(330);

    // create the one and only tab pane
    Tab mainPrefs = new Tab();
    mainPrefs.setTitle(messages.printPrefsChoose());

    // create the form
    DynamicForm form = new DynamicForm();
    // title
    titleItem = new TextItem();
    titleItem.setName("title");
    titleItem.setTitle(messages.printPrefsTitleText());
    // size
    sizeItem = new SelectItem();
    sizeItem.setName("size");
    sizeItem.setTitle(messages.printPrefsSize());
    sizeItem.setValueMap(PageSize.getAllNames());
    sizeItem.setValue(PageSize.A4.getName());
    // orientation
    orientationGroup = new RadioGroupItem();
    orientationGroup.setName("orientation");
    orientationGroup.setTitle(messages.printPrefsOrientation());
    LinkedHashMap<String, String> orientations = new LinkedHashMap<String, String>();
    orientations.put("landscape", messages.printPrefsLandscape());
    orientations.put("portrait", messages.printPrefsPortrait());
    orientationGroup.setValueMap(orientations);
    orientationGroup.setVertical(false);
    orientationGroup.setValue("landscape");
    // raster dpi slider
    rasterDpiSlider = new SliderItem();
    rasterDpiSlider.setTitle(messages.printPrefsRasterDPI());
    rasterDpiSlider.setWidth(250);
    rasterDpiSlider.setHeight(30);
    rasterDpiSlider.setMinValue(72);
    rasterDpiSlider.setMaxValue(500);
    rasterDpiSlider.setNumValues(5);
    // north arrow
    arrowCheckbox = new CheckboxItem();
    arrowCheckbox.setValue(true);
    arrowCheckbox.setTitle(messages.printPrefsWithArrow());
    // scale bar
    scaleBarCheckbox = new CheckboxItem();
    scaleBarCheckbox.setValue(true);
    scaleBarCheckbox.setTitle(messages.printPrefsWithScaleBar());
    // filename
    fileNameItem = new TextItem();
    fileNameItem.setName("filename");
    fileNameItem.setTitle(messages.printPrefsFileName());
    fileNameItem.setValue(mapWidget.getMapModel().getMapInfo().getId() + ".pdf");

    // progress indicator
    barIcon = new FormItemIcon();
    barIcon.setHeight(15);
    barIcon.setWidth(214);
    statusText = new StaticTextItem(messages.printPrefsStatus());
    statusText.setIcons(barIcon);
    barIcon.setSrc("[ISOMORPHIC]/geomajas/plugin/printing/pleasewait-blank.gif");
    // download type
    downloadTypeGroup = new RadioGroupItem();
    downloadTypeGroup.setName("downloadType");
    downloadTypeGroup.setTitle(messages.printPrefsDownloadType());
    LinkedHashMap<String, String> types = new LinkedHashMap<String, String>();
    types.put("save", messages.printPrefsSaveAsFile());
    types.put("open", messages.printPrefsOpenInBrowserWindow());
    downloadTypeGroup.setValueMap(types);
    downloadTypeGroup.setVertical(false);
    downloadTypeGroup.setValue("save");

    form.setFields(titleItem, sizeItem, orientationGroup, arrowCheckbox, scaleBarCheckbox, rasterDpiSlider,
        fileNameItem, downloadTypeGroup, statusText);
    mainPrefs.setPane(form);
    tabs.setTabs(mainPrefs);

    IButton printButton = new IButton();
    printButton.setTitle(messages.printPrefsPrint());
    printButton.addClickHandler(new ClickHandler() {
View Full Code Here

    if (searchMethods.contains(searchMethod)) {
      return;
    } else {
      searchMethods.add(searchMethod);
      Tab tab = new Tab(searchMethod.getTitle());
      tab.setPane(searchMethod.getSearchCanvas());
      if (position > -1) {
        tabs.addTab(tab, position);
      } else {
        tabs.addTab(tab);
      }
View Full Code Here

  private static final String DELETE_FEATURE_PAGE = "[ISOMORPHIC]/geomajas/example/pages/edit/delete_feature.html";

  private static final String DONUT_PAGE = "[ISOMORPHIC]/geomajas/example/pages/edit/donut_polygon.html";

  public EditingManual() {
    Tab tab1 = new Tab();
    tab1.setTitle("Create a new feature");
    HTMLPane pane1 = new HTMLPane();
    pane1.setContentsURL(CREATE_FEATURE_PAGE);
    tab1.setPane(pane1);
    tab1.setCanClose(false);
    addTab(tab1);

    Tab tab2 = new Tab();
    tab2.setTitle("Edit a feature");
    HTMLPane pane2 = new HTMLPane();
    pane2.setContentsURL(EDIT_FEATURE_PAGE);
    tab2.setPane(pane2);
    tab2.setCanClose(false);
    addTab(tab2);

    Tab tab3 = new Tab();
    tab3.setTitle("Delete a feature");
    HTMLPane pane3 = new HTMLPane();
    pane3.setContentsURL(DELETE_FEATURE_PAGE);
    tab3.setPane(pane3);
    tab3.setCanClose(false);
    addTab(tab3);

    Tab tab4 = new Tab();
    tab4.setTitle("Create donut polygon");
    HTMLPane pane4 = new HTMLPane();
    pane4.setContentsURL(DONUT_PAGE);
    tab4.setPane(pane4);
    tab4.setCanClose(false);
    addTab(tab4);
  }
View Full Code Here

        String tabTitle = entry.getKey();
        int pos = tabTitle.lastIndexOf('/');
        tabTitle = tabTitle.substring(pos + 1);

        Tab tab = new Tab(tabTitle, "[ISOMORPHIC]/geomajas/example/images/silk/script_go.png");
        tab.setPane(resourceLayout);
        tabs.addTab(tab);
      }
    }

    sourceWindow.addItem(tabs);
View Full Code Here

    String tabTitle = I18nProvider.getSampleMessages().generalJavaSource();
    int pos = tabTitle.lastIndexOf('/');
    tabTitle = tabTitle.substring(pos + 1);

    Tab tab = new Tab(tabTitle, "[ISOMORPHIC]/geomajas/example/images/silk/script_go.png");
    tab.setPane(sourceLayout);
    tabs.addTab(tab);
  }
View Full Code Here

    public NamedTab[] getTabs() {
        Tab[] tabs = super.getTabs();
        NamedTab[] namedTabs = new NamedTab[tabs.length];
        for (int i = 0, tabsLength = tabs.length; i < tabsLength; i++) {
            Tab tab = tabs[i];
            if (!(tab instanceof NamedTab)) {
                throw new IllegalStateException("NamedTabSet contains a Tab that is not a NamedTab.");
            }
            namedTabs[i] = (NamedTab) tab;
        }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.tab.Tab

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.