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


Java ScrollPanel類代碼示例

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


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

示例1: buildPropertiesPanel

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
private Panel buildPropertiesPanel() {

		// Team panel.
		final ScrollPanel scrollTeamPanel = new ScrollPanel();
		scrollTeamPanel.addStyleName(CSS_SCROLL);
		scrollTeamPanel.add(buildTeamPanel());

		// Main panel.
		final HorizontalPanel panel = new HorizontalPanel();
		panel.addStyleName(CSS_PROPS);

		panel.add(buildVersionPanel());
		panel.add(scrollTeamPanel);

		return panel;

	}
 
開發者ID:sigmah-dev,項目名稱:sigmah,代碼行數:18,代碼來源:CreditsView.java

示例2: adapterWithScrollbars

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
/**
 * Wraps the given {@code widget} with a ScollPanel and builds an
 * {@link AdapterField} for it.
 * 
 * @param label
 *            The field label. If {@code blank}, label separator is
 *            automatically disabled.
 * @param widget
 *            The widget wrapped into the scroll panel and into the adapter
 *            field.
 * @param width
 *            Width of the given widget.
 * @param height
 *            Height of the scroll panel.
 * @return The field.
 */
public static AdapterField adapterWithScrollbars(final String label, final IsWidget widget, final int width,
		final int height) {

	final ScrollPanel scrollPanel = new ScrollPanel();
	scrollPanel.setWidget(Widget.asWidgetOrNull(widget));
	scrollPanel.addAttachHandler(new AttachEvent.Handler() {
		@Override
		public void onAttachOrDetach(AttachEvent event) {
			scrollPanel.setWidth(width + "px");
		}
	});
	scrollPanel.setHeight(height + "px");

	return adapter(label, scrollPanel);

}
 
開發者ID:sigmah-dev,項目名稱:sigmah,代碼行數:33,代碼來源:Forms.java

示例3: QueryView

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
public QueryView() {
	splitPanel = new MaterialSplitPanel();
	splitPanel.setHeight(Window.getClientHeight() - 102 + "px");
	splitPanel.setBarPosition(25);
	leftPanel = new MaterialPanel();
	leftPanel.setBackgroundColor(Color.WHITE);
	leftPanel.setGrid("s6 l3");
	leftScrollPanel = new ScrollPanel();
	leftScrollPanel.setHeight(Window.getClientHeight() - 130 + "px");

	rightPanel = new MaterialPanel();
	rightPanel.setBackgroundColor(Color.GREY_LIGHTEN_2);
	rightPanel.setGrid("s6 l9");
	rightScrollPanel = new ScrollPanel();
	rightScrollPanel.setHeight(Window.getClientHeight() - 130 + "px");

	splitPanel.add(leftPanel);
	splitPanel.add(rightPanel);

	add(splitPanel);
}
 
開發者ID:lumongo,項目名稱:lumongo,代碼行數:22,代碼來源:QueryView.java

示例4: addRow

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
public int addRow(Widget header, Widget... widgets) {
	if (header.getElement().getId() == null || header.getElement().getId().isEmpty())
		header.getElement().setId(DOM.createUniqueId());
	P head = new P(DOM.createSpan(), "header-cell");
	head.add(header);
	add(head);
	for (Widget widget: widgets) {
		P body = new P(DOM.createSpan(), "content-cell");
		add(body);
		if (widget instanceof UniTimeTable) {
			ScrollPanel scroll = new ScrollPanel(widget);
			scroll.addStyleName("scroll");
			body.add(scroll);
		} else {
			body.add(widget);
		}
	}
	if (widgets.length > 0) {
		if (widgets[0] instanceof UniTimeWidget)
			Roles.getTextboxRole().setAriaLabelledbyProperty(((UniTimeWidget)widgets[0]).getWidget().getElement(), Id.of(header.getElement()));
		else
			Roles.getTextboxRole().setAriaLabelledbyProperty(widgets[0].getElement(), Id.of(header.getElement()));			
	}
	return getWidgetCount() - widgets.length;
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:26,代碼來源:FlowForm.java

示例5: addRow

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
public int addRow(Widget header, Widget widget, int colSpan) {
	header.addStyleName("label-cell");
	int row = getRowCount();
	setWidget(row, 0, header);
	getCellFormatter().setStyleName(row, 0, "label-td");
	if (widget instanceof HasMobileScroll) {
		ScrollPanel scroll = new ScrollPanel(widget);
		scroll.addStyleName("table-cell");
		setWidget(row, 1, scroll);
		getCellFormatter().setStyleName(row, 1, "table-td");
	} else {
		widget.addStyleName("widget-cell");
		setWidget(row, 1, widget);
		getCellFormatter().setStyleName(row, 1, "widget-td");
	}
	if (colSpan != 1)
		getFlexCellFormatter().setColSpan(row, 1, colSpan);
	if (header.getElement().getId() == null || header.getElement().getId().isEmpty())
		header.getElement().setId(DOM.createUniqueId());
	if (widget instanceof UniTimeWidget)
		Roles.getTextboxRole().setAriaLabelledbyProperty(((UniTimeWidget)widget).getWidget().getElement(), Id.of(header.getElement()));
	else
		Roles.getTextboxRole().setAriaLabelledbyProperty(widget.getElement(), Id.of(header.getElement()));
	return row;
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:26,代碼來源:SimpleForm.java

示例6: setCourseDetails

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
@Override
public void setCourseDetails(CourseFinderCourseDetails... details) {
	iDetails = details;
	int tabIndex = 0;
	for (CourseFinderCourseDetails detail: iDetails) {
		ScrollPanel panel = new ScrollPanel(detail.asWidget());
		panel.setStyleName("unitime-ScrollPanel-inner");
		panel.addStyleName("course-info");
		iCourseDetailsTabBar.addTab(detail.getName(), true);
		Character ch = UniTimeHeaderPanel.guessAccessKey(detail.getName());
		if (ch != null)
			iTabAccessKeys.put(ch, tabIndex);
		tabIndex++;
	}
	selectLastTab();
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:17,代碼來源:CourseFinderCourses.java

示例7: DropDown

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
public DropDown() {
    current = new FlexTable();
    current.addStyleName("datatable");
    itemlist = new FlexTable();
    dropdown = new PopupPanel(true);
    scroller = new ScrollPanel();
    scroller.add(itemlist);
    dropdown.add(scroller);
    down =new HTML(" ▼");
    down.addStyleName("current-item");
    initWidget(current);
    HTML load = new HTML("loading...");
    load.addStyleName("current-item");
    current.setWidget(0, 0, load);
    current.setWidget(0, 1, down);
    current.addClickHandler(show);
}
 
開發者ID:NOAA-PMEL,項目名稱:LAS,代碼行數:18,代碼來源:DropDown.java

示例8: WikiManager

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
/**
 * WikiManager
 */
public WikiManager(boolean isDashboard) {
	this.isDashboard = isDashboard;
	vPanel = new VerticalPanel();
	toolbar = new TabToolbarWiki(this, isDashboard);

	// Post Editor
	vWikiPanel = new VerticalPanel();
	vWikiPanel.setWidth("100%");
	wikiEditor = new WikiEditor(this);
	wikiEditor.setStyleName("okm-Mail");
	wikiHistory = new WikiHistory(this);
	wikiPage = new WikiPage();
	scrollPanelWiki = new ScrollPanel(vWikiPanel);

	vPanel.add(toolbar); // Always visible

	toolbar.setHeight("" + TOOLBAR_HEADER + "px");
	toolbar.setWidth("100%");
	vPanel.setCellHeight(toolbar, "" + TOOLBAR_HEADER + "px");

	initWidget(vPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:26,代碼來源:WikiManager.java

示例9: WorkflowManager

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
/**
 * WorkflowManager
 */
public WorkflowManager() {
	workflowGraph = new Image();
	scrollGraphPanel = new ScrollPanel(workflowGraph);
	toolbar = new TabToolbarWorkflow(this);
	workflowTable = new WorkflowTable(this);
	workflowDetailTable = new WorkflowDetailTable();
	vPanel = new VerticalPanel();
	vPanel.add(toolbar); // Always visible

	toolbar.setHeight("" + TOOLBAR_HEADER + "px");
	toolbar.setWidth("100%");
	vPanel.setCellHeight(toolbar, "" + TOOLBAR_HEADER + "px");

	initWidget(vPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:19,代碼來源:WorkflowManager.java

示例10: HistorySearch

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
/**
 * HistorySearch
 */
public HistorySearch() {
	stackPanel = new StackLayoutPanel(Unit.PX);
	searchSaved = new SearchSaved();
	userNews = new UserNews();
	scrollSearchSavedPanel = new ScrollPanel();
	scrollUserNewsSavedPanel = new ScrollPanel();

	scrollSearchSavedPanel.addStyleName("okm-PanelSelected");
	scrollUserNewsSavedPanel.addStyleName("okm-PanelSelected");

	scrollSearchSavedPanel.add(searchSaved);
	scrollSearchSavedPanel.setSize("100%", "100%");

	scrollUserNewsSavedPanel.add(userNews);
	scrollUserNewsSavedPanel.setSize("100%", "100%");

	stackPanel.add(scrollSearchSavedPanel, Util.createHeaderHTML("img/icon/stackpanel/find.gif", Main.i18n("leftpanel.label.stored.search")), true, 22);
	stackPanel.add(scrollUserNewsSavedPanel, Util.createHeaderHTML("img/icon/news.gif", Main.i18n("leftpanel.label.user.search")), true, 22);

	stackPanel.showWidget(0);
	stackPanel.setStyleName("okm-StackPanel");
	stackPanel.addStyleName("okm-DisableSelect");
	initWidget(stackPanel);
}
 
開發者ID:openkm,項目名稱:document-management-system,代碼行數:28,代碼來源:HistorySearch.java

示例11: showSourceCode

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
protected void showSourceCode(String sourceCode) {
    sourceCode = sourceCode.replaceAll("<", "&lt,").replace(">", "&gt;");

    final String html = "<pre class=\"brush: java; toolbar: false;\">" + sourceCode + "</pre>";
    ScrollPanel sp = new ScrollPanel();
    sp.setSize((Window.getClientWidth() * 0.6) + "px",
            (Window.getClientHeight() * 0.7) + "px");
    sp.add(new HTML(html));

    DialogBoxWithCloseButton dialogBox = new DialogBoxWithCloseButton(false);
    dialogBox.setWidget(sp);
    dialogBox.setText(ShowcaseSearchPanel.I18N.viewSource(source));
    dialogBox.center();

    super.doFormat();
}
 
開發者ID:iSergio,項目名稱:gwt-cs,代碼行數:17,代碼來源:ShowSourceButton.java

示例12: addAvatarSectionBody

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
/**
 * Allows to add a new avatar's section into the avatar's section dialog
 * @param avatarSectionsTabPanel the decorated panel storing the smile section
 * @param avatarSection the avatar section descriptor
 */
private void addAvatarSectionBody( final DecoratedTabPanel avatarSectionsTabPanel,
								   final PresetAvatarImages.AvatarSectionDescriptor avatarSection ) {
	//Initialize the scroll panel
	final ScrollPanel scrollPanel = new ScrollPanel();
	scrollPanel.setStyleName( CommonResourcesContainer.CHOOSE_AVATAR_PANEL_STYLE );
	
	//Add to the tab panel
	final PriceTagWidget minMoneyTitle = new PriceTagWidget( null, avatarSection.price, true, false );
	avatarSectionsTabPanel.add( scrollPanel, minMoneyTitle );
	
	//Store the tab to section mapping
	tabsToSections.put( avatarSectionsTabPanel.getWidgetIndex( scrollPanel ) , avatarSection );
	//Store the tab to price tab mapping
	pricedSectionTitles.put( avatarSectionsTabPanel.getWidgetIndex( scrollPanel ), minMoneyTitle );
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:21,代碼來源:ChooseAvatarDialogUI.java

示例13: setInitialFolderManagementView

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
public void setInitialFolderManagementView(FolderManagementController controller, String parentFolderPath, String baseFolderUrl,
		Map<String, String> batchClassesMap) {
	Label footer = new Label();
	folderTableView = new FolderTableView(footer);

	folderTablePresenter = new FolderTablePresenter(controller, folderTableView, parentFolderPath, baseFolderUrl);

	folderSystemTreeView = new FolderSystemTreeView();

	folderSystemTreePresenter = new FolderSystemTreePresenter(controller, folderSystemTreeView, parentFolderPath, footer);

	SplitLayoutPanel mainContentPanel = new SplitLayoutPanel();
	DockLayoutPanel leftLayoutPanel = new DockLayoutPanel(Unit.PCT);
	ScrollPanel treeScrollPanel = new ScrollPanel();
	treeScrollPanel.add(folderSystemTreeView);
	FolderSelectionWidget folderSelectionWidget = new FolderSelectionWidget(batchClassesMap, controller.getEventBus());
	leftLayoutPanel.addNorth(folderSelectionWidget, 10);
	leftLayoutPanel.add(treeScrollPanel);
	mainContentPanel.addWest(leftLayoutPanel, 200);
	DockLayoutPanel contentMainPanel = new DockLayoutPanel(Unit.PCT);
	contentMainPanel.add(folderTableView);
	contentMainPanel.addStyleName(FolderManagementConstants.WHITE_BACKGROUND);
	mainContentPanel.add(contentMainPanel);
	mainPanel.add(mainContentPanel);
	ScreenMaskUtility.unmaskScreen();
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:27,代碼來源:FolderManagementView.java

示例14: createLyricsDialog

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
private void createLyricsDialog()
{
	lyricsDialog = new DialogBox();
	VerticalPanel vPanel = new VerticalPanel();
	vPanel.setHeight( "100%" );
	vPanel.setHorizontalAlignment( VerticalPanel.ALIGN_CENTER );
	vPanel.setVerticalAlignment( VerticalPanel.ALIGN_MIDDLE );
	lyricsDialog.add( vPanel );
	
	lyrics = new HTML();
	ScrollPanel scrollPanel = new ScrollPanel();
	scrollPanel.setWidth( "300px" );
	scrollPanel.setHeight( "250px" );
	scrollPanel.add( lyrics );
	vPanel.add( scrollPanel );
	
	Button close = new NativeButton( "Close" );
	close.addClickListener( new ClickListener() {
		public void onClick( Widget arg0 ) {
			lyricsDialog.hide();
		}
	} );
	vPanel.add( close );
}
 
開發者ID:jolie,項目名稱:jolie,代碼行數:25,代碼來源:Echoes.java

示例15: BaseViewImpl

import com.google.gwt.user.client.ui.ScrollPanel; //導入依賴的package包/類
public BaseViewImpl(boolean useDetailsPanel) {
    errorPanel = new AlertPanel(Type.ERROR);
    sandboxStyle = Utils.sandboxStyle;
    avroUiStyle = Utils.avroUiStyle;
    initWidget(createAndBindUi());
    setTitle(getViewTitle());
    if (useDetailsPanel) {
        detailsPanel = new VerticalPanel();
        detailsPanel.setWidth("100%");
        detailsPanel.addStyleName(sandboxStyle.contentPanel());
        ScrollPanel scroll = new ScrollPanel();
        scroll.setWidth("100%");
        scroll.add(detailsPanel);
        centerPanel.setWidget(scroll);
    }
    initCenterPanel();        
    clearError();
}
 
開發者ID:kaaproject,項目名稱:sandbox-frame,代碼行數:19,代碼來源:BaseViewImpl.java


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