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


Java CellTable类代码示例

本文整理汇总了Java中com.google.gwt.user.cellview.client.CellTable的典型用法代码示例。如果您正苦于以下问题:Java CellTable类的具体用法?Java CellTable怎么用?Java CellTable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CellTable类属于com.google.gwt.user.cellview.client包,在下文中一共展示了CellTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupAnalyzeResultDisplayPanel

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
private void setupAnalyzeResultDisplayPanel(CellTable<AnalyzerResultDTO> table,
											final ListDataProvider<AnalyzerResultDTO> dataProvider) {
	final ClickableTextCellRuleID clickableIDcell = new ClickableTextCellRuleID();

	Column<AnalyzerResultDTO,String> ruleIDColumn = new Column<AnalyzerResultDTO,String>(clickableIDcell) {
		@Override
		public String getValue (AnalyzerResultDTO dr) {
			if (dr.getRefRuleId() == null)
				  return "none";
			else
				  return dr.getRefRuleId().toString();
		}
	};
	table.addColumn(ruleIDColumn, "Ref Rule ID");
	table.addColumnStyleName(2, "ar_number_column_style");
	ruleIDColumn.setFieldUpdater(new FieldUpdater<AnalyzerResultDTO,String> () {
		public void update(int index, AnalyzerResultDTO ar, String value) {
			showRuleDetailDialog(ar);
		}
	});
}
 
开发者ID:dpinney,项目名称:essence,代码行数:22,代码来源:AnalyzerAndReportUI.java

示例2: addTableColumns

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
@Override
protected void addTableColumns(CellTable<Synonym> table) {
	SynonymColumn synonymColumn = new SynonymColumn();
	
	synonymColumn.setFieldUpdater(new FieldUpdater<Synonym, String>() {
		@Override
		public void update(int index, Synonym synonym, String value) {
			ControlledVocabularyTerm term = synonym.getControlledVocabularyTerm();
			if(term != null) {
				linkedTermsView.show(term);
			}
		}
	});
	synonymColumn.setCellStyleNames("clickable-text");
	
    table.addColumn(new OntologyColumn(), "Ontology/Codelist");
    table.addColumn(new TermColumn(), "Term");
    table.addColumn(synonymColumn, "Synonym");
    table.addColumn(new TypeColumn(), "Type");
    table.addColumn(new SourceColumn(), "Source");
    table.addColumn(new UsageColumn(), "Usage");
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:23,代码来源:ApproveRejectSynonymComposite.java

示例3: DomainList

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
public DomainList() {
	
	table = new CellTable<>(15, (Resources) GWT.create(TableResources.class));
	
	table.addColumn( new Column<String,SafeHtml>(new SafeHtmlCell() ) {
		@Override
		public SafeHtml getValue(String domain) {
			return new LinkHtml( domain, "javascript:selectDomain(\"" + domain + "\")" ); };
	}, "Domain");
	
	dataProvider = new ListDataProvider<String>();
	dataProvider.addDataDisplay( table );
	
	SimplePager pager = new SimplePager();
    pager.setDisplay( table );
    
    table.setWidth("100%");
	tablePanel.add( table );
	tablePanel.add( pager );
	tablePanel.setWidth("100%");
	
	
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:24,代码来源:DomainList.java

示例4: setupAnalyzerAndReportPanel2

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的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

示例5: setupTable

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
protected void setupTable(CellTable<Term> table) {	    
	table.setWidth("100%");
	table.addStyleName("gwt-CellTable");
	table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
	table.setSelectionModel(new NoSelectionModel<Term>(keyProvider));
    
	table.addColumn(new OntologyColumn(), "Ontology");
	table.addColumn(new TermColumn(), "Term");
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:10,代码来源:AddRelationshipPopup.java

示例6: addTableColumns

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
@Override
protected void addTableColumns(CellTable<Relationship> table) {
    table.addColumn(new OntologyColumn(), "Ontology");
    table.addColumn(new TermColumn(), "Term");
    table.addColumn(new RelationshipColumn(), "Relationship");
    table.addColumn(new RelatedTermColumn(), "Related Term");
}
 
开发者ID:Novartis,项目名称:ontobrowser,代码行数:8,代码来源:ApproveRejectRelationshipComposite.java

示例7: initHeader

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
private void initHeader() {
	header = new CellTable<T>();
	header.setVisible(false);
	header.setRowCount(0, true);
	add(header);
	createOffsetColumn();
}
 
开发者ID:treblereel,项目名称:TreeGridGWT,代码行数:8,代码来源:TreeGrid.java

示例8: loadRiskConfsTable

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
private void loadRiskConfsTable(JSONValue response) {
	tablePanel.clear();
	table = new CellTable<RCInfo>(15, (Resources) GWT.create(TableResources.class));
	
	table.addColumn( new Column<RCInfo,SafeHtml>(new SafeHtmlCell() ) {
		@Override
		public SafeHtml getValue(RCInfo object) {
			return new LinkHtml( object.name, "javascript:selectRC(\"" + object.name + "\")" ); };
	}, "Risk Configuration");
	table.setWidth("100%");
	dataProvider = new ListDataProvider<RCInfo>();
	dataProvider.addDataDisplay(table);

	GWT.log( response.toString() );
	if( response.isArray() != null ) {
		for( int i = 0; i < response.isArray().size(); i++ ) {
			JSONObject o = (JSONObject)response.isArray().get( i );
			dataProvider.getList().add( new RCInfo( 
					o.get( "name" ).isString().stringValue() ) );
		}
	}

	SimplePager pager = new SimplePager();
    pager.setDisplay( table );
	
	tablePanel.add( table );
	tablePanel.add( pager );
	tablePanel.setWidth("100%");
	
	spTable.setWidget(tablePanel);
	
}
 
开发者ID:RISCOSS,项目名称:riscoss-corporate,代码行数:33,代码来源:RiskConfsModule.java

示例9: checkBoxClick

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
protected boolean checkBoxClick(CellPreviewEvent<T> event) {
	NativeEvent nativeEvent = event.getNativeEvent();
	if (BrowserEvents.CLICK.equals(nativeEvent.getType())) {
		if(event.getDisplay() instanceof CellTable<?>){
			CellTable<T> table = (CellTable<T>)event.getDisplay();
			if(table.getColumn(event.getColumn()) instanceof CheckServiceColumn){
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:13,代码来源:CheckBoxesEventTranslator.java

示例10: GridView

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
public GridView() {
		initWidget(container);
		
		GridViewResources.INSTANCE.style().ensureInjected();
		CellTableResources.INSTANCE.cellTableStyle().ensureInjected();
		
		taskTable = new CellTable<T>(Integer.MAX_VALUE,CellTableResources.INSTANCE);
//		taskTable.setSelectionModel(selectionModel);
		taskTable.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
		tableElement = taskTable.getElement().cast();
		
		container.setStyleName(GridViewResources.INSTANCE.style().taskGrid());
		header.setStyleName(GridViewResources.INSTANCE.style().header());
		headerTable.setCellPadding(0);
		headerTable.setCellSpacing(0);
		header.add(headerTable);

		body.setStyleName(GridViewResources.INSTANCE.style().body());
		body.add(taskTable);
		
		container.add(header);
		container.add(body);
		
//		initTableColumns();
		
		taskTable.setRowStyles(rowStyle);
		
	}
 
开发者ID:waynedyck,项目名称:gwt-gantt,代码行数:29,代码来源:GridView.java

示例11: createTable

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
@Override
protected AbstractCellTable<AssistedObject> createTable() {
    return new CellTable<AssistedObject>(
        DEFAULT_PAGE_SIZE,
        ResourceHelper.cellTableResources(),
        KEY_PROVIDER) {

        @Override
        public void setRowData(int start, java.util.List<? extends AssistedObject> values) {
            super.setRowData(start, values);
            if (values.size() == 0) {
                if (pager != null)
                    pager.setVisible(false);
                if (topPager != null)
                    topPager.setVisible(false);
                getTableHeadElement().getStyle().setVisibility(Visibility.HIDDEN);
            } else {
                if (pager != null)
                    pager.setVisible(true);
                if (topPager != null)
                    topPager.setVisible(true);
                getTableHeadElement().getStyle().setVisibility(Visibility.VISIBLE);
            }
        }

    };
}
 
开发者ID:inepex,项目名称:ineform,代码行数:28,代码来源:IneTable.java

示例12: onModuleLoad

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
public void onModuleLoad() {
    // create the widgets
    final Button analyseButton = new Button(messages.sendButton());
    final Button configureButton = new Button(messages.configureButton());
    final TextArea mainTextArea = new TextArea();
    mainTextArea.setCharacterWidth(80);
    mainTextArea.setVisibleLines(15);
    final Label errorLabel = new Label();
    final CellTable<SnomedConcept> resultsTable = new CellTable<>();

    // add them to the root panel
    RootPanel.get("mainTextArea").add(mainTextArea);
    RootPanel.get("analyseButton").add(analyseButton);
    RootPanel.get("configureButton").add(configureButton);
    RootPanel.get("status").add(errorLabel);
    RootPanel.get("snomedCodes").add(resultsTable);

    // set the focus to the text area
    mainTextArea.setFocus(true);

    // initialise the SNOMED code results table
    final List<SnomedConcept> conceptList = configSnomedTable(resultsTable);

    // add the handlers
    final List<SemanticType> types = new ArrayList<>();
    final Map<String, String> typeCodeToDescription = new HashMap<>();
    analyseButton.addClickHandler(
            new AnalyseHandler(mainTextArea, errorLabel, conceptList, types, typeCodeToDescription));
    configureButton.addClickHandler(new ConfigureHandler(types, typeCodeToDescription));
}
 
开发者ID:NICTA,项目名称:t3as-snomedct-service,代码行数:31,代码来源:SnomedCoderUi.java

示例13: initSslKeyTable

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
protected void initSslKeyTable(CellTable.Resources res) {
    clientKeys = new CellTable<SslKeyStoreEntry>(15, res);
    addAliasColumn(clientKeys, locale.headerKeyList());
    addTypeColumn(clientKeys, "");
    Column<SslKeyStoreEntry, String> deleteColumn = addDeleteColumn(clientKeys, "");
    // Creates handler on button clicked
    deleteColumn.setFieldUpdater(new FieldUpdater<SslKeyStoreEntry, String>() {
        @Override
        public void update(int index, SslKeyStoreEntry object, String value) {
            delegate.onClientKeyDeleteClicked(object);
        }
    });
    // don't show loading indicator
    clientKeys.setLoadingIndicator(null);
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:16,代码来源:SslKeyStoreManagerViewImpl.java

示例14: addAliasColumn

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
protected void addAliasColumn(CellTable<SslKeyStoreEntry> cellTable, String columnHeaderName) {
    Column<SslKeyStoreEntry, String> aliasColumn = new Column<SslKeyStoreEntry, String>(new TextCell()) {
        @Override
        public String getValue(SslKeyStoreEntry keyItem) {
            return keyItem.getAlias();
        }
    };
    aliasColumn.setSortable(true);
    cellTable.addColumn(aliasColumn, columnHeaderName);
    cellTable.setColumnWidth(aliasColumn, 50, Style.Unit.PCT);
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:12,代码来源:SslKeyStoreManagerViewImpl.java

示例15: addDeleteColumn

import com.google.gwt.user.cellview.client.CellTable; //导入依赖的package包/类
protected Column<SslKeyStoreEntry, String> addDeleteColumn(CellTable<SslKeyStoreEntry> cellTable, String columnHeaderName) {
    Column<SslKeyStoreEntry, String> deleteKeyColumn = new Column<SslKeyStoreEntry, String>(new ButtonCell()) {
        @Override
        public String getValue(SslKeyStoreEntry object) {
            return "Delete";
        }
    };
    cellTable.addColumn(deleteKeyColumn, columnHeaderName);
    cellTable.setColumnWidth(deleteKeyColumn, 30, Style.Unit.PX);
    return deleteKeyColumn;
}
 
开发者ID:codenvy-legacy,项目名称:plugin-datasource,代码行数:12,代码来源:SslKeyStoreManagerViewImpl.java


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