use of org.freeplane.features.map.NodeModel in project freeplane by freeplane.
the class NodeStyleController method getBorderDashMatchesEdgeDash.
private Boolean getBorderDashMatchesEdgeDash(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 Boolean borderDashMatchesEdgeDash = borderModel.getBorderDashMatchesEdgeDash();
if (borderDashMatchesEdgeDash == null) {
continue;
}
return borderDashMatchesEdgeDash;
}
return false;
}
use of org.freeplane.features.map.NodeModel in project freeplane by freeplane.
the class NodeStyleController method getBorderColorMatchesEdgeColor.
private Boolean getBorderColorMatchesEdgeColor(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 Boolean borderColorMatchesEdgeColor = borderModel.getBorderColorMatchesEdgeColor();
if (borderColorMatchesEdgeColor == null) {
continue;
}
return borderColorMatchesEdgeColor;
}
return true;
}
use of org.freeplane.features.map.NodeModel in project freeplane by freeplane.
the class NodeStyleController method getStyleMinWidth.
private Quantity<LengthUnits> getStyleMinWidth(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 NodeSizeModel sizeModel = NodeSizeModel.getModel(styleNode);
if (sizeModel == null) {
continue;
}
final Quantity<LengthUnits> minWidth = sizeModel.getMinNodeWidth();
if (minWidth == null) {
continue;
}
return minWidth;
}
return DEFAULT_MINIMUM_WIDTH;
}
use of org.freeplane.features.map.NodeModel in project freeplane by freeplane.
the class NodeStyleController method getDefaultFont.
public Font getDefaultFont(final MapModel map, final IStyle style) {
final MapStyleModel model = MapStyleModel.getExtension(map);
final NodeModel styleNode = model.getStyleNodeSafe(style);
return getFont(styleNode);
}
use of org.freeplane.features.map.NodeModel in project freeplane by freeplane.
the class NodeStyleController method getStyleBackgroundColor.
private Color getStyleBackgroundColor(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 NodeStyleModel styleModel = NodeStyleModel.getModel(styleNode);
if (styleModel == null) {
continue;
}
final Color styleColor = styleModel.getBackgroundColor();
if (styleColor == null) {
continue;
}
return styleColor;
}
return null;
}
Aggregations