Search in sources :

Example 1 with GPSecureStringTextField

use of org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField in project geo-platform by geosdi.

the class GPPrintWidget method addEditPrintSettings.

private void addEditPrintSettings() {
    fieldSet = new FieldSet();
    fieldSet.setHeadingHtml(INSTANCE.GPPrintWidget_editFieldSetHeadingText());
    FormLayout layout = new FormLayout();
    layout.setLabelWidth(100);
    layout.setLabelPad(5);
    fieldSet.setLayout(layout);
    title = new GPSecureStringTextField();
    title.setAllowBlank(false);
    title.setName(GPPrintEnumBean.GPPRINT_TITLE.toString());
    title.setFieldLabel(INSTANCE.GPPrintWidget_titleLabelText());
    fieldSet.add(title);
    mapTitle = new GPSecureStringTextField();
    mapTitle.setName(GPPrintEnumBean.GPPRINT_MAP_TITLE.toString());
    mapTitle.setFieldLabel(INSTANCE.GPPrintWidget_mapTitleLabelText());
    fieldSet.add(mapTitle);
    comments = new GPSecureStringTextArea();
    comments.setName(GPPrintEnumBean.GPPRINT_COMMENTS.toString());
    comments.setPreventScrollbars(true);
    comments.setFieldLabel(INSTANCE.GPPrintWidget_commentsLabelText());
    comments.setSize(150, 150);
    fieldSet.add(comments);
    this.formPanel.add(fieldSet);
}
Also used : FormLayout(com.extjs.gxt.ui.client.widget.layout.FormLayout) GPSecureStringTextField(org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField) FieldSet(com.extjs.gxt.ui.client.widget.form.FieldSet) GPSecureStringTextArea(org.geosdi.geoplatform.gui.configuration.GPSecureStringTextArea)

Example 2 with GPSecureStringTextField

use of org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField in project geo-platform by geosdi.

the class AddFolderWidget method addComponentToForm.

@Override
public void addComponentToForm() {
    this.fieldSet = new FieldSet();
    this.fieldSet.setHeadingHtml(LayerModuleConstants.INSTANCE.AddFolderWidget_fieldSetHeadingText());
    FormLayout layout = new FormLayout();
    layout.setLabelWidth(40);
    fieldSet.setLayout(layout);
    this.folderText = new GPSecureStringTextField();
    this.folderText.setFieldLabel(LayerModuleConstants.INSTANCE.AddFolderWidget_folderLabelText());
    this.folderText.addKeyListener(new KeyListener() {

        @Override
        public void componentKeyUp(ComponentEvent event) {
            if (folderText.getValue() == null) {
                if ((event.getKeyCode() == KeyCodes.KEY_BACKSPACE) || (event.getKeyCode() == KeyCodes.KEY_DELETE)) {
                    reset();
                }
            } else {
                if (folderText.getValue().length() > 0) {
                    save.enable();
                } else {
                    save.disable();
                }
            }
        }

        @Override
        public void componentKeyPress(ComponentEvent event) {
            if ((event.getKeyCode() == KeyCodes.KEY_ENTER) && (folderText.getValue() != null) && (folderText.getValue().length() > 0)) {
                execute();
            }
        }
    });
    this.fieldSet.add(this.folderText);
    this.getFormPanel().add(this.fieldSet);
    this.saveStatus = new SaveStatus();
    this.saveStatus.setAutoWidth(true);
    this.getFormPanel().getButtonBar().add(this.saveStatus);
    getFormPanel().setButtonAlign(HorizontalAlignment.RIGHT);
    save = new Button(ButtonsConstants.INSTANCE.createText(), AbstractImagePrototype.create(LayerResources.ICONS.addFolder()), new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            execute();
        }
    });
    save.setEnabled(false);
    this.getFormPanel().addButton(save);
    this.cancel = new Button(ButtonsConstants.INSTANCE.cancelText(), AbstractImagePrototype.create(BasicWidgetResources.ICONS.cancel()), new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            clearComponents();
        }
    });
    this.getFormPanel().addButton(cancel);
    setFocusWidget(this.folderText);
}
Also used : FormLayout(com.extjs.gxt.ui.client.widget.layout.FormLayout) GPSecureStringTextField(org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField) FieldSet(com.extjs.gxt.ui.client.widget.form.FieldSet) Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent) KeyListener(com.extjs.gxt.ui.client.event.KeyListener) ComponentEvent(com.extjs.gxt.ui.client.event.ComponentEvent) SaveStatus(org.geosdi.geoplatform.gui.client.widget.SaveStatus) EnumSaveStatus(org.geosdi.geoplatform.gui.client.widget.SaveStatus.EnumSaveStatus) SelectionListener(com.extjs.gxt.ui.client.event.SelectionListener)

Example 3 with GPSecureStringTextField

use of org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField in project geo-platform by geosdi.

the class LoadKmlFromUrlWidget method addComponentToForm.

@Override
public void addComponentToForm() {
    super.fieldSet = new FieldSet();
    super.fieldSet.setHeadingHtml(LayerModuleConstants.INSTANCE.LoadKmlFromUrlWidget_fieldSetHeadingText());
    FormLayout layout = new FormLayout();
    layout.setLabelWidth(40);
    super.fieldSet.setLayout(layout);
    urlText = new GPSecureStringTextField();
    urlText.setFieldLabel(LayerModuleConstants.INSTANCE.urlLabelText());
    this.addListenerToUrlText();
    super.fieldSet.add(urlText);
    super.getFormPanel().add(super.fieldSet);
    super.saveStatus = new KmlUrlStatus();
    super.saveStatus.setAutoWidth(true);
    super.getFormPanel().getButtonBar().add(super.saveStatus);
    super.getFormPanel().setButtonAlign(HorizontalAlignment.RIGHT);
    buttonAdd = new Button(ButtonsConstants.INSTANCE.addText(), AbstractImagePrototype.create(LayerResources.ICONS.addRasterLayer()), new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            execute();
        }
    });
    buttonAdd.setEnabled(false);
    super.getFormPanel().addButton(buttonAdd);
    Button buttonCancel = new Button(ButtonsConstants.INSTANCE.cancelText(), AbstractImagePrototype.create(BasicWidgetResources.ICONS.cancel()), new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            clearComponents();
        }
    });
    super.getFormPanel().addButton(buttonCancel);
    setFocusWidget(urlText);
}
Also used : FormLayout(com.extjs.gxt.ui.client.widget.layout.FormLayout) GPSecureStringTextField(org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField) FieldSet(com.extjs.gxt.ui.client.widget.form.FieldSet) Button(com.extjs.gxt.ui.client.widget.button.Button) ButtonEvent(com.extjs.gxt.ui.client.event.ButtonEvent) EnumKmlUrlStatus(org.geosdi.geoplatform.gui.client.widget.form.KmlUrlStatus.EnumKmlUrlStatus) SelectionListener(com.extjs.gxt.ui.client.event.SelectionListener)

Example 4 with GPSecureStringTextField

use of org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField in project geo-platform by geosdi.

the class CSWServerPaginationContainer method createSearchComponent.

private void createSearchComponent() {
    searchField = new GPSecureStringTextField();
    searchField.setFieldLabel(CatalogFinderConstants.INSTANCE.CSWServerPaginationContainer_searchFieltLabelText());
    searchField.addKeyListener(new KeyListener() {

        @Override
        public void componentKeyUp(ComponentEvent event) {
            if (((event.getKeyCode() == KeyCodes.KEY_BACKSPACE) || (event.getKeyCode() == KeyCodes.KEY_DELETE)) && (searchField.getValue() == null)) {
                reset();
            }
        }

        @Override
        public void componentKeyPress(ComponentEvent event) {
            if ((event.getKeyCode() == KeyCodes.KEY_ENTER)) {
                loader.load(0, getPageSize());
            }
        }
    });
    FieldSet searchFieldSet = new FieldSet();
    searchFieldSet.setBorders(false);
    searchFieldSet.setSize(350, 40);
    FormLayout layout = new FormLayout();
    layout.setLabelWidth(80);
    searchFieldSet.setLayout(layout);
    searchFieldSet.add(searchField);
    super.panel.add(searchFieldSet);
}
Also used : FormLayout(com.extjs.gxt.ui.client.widget.layout.FormLayout) GPSecureStringTextField(org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField) FieldSet(com.extjs.gxt.ui.client.widget.form.FieldSet)

Example 5 with GPSecureStringTextField

use of org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField in project geo-platform by geosdi.

the class CatalogBBoxComponent method addRightComponents.

private void addRightComponents(FlexTable table) {
    table.getCellFormatter().setHorizontalAlignment(1, 4, HasHorizontalAlignment.ALIGN_CENTER);
    Label maxLonLabel = new Label(CatalogFinderConstants.INSTANCE.CatalogBBoxComponent_maxLonLabelText());
    maxLonLabel.setStyleName("catalogBBOX-Label");
    table.setWidget(1, 4, maxLonLabel);
    table.getCellFormatter().getElement(1, 4).getStyle().setPaddingLeft(40, Unit.PX);
    maxLonField = new GPSecureStringTextField();
    maxLonField.setWidth(55);
    maxLonField.setReadOnly(true);
    maxLonField.setFireChangeEventOnSetValue(true);
    maxLonField.addListener(Events.Change, new Listener<FieldEvent>() {

        @Override
        public void handleEvent(FieldEvent fe) {
            BBox bBox = areaInfo.getBBox();
            double value = (fe.getValue() != null) ? Double.valueOf(fe.getValue().toString()).doubleValue() : 0;
            bBox.setMaxX(value);
        }
    });
    table.getCellFormatter().setHorizontalAlignment(1, 5, HasHorizontalAlignment.ALIGN_CENTER);
    table.setWidget(1, 5, maxLonField);
}
Also used : GPSecureStringTextField(org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField) FieldEvent(com.extjs.gxt.ui.client.event.FieldEvent) BBox(org.geosdi.geoplatform.gui.shared.bean.BBox) Label(com.extjs.gxt.ui.client.widget.Label)

Aggregations

GPSecureStringTextField (org.geosdi.geoplatform.gui.configuration.GPSecureStringTextField)35 FormLayout (com.extjs.gxt.ui.client.widget.layout.FormLayout)15 FieldSet (com.extjs.gxt.ui.client.widget.form.FieldSet)12 Button (com.extjs.gxt.ui.client.widget.button.Button)8 Label (com.extjs.gxt.ui.client.widget.Label)7 ComponentEvent (com.extjs.gxt.ui.client.event.ComponentEvent)6 KeyListener (com.extjs.gxt.ui.client.event.KeyListener)6 FormPanel (com.extjs.gxt.ui.client.widget.form.FormPanel)6 ButtonEvent (com.extjs.gxt.ui.client.event.ButtonEvent)5 FieldEvent (com.extjs.gxt.ui.client.event.FieldEvent)5 SelectionListener (com.extjs.gxt.ui.client.event.SelectionListener)4 CheckBox (com.extjs.gxt.ui.client.widget.form.CheckBox)4 BBox (org.geosdi.geoplatform.gui.shared.bean.BBox)4 ListStore (com.extjs.gxt.ui.client.store.ListStore)3 FormData (com.extjs.gxt.ui.client.widget.layout.FormData)3 FieldSetEvent (com.extjs.gxt.ui.client.event.FieldSetEvent)2 Margins (com.extjs.gxt.ui.client.util.Margins)2 HorizontalPanel (com.extjs.gxt.ui.client.widget.HorizontalPanel)2 LayoutContainer (com.extjs.gxt.ui.client.widget.LayoutContainer)2 CheckBoxGroup (com.extjs.gxt.ui.client.widget.form.CheckBoxGroup)2