public static List<ICreatorCustomLabel> getActionCreatorLabels(Map<String, Map> catalogo) { List<ICreatorCustomLabel> customLabels = new ArrayList<>(); Map currentCreator; for (String id : catalogo.keySet()) { currentCreator = catalogo.get(id); String name = (String) currentCreator.get("name"); String description = (String) currentCreator.get("description"); ICreatorCustomLabel myLabel = new ActionCreatorLabel(id, name, description); // RIGIDITA' ((Label) myLabel).setText(name); myLabel.setDescription(description); double r = 0.012; double g = 0.61; double b = 0.90; layoutizeLabelCreator(myLabel, r, g, b); customLabels.add(myLabel); } return customLabels; }
public static List<ICreatorCustomLabel> getConditionCreatorLabels(Map<String, Map> catalogo) { List<ICreatorCustomLabel> customLabels = new ArrayList<>(); Map currentCreator; for (String id : catalogo.keySet()) { if (id != "defaultCreatorKey") { currentCreator = catalogo.get(id); String name = (String) currentCreator.get("name"); String description = (String) currentCreator.get("description"); ICreatorCustomLabel myLabel = new ConditionCreatorLabel(id, name, description); // Questa riga crea rigidità ((Label) myLabel).setText(name); myLabel.setDescription(description); double r = 0.753; double g = 0.902; double b = 0.514; layoutizeLabelCreator(myLabel, r, g, b); setTrue((ConditionCreatorLabel) myLabel); // Non è pulitissimo customLabels.add(myLabel); } } return customLabels; }