use of org.freeplane.features.map.MapModel in project freeplane by freeplane.
the class FilterConditionEditor method mapChanged.
/**
*/
public void mapChanged(final MapModel newMap) {
if (newMap != null) {
if (lastMap != null && lastMap.get() == newMap) {
return;
}
filteredPropertiesModel.removeAllElements();
final Iterator<IElementaryConditionController> conditionIterator = filterController.getConditionFactory().conditionIterator();
while (conditionIterator.hasNext()) {
final IElementaryConditionController next = conditionIterator.next();
filteredPropertiesModel.addExtensionList(next.getFilteredProperties());
filteredPropertiesModel.setSelectedItem(filteredPropertiesModel.getElementAt(0));
}
} else {
filteredPropertiesComponent.setSelectedIndex(-1);
filteredPropertiesModel.setExtensionList(null);
}
lastMap = new WeakReference<MapModel>(newMap);
}
use of org.freeplane.features.map.MapModel in project freeplane by freeplane.
the class HierarchicalIcons2 method readingCompleted.
public void readingCompleted(final NodeModel topNode, final Map<String, String> newIds) {
if (!topNode.containsExtension(getClass()) && !topNode.getMap().getRootNode().containsExtension(getClass())) {
return;
}
final MapModel map = topNode.getMap();
final boolean mapStylesAreAlreadyLoaded = null != MapStyleModel.getExtension(map);
if (mapStylesAreAlreadyLoaded) {
gatherLeavesAndSetStyle(topNode);
gatherLeavesAndSetParentsStyle(topNode);
} else
LogicalStyleController.getController().refreshMap(map);
}
use of org.freeplane.features.map.MapModel in project freeplane by freeplane.
the class HierarchicalIcons2 method mapChanged.
public void mapChanged(final MapChangeEvent event) {
final MapModel map = event.getMap();
if (map == null) {
return;
}
final NodeModel rootNode = map.getRootNode();
if (!isActive(rootNode)) {
return;
}
final Object property = event.getProperty();
if (!property.equals(MapStyle.MAP_STYLES)) {
return;
}
gatherLeavesAndSetStyle(rootNode);
gatherLeavesAndSetParentsStyle(rootNode);
}
use of org.freeplane.features.map.MapModel in project freeplane by freeplane.
the class IconController method getIconSize.
public Quantity<LengthUnits> getIconSize(NodeModel node) {
final MapModel map = node.getMap();
final ModeController modeController = Controller.getCurrentModeController();
final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
final Collection<IStyle> styles = styleController.getStyles(node);
final Quantity<LengthUnits> size = getStyleIconSize(map, styles);
return size;
}
use of org.freeplane.features.map.MapModel in project freeplane by freeplane.
the class FilterHistory method redo.
void redo() {
if (!filters.hasNext()) {
return;
}
Controller controller = Controller.getCurrentController();
final MapModel map = controller.getMap();
final Filter next = filters.next();
next.applyFilter(this, map, true);
}
Aggregations