Package com.smartgwt.client.widgets.form

Examples of com.smartgwt.client.widgets.form.DynamicForm


      public void onClick(ClickEvent event) {
        onRedo();
      }
    });

    frmBuffer = new DynamicForm();
    frmBuffer.setWidth100();
    spiBuffer = new SpinnerItem();
    spiBuffer.setTitle(messages.geometricSearchWidgetBufferLabel());
    spiBuffer.setDefaultValue(5);
    spiBuffer.setMin(0);
View Full Code Here


    geocoderSource.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
        geocoderWidget.setServicePattern((String) event.getValue());
      }
    });
    DynamicForm geocoderSourceForm = new DynamicForm();
    geocoderSourceForm.setFields(geocoderSource);
    toolbar.addMember(geocoderSourceForm);

    layout.addMember(toolbar);
    layout.addMember(map);
    return layout;
View Full Code Here

      group.setPadding(5);
      group.setIsGroup(true);
      group.setWidth100();
      group.setGroupTitle(messages.favouritesControllerAddGroupTitle());

      final DynamicForm form = new DynamicForm();
      final TextItem nameItem = new TextItem();
      nameItem.setWidth(190);
      nameItem.setTitle(messages.favouritesControllerAddName());
      nameItem.setTooltip(messages.favouritesControllerAddNameTooltip());
      nameItem.setRequired(true);
      final CheckboxItem sharedItem = new CheckboxItem();
      sharedItem.setTitle(messages.favouritesControllerAddShared());
      sharedItem.setTooltip(messages.favouritesControllerAddSharedTooltip());
      final TextItem lastEditItem = new TextItem();
      lastEditItem.setWidth(190);
      lastEditItem.setDisabled(true);
      lastEditItem.setTitle(messages.searchFavouritesListWidgetLastChangeBy());
      final DateItem lastEditDateItem = new DateItem();
      lastEditDateItem.setDisabled(true);
      lastEditDateItem.setUseTextField(true);
      lastEditDateItem.setTitle(messages.searchFavouritesListWidgetLastChange());
      form.setFields(nameItem, sharedItem, lastEditItem, lastEditDateItem);

      HLayout buttonlayout = new HLayout(10);
      buttonlayout.setHeight(20);
      buttonlayout.setWidth100();
      HLayout frmButtonlayout = new HLayout(10);
      frmButtonlayout.setHeight(20);
      frmButtonlayout.setWidth100();

      final IButton saveButton = new IButton(messages.searchFavouritesListWidgetSave());
      saveButton.setIcon(BTN_SAVE_IMG);
      saveButton.setAutoFit(true);
      saveButton.setShowDisabledIcon(false);
      saveButton.setDisabled(true);
      saveButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          SearchFavourite oldFav = flr.getFavourite();
          SearchFavourite newFav = (SearchFavourite) oldFav.clone();
          newFav.setName(nameItem.getValueAsString());
          newFav.setShared(sharedItem.getValueAsBoolean());
          flr.setFavourite(newFav);
          SearchWidgetRegistry.getFavouritesController().onChangeRequested(
              new FavouriteEvent(oldFav, newFav, SearchFavouritesListPanel.this));
        }
      });

      final IButton cancelButton = new IButton(messages.searchFavouritesListWidgetCancel());
      cancelButton.setIcon(BTN_CANCEL_IMG);
      cancelButton.setAutoFit(true);
      cancelButton.setDisabled(true);
      cancelButton.setShowDisabledIcon(false);
      cancelButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          FavouritesListGrid.this.collapseRecord(record);
          FavouritesListGrid.this.expandRecord(record);
        }
      });

      form.addItemChangedHandler(new ItemChangedHandler() {
        public void onItemChanged(ItemChangedEvent event) {
          if (saveButton.isDisabled()) {
            saveButton.setDisabled(false);
            cancelButton.setDisabled(false);
          }
View Full Code Here

    passwordItem.setWidth(logoWidth - 60);
    passwordItem.setTitle(i18n.loginPassword());
    passwordItem.setWrapTitle(false);

    // Login form:
    loginForm = new DynamicForm();
    loginForm.setAutoFocus(true);
    loginForm.setNumCols(2);
    loginForm.setWidth(logoWidth);
    loginForm.setLayoutAlign(Alignment.CENTER);
    loginForm.setFields(userNameItem, passwordItem);
View Full Code Here

      VLayout leftLayout = new VLayout();
      leftLayout.setAlign(Alignment.LEFT);

      HLayout layerLayout = new HLayout();
      layerLayout.setWidth(420);
      DynamicForm layerForm = new DynamicForm();
      layerForm.setHeight(30);
      if (manualLayerSelection) {
        layerSelect = new SelectItem();
        layerSelect.setTitle(I18nProvider.getSearch().labelLayerSelected());
        layerSelect.setWidth(250);
        layerSelect.setHint(I18nProvider.getSearch().labelNoLayerSelected());
        ((SelectItem) layerSelect).setShowHintInField(true);
        layerSelect.addChangedHandler(new ChangedHandler() {
          public void onChanged(ChangedEvent event) {
            String layerLabel = (String) event.getValue();
            for (Layer<?> vLayer : mapModel.getLayers()) {
              if (vLayer.getLabel().equals(layerLabel)) {
                setLayer((VectorLayer) vLayer);
              }
            }
          }
        });
        mapModel.addMapModelHandler(new MapModelHandler() {
          public void onMapModelChange(MapModelEvent event) {
            updateLayerList();
          }
        });
        updateLayerList();
      } else {
        mapModel.addLayerSelectionHandler(new LayerSelectionHandler() {
          public void onDeselectLayer(LayerDeselectedEvent event) {
            empty();
            updateLabelTitle(I18nProvider.getSearch().labelNoLayerSelected());
          }

          public void onSelectLayer(LayerSelectedEvent event) {
            if (event.getLayer() instanceof VectorLayer) {
              setLayer((VectorLayer) event.getLayer());
              if (event.getLayer() != null) {
                updateLabelTitle(event.getLayer().getLabel());
              }
            }
          }
        });
        layerSelect = new BlurbItem();
        layerSelect.setShowTitle(true);
        layerSelect.setTitle(I18nProvider.getSearch().labelLayerSelected());
        layerSelect.setWidth(250);
        layerSelect.setValue("<b>" + I18nProvider.getSearch().labelNoLayerSelected() + "</b>");
      }
      layerForm.setFields(layerSelect);
      layerLayout.addMember(layerForm);

      leftLayout.addMember(layerLayout);
      DynamicForm logicalForm = new DynamicForm();
      logicalForm.setAutoWidth();
      logicalForm.setLayoutAlign(Alignment.CENTER);
      logicalForm.setFields(logicalOperatorRadio);
      leftLayout.setWidth(420);
      leftLayout.addMember(logicalForm);

      optionLayout.addMember(leftLayout);
      optionLayout.addMember(new LayoutSpacer());
View Full Code Here

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

        attributeChanged();
      }
    });

    // Finalize:
    form = new DynamicForm();
    form.setNumCols(6);
    form.setHeight(26);
    form.setWidth100();
    form.setFields(attributeSelect, operatorSelect, valueItem);
    addChild(form);
View Full Code Here

     * @param name form item name
     */
    public AttributeFormItem(String name) {
      super(name);

      form = new DynamicForm();
      form.setHeight(26);
      formItem = new BlurbItem();
      formItem.setShowTitle(false);
      formItem.setValue("...................");
      form.setFields(formItem);
View Full Code Here

      sampleMap.addChild(layerLabelOverlay);

      labels = new CheckboxItem();
      initLabels();

      DynamicForm  form = new DynamicForm();
      form.setTitleOrientation(TitleOrientation.TOP);
      form.setHeight(40);
      form.setFields(labels);

      layout.addMember(sampleMap);
      layout.addMember(form);

    } else {
View Full Code Here

      public void onClick(ClickEvent event) {
        onAddClick();
      }
    });

    frmBuffer = new DynamicForm();
    frmBuffer.setWidth100();
    spiBuffer = new SpinnerItem();
    spiBuffer.setTitle(messages.geometricSearchWidgetBufferLabel());
    spiBuffer.setDefaultValue(5);
    spiBuffer.setMin(0);
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.DynamicForm

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.