本文整理匯總了Java中com.google.gwt.user.client.ui.VerticalPanel.setHorizontalAlignment方法的典型用法代碼示例。如果您正苦於以下問題:Java VerticalPanel.setHorizontalAlignment方法的具體用法?Java VerticalPanel.setHorizontalAlignment怎麽用?Java VerticalPanel.setHorizontalAlignment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.VerticalPanel
的用法示例。
在下文中一共展示了VerticalPanel.setHorizontalAlignment方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initializeStatusPanel
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
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);
}
示例2: SimpleNonVisibleComponentsPanel
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* 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);
}
示例3: createView
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public void createView() {
table = new VerticalPanel();
createButton = new Hyperlink( "Create Company", "" );
goToProduct = new Hyperlink( "Go To Products", "" );
filter = new CheckBox( "Filter Company EventBus events" );
moduleHistory = new CheckBox( "Disable Company Module History" );
applicationHistory = new CheckBox( "Disable Application History" );
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.add( table );
mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
mainPanel.add( createButton );
mainPanel.add( goToProduct );
mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
mainPanel.add( moduleHistory );
mainPanel.add( applicationHistory );
mainPanel.add( filter );
initWidget( mainPanel );
}
示例4: 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);
}
示例5: createView
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public void createView() {
table = new FlexTable();
createButton = new Image( "images/add.png" );
companyButton = new Anchor( "Go to company" );
infoButton = new Anchor( "Info" );
passiveInfoButton = new Anchor( "Passive Info" );
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.add( table );
mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
mainPanel.add( createButton );
mainPanel.add( companyButton );
mainPanel.add( infoButton );
mainPanel.add( passiveInfoButton );
setWidget( mainPanel );
}
示例6: createLyricsDialog
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private void createLyricsDialog()
{
lyricsDialog = new DialogBox();
VerticalPanel vPanel = new VerticalPanel();
vPanel.setHeight( "100%" );
vPanel.setHorizontalAlignment( VerticalPanel.ALIGN_CENTER );
vPanel.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE );
lyricsDialog.add( vPanel );
lyrics = new HTML();
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.setWidth( "300px" );
scrollPanel.setHeight( "250px" );
scrollPanel.add( lyrics );
vPanel.add( scrollPanel );
Button close = new NativeButton( "Close" );
close.addClickListener( new ClickListener() {
public void onClick( Widget arg0 ) {
lyricsDialog.hide();
}
} );
vPanel.add( close );
}
示例7: ErrorView
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public ErrorView() {
VerticalPanel panel = new VerticalPanel();
Button reloadButton = new Button("Restart");
dialogBox.setText("System Error");
dialogBox.setGlassEnabled(true);
dialogBox.setAnimationEnabled(true);
dialogBox.addStyleName("gwt-ErrorDialogBox");
panel.addStyleName("dialog-vpanel");
panel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
errorLabel.addStyleName("dialog-error-icon");
panel.add(errorLabel);
reloadButton.addClickHandler(this);
panel.add(reloadButton);
dialogBox.setWidget(panel);
}
示例8: ErrorPopup
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public ErrorPopup(Widget w){
super(false, true);
VerticalPanel response = new VerticalPanel();
setText("Error");
setAnimationEnabled(true);
setWidget(response);
response.add(w);
w.addStyleName("errorMessage");
response.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
Button closeButton = new Button("Close");
response.add(closeButton);
closeButton.addStyleName("closeButton");
closeButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
hide();
}
});
}
示例9: createPanel
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private Widget createPanel() {
final VerticalPanel vPanel = new VerticalPanel();
vPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_JUSTIFY);
vPanel.add(createTabPanel());
vPanel.add(separatorPanel);
vPanel.add(loadFileButton);
vPanel.add(comboPanel);
vPanel.add(layerAttributeComboPanel);
return vPanel;
}
示例10: createUI
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* The UI consists of a vertical panel that holds a drop-down list box,
* a Horizontal panel that holds the templates list (cell list) plus
* the selected template. This is inserted in the Wizard dialog.
*
* @param templates should never be null
* @return the main panel for Wizard dialog.
*/
VerticalPanel createUI(final ArrayList<TemplateInfo> templates) {
VerticalPanel panel = new VerticalPanel();
panel.setStylePrimaryName("gwt-SimplePanel");
panel.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
panel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
templatePanel = new HorizontalPanel();
templatePanel.add(makeTemplateSelector(templates));
if (templates.size() > 0)
templatePanel.add(new TemplateWidget(templates.get(0), templateHostUrl));
templatesMenu = makeTemplatesMenu();
HorizontalPanel hPanel = new HorizontalPanel();
hPanel.add(templatesMenu);
removeButton = new Button("Remove this repository", new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
removeCurrentlySelectedRepository();
}
});
removeButton.setVisible(false);
hPanel.add(removeButton);
panel.add(hPanel);
panel.add(templatePanel);
return panel;
}
示例11: setupAnalyzerAndReportPanel2
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public void setupAnalyzerAndReportPanel2(ScrollPanel analyzerPanel, DockLayoutPanel dPanel) {
// Create a CellTable.
final CellTable<AnalyzerResultDTO> table = new CellTable<AnalyzerResultDTO>();
setupAnalyzeResultDisplayPanel(table, dataProvider);
SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
pager.setDisplay(table);
dataProvider.addDataDisplay(table);
// Set the width of each column.
// table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
final Label errorLabelDisplay = new Label();
VerticalPanel displayPanel = new VerticalPanel();
displayPanel.add(pager);
displayPanel.add(table);
displayPanel.add(errorLabelDisplay);
displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
analyzerPanel.add(displayPanel);
// DoS detector panel
// Any detector error message
VerticalPanel vPanel = new VerticalPanel();
final Label errorLabelActivateDetector = new Label();
HorizontalPanel detectorPanel = new HorizontalPanel();
detectorPanel.addStyleName("essencePanel");
detectorPanel.setSpacing(10);
setupDetectorPanel(detectorPanel, errorLabelActivateDetector, dataProvider);
vPanel.add(detectorPanel);
vPanel.add(errorLabelActivateDetector);
dPanel.addNorth(vPanel, 10);
}
示例12: SlidingToolbar
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private SlidingToolbar(PanelSizeInfo sizeInfo) {
HorizontalPanel container = new HorizontalPanel();
this.initWidget(container);
setWidth("340px");
setStylePrimaryName("toolbar");
setHeight("100%");
container.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
DOM.setStyleAttribute(getElement(), "marginLeft", "-320px");
mainPanel = new VerticalPanel();
mainPanel.setStylePrimaryName("mainToolbarPanel");
tab = new Label(">");
tab.setStylePrimaryName("tabToolbarPanel");
container.add(mainPanel);
container.add(tab);
// Configure Main Panel
mainPanel.setHeight("80%");
mainPanel.setWidth("320px");
mainPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
Element mainElem = mainPanel.getElement();
DOM.setStyleAttribute(mainElem, "paddingLeft", "70px");
DOM.setStyleAttribute(mainElem, "paddingTop", "20px");
DOM.setStyleAttribute(mainElem, "paddingRight", "20px");
DOM.setStyleAttribute(mainElem, "paddingBottom", "20px");
// Configure Tab
tab.setWidth("20px");
tab.setHeight("50px");
tab.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
Element tabElem = tab.getElement();
DOM.setStyleAttribute(tabElem, "lineHeight", "50px");
// Add to Window
RootPanel.get().add(this, 0, 0);
addAnimation();
createToolbarContent(sizeInfo);
}
示例13: PopupMessage
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
static public void PopupMessage(String title, String message) {
final DialogBox p = new DialogBox(false, false);
//p.setStyleName(INFO_MSG_STYLE);
if (title != null) {
p.setTitle(title);
}
VerticalPanel vp = new VerticalPanel();
vp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
vp.setSpacing(10);
vp.add(new HTML(message));
vp.add(new HTML(""));
Button b = new Button("Close");
vp.add(b);
p.setWidget(vp);
p.center();
b.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
p.hide();
p.clear();
}
});
p.show();
}
示例14: addAvatarDataFields
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private void addAvatarDataFields() {
//ADD THE MAIN DATA FIELDS
addNewGrid( 1, true, titlesI18N.avatarUserProfilePanel(), true);
//Initialize the avatar's image actions
VerticalPanel avatarActionPanel = new VerticalPanel();
avatarActionPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
avatarActionPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
ActionLinkPanel chooseAvatarActionLink = new ActionLinkPanel( ServerSideAccessManager.getChooseImageURL(), "",
ServerSideAccessManager.getChooseImageURL(), "",
titlesI18N.chooseLinkTitle(), avatarChooseAction, true, true );
chooseAvatarActionLink.setImportant();
avatarActionPanel.add( chooseAvatarActionLink );
avatarActionPanel.add( new ActionLinkPanel( ServerSideAccessManager.getUploadImageURL(), "",
ServerSideAccessManager.getUploadImageURL(), "",
titlesI18N.uploadLinkTitle(), avatarUploadAction, true, true ) );
avatarActionPanel.add( new ActionLinkPanel( ServerSideAccessManager.getDeleteImageURL(), "",
ServerSideAccessManager.getDeleteImageURL(), "",
titlesI18N.deleteLinkTitle(), avatarDeleteAction, true, true ) );
HorizontalPanel avatarPanel = new HorizontalPanel();
avatarPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
avatarPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
avatarPanel.add( avatarImage );
avatarPanel.add( new HTML(" ") );
avatarPanel.add( avatarActionPanel );
addToGrid( FIRST_COLUMN_INDEX, avatarPanel, false, false );
}
示例15: initAvatarPanel
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
private Widget initAvatarPanel( final int index, final PresetAvatarImages.AvatarDescriptor descriptor ){
Widget avatarWidget;
//Initialize the avatar image
final String avatarURLBase = ServerSideAccessManager.getPresetAvatarImagesBase();
Image image = new Image( avatarURLBase + descriptor.relativeURL );
image.setStyleName( CommonResourcesContainer.AVATAR_IMAGE_CHOICE_DEFAULT_STYLE );
image.setTitle( titlesI18N.clickToChooseToolTip() );
//Sort out what the avatar widget is.
if( descriptor.price > 0 ) {
//If there is a price tag then the avatar is a special object
FocusPanel focusPanel = new FocusPanel();
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
verticalPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
verticalPanel.add( image );
verticalPanel.add( new PriceTagWidget( null, descriptor.price, false, true ));
focusPanel.add( verticalPanel );
avatarWidget = focusPanel;
} else {
//If there is no price then the avatar is the image widget itself
avatarWidget = image;
}
//Add the floading style and the click handler
avatarWidget.addStyleName( CommonResourcesContainer.AVATAR_IMAGE_IN_LIST_STYLE );
((HasClickHandlers) avatarWidget).addClickHandler( new ClickHandler() {
public void onClick(ClickEvent e) {
if( isChooseEnabled ) {
//Initiate the avatar selection, do the RPC call
doChooseAvatarServerCall( index );
}
//Just in case stop the event here
e.preventDefault(); e.stopPropagation();
}
});
return (Widget) avatarWidget;
}