use of org.freeplane.features.link.LinkTransformer in project freeplane by freeplane.
the class AttributeConditionController method getValuesForProperty.
public ComboBoxModel getValuesForProperty(final Object selectedItem, NamedObject simpleCond) {
final MapModel map = Controller.getCurrentController().getMap();
final AttributeRegistry registry = AttributeRegistry.getRegistry(map);
try {
final AttributeRegistryElement element = registry.getElement(selectedItem.toString());
final SortedComboBoxModel list = element.getValues();
SortedComboBoxModel linkedList = new SortedComboBoxModel();
for (int i = 0; i < list.getSize(); i++) {
final Object value = list.getElementAt(i);
final Object transformedValue = new LinkTransformer(Controller.getCurrentModeController(), 1).transformContent(value, map);
linkedList.add(transformedValue);
}
values.setExtensionList(linkedList);
} catch (NoSuchElementException e) {
values.setExtensionList(null);
}
return values;
}
Aggregations