if (type.equals("*")) {
List actTypes = jts.getTypes(Activity.class);
for (int i = 0; i < actTypes.size(); i++) {
JaWEType jt = (JaWEType) actTypes.get(i);
JaWEAction ja = new JaWEAction();
ja.setAction(new SetActivityMode(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 {
JaWEType jt = jts.getType(type);
if (jt == null) {
continue;
}
JaWEAction ja = new JaWEAction();
ja.setAction(new SetActivityMode(controller, jt.getTypeId()));
ja.setIcon(jt.getIcon());
ja.setLangDepName(jt.getDisplayName());
JButton b = BarFactory.createToolbarButton(ja, controller);
decorateToolboxButton(b, ja);
toolbar.add(b);