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


Java TextColumn类代码示例

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


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

示例1: createTablePanel

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
/**
 * Create the panel
 * @return the panel widget
 */
protected Widget createTablePanel() {
	table = new SimpleTable<String>(TABLE_HEIGHT_PX,TABLE_WIDTH_PX,TABLE_VISIBLE_ROWS);
	
    // --------------
	// Name Column
	// --------------
    TextColumn<String> nameColumn = new TextColumn<String>() {
        public String getValue( String row ) {
            return row;
        }
    };
    table.addColumn( nameColumn, COLUMN_HEADER_NAME );
    table.setColumnWidth(nameColumn, 200, Unit.PX);
    
    VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.add(table);
    return verticalPanel;
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:23,代码来源:DataSourceNamesTable.java

示例2: createColumns

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected void createColumns(DefaultCellTable<Component> table, ListDataProvider<Component> dataProvider) {
    final TextColumn<Component> nameColumn = new TextColumn<Component>() {
        @Override
        public String getValue(Component component) {
            ComponentProviderProxy provider = _componentProviders.getExtensionProviderByComponentName(component
                    .getName());
            if (provider == null) {
                return component.getName();
            }
            return provider.getDisplayName();
        }
    };
    nameColumn.setSortable(true);

    ColumnSortEvent.ListHandler<Component> sortHandler = new ColumnSortEvent.ListHandler<Component>(
            dataProvider.getList());
    sortHandler.setComparator(nameColumn, createColumnCommparator(nameColumn));

    table.addColumn(nameColumn, Singleton.MESSAGES.label_name());

    table.addColumnSortHandler(sortHandler);
    table.getColumnSortList().push(nameColumn);
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:26,代码来源:ExtensionsList.java

示例3: createDefaultTablePanel

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
/**
 * Create the panel
 * @return the panel widget
 */
protected HorizontalPanel createDefaultTablePanel() {
	table = new PagedTable<QueryResultPageRow>(this.numberRows);
	table.setToolBarVisible(false);
    TextColumn<QueryResultPageRow> nameColumn = new TextColumn<QueryResultPageRow>() {
        public String getValue( QueryResultPageRow row ) {
            return row.getColumnData().get(0);
        }
    };
    table.addColumn( nameColumn, COLUMN_HEADER_NAME );

    HorizontalPanel hPanel = new HorizontalPanel();
    hPanel.add(table);
    return hPanel;
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:19,代码来源:QueryResultPagedTableDisplayer.java

示例4: updateTablePanelForQuery

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
/**
   * This recreates the panel based on the query.  The number of columns and column labels will vary between queries
   * @return the panel widget
   */
  protected void updateTablePanelForQuery(final String dataSource, final String sql) {
  	final HorizontalPanel hPanel = new HorizontalPanel();
  	final int nRows = this.numberRows;

queryService.getColumns(dataSource, sql, new IRpcServiceInvocationHandler<List<QueryColumnBean>>() {
	@Override
	public void onReturn(final List<QueryColumnBean> columns) {
    	table = new PagedTable<QueryResultPageRow>(nRows);
    	table.setToolBarVisible(false);
    	for(int i=0; i<columns.size(); i++) {
    		final int colIndx = i;
    		TextColumn<QueryResultPageRow> col = new TextColumn<QueryResultPageRow>() {
    			public String getValue( QueryResultPageRow row ) {
    				return row.getColumnData().get(colIndx);
    			}
    		};
    		table.addColumn(col,columns.get(i).getName());
    	}
   		
           hPanel.add(table);
           tablePanel = hPanel;
           tablePanel.setWidth("100%");
           
           mainPanel.add(tablePanel);
       	table.setDataProvider(createDataProvider(dataSource,sql));
	}
	@Override
	public void onError(Throwable error) {
    	errorMessage = error.getMessage();
		refreshCompleteEvent.fire(new UiEvent(UiEventType.QUERY_RESULT_DISPLAYER_REFRESHED_ERROR));
	}
});

  }
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:39,代码来源:QueryResultPagedTableDisplayer.java

示例5: createTablePanel

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
/**
 * Create the panel
 * @return the panel widget
 */
protected Widget createTablePanel() {
	table = new SimpleTable<String>(TABLE_HEIGHT_PX,TABLE_WIDTH_PX,TABLE_VISIBLE_ROWS);
    TextColumn<String> nameColumn = new TextColumn<String>() {
        public String getValue( String row ) {
            return row;
        }
    };
    table.addColumn( nameColumn, COLUMN_HEADER_NAME );
    table.setColumnWidth(nameColumn, 200, Unit.PX);
    
    VerticalPanel verticalPanel = new VerticalPanel();
    verticalPanel.add(table);
    return verticalPanel;
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:19,代码来源:TablesProcNamesTable.java

示例6: createNameColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private TextColumn<OrderDataDto> createNameColumn() {
	return new TextColumn<OrderDataDto>() {

		@Override
		public String getValue(OrderDataDto orderData) {
			return orderData.getFirstName() + " " + orderData.getLastName();
		}
	};
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:10,代码来源:GenerateDocumentPanel.java

示例7: createZipColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private TextColumn<OrderDataDto> createZipColumn() {
	return new TextColumn<OrderDataDto>() {

		@Override
		public String getValue(OrderDataDto orderData) {
			return orderData.getZip();
		}
	};
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:10,代码来源:GenerateDocumentPanel.java

示例8: createCityColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private TextColumn<OrderDataDto> createCityColumn() {
	return new TextColumn<OrderDataDto>() {

		@Override
		public String getValue(OrderDataDto orderData) {
			return orderData.getCity();
		}
	};
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:10,代码来源:GenerateDocumentPanel.java

示例9: createCountryColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private TextColumn<OrderDataDto> createCountryColumn() {
	return new TextColumn<OrderDataDto>() {

		@Override
		public String getValue(OrderDataDto orderData) {
			return orderData.getCountry();
		}
	};
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:10,代码来源:GenerateDocumentPanel.java

示例10: initNameColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private void initNameColumn() {
	nameColumn = new TextColumn<TemplateDto>() {

		@Override
		public String getValue(TemplateDto template) {
			return template.getDocumentName();
		}

	};
	nameColumn.setCellStyleNames("templates-name-cell");
	addColumntoTemplateTable(nameColumn, LABELS.templateDocumentName());
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:13,代码来源:TemplateListPanel.java

示例11: initEditorColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private void initEditorColumn() {
	editorColumn = new TextColumn<TemplateDto>() {

		@Override
		public String getValue(TemplateDto template) {
			return template.getEditor().getDisplayName();
		}
	};
	editorColumn.setCellStyleNames("templates-editor-cell");
	editorColumn.setHorizontalAlignment(Column.ALIGN_LEFT);
	addColumntoTemplateTable(editorColumn, LABELS.templateEditor());
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:13,代码来源:TemplateListPanel.java

示例12: initStatusColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private void initStatusColumn() {
	statusColumn = new TextColumn<TemplateDto>() {

		@Override
		public String getValue(TemplateDto template) {
			String lockingUserName = "";
			if (template.getLockingUser() != null) {
				lockingUserName = template.getLockingUser().getDisplayName();
			}
			return lockingUserName;
		}
	};
	statusColumn.setCellStyleNames("locking-user-cell");
	addColumntoTemplateTable(statusColumn, LABELS.templateLockingUser());
}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:16,代码来源:TemplateListPanel.java

示例13: initcontentControlIdColumnColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private void initcontentControlIdColumnColumn() {
	contentControlIdColumn = new TextColumn<MappingDto>() {
		@Override
		public String getValue(MappingDto mapping) {
			return mapping.getConentControlKey();
		}
	};
	mappings.addColumn(contentControlIdColumn, LABELS.contentControlIdHeader());

}
 
开发者ID:wte4j,项目名称:wte4j,代码行数:11,代码来源:MappingPanel.java

示例14: createOffsetColumn

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private void createOffsetColumn() {
	offSetColumn = new TextColumn<T>() {
		@Override
		public String getValue(T object) {
			return null;
		}
	};
	offSetHeader = new TextHeader("");
	offSetHeader.setHeaderStyleNames("treeGridOffsetHeader");
}
 
开发者ID:treblereel,项目名称:TreeGridGWT,代码行数:11,代码来源:TreeGrid.java

示例15: initTable

import com.google.gwt.user.cellview.client.TextColumn; //导入依赖的package包/类
private void initTable() {
    ListHandler<MetadataEnumeration> sortHandler =
        new ListHandler<MetadataEnumeration>(listProvider.getList());

    table.addColumnSortHandler(sortHandler);
    table.setEmptyTableWidget(new Label("No Authors found.."));
    
    this.metacompare = new Comparator<MetadataEnumeration>() {
      @Override
      public int compare(MetadataEnumeration e1, MetadataEnumeration e2) {
        if(e1.getLabel() != null && e2.getLabel() != null)
          return e1.getLabel().compareToIgnoreCase(e2.getLabel());
        return 0;
      }
    };
    
    // Name Column
    TextColumn<MetadataEnumeration> namecol = 
        new TextColumn<MetadataEnumeration>() {
      @Override
      public String getValue(MetadataEnumeration menum) {
        return menum.getLabel();
      }
    };
    table.addColumn(namecol, "Author Name");
    namecol.setSortable(true);
    sortHandler.setComparator(namecol, this.metacompare);
    table.getColumnSortList().push(namecol);    
    
    listProvider.addDataDisplay(table);
    pager.setDisplay(table);
}
 
开发者ID:KnowledgeCaptureAndDiscovery,项目名称:ontosoft,代码行数:33,代码来源:CommunityView.java


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