public static void setBorderDashMatchesEdgeDash(final NodeModel node, final Boolean borderDashMatchesEdgeDash) { createNodeBorderModel(node).setBorderDashMatchesEdgeDash(borderDashMatchesEdgeDash); }
private void removeBorderData(Object key, NodeModel from, NodeModel which) { final NodeBorderModel whichData = which.getExtension(NodeBorderModel.class); if (whichData == null) { return; } final NodeBorderModel fromData = from.getExtension(NodeBorderModel.class); if (fromData == null) { return; } if (null != whichData.getBorderWidthMatchesEdgeWidth()) { fromData.setBorderWidthMatchesEdgeWidth(null); } if (null != whichData.getBorderWidth()) { fromData.setBorderWidth(null); } if (null != whichData.getBorderDashMatchesEdgeDash()) { fromData.setBorderDashMatchesEdgeDash(null); } if (null != whichData.getBorderDash()) { fromData.setBorderDash(null); } if (null != whichData.getBorderColorMatchesEdgeColor()) { fromData.setBorderColorMatchesEdgeColor(null); } if (null != whichData.getBorderColor()) { fromData.setBorderColor(null); } }
private void copyBorderModel(final NodeModel source, final NodeModel target) { final NodeBorderModel from = NodeBorderModel.getModel(source); if (from != null) { setBorderWidthMatchesEdgeWidth(target, from.getBorderWidthMatchesEdgeWidth()); setBorderWidth(target, from.getBorderWidth()); setBorderDashMatchesEdgeDash(target, from.getBorderDashMatchesEdgeDash()); setBorderDash(target, from.getBorderDash()); setBorderColorMatchesEdgeColor(target, from.getBorderColorMatchesEdgeColor()); setBorderColor(target, from.getBorderColor()); } }
public static void setBorderWidthMatchesEdgeWidth(final NodeModel node, final Boolean borderWidthMatchesEdgeWidth) { createNodeBorderModel(node).setBorderWidthMatchesEdgeWidth(borderWidthMatchesEdgeWidth); }
public static void setBorderWidth(final NodeModel node, final Quantity<LengthUnits> borderWidth) { createNodeBorderModel(node).setBorderWidth(borderWidth); }
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; }
private Color getBorderColor(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 Color borderColor = borderModel.getBorderColor(); if (borderColor == null) { continue; } return borderColor; } return EdgeController.STANDARD_EDGE_COLOR; }
private Boolean getBorderWidthMatchesEdgeWidth(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 borderWidthMatchesEdgeWidth = borderModel.getBorderWidthMatchesEdgeWidth(); if (borderWidthMatchesEdgeWidth == null) { continue; } return borderWidthMatchesEdgeWidth; } return false; }
private Quantity<LengthUnits> getBorderWidth(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 Quantity<LengthUnits> borderWidth = borderModel.getBorderWidth(); if (borderWidth == null) { continue; } return borderWidth; } return DEFAULT_BORDER_WIDTH; }
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; }
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; }
public void setAttribute(final Object userObject, final String value) { final NodeModel node = (NodeModel) userObject; NodeBorderModel.setBorderColor(node, ColorUtils.stringToColor(value, NodeBorderModel.getBorderColor(node))); } };
public static void setBorderDash(final NodeModel node, final DashVariant borderDash) { createNodeBorderModel(node).setBorderDash(borderDash); }
public static void setBorderColor(final NodeModel node, final Color borderColor) { createNodeBorderModel(node).setBorderColor(borderColor); }
public static void setBorderColorMatchesEdgeColor(final NodeModel node, final Boolean borderColorMatchesEdgeColor) { createNodeBorderModel(node).setBorderColorMatchesEdgeColor(borderColorMatchesEdgeColor); }
public void copy(final NodeModel from, final NodeModel to) { final NodeStyleModel fromStyle = from.getExtension(NodeStyleModel.class); if (fromStyle != null) { fromStyle.copyTo(NodeStyleModel.createNodeStyleModel(to)); } final NodeSizeModel fromSize = from.getExtension(NodeSizeModel.class); if (fromSize != null) { fromSize.copyTo(NodeSizeModel.createNodeSizeModel(to)); } final NodeBorderModel fromBorder = from.getExtension(NodeBorderModel.class); if (fromBorder != null) { fromBorder.copyTo(NodeBorderModel.createNodeBorderModel(to)); } }
public static Boolean getBorderColorMatchesEdgeColor(final NodeModel node) { final NodeBorderModel extension = node.getExtension(NodeBorderModel.class); return extension == null ? null : extension.getBorderColorMatchesEdgeColor(); }
public static Boolean getBorderDashMatchesEdgeDash(final NodeModel node) { final NodeBorderModel extension = node.getExtension(NodeBorderModel.class); return extension == null ? null : extension.getBorderDashMatchesEdgeDash(); }
public static Color getBorderColor(final NodeModel node) { final NodeBorderModel extension = node.getExtension(NodeBorderModel.class); return extension == null ? null : extension.getBorderColor(); }
public static Boolean getBorderWidthMatchesEdgeWidth(final NodeModel node) { final NodeBorderModel extension = node.getExtension(NodeBorderModel.class); return extension == null ? null : extension.getBorderWidthMatchesEdgeWidth(); }