use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.ReassignmentRow in project kie-wb-common by kiegroup.
the class ReassignmentWidgetViewImpl method onSubscription.
public void onSubscription(@Observes ReassignmentEvent event) {
this.getParent().getParent().setVisible(true);
ReassignmentRow reassignment = event.getReassignment();
if (reassignment != null) {
if (!dataProvider.getList().contains(reassignment)) {
dataProvider.getList().add(reassignment);
}
refreshTable();
}
}
use of org.kie.workbench.common.stunner.bpmn.client.forms.fields.model.ReassignmentRow in project kie-wb-common by kiegroup.
the class ReassignmentWidgetViewImpl method initDelete.
private void initDelete() {
AbstractCell<ReassignmentRow> buttonCell = new AbstractCell<ReassignmentRow>(ClickEvent.getType().getName()) {
@Override
public void render(Context context, ReassignmentRow value, SafeHtmlBuilder sb) {
Button button = new Button();
button.setSize(ButtonSize.SMALL);
button.add(new Icon(IconType.REMOVE));
sb.append(SafeHtmlUtils.fromTrustedString(button.toString()));
}
@Override
public void onBrowserEvent(Context context, Element parent, ReassignmentRow value, NativeEvent event, ValueUpdater<ReassignmentRow> valueUpdater) {
if (!readOnly) {
delete(value);
}
}
};
Column<ReassignmentRow, ReassignmentRow> deleteColumn = new Column<ReassignmentRow, ReassignmentRow>(buttonCell) {
@Override
public ReassignmentRow getValue(ReassignmentRow object) {
return object;
}
};
deleteColumn.setSortable(false);
table.addColumn(deleteColumn, presenter.getDeleteLabel());
table.setColumnWidth(deleteColumn, 60, Style.Unit.PX);
}
Aggregations