List of usage examples for com.google.gwt.user.cellview.client Column setSortable
public void setSortable(boolean sortable)
From source file:org.kie.workbench.common.dmn.showcase.client.screens.notifications.Notifications.java
License:Apache License
private com.google.gwt.user.cellview.client.Column<Notification, String> createMessageColumn() { final Cell<String> messageCell = new TextCell(); final Column<Notification, String> messageColumn = new Column<Notification, String>(messageCell) { @Override// w w w. java 2s . c om public String getValue(final Notification object) { return getNotificationSourceMessage(object); } }; messageColumn.setSortable(false); return messageColumn; }
From source file:org.kie.workbench.common.screens.datamodeller.client.widgets.editor.DataObjectBrowserViewImpl.java
License:Apache License
private void addPropertyNameColumn() { Column<ObjectProperty, String> column = new Column<ObjectProperty, String>(new TextCell()) { @Override/*w w w .j a v a 2s .c om*/ 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); }
From source file:org.kie.workbench.common.screens.datamodeller.client.widgets.editor.DataObjectBrowserViewImpl.java
License:Apache License
private void addPropertyLabelColumn() { Column<ObjectProperty, String> column = new Column<ObjectProperty, String>(new TextCell()) { @Override// ww w . jav a 2s. c om 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); }
From source file:org.kie.workbench.common.screens.datamodeller.client.widgets.editor.DataObjectBrowserViewImpl.java
License:Apache License
private void addPropertyTypeColumn() { Column<ObjectProperty, HyperLinkCell.HyperLink> column = new Column<ObjectProperty, HyperLinkCell.HyperLink>( new HyperLinkCell()) { @Override/*from w w w . ja v a 2 s. c o m*/ public HyperLinkCell.HyperLink getValue(ObjectProperty objectProperty) { if (presenter != null && objectProperty.getName() != null) { final String textValue = presenter.getPropertyTypeDisplayValue(objectProperty); if (presenter.isSelectablePropertyType(objectProperty)) { return HyperLinkCell.HyperLink.newLink(textValue); } else { return HyperLinkCell.HyperLink.newText(textValue); } } else { return HyperLinkCell.HyperLink.newText(""); } } }; column.setFieldUpdater((index, objectProperty, value) -> { if (presenter != null && presenter.isSelectablePropertyType(objectProperty)) { presenter.onSelectPropertyType(objectProperty); } }); column.setSortable(true); propertiesTable.addColumn(column, Constants.INSTANCE.objectBrowser_columnType()); propertiesTable.setColumnWidth(column, 35, Style.Unit.PCT); columnIds.put(column, ColumnId.TYPE_COLUMN); }
From source file:org.kie.workbench.common.stunner.bpmn.client.forms.fields.notificationsEditor.widget.NotificationWidgetViewImpl.java
License:Apache License
private void initUsers() { PopoverTextCell toUsers = new PopoverTextCell(); Column<NotificationRow, String> toUsersColumn = new Column<NotificationRow, String>(toUsers) { @Override/* w w w.j av a 2s.com*/ public String getValue(NotificationRow object) { if (object.getUsers() != null) { return object.getUsers().stream().collect(Collectors.joining(",")); } else { return ""; } } }; toUsersColumn.setSortable(false); table.addColumn(toUsersColumn, presenter.getToUsersLabel()); table.setColumnWidth(toUsersColumn, 190, Style.Unit.PX); }
From source file:org.kie.workbench.common.stunner.bpmn.client.forms.fields.notificationsEditor.widget.NotificationWidgetViewImpl.java
License:Apache License
private void initGroups() { PopoverTextCell toGroups = new PopoverTextCell(); Column<NotificationRow, String> toGroupsColumn = new Column<NotificationRow, String>(toGroups) { @Override/*from w w w. ja v a 2 s . c o m*/ public String getValue(NotificationRow object) { if (object.getGroups() != null) { return object.getGroups().stream().collect(Collectors.joining(",")); } else { return ""; } } }; toGroupsColumn.setSortable(false); table.addColumn(toGroupsColumn, presenter.getToGroupsLabel()); table.setColumnWidth(toGroupsColumn, 190, Style.Unit.PX); }
From source file:org.kie.workbench.common.stunner.bpmn.client.forms.fields.notificationsEditor.widget.NotificationWidgetViewImpl.java
License:Apache License
private void initExpiresAt() { TextCell expiresAt = new TextCell(); Column<NotificationRow, String> expiresAtColumn = new Column<NotificationRow, String>(expiresAt) { @Override/* www .j av a 2s .c o m*/ public String getValue(NotificationRow object) { if (object.getExpiresAt() != null) { return object.getExpiresAt(); } return ""; } }; expiresAtColumn.setSortable(false); table.addColumn(expiresAtColumn, presenter.getExpiresAtLabel()); table.setColumnWidth(expiresAtColumn, 80, Style.Unit.PX); }
From source file:org.kie.workbench.common.stunner.bpmn.client.forms.fields.notificationsEditor.widget.NotificationWidgetViewImpl.java
License:Apache License
private void initFrom() { TextCell typeCell = new TextCell(); Column<NotificationRow, String> fromColumn = new Column<NotificationRow, String>(typeCell) { @Override/*from ww w. java2 s .c o m*/ public String getValue(NotificationRow object) { if (object.getFrom() != null) { return object.getFrom(); } return ""; } }; fromColumn.setSortable(false); table.addColumn(fromColumn, presenter.getFromLabel()); table.setColumnWidth(fromColumn, 80, Style.Unit.PX); }
From source file:org.kie.workbench.common.stunner.bpmn.client.forms.fields.notificationsEditor.widget.NotificationWidgetViewImpl.java
License:Apache License
private void initReplyTo() { TextCell typeCell = new TextCell(); Column<NotificationRow, String> replyToColumn = new Column<NotificationRow, String>(typeCell) { @Override// ww w .ja v a2 s . co m public String getValue(NotificationRow object) { if (object.getReplyTo() != null) { return object.getReplyTo(); } return ""; } }; replyToColumn.setSortable(false); table.addColumn(replyToColumn, presenter.getReplyToLabel()); table.setColumnWidth(replyToColumn, 80, Style.Unit.PX); }
From source file:org.kie.workbench.common.stunner.bpmn.client.forms.fields.notificationsEditor.widget.NotificationWidgetViewImpl.java
License:Apache License
private void initSubject() { PopoverTextCell typeCell = new PopoverTextCell(); Column<NotificationRow, String> subjectColumn = new Column<NotificationRow, String>(typeCell) { @Override/*from w w w .j a v a2 s . c om*/ public String getValue(NotificationRow object) { if (object.getSubject() != null) { return object.getSubject(); } return ""; } }; subjectColumn.setSortable(false); table.addColumn(subjectColumn, presenter.getSubjectLabel()); table.setColumnWidth(subjectColumn, 140, Style.Unit.PX); }