Java Code Examples for com.google.gwt.user.client.ui.VerticalPanel#setSpacing()

The following examples show how to use com.google.gwt.user.client.ui.VerticalPanel#setSpacing() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GeoDataImportDialog.java    From geowe-core with GNU General Public License v3.0 6 votes vote down vote up
private VerticalPanel getTextPanel() {
	VerticalPanel geoDataContainer = new VerticalPanel();
	geoDataContainer.setWidth("230px");
	geoDataContainer.setSpacing(5);

	geoDataTextArea = new TextArea();
	geoDataTextArea.setBorders(true);
	geoDataTextArea.setEmptyText(UIMessages.INSTANCE
			.gdidTextAreaEmptyText());
	geoDataTextArea.setWidth(270);
	geoDataTextArea.setHeight(180);
	geoDataContainer.add(new Label(UIMessages.INSTANCE
			.gdidTextAreaTitleLabel()));

	geoDataContainer.add(geoDataTextArea);
	return geoDataContainer;
}
 
Example 2
Source File: CreateEmptyLayerTab.java    From geowe-core with GNU General Public License v3.0 6 votes vote down vote up
public VerticalPanel getEmptyPanel() {
	VerticalPanel geoDataContainer = new VerticalPanel();
	geoDataContainer.setSpacing(5);
	geoDataContainer.setWidth("280px");
	geoDataContainer.setSpacing(5);
	geoDataContainer.add(new Label(UIMessages.INSTANCE
			.createEmptyLayerToolText()));

	createAttributes = new CheckBox();
	createAttributes.setBoxLabel(UIMessages.INSTANCE
			.celtAddAttributesLabel());
	createAttributes.setValue(false);

	geoDataContainer.add(createAttributes);
	return geoDataContainer;
}
 
Example 3
Source File: StatusPanelWidget.java    From geowe-core with GNU General Public License v3.0 6 votes vote down vote up
private void initializeStatusPanel() {
	String comboWidth = "125px";
	statusPanel = new VerticalPanel();
	StyleInjector.inject(".statusPanelStyle { " + "background: #E0ECF8;"
			+ "border-radius: 5px 10px;" + "opacity: 0.8}");
	statusPanel.setStyleName("statusPanelStyle");

	statusPanel.setSpacing(5);
	statusPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

	initializeLayerCombo(comboWidth);
	initializeEpsgCombo(comboWidth);
	initializeStatusGrid();

	statusPanel.add(new FieldLabel(layerCombo, UIMessages.INSTANCE
			.sbSelectLayerLabel()));
	statusPanel.add(new FieldLabel(epsgCombo, UIMessages.INSTANCE
			.sbEpsgLabel()));
	statusPanel.add(statusGrid);

	statusPanel.setVisible(false);
}
 
Example 4
Source File: GitHubExportDialog.java    From geowe-core with GNU General Public License v3.0 6 votes vote down vote up
private Widget createAuthenticationPanel() {
	final VerticalPanel panel = new VerticalPanel();
	panel.getElement().getStyle().setBackgroundColor("#E0ECF8");
	panel.setWidth("350px");		
	panel.setSpacing(10);

	userNameField = new TextField();
	userNameField.setTitle(UIMessages.INSTANCE.gitHubUserNameField());
	userNameField.setEmptyText(UIMessages.INSTANCE.gitHubUserNameField());
	userNameField.setWidth(FIELD_WIDTH);
	panel.add(userNameField);

	passwordField = new PasswordField();		
	passwordField.setTitle(UIMessages.INSTANCE.gitHubPasswordField());
	passwordField.setEmptyText(UIMessages.INSTANCE.gitHubPasswordField());
	passwordField.setWidth(FIELD_WIDTH);
	panel.add(passwordField);
	
	return panel;
}
 
Example 5
Source File: GitHubExportDialog.java    From geowe-core with GNU General Public License v3.0 6 votes vote down vote up
private Widget createCommitPanel() {
	final VerticalPanel panel = new VerticalPanel();
	panel.setWidth("350px");		
	panel.setSpacing(10);				
	
	fileNameField = new TextField();
	fileNameField.setTitle(UIMessages.INSTANCE.gitHubFileNameField());
	fileNameField.setEmptyText(UIMessages.INSTANCE.gitHubFileNameField());
	fileNameField.setWidth(FIELD_WIDTH);
	panel.add(fileNameField);
			
	messageField = new TextField();
	messageField.setTitle(UIMessages.INSTANCE.gitHubMessageCommitField());
	messageField.setEmptyText(UIMessages.INSTANCE.gitHubMessageCommitField());
	messageField.setWidth(FIELD_WIDTH);
	panel.add(messageField);

	return panel;
}
 
Example 6
Source File: AttributeSearchDialog.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
private Widget createPanel() {

		VerticalPanel vPanel = new VerticalPanel();
		vPanel.setPixelSize(490, 420);
		vPanel.setSpacing(5);
		vPanel.add(createTopPanel());
		vPanel.add(createBottomPanel());

		return vPanel;
	}
 
Example 7
Source File: LoadRasterLayerDialog.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
private Widget createPanel() {
	final VerticalPanel panel = new VerticalPanel();

	panel.setSpacing(10);
	panel.add(createTabPanel());
	createGetcapabilitiesbutton();
	return panel;
}
 
Example 8
Source File: AttributeSearchDialog.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
private VerticalPanel getAttrCombo() {
	VerticalPanel vPanel = new VerticalPanel();
	vPanel.setSpacing(5);
	vPanel.add(new Label(UIMessages.INSTANCE.asdAttributeLabel()));
	initializeAttributeLabelCombo(FIELD_WIDTH);
	vPanel.add(attributeCombo);

	return vPanel;
}
 
Example 9
Source File: ColumnLayout.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Creates new column.
 */
private Column(VerticalPanel columnPanel, int relativeWidth) {
  super(columnPanel);

  boxes = new ArrayList<BoxDescriptor>();

  this.columnPanel = columnPanel;
  this.relativeWidth = relativeWidth;

  columnPanel.setWidth(relativeWidth + "%");
  columnPanel.setSpacing(SPACING);
}
 
Example 10
Source File: LayerInfoDialog.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
private Widget createPanel() {

		VerticalPanel vPanel = new VerticalPanel();
		vPanel.setPixelSize(490, 400);
		vPanel.setSpacing(5);
		vPanel.add(createTopPanel());
		vPanel.add(createBottomPanel());
				
		return vPanel;
	}
 
Example 11
Source File: AppUtils.java    From swcv with MIT License 5 votes vote down vote up
public static DialogBox createMessageBox(String message, final DialogBox shadow)
{
    // Create a dialog box and set the caption text
    final DialogBox dialogBox = new DialogBox();

    // Create a table to layout the content
    VerticalPanel dialogContents = new VerticalPanel();
    dialogContents.setSpacing(4);
    dialogBox.setWidget(dialogContents);

    // Add an image to the dialog
    HTML html = new HTML(message);
    dialogContents.add(html);
    dialogContents.setCellHorizontalAlignment(html, HasHorizontalAlignment.ALIGN_CENTER);

    // Add a close button at the bottom of the dialog
    Button closeButton = new Button("Close", new ClickHandler()
    {
        public void onClick(ClickEvent event)
        {
            if (shadow != null)
                shadow.hide();
            dialogBox.hide();
        }
    });

    dialogContents.add(closeButton);
    dialogContents.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_RIGHT);
    dialogBox.addStyleName("errorBox inconsolataNormal");
    // Return the dialog box
    return dialogBox;
}
 
Example 12
Source File: GitHubExportDialog.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
private Widget createRepositoryPanel() {
	final VerticalPanel panel = new VerticalPanel();			
	panel.setWidth("350px");		
	panel.setSpacing(10);		
	
	repositoriesButton = new TextButton("...");
	repositoriesButton.setTitle(UIMessages.INSTANCE.gitHubTitleListRepo());
	
	
	final HorizontalPanel repositoryPanel = new HorizontalPanel();
	
	repositoryField = new TextField();
	repositoryField.setTitle(UIMessages.INSTANCE.gitHubRepositoryNameField());		
	repositoryField.setEmptyText(UIMessages.INSTANCE.gitHubRepositoryNameField());
	repositoryField.setWidth(FIELD_WIDTH);
	
	repositoryPanel.add(repositoryField);		
	repositoryPanel.add(repositoriesButton);
	
	panel.add(repositoryPanel);		
	
	pathField = new TextField();
	pathField.setTitle(UIMessages.INSTANCE.gitHubPathNameField());		
	pathField.setEmptyText(UIMessages.INSTANCE.gitHubPathNameField());
	pathField.setWidth(FIELD_WIDTH);
	
	TextButton pathButton = new TextButton("...");
	pathButton.addSelectHandler(getPathEvent());
	
	HorizontalPanel pathPanel = new HorizontalPanel();
	pathPanel.add(pathField);
	pathPanel.add(pathButton);
	
	panel.add(pathPanel);				

	return panel;
}
 
Example 13
Source File: LoadRasterLayerDialog.java    From geowe-core with GNU General Public License v3.0 5 votes vote down vote up
private VerticalPanel getWMSPanel() {
	final VerticalPanel panel = new VerticalPanel();
	panel.setWidth("350px");
	panel.setSpacing(10);

	urlWMSField = new TextField();
	urlWMSField.setTitle(UIMessages.INSTANCE.lrasterdUrlField());
	urlWMSField.setWidth(FIELD_WIDTH);
	urlWMSField.setAllowBlank(false);

	panel.add(urlWMSField);

	nameWMSField = new TextField();
	nameWMSField
			.setTitle(UIMessages.INSTANCE.lrasterdLayerNameField("WMS"));
	nameWMSField.setAllowBlank(false);
	nameWMSField.setWidth(FIELD_WIDTH);
	panel.add(nameWMSField);

	formatWMSField = new TextField();
	formatWMSField.setTitle(UIMessages.INSTANCE.lrasterdImageFormatField());
	formatWMSField.setAllowBlank(false);
	formatWMSField.setWidth(FIELD_WIDTH);
	panel.add(formatWMSField);

	return panel;
}
 
Example 14
Source File: Ode.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
private void initializeGallery() {
  VerticalPanel gVertPanel = (VerticalPanel)deckPanel.getWidget(galleryTabIndex);
  gVertPanel.setWidth("100%");
  gVertPanel.setSpacing(0);
  galleryListToolbar = new GalleryToolbar();
  gVertPanel.add(galleryListToolbar);
  HorizontalPanel appListPanel = new HorizontalPanel();
  appListPanel.setWidth("100%");
  appListPanel.add(GalleryListBox.getGalleryListBox());
  gVertPanel.add(appListPanel);

  VerticalPanel aVertPanel = (VerticalPanel)deckPanel.getWidget(galleryAppTabIndex);
  aVertPanel.setWidth("100%");
  aVertPanel.setSpacing(0);
  galleryPageToolbar = new GalleryToolbar();
  aVertPanel.add(galleryPageToolbar);
  HorizontalPanel appPanel = new HorizontalPanel();
  appPanel.setWidth("100%");
  appPanel.add(GalleryAppBox.getGalleryAppBox());
  aVertPanel.add(appPanel);

  VerticalPanel mPVertPanel = (VerticalPanel)deckPanel.getWidget(moderationPageTabIndex);
  mPVertPanel.setWidth("100%");
  mPVertPanel.setSpacing(0);
  HorizontalPanel moderationPagePanel = new HorizontalPanel();
  moderationPagePanel.setWidth("100%");
  moderationPagePanel.add(ModerationPageBox.getModerationPageBox());
  mPVertPanel.add(moderationPagePanel);

  GalleryListBox.loadGalleryList();
  if (user.isModerator()) {
    ModerationPageBox.loadModerationPage();
  }
  PrivateUserProfileTabPanel.getPrivateUserProfileTabPanel().loadProfileImage();

  galleryInitialized = true;
}
 
Example 15
Source File: Box.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a control to resize the box.
 */
private ResizeControl() {
  super(false); // no autohide

  VerticalPanel buttonPanel = new VerticalPanel();
  buttonPanel.setSpacing(10);
  addControlButton(buttonPanel, "-", new Command() {
    @Override
    public void execute() {
      height = Math.max(100, height - 20);
      restoreHeight = height;
      onResize(width, height);
    }
  });
  addControlButton(buttonPanel, "+", new Command() {
    @Override
    public void execute() {
      height = height + 20;
      restoreHeight = height;
      onResize(width, height);
    }
  });
  addControlButton(buttonPanel, MESSAGES.done(), new Command() {
    @Override
    public void execute() {
      hide();
    }
  });
  add(buttonPanel);

  setModal(true);
  setStylePrimaryName("ode-BoxResizeControl");
}
 
Example 16
Source File: RasterInfoDialog.java    From geowe-core with GNU General Public License v3.0 4 votes vote down vote up
private Widget createPanel() {
	String fieldWidth = "225px";
	HorizontalPanel hPanel = new HorizontalPanel();
	hPanel.setSpacing(10);
	// Panel izquierdo
	VerticalPanel leftPanel = new VerticalPanel();
	leftPanel.setSpacing(5);

	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;
}
 
Example 17
Source File: AttributeSearchDialog.java    From geowe-core with GNU General Public License v3.0 4 votes vote down vote up
private HorizontalLayoutContainer createTopPanel() {
	
	HorizontalLayoutContainer hPanel = new HorizontalLayoutContainer();

	VerticalPanel infoPanel = new VerticalPanel();
	infoPanel.setSpacing(5);

	layerNameField = new TextField();
	layerNameField.setEnabled(false);
	layerNameField.setWidth(FIELD_WIDTH);
	infoPanel.add(new Label(UIMessages.INSTANCE.asdLayerNameLabel()));
	infoPanel.add(layerNameField);


	infoPanel.add(createAttrPanel());
	infoPanel.add(createSearchButtonPanel());

	hPanel.add(infoPanel);

	return hPanel;
}
 
Example 18
Source File: LoadRasterLayerDialog.java    From geowe-core with GNU General Public License v3.0 4 votes vote down vote up
private VerticalPanel getWMTSPanel() {
	final VerticalPanel panel = new VerticalPanel();
	panel.setWidth("350px");
	panel.setSpacing(10);

	urlWMTSField = new TextField();
	urlWMTSField.setTitle(UIMessages.INSTANCE.lrasterdUrlField());
	urlWMTSField.setWidth(FIELD_WIDTH);
	urlWMTSField.setAllowBlank(false);

	panel.add(urlWMTSField);

	nameWMTSField = new TextField();
	nameWMTSField.setTitle(UIMessages.INSTANCE
			.lrasterdLayerNameField("WMTS"));
	nameWMTSField.setAllowBlank(false);
	nameWMTSField.setWidth(FIELD_WIDTH);
	panel.add(nameWMTSField);

	formatWMTSField = new TextField();
	formatWMTSField
			.setTitle(UIMessages.INSTANCE.lrasterdImageFormatField());
	formatWMTSField.setAllowBlank(false);
	formatWMTSField.setWidth(FIELD_WIDTH);
	panel.add(formatWMTSField);

	tileMatrixSetField = new TextField();
	tileMatrixSetField.setTitle(UIMessages.INSTANCE
			.lrasterdMatrixSetField());
	tileMatrixSetField.setAllowBlank(false);
	tileMatrixSetField.setWidth(FIELD_WIDTH);
	panel.add(tileMatrixSetField);

	styleField = new TextField();
	styleField.setTitle(UIMessages.INSTANCE
			.vlswHeading());
	styleField.setAllowBlank(true);
	styleField.setWidth(FIELD_WIDTH);
	panel.add(styleField);


	return panel;
}
 
Example 19
Source File: PreviewWidget.java    From geowe-core with GNU General Public License v3.0 4 votes vote down vote up
public Widget createPanel() {
	addLayerButton = new TextButton(UIMessages.INSTANCE.previewAddLayer());
	printButton = new TextButton(UIMessages.INSTANCE.previewPrint());
	applyButton = new TextButton(UIMessages.INSTANCE.previewApply());

	getButtonBar().add(printButton);

	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;
}
 
Example 20
Source File: GeoDataImportDialog.java    From geowe-core with GNU General Public License v3.0 4 votes vote down vote up
private HorizontalLayoutContainer createLayout() {
	HorizontalLayoutContainer mainContainer = new HorizontalLayoutContainer();
	String fieldWidth = "225px";

	// ----- Left Panel ----
	VerticalPanel layerDataContainer = new VerticalPanel();
	layerDataContainer.setWidth("250px");
	layerDataContainer.setSpacing(5);

	layerName = new TextField();
	layerName.setWidth(fieldWidth);
	layerName.setAllowBlank(false);
	layerDataContainer.add(new Label(UIMessages.INSTANCE
			.gdidLayerNameLabel()));
	layerDataContainer.add(layerName);

	projectionName = new ProjectionComboBox(fieldWidth);
	projectionName.setEmptyText(UIMessages.INSTANCE
			.asdAttributeComboEmptyText());
	layerDataContainer.add(new Label(UIMessages.INSTANCE
			.gdidProjectionLabel()));
	layerDataContainer.add(projectionName);

	Label padding = new Label("");
	padding.setHeight("75px");
	layerDataContainer.add(padding);

	vectorFormatCombo = new VectorFormatComboBox("120px",
			VectorFormat.getSupportedImportFormat());
	dataFormatField = new FieldLabel(vectorFormatCombo,
			UIMessages.INSTANCE.gdidDataFormatLabel());

	layerDataContainer.add(dataFormatField);
	dataFormatField.setVisible(false);

	// ----- Right Panel ----

	mainContainer.add(layerDataContainer);
	mainContainer.add(createTabPanel());

	return mainContainer;
}