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


Java ScrollPanel.add方法代碼示例

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


在下文中一共展示了ScrollPanel.add方法的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: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: buildLoadScreen

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * Create main VerticalPanel, add it to the RootPanel and display a loading message
 */
private void buildLoadScreen() {
	// Create new main vertical panel to which all other GUI panels shall be added
	mainVerPanel = new VerticalPanel();

	// Add header image
	Image image = new Image();
	image.setUrl("/images/header.png");
	mainVerPanel.add(image);

	// Add loading label
	Label loadingLabel = new Label("Loading Application. Please wait...");
	mainVerPanel.add(loadingLabel);

	// Vertical Panel Settings
	mainVerPanel.setSpacing(25);

	// Insert the main vertical panel into a scroll panel to allow for scrolling
	ScrollPanel sp = new ScrollPanel();
	sp.add(mainVerPanel);

	// Add main vertical panel inside scroll panel to root panel
	RootPanel.get().add(sp);
}
 
開發者ID:ratheile,項目名稱:sweng15,代碼行數:27,代碼來源:GWTModuleLoader.java

示例9: asWidget

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * @return the widget
 */
public Widget asWidget() {
    _bindingConfiguration = DOM.createElement("pre"); //$NON-NLS-1$

    Element code = DOM.createElement("code"); //$NON-NLS-1$
    code.appendChild(_bindingConfiguration);

    HTML html = new HTML();
    html.getElement().appendChild(code);
    html.setSize("100%", "100%"); //$NON-NLS-1$ //$NON-NLS-2$

    ScrollPanel panel = new ScrollPanel();
    panel.setStyleName("fill-layout-width"); //$NON-NLS-1$
    panel.add(html);
    panel.setSize("100%", "100%"); //$NON-NLS-1$ //$NON-NLS-2$

    return panel;
}
 
開發者ID:jboss-switchyard,項目名稱:switchyard,代碼行數:21,代碼來源:BindingDetailsWidget.java

示例10: createBVHAnimationPanel

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

	ScrollPanel scroll=new ScrollPanel();
	
	VerticalPanel bvhBone=new VerticalPanel();
	scroll.add(bvhBone);
	SimpleCellTable<AnimationBone> bvhNodeTable =  createAnimationBoneTable();
	bvhBone.add(bvhNodeTable);
	bvhAnimationObjects = new EasyCellTableObjects<AnimationBone>(bvhNodeTable) {
		@Override
		public void onSelect(AnimationBone selection) {
			
		}
	};
		
	return scroll;
}
 
開發者ID:akjava,項目名稱:GWTModelWeight,代碼行數:18,代碼來源:InfoPanelTab.java

示例11: createGeometryAnimationPanel

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

	ScrollPanel scroll=new ScrollPanel();
	
	VerticalPanel bvhBone=new VerticalPanel();
	scroll.add(bvhBone);
	SimpleCellTable<AnimationBone> bvhNodeTable =  createAnimationBoneTable();
	bvhBone.add(bvhNodeTable);
	geometryAnimationObjects = new EasyCellTableObjects<AnimationBone>(bvhNodeTable) {
		@Override
		public void onSelect(AnimationBone selection) {
			
		}
	};
		
	return scroll;
}
 
開發者ID:akjava,項目名稱:GWTModelWeight,代碼行數:18,代碼來源:InfoPanelTab.java

示例12: AbstractVerticalDecoratedGridSidebarWidget

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
/**
 * Construct a "Sidebar" for the provided DecisionTable
 * @param resources
 * @param isReadOnly
 * @param eventBus
 */
public AbstractVerticalDecoratedGridSidebarWidget( ResourcesProvider<T> resources,
                                                   boolean isReadOnly,
                                                   EventBus eventBus ) {
    // Argument validation performed in the superclass constructor
    super( resources,
           isReadOnly,
           eventBus );

    // Construct the Widget
    scrollPanel = new ScrollPanel();
    VerticalPanel container = new VerticalPanel();
    selectors = new VerticalSelectorWidget( eventBus );

    container.add( spacer );
    container.add( scrollPanel );
    scrollPanel.add( selectors );

    // We don't want scroll bars on the Sidebar
    scrollPanel.getElement().getStyle().setOverflow( Overflow.HIDDEN );

    initWidget( container );

}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:30,代碼來源:AbstractVerticalDecoratedGridSidebarWidget.java

示例13: init

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
protected void init(String msg, String title) {
	this.setTitle("stdErr");
	this.setGlassEnabled(true);

	HTML closeButton = new HTML("X");
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");
	closeButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			StdPanel.this.hide();
		}
	});

	ScrollPanel scvp = new ScrollPanel();
	VerticalPanel verticalPanel = new VerticalPanel();

	verticalPanel.add(closeButton);
	verticalPanel.setCellHeight(closeButton, "30px");
	verticalPanel.setStyleName("vpanel");
	HTML desc = new HTML(title);
	desc.setStyleName("popupTitle");
	verticalPanel.add(desc);
	verticalPanel.setCellHeight(desc, "30px");

	TextArea label = new TextArea();
	label.setText(msg);
	label.setReadOnly(true);
	label.setSize("650px", "400px");
	verticalPanel.add(label);
	scvp.add(verticalPanel);
	this.add(scvp);
	this.setStyleName("loading_container");
	this.center();
	this.show();
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:37,代碼來源:StdPanel.java

示例14: setupAnalyzerAndReportPanel2

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
public void setupAnalyzerAndReportPanel2(ScrollPanel analyzerPanel, DockLayoutPanel dPanel) {
	// Create a CellTable.
	final CellTable<AnalyzerResultDTO> table = new CellTable<AnalyzerResultDTO>();
	setupAnalyzeResultDisplayPanel(table, dataProvider);

	SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
	pager.setDisplay(table);
	dataProvider.addDataDisplay(table);

	// Set the width of each column.
	// table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
	final Label errorLabelDisplay = new Label();

	VerticalPanel displayPanel = new VerticalPanel();
	displayPanel.add(pager);
	displayPanel.add(table);
	displayPanel.add(errorLabelDisplay);
	displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
	analyzerPanel.add(displayPanel);

	// DoS detector panel
	// Any detector error message
	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelActivateDetector = new Label();

	HorizontalPanel detectorPanel = new HorizontalPanel();
	detectorPanel.addStyleName("essencePanel");
	detectorPanel.setSpacing(10);
	setupDetectorPanel(detectorPanel, errorLabelActivateDetector, dataProvider);
	vPanel.add(detectorPanel);	
    
	vPanel.add(errorLabelActivateDetector);
	dPanel.addNorth(vPanel, 10);
}
 
開發者ID:dpinney,項目名稱:essence,代碼行數:36,代碼來源:AnalyzerAndReportUI.java

示例15: populateDialog

import com.google.gwt.user.client.ui.ScrollPanel; //導入方法依賴的package包/類
@Override
protected void populateDialog() {
	//ADD THE MAIN DATA FIELDS
	if( isTopicView ) {
		addNewGrid( 2, 2, false, "", true);
	} else {
		addNewGrid( 1, 1, false, "", true);
	}
	
	//Make a wrapper scroll panel around the message because it can be too long
	VerticalPanel centeringPanel = new VerticalPanel();
	centeringPanel.addStyleName( CommonResourcesContainer.MAXIMUM_WIDTH_FOR_MESSAGE_VIEW_STYLE );
	centeringPanel.setHeight("100%");
	centeringPanel.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );
	centeringPanel.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
	centeringPanel.add( forumMessageUI );
	
	ScrollPanel wrapperPanel = new ScrollPanel();
	wrapperPanel.setStyleName( CommonResourcesContainer.SCROLLABLE_SIMPLE_PANEL );
	//Force the maximum viewable area for the displayed forum message
	wrapperPanel.addStyleName( CommonResourcesContainer.MAXIMUM_SIZE_FOR_MESSAGE_VIEW_STYLE );
	wrapperPanel.add( centeringPanel );
	
	if( isTopicView ) {
		addToGrid( this.getCurrentGridIndex(), FIRST_COLUMN_INDEX, 2, wrapperPanel, false, false );
		
		//Add the grid action buttons
		this.addGridActionElements(true, true);
	} else {
		addToGrid( FIRST_COLUMN_INDEX, wrapperPanel, false, false );
	}
}
 
開發者ID:ivan-zapreev,項目名稱:x-cure-chat,代碼行數:33,代碼來源:ViewMessageDialogUI.java


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