use of com.extjs.gxt.ui.client.widget.layout.FormLayout in project geo-platform by geosdi.
the class GPPrintWidget method addCheckPrintBaseMap.
private void addCheckPrintBaseMap() {
fieldSet = new FieldSet();
fieldSet.setHeadingHtml(INSTANCE.GPPrintWidget_checkPrintFieldSetHeadingText());
FormLayout layout = new FormLayout();
layout.setLabelWidth(100);
layout.setLabelPad(5);
fieldSet.setLayout(layout);
this.checkPrintBaseMap = new CheckBox();
this.checkPrintBaseMap.setFieldLabel(INSTANCE.GPPrintWidget_checkBoxPrintBaseMapFieldLabelText());
this.checkPrintBaseMap.setToolTip(INSTANCE.GPPrintWidget_checkBoxPrintBaseMapTooltipText());
fieldSet.add(this.checkPrintBaseMap);
super.formPanel.add(fieldSet);
}
use of com.extjs.gxt.ui.client.widget.layout.FormLayout in project geo-platform by geosdi.
the class GPPrintWidget method addScaleCombo.
private void addScaleCombo() {
fieldSet = new FieldSet();
fieldSet.setHeadingHtml(INSTANCE.GPPrintWidget_scaleFieldSetHeadingText());
FormLayout layout = new FormLayout();
layout.setLabelWidth(100);
layout.setLabelPad(5);
fieldSet.setLayout(layout);
this.storeScale = new ListStore<Scale>();
this.storeScale.add(PrintUtility.getScale());
this.comboScale = new ComboBox<Scale>();
this.comboScale.setFieldLabel(INSTANCE.GPPrintWidget_comboScaleFieldLabelText());
// this.comboScale.setEmptyText("Choose Scale....");
this.comboScale.setValue(new Scale("1:4.000.000"));
this.comboScale.setDisplayField(Scale.ScaleEnum.SCALE.getValue());
this.comboScale.setEditable(false);
this.comboScale.setAllowBlank(false);
this.comboScale.setForceSelection(true);
this.comboScale.setTypeAhead(true);
this.comboScale.setTriggerAction(TriggerAction.ALL);
this.comboScale.setStore(this.storeScale);
fieldSet.add(this.comboScale);
super.formPanel.add(fieldSet);
comboScale.addSelectionChangedListener(new SelectionChangedListener<Scale>() {
@Override
public void selectionChanged(SelectionChangedEvent<Scale> se) {
if (se != null) {
if (GPApplicationMap.getInstance().getApplicationMap().getMap().getLayerByName(PRINT_VECTOR_NAME) != null) {
printExtent.removeAllFeatures();
String scaleString = se.getSelectedItem().getScale();
String scaleStringRight = scaleString.substring(scaleString.indexOf(":") + 1);
String scaleStringWithoutDot = scaleStringRight.replaceAll("\\.", "");
float scale = Float.parseFloat(scaleStringWithoutDot);
printExtent.addFeature(PrintUtility.updateRectangle(GPApplicationMap.getInstance().getApplicationMap().getMap().getCenter(), scale, GPApplicationMap.getInstance().getApplicationMap().getMap(), sizeFactor, rotation));
}
}
}
});
}
use of com.extjs.gxt.ui.client.widget.layout.FormLayout in project geo-platform by geosdi.
the class INCQLButton method initialize.
@Override
protected void initialize() {
formData = new FormData("98%");
final CQLLayerAttributesComboBox attributesComboBox = new CQLLayerAttributesComboBox(this.treePanel);
attributesComboBox.setFieldLabel(LayerFiltersModuleConstants.INSTANCE.INCQLButton_attributeLabelText());
this.parameter1.setFieldLabel(LayerFiltersModuleConstants.INSTANCE.INCQLButton_parameter1LabelText());
this.parameter2.setFieldLabel(LayerFiltersModuleConstants.INSTANCE.INCQLButton_parameter2LabelText());
this.parameterPanel.setHeaderVisible(Boolean.FALSE);
this.parameterPanel.add(parameter1, formData);
this.parameterPanel.add(parameter2, formData);
this.fieldList.add(parameter1);
this.fieldList.add(parameter2);
this.insertButton = new Button(ButtonsConstants.INSTANCE.insertText(), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent be) {
String attribute = null;
if (attributesComboBox.getValue() != null) {
attribute = attributesComboBox.getValue().get(GPAttributeKey.ATTRIBUTE_VALUE.toString()).toString();
}
attribute = attribute != null ? attribute + " " : "";
StringBuilder stringToInsert = new StringBuilder(attribute);
stringToInsert.append("IN(");
boolean isFirstIteration = true;
for (GPSecureStringTextField textField : fieldList) {
String parameterValue = textField.getValue();
if (isFirstIteration) {
stringToInsert.append(parameterValue);
isFirstIteration = false;
} else {
stringToInsert.append(", ");
stringToInsert.append(parameterValue);
}
}
stringToInsert.append(")");
INCQLButton.super.insertTextIntoFilterArea(stringToInsert.toString());
window.hide();
}
});
super.window = new GeoPlatformWindow(true) {
@Override
public void addComponent() {
add(new Label(LayerFiltersModuleConstants.INSTANCE.INCQLButton_windowResultLabelText()));
add(attributesComboBox, formData);
add(parameterPanel, formData);
Button addExpressionButton = new Button(LayerFiltersModuleConstants.INSTANCE.INCQLButton_windowAddParameterButtonText());
addExpressionButton.setIcon(AbstractImagePrototype.create(BasicWidgetResources.ICONS.done()));
addExpressionButton.setToolTip(LayerFiltersModuleConstants.INSTANCE.INCQLButton_windowExpressionTooltipText());
addExpressionButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
INCQLButton.this.addParameterFieldRow();
}
});
add(addExpressionButton);
add(new Label(LayerFiltersModuleConstants.INSTANCE.INCQLButton_windowResultLabelText()));
insertButton.disable();
addButton(insertButton);
}
@Override
public void initSize() {
super.setSize("370", "350");
}
@Override
public void setWindowProperties() {
super.setHeadingHtml(LayerFiltersModuleConstants.INSTANCE.INCQLButton_windowHeadingText());
super.setLayout(new FormLayout());
}
};
this.keyUplistener = new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
for (GPSecureStringTextField textField : fieldList) {
String parameterValue = textField.getValue();
if (parameterValue == null || parameterValue.isEmpty()) {
insertButton.disable();
return;
}
}
insertButton.enable();
}
};
parameter1.addListener(Events.OnKeyUp, keyUplistener);
parameter2.addListener(Events.OnKeyUp, keyUplistener);
attributesComboBox.addSelectionChangedListener(new SelectionChangedListener<GPLayerAttributes>() {
@Override
public void selectionChanged(SelectionChangedEvent<GPLayerAttributes> se) {
keyUplistener.handleEvent(se);
}
});
super.initialized = Boolean.TRUE;
}
use of com.extjs.gxt.ui.client.widget.layout.FormLayout in project geo-platform by geosdi.
the class TimeInputWidget method setWindowProperties.
@Override
public void setWindowProperties() {
super.setHeadingHtml("Time Filter Composition");
super.setLayout(new FormLayout());
super.setModal(true);
}
use of com.extjs.gxt.ui.client.widget.layout.FormLayout in project geo-platform by geosdi.
the class CSWServerFormWidget method createFieldSet.
private void createFieldSet() {
fieldSet = new FieldSet();
fieldSet.setHeadingHtml(CatalogFinderConstants.INSTANCE.CSWServerFormWidget_fieldSetHeadingText());
FormLayout layout = new FormLayout();
layout.setLabelWidth(70);
layout.setDefaultWidth(250);
fieldSet.setLayout(layout);
aliasField = new GPSecureStringTextField();
aliasField.setFieldLabel(CatalogFinderConstants.INSTANCE.CSWServerFormWidget_aliasFieldLabelText());
aliasField.setEmptyText(CatalogFinderConstants.INSTANCE.CSWServerFormWidget_aliasEmptyText());
aliasField.setToolTip(CatalogFinderConstants.INSTANCE.CSWServerFormWidget_aliasTooltipText());
aliasField.setAllowBlank(false);
aliasField.setAutoValidate(true);
urlField = new GPSecureStringTextField();
urlField.setFieldLabel(CatalogFinderConstants.INSTANCE.CSWServerFormWidget_urlFieldLabelText());
urlField.setEmptyText(CatalogFinderConstants.INSTANCE.CSWServerFormWidget_urlEmptyText());
urlField.setToolTip(CatalogFinderConstants.INSTANCE.CSWServerFormWidget_urlTooltipText());
urlField.setAllowBlank(false);
urlField.setAutoValidate(true);
urlField.setValidator(new Validator() {
@Override
public String validate(Field<?> field, String value) {
if (!value.startsWith("http://") && !value.startsWith("https://")) {
return CatalogFinderConstants.INSTANCE.CSWServerFormWidget_urlValidateMessageText();
}
urlEncoding = deleteQueryStringFromURL(value.trim());
return null;
}
});
fieldSet.add(aliasField);
fieldSet.add(urlField);
formPanel.add(fieldSet);
}
Aggregations