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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations