本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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));
}
});
}
示例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;
}
示例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();
}
};
}
示例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();
}
};
}
示例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();
}
};
}
示例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();
}
};
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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");
}
示例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);
}