當前位置: 首頁>>代碼示例>>Java>>正文


Java FlowPanel.addStyleName方法代碼示例

本文整理匯總了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);
  }
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:25,代碼來源:UniTimeDialogBox.java

示例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);
    }
  });
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:27,代碼來源:GalleryList.java

示例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);
          }
    }
  });
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:42,代碼來源:ProfilePage.java

示例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);
    }
}
 
開發者ID:YoungDigitalPlanet,項目名稱:empiria.player,代碼行數:42,代碼來源:InlineChoiceDefaultController.java

示例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);
}
 
開發者ID:YoungDigitalPlanet,項目名稱:empiria.player,代碼行數:6,代碼來源:MultiPageControllerStyleManager.java

示例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);
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:59,代碼來源:GalleryList.java

示例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);
  }
}
 
開發者ID:mit-cml,項目名稱:appinventor-extensions,代碼行數:53,代碼來源:GalleryGuiFactory.java


注:本文中的com.google.gwt.user.client.ui.FlowPanel.addStyleName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。