本文整理匯總了Java中com.google.gwt.user.client.ui.HorizontalPanel.setVerticalAlignment方法的典型用法代碼示例。如果您正苦於以下問題:Java HorizontalPanel.setVerticalAlignment方法的具體用法?Java HorizontalPanel.setVerticalAlignment怎麽用?Java HorizontalPanel.setVerticalAlignment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.HorizontalPanel
的用法示例。
在下文中一共展示了HorizontalPanel.setVerticalAlignment方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createSeparatorPanel
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
private void createSeparatorPanel() {
separatorPanel = new HorizontalPanel();
separatorPanel.setSpacing(1);
separatorPanel.setWidth("100%");
separatorPanel.addStyleName(ThemeStyles.get().style().borderTop());
separatorPanel.addStyleName(ThemeStyles.get().style().borderBottom());
separatorPanel
.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
separatorPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
separatorPanel.add(new Label(UIMessages.INSTANCE
.separator(DEFAULT_CSV_SEPARATOR)));
separatorTextField = new TextField();
separatorTextField.setText(DEFAULT_CSV_SEPARATOR);
separatorTextField.setWidth(30);
separatorPanel.add(separatorTextField);
}
示例2: PageListWidget
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
/**
* The basic constructor
* @param siteSectionPrefix the history token site section prefix
*/
public PageListWidget( final String siteSectionPrefix ) {
this.siteSectionPrefix = siteSectionPrefix;
final HorizontalPanel mainPanel = new HorizontalPanel();
mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER);
mainPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM);
indexesPanel = new HorizontalPanel();
indexesPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER);
indexesPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM);
Label pageLabel = new Label( I18NManager.getTitles().pageString() );
pageLabel.setStyleName( CommonResourcesContainer.REGULAR_FIELD_STYLE );
mainPanel.add( pageLabel );
mainPanel.add( new HTML(": ") );
mainPanel.add( indexesPanel );
//The wrapper panel
HorizontalPanel wrapPanel = new HorizontalPanel();
wrapPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
wrapPanel.add( mainPanel );
initWidget( wrapPanel );
}
示例3: getPanel
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
private HorizontalPanel getPanel(final HTML data) {
HorizontalPanel panel = new HorizontalPanel();
panel.setSize("520px", "310px");
panel.setSpacing(5);
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
panel.add(getAuthenticationPanel());
panel.add(data);
return panel;
}
示例4: SlidingToolbar
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的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);
}
示例5: AbsolutePanelComponent
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public AbsolutePanelComponent() {
componentContainer = new HorizontalPanel();
componentContainer.setWidth("100%");
componentContainer.setHeight("100%");
componentContainer.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
componentContainer.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE);
setPanelWidget(componentContainer);
}
示例6: OperationsMenu
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public OperationsMenu() {
buttonBar = new HorizontalPanel();
buttonBar.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
turnOffButtons();
animationButton.addStyleDependentName("SMALLER");
animationButton.setTitle("Interactive interface for making a sequence of plots over time.");
compareButton.addStyleDependentName("SMALLER");
correlationButton.addStyleDependentName("SMALLER");
correlationButton.setTitle("Beta interface to make a scatter plot of a property vs. another property.");
googleEarthButton.addStyleDependentName("SMALLER");
googleEarthButton.setTitle("View a plot of data draped over the globe using Google Earth.");
showValuesButton.addStyleDependentName("SMALLER");
showValuesButton.setTitle("Look at the data values in a new window.");
exportToDesktopButton.addStyleDependentName("SMALLER");
exportToDesktopButton.setTitle("Get a few lines of native script for various analysis packages.");
saveAsButton.addStyleDependentName("SMALLER");
saveAsButton.ensureDebugId("saveAsButton");
saveAsButton.setTitle("Save data in various text and binary formats.");
climateAnalysis.addStyleDependentName("SMALLER");
climateAnalysis.setTitle("Perform time average spectrum and other advanced analysis.");
dsgTable.addStyleDependentName("SMALLER");
dsgTable.setTitle("See a table of current observations by ID.");
thumbnailTable.addStyleDependentName("SMALLER");
thumbnailTable.setTitle("See a table of select property-property plots.");
buttonBar.add(animationButton);
buttonBar.add(correlationButton);
buttonBar.add(googleEarthButton);
buttonBar.add(showValuesButton);
buttonBar.add(exportToDesktopButton);
buttonBar.add(saveAsButton);
buttonBar.add(climateAnalysis);
buttonBar.add(dsgTable);
buttonBar.add(thumbnailTable);
climateAnalysis.setVisible(false);
dsgTable.setVisible(false);
thumbnailTable.setVisible(false);
initWidget(buttonBar);
buttonBar.setSize("100%", "100%");
}
示例7: SiteTitle
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public SiteTitle() {
//Add the widgets to the main panel
HorizontalPanel titlePanel = new HorizontalPanel();
titlePanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
titlePanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
titlePanel.add( SiteDynamicDecorations.getBackgroundTimeImage() );
//titlePanel.add( new HTML(" ") ); //Add some spacing
//titlePanel.add( SiteDynamicDecorations.getSiteTitleLabel() );
//Initialize the composite
initWidget( titlePanel );
}
示例8: getLocaleSelectionPanel
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
/**
* Allows to get the locale selection Panel
* @return
*/
public static HorizontalPanel getLocaleSelectionPanel() {
final HorizontalPanel localeSelectionPanel = new HorizontalPanel();
localeSelectionPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
localeSelectionPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
localeSelectionPanel.setStyleName( CommonResourcesContainer.LOCALE_PANEL_STYLE );
String[] localeNames = LocaleInfo.getAvailableLocaleNames();
for( String localeValue : localeNames ) {
if( !localeValue.equals( InterfaceUtils.DEFAULT_LOCALE_VALUE ) ) {
String nativeName = LocaleInfo.getLocaleNativeDisplayName( localeValue );
Image localeImage = new Image();
localeImage.addStyleName( CommonResourcesContainer.LOCALIZATION_IMAGE_STYLE );
localeImage.setUrl( ServerSideAccessManager.SITE_IMAGES_LOCATION + "locale_small_" + localeValue + ".png");
localeImage.setTitle( nativeName );
final String currLocaleValue = localeValue;
localeImage.addClickHandler( new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
reloadWebSitePages( currLocaleValue );
}
});
localeSelectionPanel.add( new HTML(" ") );
localeSelectionPanel.add( localeImage );
}
}
return localeSelectionPanel;
}
示例9: displayStatisticsElement
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
/**
* Allows to display the statistics entry based on the statistical data text and the image
* @param avatarVerticalPanel the vertical panel to add the statistical widget to
* @param widget the widget that described the value
* @param image_name the name of the image describing the statistics
*/
private void displayStatisticsElement( final VerticalPanel avatarVerticalPanel,
final Widget widget, final String image_name) {
final HorizontalPanel panel = new HorizontalPanel();
panel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
panel.add( new Image( ServerSideAccessManager.USER_INFO_RELATED_IMAGES_LOCATION +
ServerSideAccessManager.SERVER_CONTEXT_DELIMITER + image_name + ".png" ) );
panel.add( new HTML(" ") );
panel.add( widget );
avatarVerticalPanel.add( panel );
}
示例10: createPageSizeWidget
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
protected Widget createPageSizeWidget() {
HorizontalPanel panel = new HorizontalPanel();
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
panel.add(new HTML(_messages.pagesize1()));
panel.add(new ListBox());
panel.add(new HTML(_messages.pagesize2()));
panel.setStylePrimaryName(STYLE_PAGESIZE);
return panel;
}
示例11: TextMaximumSizeProgress
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
/**
* This constructor should be only visible inside of the package.
* Note that to initialize the progress bar one has to bind it to the text base object.
* This should be done using the method bindProgressBar(...).
*/
TextMaximumSizeProgress( ) {
//Initialize the progress bar content first
HorizontalPanel innerProgressBarPanel = new HorizontalPanel();
innerProgressBarPanel.setStyleName( CommonResourcesContainer.PROGRESS_BAR_STYLE_NAME );
innerProgressBarPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
innerProgressBarPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
innerProgressBarPanel.add( leftBar );
innerProgressBarPanel.add( rightBar );
progressBarPanel.addClickHandler( new ClickHandler(){
public void onClick(ClickEvent e) {
if( isMaximumLengthExceeded ) {
(new SplitLoad( true ) {
@Override
public void execute() {
//Report the error
ErrorMessagesDialogUI.openErrorDialog( infoToolTipMessage );
}
}).loadAndExecute();
} else {
(new SplitLoad( true ) {
@Override
public void execute() {
//Open the info dialog
InfoMessageDialogUI.openInfoDialog( infoToolTipMessage );
}
}).loadAndExecute();
}
}
});
progressBarPanel.add( innerProgressBarPanel );
//Initialize the composite
initWidget( progressBarPanel );
}
示例12: UserProfileFilesView
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
/**
* The basic constructor
*/
public UserProfileFilesView( final DialogBox parentDialog, final UserData userData ) {
//Store the reference to the parent dialog
this.parentDialog = parentDialog;
//Set the local scroll panel
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.addStyleName( CommonResourcesContainer.FILE_TUMBNAILS_PANEL_STYLE );
//Set up the images panel
thumbnailsPanel = new HorizontalPanel();
thumbnailsPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
thumbnailsPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
scrollPanel.add( thumbnailsPanel );
//Instantiate the buttons
previousButton = new LeftRightButtons( CommonResourcesContainer.NAV_LEFT_IMG_BUTTON, false , false );
nextButton = new LeftRightButtons( CommonResourcesContainer.NAV_RIGHT_IMG_BUTTON, false , false );
//Set up the main panel
mainHorPanel = new HorizontalPanel();
mainHorPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
mainHorPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
mainHorPanel.add( previousButton );
mainHorPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
mainHorPanel.add( scrollPanel );
mainHorPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
mainHorPanel.add( nextButton );
//Set the user profile files
setUserProfile( userData );
//Initialize the widget
initWidget( mainHorPanel );
}
示例13: initializeWarning
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public void initializeWarning( final String warningString ) {
//For the MS IE we add an error/warning message
//about that we do not really suport it
VerticalPanel warningPanel = new VerticalPanel();
warningPanel.setStyleName( CommonResourcesContainer.IE_ERROR_PANEL_STYLE_NAME );
warningPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
warningPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
//Add the error/warning message
HTML errorMessage = new HTML( warningString );
warningPanel.add( errorMessage );
//Add the horizontal panel with the continue button and the localization list box
HorizontalPanel horizPanel = new HorizontalPanel();
horizPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
horizPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
//Add the continue button
Button continueButon = new Button();
continueButon.setText( I18NManager.getTitles().continueButtonTitle() );
continueButon.setStyleName( CommonResourcesContainer.USER_DIALOG_ACTION_BUTTON_STYLE );
continueButon.addClickHandler( new ClickHandler() {
public void onClick( ClickEvent e) {
//Remember that the user was warned about using MS IE
SiteManager.setMSIEWarned();
//Initialize the web site
initializeSite();
}
});
horizPanel.add( continueButon );
//Add spacing
horizPanel.add( new HTML(" ") );
//Add the localization list box
horizPanel.add( InterfaceUtils.getLocaleSelectionPanel() );
warningPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_RIGHT );
warningPanel.add( horizPanel );
RootPanel.get().add( warningPanel );
}
示例14: Top10UserFileWidget
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
/**
* The basic constructor
* @param parentDialog the reference to the parent dialog or null if none
* @param fileDescriptors the list of the users' profile files to browse through
* @param fileIndex the index of the file we create this preview widget for
*/
public Top10UserFileWidget( final DialogBox parentDialog, final List<ShortUserFileDescriptor> fileDescriptors, final int fileIndex ) {
//Store the data
this.parentDialog = parentDialog;
this.fileDescr = fileDescriptors.get( fileIndex );
//Initialize and fill out the main panel
mainPanel = new VerticalPanel();
mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
//Initialize the image
previewImage = constructThumbnailImage( fileDescriptors, fileIndex );
//Initialize the upload date panel
final HorizontalPanel uploadDatePanel = new HorizontalPanel();
uploadDatePanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
//Add the image
uploadDatePanel.add( new Image( ServerSideAccessManager.USER_INFO_RELATED_IMAGES_LOCATION +
ServerSideAccessManager.SERVER_CONTEXT_DELIMITER + "uploaded.png" ) );
uploadDatePanel.add( new HTML(" ") );
//Add the date label
{
final DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat( PredefinedFormat.DATE_TIME_SHORT );
final Label uploadDateLabel = new Label( dateTimeFormat.format( fileDescr.uploadDate ) );
uploadDateLabel.setStyleName( CommonResourcesContainer.TOP_TEN_USER_FILE_UPLOAD_DATE_STYLE );
uploadDatePanel.add( uploadDateLabel );
}
//Initialize the user name label
userNameAvatar = new UserAvatarWidget( fileDescr.ownerID, fileDescr.ownerLoginName );
mainPanel.add( previewImage );
mainPanel.add( uploadDatePanel );
mainPanel.add( userNameAvatar );
//Initialize the composite
initWidget(mainPanel);
}
示例15: addAvatarDataFields
import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的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 );
}