Java Code Examples for com.google.gwt.user.client.ui.VerticalPanel

The following are top voted examples for showing how to use com.google.gwt.user.client.ui.VerticalPanel. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: sig-seguimiento-vehiculos   File: OpenProjectDialog.java   View source code 6 votes vote down vote up
private SelectHandler createUrlToShare(final VerticalPanel geoDataContainer) {
	return new SelectHandler() {
		@Override
		public void onSelect(SelectEvent event) {
			urlToShareAnchor.setHref(getHref());
			urlToShareAnchor.setText(
					UIMessages.INSTANCE.seeOtherWindow("GeoWE Project"),
					Direction.LTR);

			urlShared.setText(getHref());
			urlPanel.setVisible(true);
			urlShared.setVisible(true);
		}

		private String getHref() {
			String baseUrl = GWT.getHostPageBaseURL();

			baseUrl += "?projectUrl="
					+ URL.encodeQueryString(urlTextField.getValue());

			return baseUrl;
		}
	};
}
 
Example 2
Project: sig-seguimiento-vehiculos   File: StatusPanelWidget.java   View source code 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 3
Project: sig-seguimiento-vehiculos   File: CreateEmptyLayerTab.java   View source code 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 4
Project: sig-seguimiento-vehiculos   File: GeoDataImportDialog.java   View source code 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 5
Project: sig-seguimiento-vehiculos   File: LoadRasterLayerDialog.java   View source code 6 votes vote down vote up
private VerticalPanel getTMSPanel() {
	final VerticalPanel panel = new VerticalPanel();
	panel.setWidth("350px");
	panel.setSpacing(10);

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

	panel.add(urlTMSField);

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

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

	return panel;
}
 
Example 6
Project: sig-seguimiento-vehiculos   File: GitHubExportDialog.java   View source code 6 votes vote down vote up
public GitHubExportDialog() {
	super();
	this.setHeadingText(UIMessages.INSTANCE.gitHubExportDialogTitle());
	this.getHeader().setIcon(ImageProvider.INSTANCE.github24());
	this.setPredefinedButtons(PredefinedButton.CANCEL);
	this.setPixelSize(350, 350);		
	this.setModal(true);
	this.setHideOnButtonClick(true);
	final VerticalPanel panel = new VerticalPanel();
	panel.add(createAuthenticationPanel());
	panel.add(createRepositoryPanel());
	panel.add(createCommitPanel());	
	add(panel);
	createButton = new TextButton(UIMessages.INSTANCE.gitHubCreateButton());
	updateButton = new TextButton(UIMessages.INSTANCE.gitHubUpdateButton());
			
	getButtonBar().add(createButton);
	getButtonBar().add(updateButton);		
}
 
Example 7
Project: sig-seguimiento-vehiculos   File: GitHubExportDialog.java   View source code 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 8
Project: sig-seguimiento-vehiculos   File: GitHubExportDialog.java   View source code 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 9
Project: sig-seguimiento-vehiculos   File: LayerManagerWidget.java   View source code 6 votes vote down vote up
private VerticalPanel getFoot() {
	slider.setWidth("290px");
	slider.disable();
	slider.setIncrement(1);

	slider.addValueChangeHandler(new ValueChangeHandler<Integer>() {

		@Override
		public void onValueChange(final ValueChangeEvent<Integer> event) {
			final Layer layer = getSelectedLayer(getSelectedTabName());
			layer.setOpacity((float) (event.getValue().intValue() / 100.0));
		}

	});

	final VerticalPanel panel = new VerticalPanel();
	panel.setWidth("300px");
	panel.addStyleName(ThemeStyles.get().style().borderTop());
	panel.add(new HTML(UIMessages.INSTANCE.lmOpacityHtmlLabel()));
	panel.add(slider);

	panel.add(statusBar);
	return panel;
}
 
Example 10
Project: appinventor-extensions   File: YoungAndroidFormUpgrader.java   View source code 6 votes vote down vote up
private static void upgradeWarnDialog(String aMessage) {
  final DialogBox dialogBox = new DialogBox(false, true);
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText(MESSAGES.warningDialogTitle());
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  final HTML message = new HTML(aMessage);
  message.setStyleName("DialogBox-message");
  VerticalPanel vPanel = new VerticalPanel();
  Button okButton = new Button("OK");
  okButton.addClickListener(new ClickListener() {
      @Override
      public void onClick(Widget sender) {
        dialogBox.hide();
      }
    });
  vPanel.add(message);
  vPanel.add(okButton);
  dialogBox.setWidget(vPanel);
  dialogBox.center();
  dialogBox.show();
}
 
Example 11
Project: appinventor-extensions   File: OdeLog.java   View source code 6 votes vote down vote up
/**
 * Creates a new output panel for displaying internal messages.
 */
private OdeLog() {
  // Initialize UI
  Button clearButton = new Button(MESSAGES.clearButton());
  clearButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      clear();
    }
  });

  text = new HTML();
  text.setWidth("100%");

  VerticalPanel panel = new VerticalPanel();
  panel.add(clearButton);
  panel.add(text);
  panel.setSize("100%", "100%");
  panel.setCellHeight(text, "100%");
  panel.setCellWidth(text, "100%");

  initWidget(panel);
}
 
Example 12
Project: appinventor-extensions   File: LabeledTextBox.java   View source code 6 votes vote down vote up
/**
 * Use this TextBox if you want to have text validation while a user is typing
 *
 * @param caption    caption for leading label
 * @param validator  The validator to use for a specific textBox
 */
public LabeledTextBox(String caption, Validator validator) {
  this.validator = validator;

  HorizontalPanel panel = new HorizontalPanel();
  Label label = new Label(caption);
  panel.add(label);
  textbox = new TextBox();
  defaultTextBoxColor = textbox.getElement().getStyle().getBorderColor();
  textbox.setWidth("100%");
  panel.add(textbox);
  panel.setCellWidth(label, "40%");

  HorizontalPanel errorPanel = new HorizontalPanel();
  errorLabel = new Label("");
  errorPanel.add(errorLabel);

  VerticalPanel vp = new VerticalPanel();
  vp.add(panel);
  vp.add(errorPanel);
  vp.setHeight("85px");

  initWidget(vp);

  setWidth("100%");
}
 
Example 13
Project: appinventor-extensions   File: Icon.java   View source code 6 votes vote down vote up
/**
 * Creates a new icon with the specified caption.
 *
 * @param image  image shown on icon (preferably 16 x 16px)
 * @param caption  caption shown below image
 */
public Icon(Image image, String caption) {

  panel = new VerticalPanel() {
    @Override
    public void onBrowserEvent(Event event) {
      Icon.this.onBrowserEvent(event);
    }
  };
  panel.add(image);
  panel.setCellHorizontalAlignment(image, VerticalPanel.ALIGN_CENTER);
  captionLabel = new Label(caption);
  panel.add(captionLabel);

  initWidget(panel);

  setStylePrimaryName("ode-Icon");
}
 
Example 14
Project: appinventor-extensions   File: PropertiesPanel.java   View source code 6 votes vote down vote up
/**
 * Creates a new properties panel.
 */
public PropertiesPanel() {
  // Initialize UI
  VerticalPanel outerPanel = new VerticalPanel();
  outerPanel.setWidth("100%");

  componentName = new Label("");
  componentName.setStyleName("ode-PropertiesComponentName");
  outerPanel.add(componentName);

  panel = new VerticalPanel();
  panel.setWidth("100%");
  panel.setStylePrimaryName("ode-PropertiesPanel");
  outerPanel.add(panel);

  initWidget(outerPanel);
}
 
Example 15
Project: appinventor-extensions   File: TopPanel.java   View source code 6 votes vote down vote up
private void addLogo(HorizontalPanel panel) {
  // Logo should be a link to App Inv homepage. Currently, after the user
  // has logged in, the top level *is* ODE; so for now don't make it a link.
  // Add timestamp to logo url to get around browsers that agressively cache
  // the image! This same trick is used in StorageUtil.getFilePath().
  Image logo = new Image(LOGO_IMAGE_URL + "?t=" + System.currentTimeMillis());
  logo.setSize("40px", "40px");
  logo.setStyleName("ode-Logo");
  String logoUrl = ode.getSystemConfig().getLogoUrl();
  if (!Strings.isNullOrEmpty(logoUrl)) {
    logo.addClickHandler(new WindowOpenClickHandler(logoUrl));
  }
  panel.add(logo);
  panel.setCellWidth(logo, "50px");
  Label title = new Label("MIT App Inventor");
  title.setStyleName("ode-LogoText");
  VerticalPanel titleContainer = new VerticalPanel();
  titleContainer.add(title);
  panel.add(titleContainer);
  panel.setCellWidth(titleContainer, "180px");
  panel.setCellHorizontalAlignment(logo, HorizontalPanel.ALIGN_LEFT);
  panel.setCellVerticalAlignment(logo, HorizontalPanel.ALIGN_MIDDLE);
}
 
Example 16
Project: appinventor-extensions   File: SimpleNonVisibleComponentsPanel.java   View source code 6 votes vote down vote up
/**
 * Creates new component design panel for non-visible components.
 */
public SimpleNonVisibleComponentsPanel() {
  // Initialize UI
  VerticalPanel panel = new VerticalPanel();
  panel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);

  heading = new Label("");
  heading.setStyleName("ya-NonVisibleComponentsHeader");
  panel.add(heading);

  componentsPanel = new FlowPanel();
  componentsPanel.setStyleName("ode-SimpleUiDesignerNonVisibleComponents");
  panel.add(componentsPanel);

  initWidget(panel);
}
 
Example 17
Project: appinventor-extensions   File: MockListView.java   View source code 6 votes vote down vote up
/**
 * Creates a new MockListView component. It places a label inside a simplepanel which
 * is then placed into a vertical panel
 *
 * @param editor  editor of source file the component belongs to
 */
public MockListView(SimpleEditor editor) {
  super(editor, TYPE, images.listview());
  listViewWidget = new VerticalPanel();
  //TODO (Jose) extract magic numbers as ComponentConstants.java
  listViewWidget.setSize(ComponentConstants.LISTVIEW_PREFERRED_WIDTH + "px", "100%");
  listViewWidget.setStylePrimaryName("ode-SimpleMockComponent");
  listViewWidget.setStyleName("listViewComponentStyle", true);

  createFilterBox();

  // textColor must be set before the component is initialized, because onPropertyChange
  // might call setSlementsFromString, which tries to set the item textcolor
  textColor  = DEFAULT_TEXT_COLOR;

  initComponent(listViewWidget);
  MockComponentsUtil.setWidgetBackgroundColor(listViewWidget, DEFAULT_BACKGROUND_COLOR);
}
 
Example 18
Project: appinventor-extensions   File: ProjectEditor.java   View source code 6 votes vote down vote up
/**
 * Creates a {@code ProjectEditor} instance.
 *
 * @param projectRootNode  the project root node
 */
public ProjectEditor(ProjectRootNode projectRootNode) {
  this.projectRootNode = projectRootNode;
  projectId = projectRootNode.getProjectId();
  project = Ode.getInstance().getProjectManager().getProject(projectId);

  openFileEditors = Maps.newHashMap();
  fileIds = new ArrayList<String>();

  deckPanel = new DeckPanel();

  VerticalPanel panel = new VerticalPanel();
  panel.add(deckPanel);
  deckPanel.setSize("100%", "100%");
  panel.setSize("100%", "100%");
  initWidget(panel);
  // Note: I'm not sure that the setSize call below does anything useful.
  setSize("100%", "100%");
}
 
Example 19
Project: appinventor-extensions   File: Ode.java   View source code 6 votes vote down vote up
/**
 * The "Final" Dialog box. When a user chooses to end their session
 * due to a conflicting login, we should show this dialog which is modal
 * and has no exit! My preference would have been to close the window
 * altogether, but the browsers won't let javascript code close windows
 * that it didn't open itself (like the main window). I also tried to
 * use document.write() to write replacement HTML but that caused errors
 * in Firefox and strange behavior in Chrome. So we do this...
 *
 * We are called from invalidSessionDialog() (above).
 */
private void finalDialog() {
  // Create the UI elements of the DialogBox
  final DialogBox dialogBox = new DialogBox(false, true); // DialogBox(autohide, modal)
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText(MESSAGES.finalDialogText());
  dialogBox.setHeight("100px");
  dialogBox.setWidth("400px");
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  dialogBox.center();
  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML(MESSAGES.finalDialogMessage());
  message.setStyleName("DialogBox-message");
  DialogBoxContents.add(message);
  dialogBox.setWidget(DialogBoxContents);
  dialogBox.show();
}
 
Example 20
Project: appinventor-extensions   File: Ode.java   View source code 6 votes vote down vote up
/**
 * corruptionDialog -- Put up a dialog box explaining that we detected corruption
 * while reading in a project file. There is no continuing once this happens.
 *
 */
void corruptionDialog() {
  // Create the UI elements of the DialogBox
  final DialogBox dialogBox = new DialogBox(false, true); // DialogBox(autohide, modal)
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText(MESSAGES.corruptionDialogText());
  dialogBox.setHeight("100px");
  dialogBox.setWidth("400px");
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  dialogBox.center();
  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML(MESSAGES.corruptionDialogMessage());
  message.setStyleName("DialogBox-message");
  DialogBoxContents.add(message);
  dialogBox.setWidget(DialogBoxContents);
  dialogBox.show();
}
 
Example 21
Project: appinventor-extensions   File: Ode.java   View source code 6 votes vote down vote up
/**
 * This dialog is showned if an account is disabled. It is
 * completely modal with no escape. The provided URL is displayed in
 * an iframe, so it can be tailored to each person whose account is
 * disabled.
 *
 * @param Url the Url to display in the dialog box.
 */

public void disabledAccountDialog(String Url) {
  // Create the UI elements of the DialogBox
  final DialogBox dialogBox = new DialogBox(false, true); // DialogBox(autohide, modal)
  dialogBox.setStylePrimaryName("ode-DialogBox");
  dialogBox.setText(MESSAGES.accountDisabledMessage());
  dialogBox.setHeight("700px");
  dialogBox.setWidth("700px");
  dialogBox.setGlassEnabled(true);
  dialogBox.setAnimationEnabled(true);
  dialogBox.center();
  VerticalPanel DialogBoxContents = new VerticalPanel();
  HTML message = new HTML("<iframe src=\"" + Url + "\" style=\"border: 0; width: 680px; height: 660px;\"></iframe>");
  message.setStyleName("DialogBox-message");
  DialogBoxContents.add(message);
  dialogBox.setWidget(DialogBoxContents);
  dialogBox.show();
}
 
Example 22
Project: document-management-system   File: WikiManager.java   View source code 6 votes vote down vote up
/**
 * WikiManager
 */
public WikiManager(boolean isDashboard) {
	this.isDashboard = isDashboard;
	vPanel = new VerticalPanel();
	toolbar = new TabToolbarWiki(this, isDashboard);

	// Post Editor
	vWikiPanel = new VerticalPanel();
	vWikiPanel.setWidth("100%");
	wikiEditor = new WikiEditor(this);
	wikiEditor.setStyleName("okm-Mail");
	wikiHistory = new WikiHistory(this);
	wikiPage = new WikiPage();
	scrollPanelWiki = new ScrollPanel(vWikiPanel);

	vPanel.add(toolbar); // Always visible

	toolbar.setHeight("" + TOOLBAR_HEADER + "px");
	toolbar.setWidth("100%");
	vPanel.setCellHeight(toolbar, "" + TOOLBAR_HEADER + "px");

	initWidget(vPanel);
}
 
Example 23
Project: document-management-system   File: WorkflowManager.java   View source code 6 votes vote down vote up
/**
 * WorkflowManager
 */
public WorkflowManager() {
	workflowGraph = new Image();
	scrollGraphPanel = new ScrollPanel(workflowGraph);
	toolbar = new TabToolbarWorkflow(this);
	workflowTable = new WorkflowTable(this);
	workflowDetailTable = new WorkflowDetailTable();
	vPanel = new VerticalPanel();
	vPanel.add(toolbar); // Always visible

	toolbar.setHeight("" + TOOLBAR_HEADER + "px");
	toolbar.setWidth("100%");
	vPanel.setCellHeight(toolbar, "" + TOOLBAR_HEADER + "px");

	initWidget(vPanel);
}
 
Example 24
Project: document-management-system   File: HelloWorld.java   View source code 6 votes vote down vote up
public HelloWorld() {
	HTML html = new HTML("Hello Word");
	refresh = new Button("refresh UI");
	refresh.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			GeneralComunicator.refreshUI();
		}
	});

	vPanel = new VerticalPanel();
	vPanel.add(html);
	vPanel.add(refresh);

	refresh.setStyleName("okm-Input");

	initWidget(vPanel);
}
 
Example 25
Project: document-management-system   File: Browser.java   View source code 6 votes vote down vote up
/**
 * Browser
 */
public Browser() {
	verticalSplitLayoutPanel = new VerticalSplitLayoutExtended(new VerticalResizeHandler() {
		@Override
		public void onResize(int topHeight, int bottomHeight) {
			resizePanels();
		}
	});
	fileBrowser = new FileBrowser();
	tabPropertiesPanel = new VerticalPanel();
	tabMultiple = new TabMultiple();

	tabPropertiesPanel.add(tabMultiple);
	tabPropertiesPanel.setStyleName("okm-Properties-Tab");

	verticalSplitLayoutPanel.getSplitPanel().addNorth(fileBrowser, 300);
	verticalSplitLayoutPanel.getSplitPanel().add(tabPropertiesPanel);

	initWidget(verticalSplitLayoutPanel);
}
 
Example 26
Project: document-management-system   File: DebugConsolePopup.java   View source code 6 votes vote down vote up
/**
 * Logout popup
 */
public DebugConsolePopup() {
	// Establishes auto-close when click outside
	super(false, false);

	setText(Main.i18n("debug.console.label"));
	vPanel = new VerticalPanel();
	button = new Button(Main.i18n("button.close"), this);
	text = new HTML(Main.i18n("debug.enable.disable"));

	vPanel.add(new HTML("<br>"));
	vPanel.add(text);
	vPanel.add(Log.getLogger(DivLogger.class).getWidget());
	vPanel.add(new HTML("<br>"));
	vPanel.add(button);
	vPanel.add(new HTML("<br>"));

	vPanel.setCellHorizontalAlignment(button, VerticalPanel.ALIGN_CENTER);

	button.setStyleName("okm-YesButton");

	super.hide();
	Log.getLogger(DivLogger.class).getWidget().setVisible(true);
	setWidget(vPanel);
}
 
Example 27
Project: document-management-system   File: MailDashboard.java   View source code 6 votes vote down vote up
/**
 * GeneralDashboard
 */
public MailDashboard() {
	vPanelLeft = new VerticalPanel();
	vPanelRight = new VerticalPanel();
	hPanel = new HorizontalPanel();

	userLastImportedMails = new DashboardWidget("UserLastImportedMails",
			"dashboard.mail.last.imported.mails", "img/email.gif", true, "userLastImportedMails");
	userLastImportedAttachments = new DashboardWidget("UserLastImportedMailAttachments",
			"dashboard.mail.last.imported.attached.documents", "img/email_attach.gif", true,
			"userLastImportedMailAttachments");

	vPanelLeft.add(userLastImportedMails);
	vPanelRight.add(userLastImportedAttachments);

	hPanel.add(vPanelLeft);
	hPanel.add(vPanelRight);

	initWidget(hPanel);
}
 
Example 28
Project: document-management-system   File: WorkflowDashboard.java   View source code 6 votes vote down vote up
/**
 * UserDashboard
 */
public WorkflowDashboard() {
	vPanelLeft = new VerticalPanel();
	vPanelRight = new VerticalPanel();
	hPanel = new HorizontalPanel();

	hPanel.add(vPanelLeft);
	hPanel.add(vPanelRight);

	pendingTasks = new WorkflowWidget("dashboard.workflow.pending.tasks", "img/icon/workflow.gif", true);
	pendingPooledTasks = new WorkflowWidget("dashboard.workflow.pending.tasks.unassigned", "img/icon/workflow.gif", true);
	pendingTasks.setIsWidgetPendingTask();
	pendingPooledTasks.setIsWidgetPooledTask();
	workflowFormPanel = new WorkflowFormPanel();

	vPanelLeft.add(pendingTasks);
	vPanelLeft.add(pendingPooledTasks);
	vPanelRight.add(workflowFormPanel);

	hPanel.setHeight("100%");
	vPanelRight.setHeight("100%");

	initWidget(hPanel);
}
 
Example 29
Project: document-management-system   File: LogoutPopup.java   View source code 6 votes vote down vote up
/**
 * Logout popup
 */
public LogoutPopup() {
	// Establishes auto-close when click outside
	super(false, true);

	vPanel = new VerticalPanel();
	text = new HTML(Main.i18n("logout.logout"));
	button = new Button(Main.i18n("button.close"), this);

	vPanel.setWidth("250px");
	vPanel.setHeight("100px");

	vPanel.add(new HTML("<br>"));
	vPanel.add(text);
	vPanel.add(new HTML("<br>"));
	vPanel.add(button);
	vPanel.add(new HTML("<br>"));

	vPanel.setCellHorizontalAlignment(text, VerticalPanel.ALIGN_CENTER);
	vPanel.setCellHorizontalAlignment(button, VerticalPanel.ALIGN_CENTER);

	button.setStyleName("okm-YesButton");

	super.hide();
	setWidget(vPanel);
}
 
Example 30
Project: document-management-system   File: WorkflowWidget.java   View source code 6 votes vote down vote up
/**
 * WorkflowWidget
 */
public WorkflowWidget(String name, String uuid, WorkflowWidgetToFire workflowWidgetToFire, Map<String, Object> workflowVariables) {
	this.name = name;
	this.uuid = uuid;
	this.workflowWidgetToFire = workflowWidgetToFire;
	this.workflowVariables = workflowVariables;
	drawed = false;

	vPanel = new VerticalPanel();
	hPanel = new HorizontalPanel();
	manager = new FormManager();

	vPanel.setWidth("300px");
	vPanel.setHeight("50px");

	vPanel.add(new HTML("<br>"));
	vPanel.add(manager.getTable());
	vPanel.add(new HTML("<br>"));

	vPanel.setCellHorizontalAlignment(hPanel, VerticalPanel.ALIGN_CENTER);

	initWidget(vPanel);
}
 
Example 31
Project: document-management-system   File: FuturamaWalking.java   View source code 6 votes vote down vote up
/**
 * FuturamaWalking
 */
public FuturamaWalking() {
	// Establishes auto-close when click outside
	super(false, false);
	left = -180;
	top = Window.getClientHeight() - 80 - 21;

	vPanel = new VerticalPanel();
	vPanel.setWidth("186px");
	vPanel.setHeight("80px");

	logo = new Image("img/eastereggs/futurama_walking.gif");
	vPanel.add(logo);

	setPopupPosition(left, top);

	hide();
	setWidget(vPanel);
}
 
Example 32
Project: gwt-uploader   File: GwtUploaderDemo.java   View source code 6 votes vote down vote up
@Override
public void onModuleLoad() {
  uploaderPanels.put("TextButtonAndProgressText", new TextButtonAndProgressText());
  uploaderPanels.put("ImageButtonAndProgressText", new ImageButtonAndProgressText());
  uploaderPanels.put("ImageButtonAndProgressBar", new ImageButtonAndProgressBar());
  uploaderPanels.put("MultiUploadWithProgressBar", new MultiUploadWithProgressBar());
  uploaderPanels.put("MultiUploadWithProgressBarAndDragAndDrop",
                     new MultiUploadWithProgressBarAndDragAndDrop());

  for (Map.Entry<String, UploaderSample> entry : uploaderPanels.entrySet()) {
    final UploaderSample sample = entry.getValue();
    final Widget uploaderPanel = sample.getUploaderPanel();
    final Button btnViewSource = new Button("View Source");
    btnViewSource.getElement().getStyle().setMarginTop(10, Style.Unit.PX);
    btnViewSource.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        sourceCodePopup.showSourceCode(sample.getUploaderCode());
      }
    });
    VerticalPanel panel = new VerticalPanel();
    panel.add(uploaderPanel);
    panel.add(btnViewSource);
    RootPanel.get(entry.getKey()).add(panel);
  }
}
 
Example 33
Project: gwt-uploader   File: SourceCodePopupPanel.java   View source code 6 votes vote down vote up
public SourceCodePopupPanel() {
  // PopupPanel's constructor takes 'auto-hide' as its boolean parameter.
  // If this is set, the panel closes itself automatically when the user
  // clicks outside of it.
  super(true);
  // Set the dialog box's caption.
  setText("Source Code");

  // Enable animation.
  setAnimationEnabled(true);

  // Enable glass background.
  setGlassEnabled(true);
  Button btnClose = new Button("Close");
  btnClose.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      hide();
    }
  });
  VerticalPanel panel = new VerticalPanel();
  panel.add(html);
  panel.add(btnClose);
  panel.setCellHorizontalAlignment(btnClose, HasHorizontalAlignment.ALIGN_RIGHT);
  setWidget(panel);
}
 
Example 34
Project: Wiab.pro   File: ComplexColorPicker.java   View source code 6 votes vote down vote up
public ComplexColorPicker() {
  style.ensureInjected();

  // The background color can be set to "none"
  noneBtn = new PushButton(messages.none());
  noneBtn.addStyleName(ComplexColorPicker.style.buttonsMargins());
  noneBtn.setStylePrimaryName(ComplexColorPicker.style.customColorPushbutton());
  noneBtn.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      listener.onNoneColorChoose();
    }
  });

  vp = new VerticalPanel();

  // We use a simple color picker by default
  simplePicker = new SimpleColorPicker(this);
  vp.add(simplePicker);
  vp.add(noneBtn);
  super.add(vp);
}
 
Example 35
Project: Wiab.pro   File: DialogBox.java   View source code 6 votes vote down vote up
/**
 * Creates dialog box.
 *
 * @param popup - UniversalPopup on which the dialog is based
 * @param title - title placed in the title bar
 * @param innerWidget - the inner widget of the dialog
 * @param dialogButtons - buttons
 */
public static void create(UniversalPopup popup, String title, Widget innerWidget,
    DialogButton[] dialogButtons) {
  // Title
  popup.getTitleBar().setTitleText(title);

  VerticalPanel contents = new VerticalPanel();
  popup.add(contents);

  // Message
  contents.add(innerWidget);

  // Buttons
  HorizontalPanel buttonPanel = new HorizontalPanel();
  for (DialogButton dialogButton : dialogButtons) {
    Button button = new Button(dialogButton.getTitle());
    button.setStyleName(Dialog.getCss().dialogButton());
    buttonPanel.add(button);
    dialogButton.link(button);
  }
  contents.add(buttonPanel);
  buttonPanel.setStyleName(Dialog.getCss().dialogButtonPanel());
  contents.setCellHorizontalAlignment(buttonPanel, HasHorizontalAlignment.ALIGN_RIGHT);
}
 
Example 36
Project: Wiab.pro   File: DialogBox.java   View source code 6 votes vote down vote up
/**
 * Standard information dialog with prompt and "OK" button.
 *
 * @param message message to display
 */
public static void information(String message) {
  PopupChrome chrome = PopupChromeFactory.createPopupChrome();
  final UniversalPopup popup = PopupFactory.createPopup(RootPanel.getBodyElement(),
      new CenterPopupPositioner(), chrome, true);

  VerticalPanel verticalPanel = new VerticalPanel();
  verticalPanel.setStyleName(Dialog.getCss().verticalPanel());
  Label label = new Label(message);
  verticalPanel.add(label);

  DialogButton okButton = new DialogButton(messages.ok(), new Command() {

    @Override
    public void execute() {
      popup.hide();
    }
  });

  DialogBox.create(popup, messages.confirmation(), verticalPanel,
      new DialogButton[] { okButton });

  popup.show();
  requestFocus(okButton.getButton());
}
 
Example 37
Project: riscoss-corporate   File: ComparisonPanel.java   View source code 6 votes vote down vote up
protected Widget generateIndicatorWidget(JSONObject v) {
	VerticalPanel panel = new VerticalPanel();
	GaugeImage img = new GaugeImage();
	img.setEvidence( v.get( "p" ).isString().stringValue(), v.get( "m" ).isString().stringValue() );
	SimplePanel pp = new SimplePanel();
	pp.setWidget(img);
	pp.setStyleName("contentResultsTable");
	panel.add(pp);
	panel.add( new HTML( 
			"Exposure: <font color='red'>" + 
					v.get( "e" ).isObject().get( "e" ).isNumber().doubleValue() +
			"</font>") );
	panel.setStyleName("headerTable");
	panel.setHeight("100%");
	return panel;
}
 
Example 38
Project: geowe-core   File: LoadRasterLayerDialog.java   View source code 6 votes vote down vote up
private VerticalPanel getTMSPanel() {
	final VerticalPanel panel = new VerticalPanel();
	panel.setWidth("350px");
	panel.setSpacing(10);

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

	panel.add(urlTMSField);

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

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

	return panel;
}
 
Example 39
Project: gerrit   File: CreateProjectScreen.java   View source code 6 votes vote down vote up
private void addCreateProjectPanel() {
  final VerticalPanel fp = new VerticalPanel();
  fp.setStyleName(Gerrit.RESOURCES.css().createProjectPanel());

  initCreateButton();
  initCreateTxt();
  initParentBox();

  addGrid(fp);

  emptyCommit = new CheckBox(AdminConstants.I.checkBoxEmptyCommit());
  permissionsOnly = new CheckBox(AdminConstants.I.checkBoxPermissionsOnly());
  fp.add(emptyCommit);
  fp.add(permissionsOnly);
  fp.add(create);
  VerticalPanel vp = new VerticalPanel();
  vp.add(fp);
  initSuggestedParents();
  vp.add(suggestedParentsTab);
  add(vp);
}
 
Example 40
Project: google-gin   File: DefaultHomepage.java   View source code 6 votes vote down vote up
@Inject
public DefaultHomepage(CardGrid cardGrid,
                @StartGame Button button,
                GameHost startGame,
                ScoreBoard scoreBoard) {
  
  button.addClickListener(startGame);

  VerticalPanel gamePanel = new VerticalPanel();
  gamePanel.addStyleName("widePanel");

  Label title = new Label("Welcome to... Higher or Lower!");
  title.addStyleName("title");
  gamePanel.add(title);

  gamePanel.add(button);
  gamePanel.add(cardGrid);
  gamePanel.add(scoreBoard);
  initWidget(gamePanel);
}