本文整理匯總了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();
}
示例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);
}
示例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);
}