if (type.equals("*")) {
List parTypes = jts.getTypes(Participant.class);
for (int i = 0; i < parTypes.size(); i++) {
JaWEType jt = (JaWEType) parTypes.get(i);
JaWEAction ja = new JaWEAction();
ja.setAction(new SetParticipantMode(controller, jt.getTypeId()));
ja.setIcon(jt.getIcon());
ja.setLangDepName(jt.getDisplayName());
JButton b = BarFactory.createToolbarButton(ja, controller);
decorateToolboxButton(b, ja);
toolbar.add(b);
controller.getSettings().addAction(jt.getTypeId(), ja);
}
} else if (!(type.equals("SetParticipantModeCommonExpression") || type.equals("SetParticipantModeFreeTextExpression"))) {
JaWEType jt = jts.getType(type);
if (jt == null) {
continue;
}
JaWEAction ja = new JaWEAction();
ja.setAction(new SetParticipantMode(controller, jt.getTypeId()));
ja.setIcon(jt.getIcon());
ja.setLangDepName(jt.getDisplayName());
JButton b = BarFactory.createToolbarButton(ja, controller);
decorateToolboxButton(b, ja);
toolbar.add(b);