Package com.smartgwt.client.widgets.tab

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


    TabSet tabs = new TabSet();
    tabs.setWidth(PrintingLayout.printPreferencesWidth);
    tabs.setHeight(PrintingLayout.printPreferencesHeight);

    // create the one and only tab pane
    Tab mainPreferences = new Tab();
    mainPreferences.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(PrintingLayout.printPreferencesResolutionWidth);
    rasterDpiSlider.setHeight(PrintingLayout.printPreferencesResolutionHeight);
    rasterDpiSlider.setMinValue(72);
    rasterDpiSlider.setMaxValue(600);
    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() + EXTENSION);

    // progress indicator
    barIcon = new FormItemIcon();
    barIcon.setHeight(PrintingLayout.iconWaitHeight);
    barIcon.setWidth(PrintingLayout.iconWaitWidth);
    StaticTextItem statusText = new StaticTextItem(MESSAGES.printPrefsStatus());
    statusText.setIcons(barIcon);
    barIcon.setSrc(PrintingLayout.iconWaitBlank);
    // download type
    downloadTypeGroup = new RadioGroupItem();
    downloadTypeGroup.setName(DOWNLOAD_TYPE);
    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);
    mainPreferences.setPane(form);
    tabs.setTabs(mainPreferences);

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


    leafTabs.setTop(handleVertical(10));
    leafTabs.setWidth(/* handleHorizontal */(250));
    leafTabs.setHeight(handleVertical(180));

    leafTabs.setLeft(handleHorizontal(880));
    Tab regex = new Tab("Expression");
    regex.setID("i1");
    handleRegex(regex);
    Tab vals = new Tab("Allowed<br />Values");
    vals.setID("i2");

    handleVals(vals);
    Tab chars = new Tab("Allowed<br />Chars");
    chars.setID("i3");

    handleChars(chars);
    leafTabs.setTabs(chars, vals, regex);

    return leafTabs;
View Full Code Here

  private TabSet getTabs(HLayout layout) {
    TabSet tabSet = new TabSet();
    tabSet.setHeight(handleVertical(350));
    tabSet.setWidth(handleHorizontal(1210));
    Tab treeTab = new Tab("Tree View");
    treeTab.setPane(layout);
    Tab xsdTab = new Tab("XSD View");
    DynamicForm textForm = new DynamicForm();
    textForm.setTop(handleVertical(10));
    final TextAreaItem textAreaItem = new TextAreaItem();
    textAreaItem.setWrap(TextAreaWrap.HARD);
    textAreaItem.setTitle("XSD");
    textAreaItem.setWidth(handleHorizontal(1100));
    textAreaItem.setHeight(handleVertical(300));
    textForm.setFields(textAreaItem);
    xsdTab.setPane(textForm);

    tabSet.setTabs(treeTab, xsdTab);
    tabSet.setTop(handleVertical(50));

    tabSet.addTabSelectedHandler(new TabSelectedHandler() {
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.