本文整理汇总了Java中com.google.gwt.user.client.ui.FlowPanel.addStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java FlowPanel.addStyleName方法的具体用法?Java FlowPanel.addStyleName怎么用?Java FlowPanel.addStyleName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.FlowPanel
的用法示例。
在下文中一共展示了FlowPanel.addStyleName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: UniTimeDialogBox
import com.google.gwt.user.client.ui.FlowPanel; //导入方法依赖的package包/类
public UniTimeDialogBox(boolean autoHide, boolean modal) {
super(autoHide, modal);
setAnimationEnabled(true);
setGlassEnabled(true);
iContainer = new FlowPanel();
iContainer.addStyleName("dialogContainer");
iClose = new Anchor();
iClose.setTitle(MESSAGES.hintCloseDialog());
iClose.setStyleName("close");
iClose.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
onCloseClick(event);
}
});
iClose.setVisible(autoHide);
iControls = new FlowPanel();
iControls.setStyleName("dialogControls");
iControls.add(iClose);
}
示例2: addGallerySearchTab
import com.google.gwt.user.client.ui.FlowPanel; //导入方法依赖的package包/类
/**
* Creates the GUI components for search tab.
*
* @param searchApp: the FlowPanel that search tab will reside.
*/
private void addGallerySearchTab(FlowPanel searchApp) {
// Add search GUI
FlowPanel searchPanel = new FlowPanel();
final TextBox searchText = new TextBox();
searchText.addStyleName("gallery-search-textarea");
Button sb = new Button(MESSAGES.gallerySearchForAppsButton());
searchPanel.add(searchText);
searchPanel.add(sb);
searchPanel.addStyleName("gallery-search-panel");
searchApp.add(searchPanel);
appSearchContent.addStyleName("gallery-search-results");
searchApp.add(appSearchContent);
searchApp.addStyleName("gallery-search");
sb.addClickHandler(new ClickHandler() {
// @Override
public void onClick(ClickEvent event) {
gallery.FindApps(searchText.getText(), 0, NUMAPPSTOSHOW, 0, true);
}
});
}
示例3: addGalleryAppTab
import com.google.gwt.user.client.ui.FlowPanel; //导入方法依赖的package包/类
/**
* Creates the GUI components for a regular app tab.
* This method resides here because it needs access to global variables.
* @param container: the FlowPanel that this app tab will reside.
* @param content: the sub-panel that contains the actual app content.
*/
private void addGalleryAppTab(FlowPanel container, FlowPanel content, final String incomingUserId) {
// Search specific
generalTotalResultsLabel = new Label();
container.add(generalTotalResultsLabel);
final OdeAsyncCallback<GalleryAppListResult> byAuthorCallback = new OdeAsyncCallback<GalleryAppListResult>(
// failure message
MESSAGES.galleryError()) {
@Override
public void onSuccess(GalleryAppListResult appsResult) {
refreshApps(appsResult,false);
}
};
Ode.getInstance().getGalleryService().getDeveloperApps(userId,appCatalogCounter ,NUMAPPSTOSHOW, byAuthorCallback);
container.add(content);
buttonNext = new Label();
buttonNext.setText(MESSAGES.galleryMoreApps());
buttonNext.addStyleName("active");
FlowPanel next = new FlowPanel();
next.add(buttonNext);
next.addStyleName("gallery-nav-next");
container.add(next);
buttonNext.addClickHandler(new ClickHandler() {
// @Override
public void onClick(ClickEvent event) {
if (!appCatalogExhausted) {
// If the next page still has apps to retrieve, do it
appCatalogCounter += NUMAPPSTOSHOW;
Ode.getInstance().getGalleryService().getDeveloperApps(userId,appCatalogCounter ,NUMAPPSTOSHOW, byAuthorCallback);
}
}
});
}
示例4: installViews
import com.google.gwt.user.client.ui.FlowPanel; //导入方法依赖的package包/类
@Override
public void installViews(List<HasWidgets> placeholders) {
responseIdentifier = XMLUtils.getAttributeAsString(moduleElement, "responseIdentifier");
response = responseSocket.getResponse(responseIdentifier);
shuffle = XMLUtils.getAttributeAsBoolean(moduleElement, "shuffle");
String userClass = XMLUtils.getAttributeAsString(moduleElement, "class");
listBox = new AccessibleListBox();
if (shuffle) {
initRandom(moduleElement);
} else {
init(moduleElement);
}
if (showEmptyOption) {
listBox.setSelectedIndex(0);
} else {
listBox.setSelectedIndex(-1);
}
listBox.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(ChangeEvent event) {
listBoxChanged();
}
});
container = new FlowPanel();
container.add(listBox);
placeholders.get(0)
.add(container);
container.setStyleName("qp-text-choice");
if (userClass != null && !"".equals(userClass)) {
container.addStyleName(userClass);
}
}
示例5: setPageStyles
import com.google.gwt.user.client.ui.FlowPanel; //导入方法依赖的package包/类
public void setPageStyles(FlowPanel panel, boolean isChangeToNextPage) {
panel.addStyleName(styleNames.QP_PAGE_UNSELECTED());
String pageDirectionChangeStyle = findPageDirectionChangeStyle(isChangeToNextPage);
panel.addStyleName(pageDirectionChangeStyle);
}
示例6: GalleryList
import com.google.gwt.user.client.ui.FlowPanel; //导入方法依赖的package包/类
/**
* Creates a new GalleryList
*/
public GalleryList() {
gallery = GalleryClient.getInstance();
gallery.addListener(this);
galleryGF = new GalleryGuiFactory();
selectedApps = new ArrayList<GalleryApp>();
// Initialize UI
galleryGUI = new FlowPanel();
galleryGUI.addStyleName("gallery");
appTabs = new TabPanel();
appRecent = new FlowPanel();
appFeatured = new FlowPanel();
appPopular = new FlowPanel();
appSearch = new FlowPanel();
appTutorial = new FlowPanel();
appRecentContent = new FlowPanel();
appFeaturedContent = new FlowPanel();
appPopularContent = new FlowPanel();
appSearchContent = new FlowPanel();
appTutorialContent = new FlowPanel();
searchText = new TextBox();
// HTML segment for gallery typeface
HTML headerExtra = new HTML(
"<link href='http://fonts.googleapis.com/css?" +
"family=Roboto:400,300,100' rel='stylesheet' type='text/css'>");
galleryGUI.add(headerExtra);
// Add content to panels
appFeaturedTab = new GalleryAppTab(appFeatured, appFeaturedContent, REQUEST_FEATURED);
appRecentTab = new GalleryAppTab(appRecent, appRecentContent, REQUEST_RECENT);
appSearchTab = new GalleryAppTab(appSearch, appSearchContent, REQUEST_SEARCH);
appPopularTab = new GalleryAppTab(appPopular, appPopularContent, REQUEST_MOSTLIKED);
appTutorialTab = new GalleryAppTab(appTutorial, appTutorialContent, REQUEST_TUTORIAL);
// don't think we need because in regular addgallerytab below
// Add panels to main tabPanel
appTabs.add(appRecent, "Recent");
appTabs.add(appTutorial,"Tutorials");
appTabs.add(appFeatured, "Featured");
appTabs.add(appPopular, "Popular");
appTabs.add(appSearch, "Search");
appTabs.selectTab(0);
appTabs.addStyleName("gallery-app-tabs");
galleryGUI.add(appTabs);
// Initialize top-level GUI
VerticalPanel panel = new VerticalPanel();
panel.setWidth("100%");
panel.add(galleryGUI);
initWidget(panel);
}
示例7: generateAppPageComments
import com.google.gwt.user.client.ui.FlowPanel; //导入方法依赖的package包/类
/**
* Creates list of comments in the app page.
* @param comments: list of returned gallery comments from callback.
* @param container: the GUI panel where comments will reside.
*/
public void generateAppPageComments(List<GalleryComment> comments, FlowPanel container) {
container.clear(); // so don't show previous listing
if (comments == null) {
Label noComments = new Label("This app does not have any comments yet.");
noComments.addStyleName("comment-nope");
container.add(noComments);
}
for ( GalleryComment c : comments) {
FlowPanel commentItem = new FlowPanel();
FlowPanel commentPerson = new FlowPanel();
FlowPanel commentMeta = new FlowPanel();
FlowPanel commentContent = new FlowPanel();
// Add commentPerson, default avatar for now
Image cPerson = new Image();
cPerson.setUrl(PERSON_URL);
commentPerson.add(cPerson);
commentPerson.addStyleName("comment-person");
commentItem.add(commentPerson);
// Add commentContent
Label cAuthor = new Label(c.getUserName());
cAuthor.addStyleName("comment-author");
commentMeta.add(cAuthor);
Date commentDate = new Date(c.getTimeStamp());
DateTimeFormat dateFormat = DateTimeFormat.getFormat("yyyy/MM/dd hh:mm:ss a");
Label cDate = new Label(" on " + dateFormat.format(commentDate));
cDate.addStyleName("comment-date");
commentMeta.add(cDate);
commentMeta.addStyleName("comment-meta");
commentContent.add(commentMeta);
Label cText = new Label(c.getComment());
cText.addStyleName("comment-text");
commentContent.add(cText);
commentContent.addStyleName("comment-content");
commentItem.add(commentContent);
commentItem.addStyleName("comment-item");
commentItem.addStyleName("clearfix");
container.add(commentItem);
}
}