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


Java ScrollPanel.setPixelSize方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.ScrollPanel.setPixelSize方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrollPanel.setPixelSize方法的具體用法?Java ScrollPanel.setPixelSize怎麽用?Java ScrollPanel.setPixelSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.ScrollPanel的用法示例。


在下文中一共展示了ScrollPanel.setPixelSize方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: HelpBookPopup

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public HelpBookPopup() {
  super(false);
  panel = new FlowPanel(); // vertical
  panel.setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);

  // populate the panel
  panel.add(new ClosePopupButton(this));

  BookHelpConsts[] consts = BookHelpConsts.values();

  FlowPanel content = new FlowPanel(); // vertical
  content.setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);
  for (int i = 0; i < consts.length; i++) {
    content.add(new HTML("<h2 id=\"form_name\">" + consts[i].getTitle() + "</h2>"));

    if (consts[i].getVideoUrl() != null) {
      String buttonTxt = consts[i].getTitle() + " Video Assistance";
      String toolTipTxt = "Play Video descibing how to " + consts[i].getTitle();
      AggregateButton vidButton = new AggregateButton(buttonTxt, toolTipTxt);
      vidButton.addClickHandler(new BinaryPopupClickHandler(consts[i].getVideoUrl(), true));
      content.add(vidButton);
    }

    content.add(new HTML(consts[i].getConcept() + "<br><br>"));
    content.add(new HTML(consts[i].getProcedures() + "<br><br>"));
  }

  ScrollPanel scroll = new ScrollPanel(content);
  scroll.setPixelSize((Window.getClientWidth() * 3 / 4), (Window.getClientHeight() * 3 / 4));

  panel.add(scroll);

  setWidget(panel);
  center();
}
 
開發者ID:opendatakit,項目名稱:aggregate,代碼行數:36,代碼來源:HelpBookPopup.java

示例2: RepeatPopup

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public RepeatPopup(final String keyString) {
  super();
  panel = new FlowPanel();
 

  // Set up the callback object.
  AsyncCallback<SubmissionUISummary> callback = new AsyncCallback<SubmissionUISummary>() {
     public void onFailure(Throwable caught) {
         AggregateUI.getUI().reportError(caught);
     }

     public void onSuccess(SubmissionUISummary summary) {
       panel.add(new SubmissionTable(summary, false)); //contains the data
     }
  };
  
  // obtain repeats
  SecureGWT.getSubmissionService().getRepeatSubmissions(keyString, callback);
  
  
  // populate the panel
  panel.add(new ClosePopupButton(this));
  
  ScrollPanel scroll = new ScrollPanel(panel);
  scroll.setPixelSize((Window.getClientWidth() * 3 / 4),(Window.getClientHeight() * 3 / 4));
  setWidget(scroll);
}
 
開發者ID:opendatakit,項目名稱:aggregate,代碼行數:28,代碼來源:RepeatPopup.java

示例3: PanelRanking

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
@Inject
public PanelRanking(CellTableRanking.Factory cellTableRankingFactory, @Assisted String label) {
	setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
	this.cellTableRanking = cellTableRankingFactory.create(label);

	ScrollPanel scrollPanel = new ScrollPanel(cellTableRanking);
	scrollPanel.setPixelSize(600, 600);
	add(scrollPanel);
}
 
開發者ID:nodchip,項目名稱:QMAClone,代碼行數:10,代碼來源:PanelRanking.java


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