本文整理匯總了Java中com.google.gwt.user.client.ui.VerticalPanel.setVerticalAlignment方法的典型用法代碼示例。如果您正苦於以下問題:Java VerticalPanel.setVerticalAlignment方法的具體用法?Java VerticalPanel.setVerticalAlignment怎麽用?Java VerticalPanel.setVerticalAlignment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.VerticalPanel
的用法示例。
在下文中一共展示了VerticalPanel.setVerticalAlignment方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addNewFieldValuePair
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
protected void addNewFieldValuePair( final FlowPanel content, final String fieldName,
final Date dateValue, final boolean addEndCommaDelimiter ) {
final Label fieldLabel = new Label( fieldName );
fieldLabel.setStyleName( CommonResourcesContainer.USER_DIALOG_REGULAR_FIELD_STYLE );
final DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat( PredefinedFormat.DATE_TIME_SHORT );
final Label dateTimeLabel = new Label( dateTimeFormat.format( dateValue ) );
dateTimeLabel.setStyleName( CommonResourcesContainer.CONST_FIELD_VALUE_DEFAULT_STYLE_NAME );
final int width = ( dateTimeLabel.getOffsetWidth() == 0 ? DEFAULT_PROGRESS_BAR_WIDTH_PIXELS : dateTimeLabel.getOffsetWidth() );
DateOldProgressBarUI progressBarUI= new DateOldProgressBarUI( width, DEFAULT_PROGRESS_BAR_HEIGHT_PIXELS, dateValue );
//If there are replies to this message
VerticalPanel dateTimePanel = new VerticalPanel();
dateTimePanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
dateTimePanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
dateTimePanel.add( dateTimeLabel );
dateTimePanel.add( progressBarUI );
//Add the widgets to the panel
addNewFieldValuePair( content, fieldLabel, dateTimePanel, addEndCommaDelimiter );
}
示例2: getYoutubeEmbeddedFlashObject
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* Allows to get a flash object for the youtube video url
* @param yutubeMediaUrl the youtube video url
* @param youtubeURL the original youtube link url
* @param isInitiallyBlocked is true if the flash should be initially blocked
* @return the corresponding flash object widget
*/
public static Widget getYoutubeEmbeddedFlashObject( final String yutubeMediaUrl, final String youtubeURL, final boolean isInitiallyBlocked ) {
//Construct the youtube embedded object descriptor
FlashEmbeddedObject flashObject = new FlashEmbeddedObject( null );
flashObject.setMovieUrl( yutubeMediaUrl );
flashObject.completeEmbedFlash();
//Make the widget out of a wrapped youtube video plus the video URL.
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
mainPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
mainPanel.add( new FlashObjectWrapperUI( flashObject.toString(), isInitiallyBlocked, null ) );
mainPanel.add( new URLWidget( youtubeURL, false, false ) );
return mainPanel;
}
示例3: ChatMessagesPanelUI
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* The basic constructor
* @param roomID the id of the room to which this messages panel belongs
*/
public ChatMessagesPanelUI( final int roomID ) {
//Store the room's ID
this.roomID = roomID;
//Set interface components
table.setStyleName( CommonResourcesContainer.CHAT_MESSAGES_TABLE_STYLE_NAME );
VerticalPanel bottomAlignmentPanel = new VerticalPanel();
bottomAlignmentPanel.addStyleName( CommonResourcesContainer.CHAT_MESSAGES_VERTICAL_ALIGN_PANEL_STYLE_NAME );
bottomAlignmentPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
bottomAlignmentPanel.add( table );
msgsScrollPanel.add( bottomAlignmentPanel );
msgsScrollPanel.setStyleName( CommonResourcesContainer.CHAT_MESSAGES_SCROLL_PANEL_STYLE_NAME );
/*Initialize the composite widget*/
initWidget( msgsScrollPanel );
}
示例4: 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 );
}
示例5: LayerInfoToolBar
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public LayerInfoToolBar() {
super();
setHeight("200px");
setHeaderVisible(false);
tools = new ArrayList<FeatureTool>();
verticalGroup = new VerticalPanel();
verticalGroup.setSpacing(3);
verticalGroup.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
}
示例6: 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;
}
示例7: FormField
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public FormField() {
super(new VerticalPanel(), CLASS_NAME);
VerticalPanel container = (VerticalPanel)getWidget();
container.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
container.setSpacing(0);
lbl = new Label();
lbl.setWidth("100%");
lbl.setStylePrimaryName(LABEL_CLASS_NAME);
}
示例8: TabMultiple
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* Tab multiple
*/
public TabMultiple() {
panel = new VerticalPanel();
tabFolder = new TabFolder();
tabDocument = new TabDocument();
tabMail = new TabMail();
status = new Status();
status.setStyleName("okm-StatusPopup");
panel.setVerticalAlignment(VerticalPanel.ALIGN_TOP);
panel.setSize("100%", "100%");
initWidget(panel);
}
示例9: populateDialog
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
@Override
protected void populateDialog() {
//ADD THE MAIN DATA FIELDS
if( isTopicView ) {
addNewGrid( 2, 2, false, "", true);
} else {
addNewGrid( 1, 1, false, "", true);
}
//Make a wrapper scroll panel around the message because it can be too long
VerticalPanel centeringPanel = new VerticalPanel();
centeringPanel.addStyleName( CommonResourcesContainer.MAXIMUM_WIDTH_FOR_MESSAGE_VIEW_STYLE );
centeringPanel.setHeight("100%");
centeringPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
centeringPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
centeringPanel.add( forumMessageUI );
ScrollPanel wrapperPanel = new ScrollPanel();
wrapperPanel.setStyleName( CommonResourcesContainer.SCROLLABLE_SIMPLE_PANEL );
//Force the maximum viewable area for the displayed forum message
wrapperPanel.addStyleName( CommonResourcesContainer.MAXIMUM_SIZE_FOR_MESSAGE_VIEW_STYLE );
wrapperPanel.add( centeringPanel );
if( isTopicView ) {
addToGrid( this.getCurrentGridIndex(), FIRST_COLUMN_INDEX, 2, wrapperPanel, false, false );
//Add the grid action buttons
this.addGridActionElements(true, true);
} else {
addToGrid( FIRST_COLUMN_INDEX, wrapperPanel, false, false );
}
}
示例10: middleAlign
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public static Widget middleAlign(Widget w) {
VerticalPanel p = new VerticalPanel();
p.setHeight("100%");
p.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
p.add(w);
return p;
}
示例11: 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 );
}
示例12: 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;
}
示例13: initializeWarning
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的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: go
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/** {@inheritDoc} */
@Override
public void go(AcceptsOneWidget container) {
VerticalPanel panel = new VerticalPanel();
panel.setSize("100%", "100%");
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
panel.add(getImage());
editorView = new ScrollPanel(panel);
editorView.getElement().getFirstChildElement().getStyle().setHeight(100, Unit.PCT);
container.setWidget(editorView);
}
示例15: makeVertPanel
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public static VerticalPanel makeVertPanel(HasHorizontalAlignment.HorizontalAlignmentConstant halign,
HasVerticalAlignment.VerticalAlignmentConstant valign,
Widget... widgets) {
VerticalPanel vp = new VerticalPanel();
for (Widget w : widgets) {
vp.add(w);
}
if (halign != null) {
vp.setHorizontalAlignment(halign);
}
if (valign != null) {
vp.setVerticalAlignment(valign);
}
return vp;
}