本文整理匯總了Java中com.google.gwt.user.client.ui.VerticalPanel.setCellHorizontalAlignment方法的典型用法代碼示例。如果您正苦於以下問題:Java VerticalPanel.setCellHorizontalAlignment方法的具體用法?Java VerticalPanel.setCellHorizontalAlignment怎麽用?Java VerticalPanel.setCellHorizontalAlignment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.VerticalPanel
的用法示例。
在下文中一共展示了VerticalPanel.setCellHorizontalAlignment方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: Icon
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* 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");
}
示例2: DebugConsolePopup
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* 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);
}
示例3: LogoutPopup
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* 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);
}
示例4: WorkflowWidget
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* 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);
}
示例5: SourceCodePopupPanel
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
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);
}
示例6: create
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* 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);
}
示例7: addDialogWidgets
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private void addDialogWidgets() {
VerticalPanel dialogVPanel = new VerticalPanel();
HorizontalPanel buttonsHPanel = new HorizontalPanel();
Button cancelButton = new Button("Cancel");
cancelButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
typeError.setText(null);
dialogBox.hide();
}
});
buttonsHPanel.add(updateButton);
buttonsHPanel.add(cancelButton);
buttonsHPanel.addStyleName("dialog-buttons");
dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_LEFT);
dialogVPanel.add(grid);
dialogVPanel.add(typeError);
dialogVPanel.add(buttonsHPanel);
dialogVPanel.setCellHorizontalAlignment(buttonsHPanel, VerticalPanel.ALIGN_CENTER);
dialogBox.setWidget(dialogVPanel);
}
示例8: handleDoubleClick
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
protected void handleDoubleClick(TableData.Row row) {
VerticalPanel vp = new VerticalPanel();
final Image previewImage = new Image(getFullSizeUrl(row));
final HTML caption = new HTML(getPopUpCaption(row));
String title = getThumbnailDesc(row).replace("<em>", "").replace("</em>", "");
caption.setWidth("320px");
previewImage.addLoadHandler(new LoadHandler() {
public void onLoad(LoadEvent ev) {
caption.setWidth(previewImage.getWidth() + "px");
}
});
GwtUtil.setStyle(vp, "margin", "8px");
vp.setCellHorizontalAlignment(previewImage, HasHorizontalAlignment.ALIGN_CENTER);
vp.setCellVerticalAlignment(previewImage, HasVerticalAlignment.ALIGN_MIDDLE);
vp.add(previewImage);
vp.add(caption);
PopupPane popupPane = new PopupPane(title, vp, PopupType.STANDARD, false, false);
popupPane.show();
}
示例9: ColorPickerPopup
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public ColorPickerPopup(ColorChooserPanel colorPicker, boolean showLinks, boolean autoClose)
{
super(autoClose, true);
this.showLinks = showLinks;
VerticalPanel vpanel = new VerticalPanel();
vpanel.add(colorPicker);
if (showLinks)
{
HorizontalPanel hpanel = new HorizontalPanel();
cancel.addStyleName("agilar-colorpicker-popup-link");
ok.addStyleName("agilar-colorpicker-popup-link");
cancel.addClickHandler(this);
ok.addClickHandler(this);
hpanel.add(cancel);
hpanel.add(ok);
vpanel.add(hpanel);
vpanel.setCellHorizontalAlignment(hpanel, VerticalPanel.ALIGN_RIGHT);
}
setWidget(vpanel);
}
示例10: addControlButton
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* Creates a button with a click handler which will execute the given command.
*/
private void addControlButton(VerticalPanel panel, String caption, final Command command) {
TextButton button = new TextButton(caption);
button.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
command.execute();
}
});
panel.add(button);
panel.setCellHorizontalAlignment(button, VerticalPanel.ALIGN_CENTER);
}
示例11: LoginScreen
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public LoginScreen() {
VerticalPanel vPanel = new VerticalPanel();
txtPassword.setConvertToUpper(false);
txtLogin.setConvertToUpper(false);
txtLogin.setRequired(true);
vp.add(txtLogin);
vp.add(txtPassword);
addExtraInputFields(vp);
rememberMe.setChecked(true);
rememberMe.setStyleName("one-remember-me");
vp.add(rememberMe);
vp.setCellHorizontalAlignment(rememberMe, HorizontalPanel.ALIGN_RIGHT);
ButtonPanel btnPanel = new ButtonPanel();
btnPanel.addSaveButton("Login");
btnPanel.addClearButton();
btnPanel.setCallback(this);
vp.add(btnPanel);
vp.setCellHorizontalAlignment(btnPanel, HorizontalPanel.ALIGN_LEFT);
setTitleText("Please Login");
//dockPanel.add(vp, DockPanel.NORTH);
vPanel.add(vp);
vPanel.setCellHorizontalAlignment(vp, HorizontalPanel.ALIGN_CENTER);
vPanel.setCellVerticalAlignment(vp, HorizontalPanel.ALIGN_MIDDLE);
vPanel.setStyleName("mdv-form");
dockPanel.add(vPanel, NORTH);
dockPanel.setCellHeight(vPanel, "100%");
initWidget(dockPanel);
}
示例12: alertWidget
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public static DialogBox alertWidget(final String header, final String content) {
final DialogBox dialogBox = new DialogBox();
final VerticalPanel verticalPanel = new VerticalPanel();
final Label emptyLabel = new Label("");
emptyLabel.setSize("auto", "25px");
dialogBox.setText(header);
verticalPanel.add(emptyLabel);
verticalPanel.add(new Label(content));
verticalPanel.add(emptyLabel);
final Button buttonClose = new Button("Close", new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
dialogBox.hide();
}
});
buttonClose.setWidth("100px");
verticalPanel.add(buttonClose);
verticalPanel.setCellHorizontalAlignment(buttonClose, HasAlignment.ALIGN_CENTER);
dialogBox.add(verticalPanel);
dialogBox.setWidth("400px");
return dialogBox;
}
示例13: alertWidget
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* Creates a DialogBox object with the specified header and content and
* returns it to be displayed.
*
* @param header
* Title for the alert dialog
* @param content
* Inner message content to display
* @return A DialogBox object configured with the specified strings
*/
public static DialogBox alertWidget(final String header,
final String content) {
final DialogBox dialogBox = new DialogBox();
final VerticalPanel verticalPanel = new VerticalPanel();
final Label emptyLabel = new Label("");
emptyLabel.setSize("auto", "25px");
dialogBox.setText(header);
verticalPanel.add(emptyLabel);
verticalPanel.add(new Label(content));
verticalPanel.add(emptyLabel);
final Button buttonClose = new Button("Close", new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
dialogBox.hide();
}
});
buttonClose.setWidth("100px");
verticalPanel.add(buttonClose);
verticalPanel.setCellHorizontalAlignment(buttonClose,
HasAlignment.ALIGN_CENTER);
dialogBox.add(verticalPanel);
return dialogBox;
}
示例14: createSearchCatalogsContent
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private Widget createSearchCatalogsContent(String projectId) {
_catalogPanel = new CatalogPanel(null, projectId);
_catalogPanel.setSize("95%", "95%");
_catalogPanel.addKeyPressOnCreation(keyPressHandler);
// HorizontalPanel buttons= new HorizontalPanel();
// buttons.addStyleName("base-dialog-buttons");
// GwtUtil.setStyle(buttons, "cssFloat", "none");
// buttons.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
FlowPanel buttons= new FlowPanel();
buttons.setWidth("100%");
Button ok= new Button("Search");
ok.addStyleName("highlight-text");
ok.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent ev) { doOK(); }
});
buttons.add(ok);
Widget help= HelpManager.makeHelpIcon("basics.catalog");
buttons.add(help);
GwtUtil.setStyles(ok, "cssFloat", "left",
"margin", "0 0 0 37px",
"color", "black",
"fontWeight", "bold");
GwtUtil.setStyles(help, "cssFloat", "right",
"", "0 20px 0 0");
VerticalPanel vp= new VerticalPanel();
vp.add(_catalogPanel);
vp.add(buttons);
vp.setCellHorizontalAlignment(_catalogPanel, VerticalPanel.ALIGN_CENTER);
vp.setSize("95%", "450px");
return vp;
}
示例15: MAppContext
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public MAppContext()
{
super();
AppRoot.getEventBus().addHandler( ModelUpdateEvent.TYPE, this );
VerticalPanel vpanel = new VerticalPanel();
vpanel.add( m_panelAction );
vpanel.setCellHorizontalAlignment( m_panelAction, HasHorizontalAlignment.ALIGN_RIGHT );
HorizontalPanel hpanel = new HorizontalPanel();
hpanel.add( m_panelExtra );
hpanel.setCellHeight( m_panelExtra, "100%" );
m_panelExtra.setHeight( "100%" );
hpanel.add( m_panelMiniMap );
vpanel.add( hpanel );
m_panelAction.add( new WgtContextAction() );
m_panelAction.setStylePrimaryName( "fmp-context-action" );
m_panelMiniMap.setStylePrimaryName( "fmp-context-minimap" );
m_panelMiniMap.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
m_panelMiniMap.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
// m_panelMiniMap.addStyleName( "transparent50" );
m_panelExtra.add( new WgtContextExtra() );
m_panelExtra.setStylePrimaryName( "fmp-context-extra" );
// m_panelExtra.addStyleName( "transparent50" );
initWidget( vpanel );
hpanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
}