List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setSpacing
public void setSpacing(int spacing)
From source file:org.geowe.client.local.main.MenuPanelWidget.java
License:Open Source License
private HorizontalPanel getSpatialToolGroup2Tools() { HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); horizontalGroup.setSpacing(5); horizontalGroup.add(bufferTool);// w w w .ja va2 s .c o m horizontalGroup.add(envelopeTool); horizontalGroup.add(centroidTool); return horizontalGroup; }
From source file:org.geowe.client.local.main.PreviewWidget.java
License:Open Source License
public Widget createPanel() { addLayerButton = new TextButton(UIMessages.INSTANCE.previewAddLayer()); printButton = new TextButton(UIMessages.INSTANCE.previewPrint()); applyButton = new TextButton(UIMessages.INSTANCE.previewApply()); getButtonBar().add(printButton);/*w ww . j ava 2 s.c o m*/ initializeLayerCombo(); HorizontalPanel hPanel = new HorizontalPanel(); hPanel.setSpacing(5); hPanel.add(createFrame()); VerticalPanel vPanel = new VerticalPanel(); vPanel.setSpacing(5); zoomPageComboBox = new IntegerValueComboBox("180px"); zoomPageComboBox.setValues(Arrays.asList(zoomLevel)); vPanel.add(new Label(UIMessages.INSTANCE.previewZoomLevel())); vPanel.add(zoomPageComboBox); vPanel.add(new Label(UIMessages.INSTANCE.sbSelectLayerLabel())); vPanel.add(layerCombo); vPanel.add(addLayerButton); titleField = new TextField(); titleField.setEnabled(true); titleField.setWidth("280px"); vPanel.add(new Label(UIMessages.INSTANCE.projectTitle())); vPanel.add(titleField); descriptionField = new TextArea(); descriptionField.setEnabled(true); descriptionField.setWidth("280px"); descriptionField.setHeight("200px"); vPanel.add(new Label(UIMessages.INSTANCE.projectDescription())); htmlEditor = new HtmlEditor(); htmlEditor.setEnabled(true); htmlEditor.setWidth("280px"); htmlEditor.setHeight("200px"); vPanel.add(htmlEditor); vPanel.add(applyButton); hPanel.add(vPanel); return hPanel; }
From source file:org.geowe.client.local.main.tool.featureinfo.FeatureInfoToolBar.java
License:Open Source License
public void initialize(GridEditing<FeatureAttributeBean> gridEditing, ListStore<FeatureAttributeBean> featureAttributes) { this.gridEditing = gridEditing; this.featureAttributes = featureAttributes; setHeaderVisible(false);/*from w w w . j av a2s. c om*/ addStyleName(ThemeStyles.get().style().borderBottom()); HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.add(getEditButton()); horizontalGroup.add(getClearButton()); horizontalGroup.add(getWKTButton()); horizontalGroup.add(getExportCSVButton()); setWidget(horizontalGroup); }
From source file:org.geowe.client.local.main.tool.info.RasterInfoDialog.java
License:Open Source License
private Widget createPanel() { String fieldWidth = "225px"; HorizontalPanel hPanel = new HorizontalPanel(); hPanel.setSpacing(10); // Panel izquierdo VerticalPanel leftPanel = new VerticalPanel(); leftPanel.setSpacing(5);//ww w. j a v a 2s .co m layerNameField = new TextField(); layerNameField.setEnabled(false); layerNameField.setWidth(fieldWidth); leftPanel.add(new Label((UIMessages.INSTANCE.lidLayerNameLabel()))); leftPanel.add(layerNameField); projectionField = new TextField(); projectionField.setEnabled(false); projectionField.setWidth(fieldWidth); leftPanel.add(new Label((UIMessages.INSTANCE.lidProjectionLabel()))); leftPanel.add(projectionField); baseLayerField = new TextField(); baseLayerField.setEnabled(false); baseLayerField.setWidth(fieldWidth); leftPanel.add(new Label((UIMessages.INSTANCE.baseLayer()))); leftPanel.add(baseLayerField); layerZoomField = new TextField(); layerZoomField.setEnabled(false); layerZoomField.setWidth(fieldWidth); leftPanel.add(new Label((UIMessages.INSTANCE.mpZoomToolsLabel() + "(min/max)"))); leftPanel.add(layerZoomField); // Panel derecho VerticalPanel rightPanel = new VerticalPanel(); leftPanel.setSpacing(5); layerScalesTextArea = new TextArea(); layerScalesTextArea.setSize(fieldWidth, "100px"); layerScalesTextArea.setEnabled(false); rightPanel.add(new Label((UIMessages.INSTANCE.scales()))); rightPanel.add(layerScalesTextArea); layerScalesTextArea.setToolTip(UIMessages.INSTANCE.scalesDescription()); layerResolutionsTextArea = new TextArea(); layerResolutionsTextArea.setSize(fieldWidth, "100px"); layerResolutionsTextArea.setEnabled(false); rightPanel.add(new Label((UIMessages.INSTANCE.resolution()))); rightPanel.add(layerResolutionsTextArea); layerResolutionsTextArea.setToolTip(UIMessages.INSTANCE.resolutionsDescription()); hPanel.add(leftPanel); hPanel.add(rightPanel); return hPanel; }
From source file:org.geowe.client.local.main.tool.search.AttributeSearchDialog.java
License:Open Source License
private HorizontalPanel createAttrPanel() { HorizontalPanel hPanel = new HorizontalPanel(); hPanel.setSpacing(10); hPanel.addStyleName(ThemeStyles.get().style().borderBottom()); hPanel.addStyleName(ThemeStyles.get().style().borderTop()); hPanel.add(getAttrCombo());//from ww w . ja v a 2 s.c o m hPanel.add(getAttrValuePanel()); return hPanel; }
From source file:org.geowe.client.local.main.tool.search.AttributeSearchDialog.java
License:Open Source License
private HorizontalPanel createSearchButtonPanel() { HorizontalPanel hPanel = new HorizontalPanel(); hPanel.setSpacing(10); searchButton = getSearchMenuButton(); hPanel.add(searchButton);/*from w w w . j a va 2s . c om*/ isCaseSensitive = new CheckBox(); isCaseSensitive.setBoxLabel(UIMessages.INSTANCE.caseSensitive()); isCaseSensitive.setValue(true); hPanel.add(isCaseSensitive); return hPanel; }
From source file:org.geowe.client.local.main.tool.spatial.geoprocess.dialog.GeoprocessDialog.java
License:Open Source License
private HorizontalPanel getHorizontalPanel() { final HorizontalPanel horizontalGroup = new HorizontalPanel(); horizontalGroup.setSpacing(5); horizontalGroup.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE); return horizontalGroup; }
From source file:org.geowe.client.local.style.ColorStyleTab.java
License:Open Source License
@Override protected void initializePanel() { String fieldWidth = "125px"; fillColor = new TextField(); fillColor.setWidth(fieldWidth);/*from w w w .j a v a 2s . c o m*/ addFocusHandler(fillColor); fillOpacity = new Slider(); fillOpacity.setWidth(fieldWidth); fillOpacity.setValue(0); fillOpacity.setIncrement(1); lineColor = new TextField(); lineColor.setWidth(fieldWidth); addFocusHandler(lineColor); lineThick = new Slider(); lineThick.setWidth(fieldWidth); lineThick.setValue(0); lineThick.setMaxValue(20); lineThick.setIncrement(1); colorPicker = new ColorPicker(); colorPicker.addSelectedColorChangedListener(this); HorizontalPanel mainPanel = new HorizontalPanel(); mainPanel.setSpacing(10); VerticalLayoutContainer vlc = new VerticalLayoutContainer(); vlc.add(new FieldLabel(fillColor, UIMessages.INSTANCE.vlswFillcolor()), new VerticalLayoutData(-18, -1)); vlc.add(new FieldLabel(fillOpacity, UIMessages.INSTANCE.vlswFillopacity()), new VerticalLayoutData(-18, -1)); vlc.add(new FieldLabel(lineColor, UIMessages.INSTANCE.vlswStrokeColor()), new VerticalLayoutData(-18, -1)); vlc.add(new FieldLabel(lineThick, UIMessages.INSTANCE.vlswStrokeWidth()), new VerticalLayoutData(-18, -1)); mainPanel.add(vlc); mainPanel.add(colorPicker); panel.add(mainPanel); }
From source file:org.geowe.client.local.style.LabelStyleTab.java
License:Open Source License
@Override protected void initializePanel() { String fieldWidth = "125px"; attributeLabel = new FeatureAttributeComboBox(fieldWidth); attributeLabel.setEnabled(false);//from w w w. j a va2 s.c o m fontSize = new FontSizeComboBox(fieldWidth); fontSize.setEnabled(false); boldFont = new CheckBox(); boldFont.setValue(false); boldFont.setEnabled(false); labelBackColor = new TextField(); labelBackColor.setEnabled(false); labelBackColor.setWidth(fieldWidth); labelBackColor.addFocusHandler(new FocusHandler() { @Override public void onFocus(FocusEvent event) { colorPicker.slide(true); } }); colorPicker = new ColorPicker(); colorPicker.addSelectedColorChangedListener(this); colorPicker.setEnabled(false); enableLabeling = new CheckBox(); enableLabeling.setBoxLabel(UIMessages.INSTANCE.enableLabelStyle()); enableLabeling.setValue(false); enableLabeling.addValueChangeHandler(new ValueChangeHandler<Boolean>() { @Override public void onValueChange(ValueChangeEvent<Boolean> event) { attributeLabel.setEnabled(event.getValue()); fontSize.setEnabled(event.getValue()); boldFont.setEnabled(event.getValue()); labelBackColor.setEnabled(event.getValue()); colorPicker.slide(event.getValue()); colorPicker.setEnabled(event.getValue()); } }); HorizontalPanel mainPanel = new HorizontalPanel(); mainPanel.setSpacing(8); VerticalLayoutContainer attrStyleContainer = new VerticalLayoutContainer(); attrStyleContainer.add(new FieldLabel(attributeLabel, UIMessages.INSTANCE.vlswLabelAttribute()), new VerticalLayoutData(-18, -1)); attrStyleContainer.add(new FieldLabel(fontSize, UIMessages.INSTANCE.vlsFontSize()), new VerticalLayoutData(-18, -1)); attrStyleContainer.add(new FieldLabel(boldFont, UIMessages.INSTANCE.vlsFontBold()), new VerticalLayoutData(-18, -1)); attrStyleContainer.add(new FieldLabel(labelBackColor, UIMessages.INSTANCE.background()), new VerticalLayoutData(-18, -1)); mainPanel.add(attrStyleContainer); mainPanel.add(colorPicker); panel.setSpacing(2); panel.add(enableLabeling); panel.add(mainPanel); }
From source file:org.geowe.client.local.style.SimpleThemingVerticalLegend.java
License:Open Source License
@Override protected List<Widget> getData() { Map<String, String> attrColorMap = createAttributeColorMap(); List<Widget> widgets = new ArrayList<Widget>(); for (Entry<String, String> attr : attrColorMap.entrySet()) { HorizontalPanel hpanel = new HorizontalPanel(); hpanel.setSpacing(2); hpanel.add(getColorPanel(attr.getValue())); hpanel.add(new Label(attr.getKey())); widgets.add(hpanel);//from w w w . ja v a 2 s . c o m } return widgets; }