Examples of RadioGroupItem


Examples of com.smartgwt.client.widgets.form.fields.RadioGroupItem

        TextItem nameItem = new TextItem();
        nameItem.setType("text");
        nameItem.setName("name");

        RadioGroupItem radioGroupItem = new RadioGroupItem("sharing");
        radioGroupItem.setTitle("Sharing");
        radioGroupItem.setVertical(false);
        radioGroupItem.setValueMap("Public", "Private");
        radioGroupItem.setWidth(50);
       
        calendar.setEventDialogFields(nameItem, radioGroupItem);

        return calendar;
    }
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.RadioGroupItem

        form.setBackgroundColor("white");
        form.setBorder("1px solid #6a6a6a");
        form.setTitlePrefix("<b>");
        form.setTitleSuffix("<b>");

        RadioGroupItem radioGroupItem = new RadioGroupItem();
        radioGroupItem.setName("Acceleration");
        radioGroupItem.setValueMap("smoothStart", "smoothEnd", "smoothStartEnd", "none", "custom");
        radioGroupItem.setDefaultValue("smoothEnd");
        radioGroupItem.addChangedHandler(new ChangedHandler() {
            public void onChanged(ChangedEvent event) {
                String value = event.getValue().toString();
                if (value.equals("custom")) {

                } else {
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.RadioGroupItem

        styleMap.put("exampleStyleOnline", "Online");
        styleMap.put("exampleStyleLegal", "Legal");
        styleMap.put("exampleStyleCode", "Code");
        styleMap.put("exampleStyleInformal", "Informal");
       
        RadioGroupItem style = new RadioGroupItem();
        style.setDefaultValue("exampleStyleOnline");
        style.setShowTitle(false);
        style.setValueMap(styleMap);
        style.addChangedHandler(new ChangedHandler() {
            public void onChanged(ChangedEvent event) {
                textBox.setStyleName((String)event.getValue());
                textBox.markForRedraw();
            }
        });
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.RadioGroupItem

        countryGrid.setFields(countryCodeField, nameField, capitalField, continentField);
        countryGrid.setCanResizeFields(true);
        countryGrid.setData(CountryData.getRecords());

        DynamicForm form = new DynamicForm();
        RadioGroupItem radioGroupItem = new RadioGroupItem();
        radioGroupItem.setShowTitle(false);
        radioGroupItem.setValueMap("Left", "Center", "Right");
        radioGroupItem.setDefaultValue("Center");
        radioGroupItem.addChangedHandler(new ChangedHandler() {
            public void onChanged(ChangedEvent event) {
                String newValue = (String) event.getValue();
                ListGridField field = countryGrid.getField("countryCode");
                field.setAlign(Alignment.valueOf(newValue.toUpperCase()));
                countryGrid.markForRedraw();
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.RadioGroupItem

    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());
View Full Code Here

Examples of com.smartgwt.client.widgets.form.fields.RadioGroupItem

        final DynamicForm form = new DynamicForm();
        form.setWidth(250);
        form.setTitleOrientation(TitleOrientation.TOP);

        final RadioGroupItem radioGroupItem = new RadioGroupItem();
        radioGroupItem.setName("willAttend");
        radioGroupItem.setColSpan("*");
        radioGroupItem.setRequired(true);
        radioGroupItem.setVertical(false);
        radioGroupItem.setValueMap("Yes", "No");
        radioGroupItem.setRedrawOnChange(true);
        radioGroupItem.setTitle("Will you be attending the meeting on April 4th? If no, please provide a reason");

        TextItem textItem = new TextItem();
        textItem.setName("reason");
        textItem.setTitle("Reason");
        RequiredIfValidator ifValidator = new RequiredIfValidator();
        ifValidator.setExpression(new RequiredIfFunction() {
            public boolean execute(FormItem formItem, Object value) {
                String valueStr = (String) radioGroupItem.getValue();
                return "No".equals(valueStr);
            }
        });
        ifValidator.setErrorMessage("Please provide a reason");

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.