本文整理汇总了Java中com.google.gwt.cell.client.TextCell类的典型用法代码示例。如果您正苦于以下问题:Java TextCell类的具体用法?Java TextCell怎么用?Java TextCell使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TextCell类属于com.google.gwt.cell.client包,在下文中一共展示了TextCell类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createColumnTextCell
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private ColumnMeta createColumnTextCell(final String value,
String dataStoreName) {
Column<String, String> testColumn = new Column<String, String>(new TextCell()) {
@Override
public String getValue(String object) {
return value;
}
};
testColumn.setSortable(true);
testColumn.setDataStoreName(dataStoreName);
final Header<String> header = new TextHeader(value);
ColumnMeta<String> columnMeta = new ColumnMeta(testColumn,
dataStoreName);
columnMeta.setHeader(header);
return columnMeta;
}
示例2: createAttributeNameColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
protected com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> createAttributeNameColumn(ColumnSortEvent.ListHandler<Entry<String, String>> sortHandler) {
// Attribute name.
final Cell<String> nameCell = canManageAttributes() ? new EditTextCell() : new TextCell();
final com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> keyColumn = new com.google.gwt.user.cellview.client.Column<Entry<String, String>, String>(
nameCell) {
@Override
public String getValue(final Entry<String, String> object) {
return object.getKey() != null ? object.getKey() : "";
}
};
keyColumn.setSortable(true);
sortHandler.setComparator(keyColumn,
new Comparator<Entry<String, String>>() {
@Override
public int compare(Entry<String, String> o1,
Entry<String, String> o2) {
return o1.getKey().compareTo(o2.getKey());
}
});
keyColumn.setFieldUpdater(canManageAttributes() ? keyModifiedEventHandler : null);
return keyColumn;
}
示例3: createAttributeValueColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
protected com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> createAttributeValueColumn(ColumnSortEvent.ListHandler<Entry<String, String>> sortHandler) {
// Attribute value.
final Cell<String> valueCell = canManageAttributes() ? new EditTextCell() : new TextCell();
final com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> valueColumn = new com.google.gwt.user.cellview.client.Column<Entry<String, String>, String>(
valueCell) {
@Override
public String getValue(final Entry<String, String> object) {
return object.getValue() != null ? object.getValue() : "";
}
};
valueColumn.setSortable(true);
sortHandler.setComparator(valueColumn,
new Comparator<Entry<String, String>>() {
@Override
public int compare(Entry<String, String> o1,
Entry<String, String> o2) {
return o1.getValue().compareTo(o2.getValue());
}
});
valueColumn.setFieldUpdater(canManageAttributes() ? valueModifiedEventHandler : null);
return valueColumn;
}
示例4: StudentEditorPresenter
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
public StudentEditorPresenter(final GwtPreferences preferences) {
this.preferences = preferences;
initWidget(uiBinder.createAndBindUi(this));
TextCell textCell = new TextCell();
studentDisplay = new CellList<String>(textCell);
studentList = new ListDataProvider<>(preferences.getStudentNames());
studentList.addDataDisplay(studentDisplay);
selectionModel = new SingleSelectionModel<>();
studentDisplay.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
updateSelectedStudent();
oldStudentName = selectionModel.getSelectedObject();
studentName.setText(oldStudentName);
}
});
studentPanel.add(studentDisplay);
selectionModel.setSelected(studentList.getList().get(0), true);
}
示例5: setup
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
@PostConstruct
public void setup() {
this.availableFactTypesWidget = new MinimumWidthCellList<String>( new TextCell(),
WizardCellListResources.INSTANCE );
this.chosenPatternsWidget = new MinimumWidthCellList<ActionInsertFactFieldsPattern>( actionInsertFactFieldPatternCell,
WizardCellListResources.INSTANCE );
this.availableFieldsWidget = new MinimumWidthCellList<AvailableField>( new AvailableFieldCell(),
WizardCellListResources.INSTANCE );
this.chosenFieldsWidget = new MinimumWidthCellList<ActionInsertFactCol52>( actionInsertFactFieldCell,
WizardCellListResources.INSTANCE );
initialiseAvailableFactTypes();
initialiseChosenPatterns();
initialiseAvailableFields();
initialiseChosenFields();
initialiseBinding();
initialiseLogicalInsert();
initialiseColumnHeader();
initialiseValueList();
}
示例6: addClassNameColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private void addClassNameColumn() {
Column<ClassRow, String> column = new Column<ClassRow, String>( new TextCell() ) {
@Override
public String getValue( ClassRow classRow ) {
if ( classRow.getClassName() != null ) {
return classRow.getClassName();
} else {
return "";
}
}
};
dataGrid.addColumn( column,
Constants.INSTANCE.project_class_list_class_name_column() );
dataGrid.setColumnWidth( column, 90, Style.Unit.PCT );
}
示例7: addPropertyNameColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private void addPropertyNameColumn() {
Column<ObjectProperty, String> column = new Column<ObjectProperty, String>(new TextCell()) {
@Override
public String getValue(ObjectProperty objectProperty) {
if (objectProperty.getName() != null) {
return objectProperty.getName();
} else {
return "";
}
}
};
column.setSortable(true);
propertiesTable.addColumn(column,
Constants.INSTANCE.objectBrowser_columnName());
propertiesTable.setColumnWidth(column,
25,
Style.Unit.PCT);
columnIds.put(column,
ColumnId.NAME_COLUMN);
}
示例8: addPropertyLabelColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private void addPropertyLabelColumn() {
Column<ObjectProperty, String> column = new Column<ObjectProperty, String>(new TextCell()) {
@Override
public String getValue(ObjectProperty objectProperty) {
if (objectProperty.getName() != null) {
return AnnotationValueHandler.getStringValue(objectProperty,
MainDomainAnnotations.LABEL_ANNOTATION,
MainDomainAnnotations.VALUE_PARAM);
} else {
return "";
}
}
};
column.setSortable(true);
propertiesTable.addColumn(column,
Constants.INSTANCE.objectBrowser_columnLabel());
propertiesTable.setColumnWidth(column,
25,
Style.Unit.PCT);
columnIds.put(column,
ColumnId.LABEL_COLUMN);
}
示例9: createMessageColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private com.google.gwt.user.cellview.client.Column<Notification, String> createMessageColumn(ColumnSortEvent.ListHandler<Notification> sortHandler) {
// Log message.
final Cell<String> messageCell = new TextCell();
final com.google.gwt.user.cellview.client.Column<Notification, String> messageColumn = new com.google.gwt.user.cellview.client.Column<Notification, String>(messageCell) {
@Override
public String getValue(final Notification object) {
return getNotificationSourceMessage(object);
}
};
messageColumn.setSortable(false);
return messageColumn;
}
示例10: getReadOnlyColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
@Override
protected Column<TableEntry<Date>, String> getReadOnlyColumn() {
Column<TableEntry<Date>, String> column = new Column<TableEntry<Date>, String>(new TextCell()) {
@Override
public String getValue(TableEntry<Date> model) {
if (model.getValue() == null) {
return "";
}
DateTimeFormat format = DateTimeFormat.getFormat(DEFAULT_DATE_AND_TIME_FORMAT_MASK);
return format.format(model.getValue());
}
};
return column;
}
示例11: ExtensionManagerViewImpl
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
@Inject
public ExtensionManagerViewImpl(
ToolbarPresenter toolbarPresenter, ActionManager actionManager, Resources resources) {
dataGrid = new DataGrid<>(100, resources);
rootElement = ourUiBinder.createAndBindUi(this);
DefaultActionGroup actionGroup =
new DefaultActionGroup("extensionManager", false, actionManager);
actionManager.registerAction("extensionManagerGroup", actionGroup);
toolbarPresenter.bindMainGroup(actionGroup);
UIObject.ensureDebugId(descriptionArea, "window-preferences-extensions-descriptionArea");
Column<ExtensionDescription, String> titleColumn =
new Column<ExtensionDescription, String>(new TextCell()) {
@Override
public String getValue(ExtensionDescription object) {
return object.getTitle();
}
};
titleColumn.setCellStyleNames(style.titleColumn());
dataGrid.addColumn(titleColumn);
SingleSelectionModel<ExtensionDescription> selectionModel =
new SingleSelectionModel<ExtensionDescription>();
dataGrid.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(
new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {}
});
}
示例12: addLineColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private void addLineColumn() {
final Column<MessageConsoleServiceRow, ?> lineColumn = new Column<MessageConsoleServiceRow, String>(new TextCell()) {
@Override
public String getValue(MessageConsoleServiceRow row) {
return row != null ? Integer.toString(row.getMessageLine()) : null;
}
};
dataGrid.addColumn(lineColumn,
MessageConsoleResources.CONSTANTS.Line());
dataGrid.setColumnWidth(lineColumn,
75,
Style.Unit.PX);
}
示例13: addColumnColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private void addColumnColumn() {
Column<MessageConsoleServiceRow, ?> column = new Column<MessageConsoleServiceRow, String>(new TextCell()) {
@Override
public String getValue(MessageConsoleServiceRow row) {
return Integer.toString(row.getMessageColumn());
}
};
dataGrid.addColumn(column,
MessageConsoleResources.CONSTANTS.Column());
dataGrid.setColumnWidth(column,
75,
Style.Unit.PX);
}
示例14: initDescriptionColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private com.google.gwt.user.cellview.client.Column initDescriptionColumn() {
// start time
com.google.gwt.user.cellview.client.Column<DataGridFilterSummary, String> descriptionColumn = new com.google.gwt.user.cellview.client.Column<DataGridFilterSummary, String>(new TextCell()) {
@Override
public String getValue(DataGridFilterSummary object) {
return object.getFilterName();
}
};
descriptionColumn.setSortable(true);
descriptionColumn.setDataStoreName("log.filterName");
return descriptionColumn;
}
示例15: createColumn
import com.google.gwt.cell.client.TextCell; //导入依赖的package包/类
private Column createColumn(String value,
String dataStoreName) {
Column<String, String> testColumn = new Column<String, String>(new TextCell()) {
@Override
public String getValue(String object) {
return value;
}
};
testColumn.setSortable(true);
testColumn.setDataStoreName(dataStoreName);
return testColumn;
}