Examples of Tab


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

    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

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

    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

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

  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

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

        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

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

    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

Examples of com.vaadin.ui.TabSheet.Tab

        sp.setWidth("100%");
        sp.setHeight("100px");

        Accordion acc = new Accordion();

        Tab tab1 = acc.addTab(new TextField("first field"));
        tab1.setCaption("First tab");

        Tab tab2 = acc.addTab(new TextField("second field"));
        tab2.setCaption("Second tab");

        acc.setSizeFull();

        sp.addComponent(acc);
        addComponent(sp);
View Full Code Here

Examples of com.vaadin.ui.TabSheet.Tab

    @Test
    public void getComponentFromTab() {
        Component c = new Label("abc");
        TabSheet tabSheet = new TabSheet();
        Tab tab = tabSheet.addTab(c);
        assertEquals(c, tab.getComponent());
    }
View Full Code Here

Examples of com.vaadin.ui.TabSheet.Tab

    }

    @Test
    public void addTabWithComponentOnly() {
        TabSheet tabSheet = new TabSheet();
        Tab tab1 = tabSheet.addTab(new Label("aaa"));
        Tab tab2 = tabSheet.addTab(new Label("bbb"));
        Tab tab3 = tabSheet.addTab(new Label("ccc"));

        // Check right order of tabs
        assertEquals(0, tabSheet.getTabPosition(tab1));
        assertEquals(1, tabSheet.getTabPosition(tab2));
        assertEquals(2, tabSheet.getTabPosition(tab3));
View Full Code Here

Examples of com.vaadin.ui.TabSheet.Tab

    }

    @Test
    public void addTabWithComponentAndIndex() {
        TabSheet tabSheet = new TabSheet();
        Tab tab1 = tabSheet.addTab(new Label("aaa"));
        Tab tab2 = tabSheet.addTab(new Label("bbb"));
        Tab tab3 = tabSheet.addTab(new Label("ccc"));

        Tab tab4 = tabSheet.addTab(new Label("ddd"), 1);
        Tab tab5 = tabSheet.addTab(new Label("eee"), 3);

        assertEquals(0, tabSheet.getTabPosition(tab1));
        assertEquals(1, tabSheet.getTabPosition(tab4));
        assertEquals(2, tabSheet.getTabPosition(tab2));
        assertEquals(3, tabSheet.getTabPosition(tab5));
View Full Code Here

Examples of com.vaadin.ui.TabSheet.Tab

    }

    @Test
    public void addTabWithAllParameters() {
        TabSheet tabSheet = new TabSheet();
        Tab tab1 = tabSheet.addTab(new Label("aaa"));
        Tab tab2 = tabSheet.addTab(new Label("bbb"));
        Tab tab3 = tabSheet.addTab(new Label("ccc"));

        Tab tab4 = tabSheet.addTab(new Label("ddd"), "ddd", null, 1);
        Tab tab5 = tabSheet.addTab(new Label("eee"), "eee", null, 3);

        assertEquals(0, tabSheet.getTabPosition(tab1));
        assertEquals(1, tabSheet.getTabPosition(tab4));
        assertEquals(2, tabSheet.getTabPosition(tab2));
        assertEquals(3, tabSheet.getTabPosition(tab5));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.