当前位置: 首页>>代码示例>>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;未经允许,请勿转载。