Search in sources :

Example 6 with DashVariant

use of org.freeplane.features.DashVariant in project freeplane by freeplane.

the class NodeStyleController method getBorderDash.

public DashVariant getBorderDash(NodeModel node) {
    final MapModel map = node.getMap();
    final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
    final Collection<IStyle> style = styleController.getStyles(node);
    final DashVariant borderDash = getBorderDash(map, style);
    return borderDash;
}
Also used : IStyle(org.freeplane.features.styles.IStyle) DashVariant(org.freeplane.features.DashVariant) LogicalStyleController(org.freeplane.features.styles.LogicalStyleController) MapModel(org.freeplane.features.map.MapModel)

Example 7 with DashVariant

use of org.freeplane.features.DashVariant in project freeplane by freeplane.

the class NodeStyleController method getBorderDash.

private DashVariant getBorderDash(final MapModel map, final Collection<IStyle> styleKeys) {
    final MapStyleModel model = MapStyleModel.getExtension(map);
    for (IStyle styleKey : styleKeys) {
        final NodeModel styleNode = model.getStyleNode(styleKey);
        if (styleNode == null) {
            continue;
        }
        final NodeBorderModel borderModel = NodeBorderModel.getModel(styleNode);
        if (borderModel == null) {
            continue;
        }
        final DashVariant borderDash = borderModel.getBorderDash();
        if (borderDash == null) {
            continue;
        }
        return borderDash;
    }
    return DashVariant.DEFAULT;
}
Also used : IStyle(org.freeplane.features.styles.IStyle) NodeModel(org.freeplane.features.map.NodeModel) DashVariant(org.freeplane.features.DashVariant) MapStyleModel(org.freeplane.features.styles.MapStyleModel)

Aggregations

DashVariant (org.freeplane.features.DashVariant)7 NodeModel (org.freeplane.features.map.NodeModel)3 IStyle (org.freeplane.features.styles.IStyle)3 IActor (org.freeplane.core.undo.IActor)2 MapStyleModel (org.freeplane.features.styles.MapStyleModel)2 Color (java.awt.Color)1 LengthUnits (org.freeplane.core.ui.LengthUnits)1 EdgeModel (org.freeplane.features.edge.EdgeModel)1 MapController (org.freeplane.features.map.MapController)1 MapModel (org.freeplane.features.map.MapModel)1 ModeController (org.freeplane.features.mode.ModeController)1 LogicalStyleController (org.freeplane.features.styles.LogicalStyleController)1