use of org.freeplane.features.styles.IStyle in project freeplane by freeplane.
the class IconController method getStyleIconSize.
private Quantity<LengthUnits> getStyleIconSize(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 Quantity<LengthUnits> iconSize = styleNode.getSharedData().getIcons().getIconSize();
if (iconSize == null) {
continue;
}
return iconSize;
}
return DEFAULT_ICON_SIZE;
}
use of org.freeplane.features.styles.IStyle in project freeplane by freeplane.
the class NodeStyleController method getBorderColorMatchesEdgeColor.
public Boolean getBorderColorMatchesEdgeColor(NodeModel node) {
final MapModel map = node.getMap();
final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
final Collection<IStyle> style = styleController.getStyles(node);
final Boolean borderColorMatchesEdgeColor = getBorderColorMatchesEdgeColor(map, style);
return borderColorMatchesEdgeColor;
}
use of org.freeplane.features.styles.IStyle in project freeplane by freeplane.
the class NodeStyleController method getNodeFormat.
public String getNodeFormat(NodeModel node) {
Collection<IStyle> collection = LogicalStyleController.getController(modeController).getStyles(node);
final MapStyleModel model = MapStyleModel.getExtension(node.getMap());
for (IStyle styleKey : collection) {
final NodeModel styleNode = model.getStyleNode(styleKey);
if (styleNode == null) {
continue;
}
final String format = NodeStyleModel.getNodeFormat(styleNode);
if (format != null) {
return format;
}
}
// automatically disable all IContentTransformers!
return PatternFormat.STANDARD_FORMAT_PATTERN;
}
use of org.freeplane.features.styles.IStyle 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.styles.IStyle in project freeplane by freeplane.
the class NodeStyleController method getBorderColor.
public Color getBorderColor(NodeModel node) {
final MapModel map = node.getMap();
final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
final Collection<IStyle> style = styleController.getStyles(node);
final Color borderColor = getBorderColor(map, style);
return borderColor;
}
Aggregations