Java 类com.google.gwt.user.client.ui.VerticalPanel 实例源码
项目:sig-seguimiento-vehiculos
文件:OpenProjectDialog.java
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;
}
};
}
项目:sig-seguimiento-vehiculos
文件:StatusPanelWidget.java
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);
}
项目:sig-seguimiento-vehiculos
文件:CreateEmptyLayerTab.java
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;
}
项目:sig-seguimiento-vehiculos
文件:GeoDataImportDialog.java
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;
}
项目:sig-seguimiento-vehiculos
文件:LoadRasterLayerDialog.java
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;
}
项目:sig-seguimiento-vehiculos
文件:GitHubExportDialog.java
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);
}
项目:sig-seguimiento-vehiculos
文件:GitHubExportDialog.java
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;
}
项目:sig-seguimiento-vehiculos
文件:GitHubExportDialog.java
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;
}
项目:sig-seguimiento-vehiculos
文件:LayerManagerWidget.java
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;
}
项目:appinventor-extensions
文件:YoungAndroidFormUpgrader.java
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();
}
项目:appinventor-extensions
文件:OdeLog.java
/**
* 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);
}
项目:appinventor-extensions
文件:LabeledTextBox.java
/**
* 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%");
}
项目:appinventor-extensions
文件:Icon.java
/**
* 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");
}
项目:appinventor-extensions
文件:PropertiesPanel.java
/**
* 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);
}
项目:appinventor-extensions
文件:TopPanel.java
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);
}
项目:appinventor-extensions
文件:SimpleNonVisibleComponentsPanel.java
/**
* 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);
}
项目:appinventor-extensions
文件:MockListView.java
/**
* 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);
}
项目:appinventor-extensions
文件:ProjectEditor.java
/**
* 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%");
}
项目:appinventor-extensions
文件:Ode.java
/**
* 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();
}
项目:appinventor-extensions
文件:Ode.java
/**
* 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();
}
项目:appinventor-extensions
文件:Ode.java
/**
* 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();
}
项目:document-management-system
文件:WikiManager.java
/**
* 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);
}
项目:document-management-system
文件:WorkflowManager.java
/**
* 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);
}
项目:document-management-system
文件:HelloWorld.java
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);
}
项目:document-management-system
文件:Browser.java
/**
* 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);
}
项目:document-management-system
文件:DebugConsolePopup.java
/**
* 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);
}
项目:document-management-system
文件:MailDashboard.java
/**
* 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);
}
项目:document-management-system
文件:WorkflowDashboard.java
/**
* 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);
}
项目:document-management-system
文件:LogoutPopup.java
/**
* 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);
}
项目:document-management-system
文件:WorkflowWidget.java
/**
* 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);
}
项目:document-management-system
文件:FuturamaWalking.java
/**
* 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);
}
项目:gwt-uploader
文件:GwtUploaderDemo.java
@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);
}
}
项目:gwt-uploader
文件:SourceCodePopupPanel.java
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);
}
项目:Wiab.pro
文件:ComplexColorPicker.java
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);
}
项目:Wiab.pro
文件:DialogBox.java
/**
* 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);
}
项目:Wiab.pro
文件:DialogBox.java
/**
* 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());
}
项目:riscoss-corporate
文件:ComparisonPanel.java
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;
}
项目:geowe-core
文件:LoadRasterLayerDialog.java
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;
}
项目:gerrit
文件:CreateProjectScreen.java
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);
}
项目:google-gin
文件:DefaultHomepage.java
@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);
}