当前位置: 首页>>代码示例>>Java>>正文


Java DisclosurePanel.add方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.DisclosurePanel.add方法的典型用法代码示例。如果您正苦于以下问题:Java DisclosurePanel.add方法的具体用法?Java DisclosurePanel.add怎么用?Java DisclosurePanel.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.DisclosurePanel的用法示例。


在下文中一共展示了DisclosurePanel.add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ComparisonAxisSelector

import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
public ComparisonAxisSelector(String width) {
        // The the other widgets have flextable layouts.  Without it, this one doesn't line up.
		layout = new FlexTable();
		axes = new ListBox();
		flex = new FlexTable();
		// It looks funny without some sort of label on the same line.
		HTML html = new HTML("Axis: ");
		flex.setWidget(0, 0, html);
		flex.setWidget(0, 1, axes);
		disPanel = new DisclosurePanel("Compare");
		disPanel.add(flex);
		disPanel.setOpen(true);
		
//		if ( width != null && !width.equals("") ) {
//		    disPanel.setWidth(width);
//		}
		layout.setWidget(0, 0, disPanel);
		initWidget(layout);
	}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:20,代码来源:ComparisonAxisSelector.java

示例2: AxesWidgetGroup

import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
/**
 * A widget to hold a set of x, y, z, t, and e(nsemble) axis controls and to
 * display them in groups according to the view. Initially the map is at the
 * top and z and t are below, but this can be switched.
 * 
 * @param plot_title
 * @param ortho_title
 * @param layout
 */
public AxesWidgetGroup(String title, String orientation, String width, String panel_title, String tile_server, String tile_layer, EventBus eventBus) {
    mapPanel = new DisclosurePanel("Map");
    mapPanel.setWidth(xControlsWidthPx);
    menuWidgets = new FlexTable();
    refMap = new OLMapWidget("128px", "256px", tile_server, tile_layer);
    zWidget = new AxisWidget();
    zWidget.setVisible(false);
    eWidget = new EnsembleAxisWidget();
    eWidget.setVisible(false);
    dateTimeWidget = new DateTimeWidget();
    dateTimeWidget.setVisible(false);
    forecastVerificationTime = new DateTimeWidget();
    forecastVerificationTime.setVisible(false);
    panel = new FlowPanel();//new DisclosurePanel(title);
    mapPanel.add(refMap);
    mapPanel.setOpen(true);
    if ( orientation.equals("horizontal") ) {
        row.setWidget(0, 0, mapPanel);
        row.setWidget(0, 1, zWidget);
        row.setWidget(0, 2, dateTimeWidget);
        row.setWidget(0, 3, forecastVerificationTime);
        row.setWidget(0, 4, eWidget);
        row.getFlexCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
        row.getFlexCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
        row.getFlexCellFormatter().setVerticalAlignment(0, 2, HasVerticalAlignment.ALIGN_TOP);
        row.getFlexCellFormatter().setVerticalAlignment(0, 3, HasVerticalAlignment.ALIGN_TOP);

        panel.add(row);
    } else {
        layout.add(mapPanel);
        panel.add(layout);
        panel.setVisible(true);//.setOpen(true);
        menuWidgets.setWidget(0, 0, zWidget);
        menuWidgets.setWidget(1, 0, dateTimeWidget);
        menuWidgets.setWidget(2, 0, forecastVerificationTime);
        menuWidgets.setWidget(3, 0, eWidget);
        menuWidgets.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
        menuWidgets.getCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
        layout.add(menuWidgets);      
    }
    initWidget(panel);
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:52,代码来源:AxesWidgetGroup.java

示例3: addDialogWidgets

import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	Grid grid = new Grid(4,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	DisclosurePanel recentlyViewedPanel = new DisclosurePanel("Recently Viewed Terms");
	DisclosurePanel recentlyCreatedPanel = new DisclosurePanel("Recently Created Terms");
	Button cancelButton = new Button("Cancel");
	
	recentlyViewedPanel.getHeader().addStyleName("dialog-label");
	recentlyViewedPanel.add(recentlyViewTable);
	
	recentlyCreatedPanel.getHeader().addStyleName("dialog-label");
	recentlyCreatedPanel.add(recentlyCreatedTable);
			
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
			if(currentTerm != null) {
				eventBus.fireEvent(new ViewTermEvent(currentTerm));
			}
		}
	});
	
	grid.addStyleName("gwt-Grid");
	errorLabel.addStyleName("dialog-error");
	buttonsHPanel.addStyleName("dialog-buttons");
	buttonsHPanel.addStyleName("centered-hortz");
	vertPanel.addStyleName("dialog-vpanel");		
	//vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, new Label("Ontology:"));
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Relationship:"));
	grid.setWidget(++row, col, new Label("Related Term:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, typeDropBox);
	grid.setWidget(++row, col, relatedTermLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}
			
	buttonsHPanel.add(addButton);
	buttonsHPanel.add(cancelButton);
	
	vertPanel.add(grid);
	vertPanel.add(recentlyViewedPanel);
	vertPanel.add(recentlyCreatedPanel);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	dialogBox.setWidget(vertPanel);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:58,代码来源:AddRelationshipPopup.java

示例4: addDialogWidgets

import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	Grid grid = new Grid(3,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	DisclosurePanel recentlyViewedPanel = new DisclosurePanel("Recently Viewed Terms");
	DisclosurePanel recentlyCreatedPanel = new DisclosurePanel("Recently Created Terms");
	Label comments = new Label("Comments:");
	Button cancelButton = new Button("Cancel");
	
	comments.addStyleName("dialog-label");
	
	recentlyViewedPanel.getHeader().addStyleName("dialog-label");
	recentlyViewedPanel.add(recentlyViewTable);
	
	recentlyCreatedPanel.getHeader().addStyleName("dialog-label");
	recentlyCreatedPanel.add(recentlyCreatedTable);
			
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
			obsoleteTerm = null;
			commentsField.setValue(null);
		}
	});
	
	grid.addStyleName("gwt-Grid");
	errorLabel.addStyleName("dialog-error");
	buttonsHPanel.addStyleName("dialog-buttons");
	buttonsHPanel.addStyleName("centered-hortz");
	vertPanel.addStyleName("dialog-vpanel");		
	//vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, new Label("Ontology:"));
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Replaced By:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, replaceByTermLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}			
							
	buttonsHPanel.add(obsoleteButton);
	buttonsHPanel.add(cancelButton);
	
	vertPanel.add(grid);
	vertPanel.add(recentlyViewedPanel);
	vertPanel.add(recentlyCreatedPanel);
	vertPanel.add(comments);
	vertPanel.add(commentsField);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	dialogBox.setWidget(vertPanel);
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:60,代码来源:ReplaceTermPopup.java

示例5: createExportComposite

import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
private void createExportComposite(final QPagingScrollTable table, HorizontalPanel hPanel) {
    createExportLabelsAndImages();

    final DisclosurePanel exportPanel = new DisclosurePanel("Export");
    String[] labels = getExportLabels(table.getSource().getExportFormats());
    Image[] exportImages = getExportImages(labels);

    FlexTable gridExportPanel = new FlexTable();
    hPanel.add(exportPanel);
    exportPanel.add(gridExportPanel);
    final Frame frame = new Frame();
    frame.setHeight("0");
    frame.setWidth("0");
    frame.setVisible(false);
    final String moduleRelativeURL = GWT.getModuleBaseURL() + "/rpc.export";
    gridExportPanel.setWidget(0,0,frame);

    final CheckBox generateColumnHeaderBox= new CheckBox("Generate Column Header");
    gridExportPanel.getFlexCellFormatter().setColSpan(1,1, 7);
    gridExportPanel.setWidget(2, 1,generateColumnHeaderBox);
    gridExportPanel.getFlexCellFormatter().setColSpan(2,1,6);

    for (int i = 0; i < labels.length; i++) {

    	exportImages[i].setStylePrimaryName("datagridexportlabel");
    	exportImages[i].setTitle(labels[i]);
    	gridExportPanel.setWidget(0, i+1,exportImages[i]);

    	exportImages[i].addClickHandler(new ClickHandler() {

    		@Override
            public void onClick(ClickEvent event) {
    			if (event.getSource() instanceof Image) {
    				Image image = (Image) (event.getSource());
    				final String exportCode = image.getTitle();
    				RPCServiceAsync service = MainFactoryActions.createService();
    				AsyncCallback<?> callback = new AsyncCallback<Object>() {
    					@Override
                        public void onSuccess(Object result) {
    						String uuid = (String) result;
    						// set frame
    						frame.setUrl(moduleRelativeURL + "?uuid=" + uuid);
    						ClientApplicationContext.getInstance().setBusy(false);
    					}

    					@Override
                        public void onFailure(Throwable caught) {

    						ClientApplicationContext.getInstance().log("Export failed", "Export failed for " + exportCode + " ", true, true, caught);
    						ClientApplicationContext.getInstance().setBusy(false);
    						FunctionsExecutor.setProcessedBuiltIn(true);
    					}
    				};
    				List<DataContainerGVO> dList = new ArrayList<DataContainerGVO>();
    				// following loop is to maintain the order of rows while exporting.
    				for(int i=0;i<(table.getAbsoluteLastRowIndex()+1);i++){
    					dList.add(table.getRowValue(i));
    				}
    				service.prepareForExport(dList, exportCode, null, generateColumnHeaderBox.getValue().booleanValue(),  callback);
    			}
    		}
    	});
    }
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:65,代码来源:QPagingScrollTableOperation.java


注:本文中的com.google.gwt.user.client.ui.DisclosurePanel.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。