)
);
Label header = new Label("Available tokens to signal: ");
header.setStyleName("bpm-label-header");
layout.add(header, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
layout.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
listBoxTokens = new ListBox<TokenReference>(new String[] { "Id", "Name" });
listBoxTokens.setCellRenderer(new ListBox.CellRenderer<TokenReference>() {
public void renderCell(ListBox<TokenReference> listBox, int row, int column, TokenReference item) {
switch (column) {
case 0:
listBox.setText(row, column, item.getId());
break;
case 1:
listBox.setText(row, column, item.getName() == null ? item.getCurrentNodeName() : item.getName());
break;
default:
throw new RuntimeException("Unexpected column size");
}
}
});
listBoxTokens.addRowSelectionHandler(
new RowSelectionHandler()
{
public void onRowSelection(RowSelectionEvent rowSelectionEvent)
{
int index = listBoxTokens.getSelectedIndex();
if(index!=-1)
{
TokenReference item = listBoxTokens.getItem(index);
renderAvailableSignals(item);
}
}
}
);
renderSignalListBox(-1);
layout.add(listBoxTokens, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
Label headerSignals = new Label("Available signal names");
headerSignals.setStyleName("bpm-label-header");
layout.add(headerSignals, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
listBoxTokenSignals = new ListBox<String>(new String[] { "Signal name" });
listBoxTokenSignals.setCellRenderer(new ListBox.CellRenderer<String>() {
public void renderCell(ListBox<String> listBox, int row, int column, String item) {
switch (column) {
case 0:
listBox.setText(row, column, item);
break;
default:
throw new RuntimeException("Unexpected column size");
}
}
});
layout.add(listBoxTokenSignals, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
signalWindowPanel = new WidgetWindowPanel(
"Signal proces from wait state",
layout, true
);