本文整理汇总了Java中com.google.gwt.user.client.ui.DecoratorPanel.setStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java DecoratorPanel.setStyleName方法的具体用法?Java DecoratorPanel.setStyleName怎么用?Java DecoratorPanel.setStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.DecoratorPanel
的用法示例。
在下文中一共展示了DecoratorPanel.setStyleName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SiteLoadingGlassPanel
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
/**
* The basic constructor
*/
public SiteLoadingGlassPanel( final FocusPanel theMainFocusPanel ) {
//Store the main focus panel reference
this.theMainFocusPanel = theMainFocusPanel;
//Get the title manager
final UITitlesI18N titlesI18N = I18NManager.getTitles();
//Set up the component's content
final DecoratorPanel decoratedPanel = new DecoratorPanel();
decoratedPanel.setStyleName( CommonResourcesContainer.INTERNAL_ROUNDED_CORNER_PANEL_STYLE );
//Add the content to the decorated panel
final HorizontalPanel horizontalPanel = new HorizontalPanel();
horizontalPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_BOTTOM );
horizontalPanel.setStyleName( CommonResourcesContainer.INTERNAL_ROUNDED_CORNER_PANEL_CONTENT_STYLE );
//Add the loading image
horizontalPanel.add( new Image( ServerSideAccessManager.getActivityImageURL( ) ) );
//Add the spacing
horizontalPanel.add( new HTML(" ") );
//Add the communicating label
final Label loadingLabel = new Label( titlesI18N.communicatingText() );
loadingLabel.setStyleName( CommonResourcesContainer.LOADING_LABEL_STYLE );
horizontalPanel.add( loadingLabel );
//Store the content in the decorated panel
decoratedPanel.add( horizontalPanel );
//Put the stuff into the glass panel, make sure it is centered
loadingGlassPanel.insertRow( 0 );
loadingGlassPanel.insertCell( 0, 0 );
loadingGlassPanel.getCellFormatter().setAlignment( 0, 0, HasHorizontalAlignment.ALIGN_CENTER, HasVerticalAlignment.ALIGN_MIDDLE );
loadingGlassPanel.setWidget( 0, 0, decoratedPanel );
loadingGlassPanel.setVisible( false );
loadingGlassPanel.setTitle( titlesI18N.communicatingToolTipText() );
loadingGlassPanel.setStyleName( CommonResourcesContainer.SITE_LOADING_COMPONENT_GLASS_PANEL_STYLE );
//Initialize the widget
initWidget( loadingGlassPanel );
}
示例2: ForumBodyWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
/**
* The basic constructor provided with the site section url prefix
* @param siteSectionPrefix the history token site section prefix
*/
ForumBodyWidget( final String siteSectionPrefix ) {
super();
//The forum's search panel
this.searchPanel = new ForumSearchPanel( false );
forumBodyComponents.add( searchPanel );
//The forum's messages panel
this.messagesPanel = new ForumMessagesPanel( true, true, true, siteSectionPrefix );
forumBodyComponents.add( messagesPanel );
//The forum's message stack navigator
this.stackNavigator = new MessagesStackNavigator( false, messagesPanel, searchPanel, siteSectionPrefix );
forumBodyComponents.add( stackNavigator );
//Set up the forum manager
ForumSearchManager.setForumUIComponents( searchPanel, stackNavigator, messagesPanel, this );
//Register the avatar image spoiler listener
UserAvatarImageWidget.addAvatarSpoilerChangeListener( this );
//Initialize the main vetical panel
forumPanel.setWidth("100%");
forumPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
//Add the search and navigator panels to a wrapping decorated panel
final VerticalPanel searchNavPanel = new VerticalPanel();
searchNavPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
final DecoratorPanel decPanel = new DecoratorPanel();
decPanel.setStyleName( CommonResourcesContainer.GRAY_ROUNDED_CORNER_PANEL_STYLE );
decPanel.add( searchNavPanel );
forumPanel.add( decPanel );
//Add the search panel
searchPanel.setWidth("100%");
searchNavPanel.add( searchPanel );
//Add the messages stack navigator
stackNavigator.setWidth("100%");
searchNavPanel.add( stackNavigator );
//Add Messages panel
forumPanel.add( messagesPanel );
//Initialize the composite
initWidget( forumPanel );
}
示例3: Top10BodyWidget
import com.google.gwt.user.client.ui.DecoratorPanel; //导入方法依赖的package包/类
/**
* The basic constructor provided with the site section url prefix
* @param siteSectionPrefix the history token site section prefix
*/
public Top10BodyWidget( final String siteSectionPrefix ) {
super();
//Store the data
this.siteSectionPrefix = siteSectionPrefix;
//Register as the avatar spoiler change listener
UserAvatarImageWidget.addAvatarSpoilerChangeListener( this );
//Initialize the main decorated panel
decoratedPanel = new DecoratorPanel();
decoratedPanel.setStyleName( CommonResourcesContainer.GRAY_ROUNDED_CORNER_PANEL_STYLE );
//Initialize the vertical
widgetPanel = new VerticalPanel();
widgetPanel.setWidth("100%");
widgetPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_LEFT );
widgetPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_TOP );
decoratedPanel.add( widgetPanel );
//Initialize the scroll panel
scrollPanel = new SimplePanel();
scrollPanel.setStyleName( CommonResourcesContainer.SCROLLABLE_SIMPLE_PANEL );
widgetPanel.add( scrollPanel );
//Initialize the panel storing the statistics widgets
statWidgetsPanel = new HorizontalPanel();
statWidgetsPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
statWidgetsPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_TOP );
statWidgetsPanel.setWidth("100%");
scrollPanel.add( statWidgetsPanel );
//Add top10 widgets here
addTop10Widget( new MoneyTop10StatWidget() );
addTop10Widget( new TimeOnSiteTop10StatWidget() );
addTop10Widget( new ChatMsgsTop10StatWidget() );
addTop10Widget( new ForumPostsTop10StatWidget() );
addTop10Widget( new RegistrationsTop10StatWidget() );
addTop10Widget( new LastProfileFileTop10StatWidget() );
addTop10Widget( new VisitsTop10StatWidget() );
//Initialize the composite
initWidget( decoratedPanel );
}