public void setAttribute(final Object userObject, final String value) { final NodeModel node = (NodeModel) userObject; NodeStyleModel.setHorizontalTextAlignment(node, HorizontalTextAlignment.valueOf(value)); } };
public static void setShapeVerticalMargin(final NodeModel node, final Quantity<LengthUnits> margin) { final NodeStyleModel styleModel = NodeStyleModel.createNodeStyleModel(node); styleModel.setShapeConfiguration(styleModel.getShapeConfiguration().withVerticalMargin(margin)); }
public static void setShapeHorizontalMargin(final NodeModel node, final Quantity<LengthUnits> margin) { final NodeStyleModel styleModel = NodeStyleModel.createNodeStyleModel(node); styleModel.setShapeConfiguration(styleModel.getShapeConfiguration().withHorizontalMargin(margin)); }
@Override void setStyleOnExternalChange(NodeModel node) { final NodeStyleController styleController = NodeStyleController.getController(); final NodeBorderModel nodeBorderModel = NodeBorderModel.getModel(node); final Boolean match = nodeBorderModel != null ? nodeBorderModel.getBorderColorMatchesEdgeColor() : null; final Boolean viewMatch = styleController.getBorderColorMatchesEdgeColor(node); mSetBorderColorMatchesEdgeColor.setValue(match != null); mBorderColorMatchesEdgeColor.setValue(viewMatch); } }
@Override void setStyleOnExternalChange(NodeModel node) { final NodeStyleController styleController = NodeStyleController.getController(); final NodeBorderModel nodeBorderModel = NodeBorderModel.getModel(node); final Boolean match = nodeBorderModel != null ? nodeBorderModel.getBorderWidthMatchesEdgeWidth() : null; final Boolean viewMatch = styleController.getBorderWidthMatchesEdgeWidth(node); mSetBorderWidthMatchesEdgeWidth.setValue(match != null); mBorderWidthMatchesEdgeWidth.setValue(viewMatch); } }
@Override void setStyleOnExternalChange(NodeModel node) { final NodeBorderModel nodeBorderModel = NodeBorderModel.getModel(node); final NodeStyleController styleController = NodeStyleController.getController(); final Boolean match = nodeBorderModel != null ? nodeBorderModel.getBorderDashMatchesEdgeDash() : null; final Boolean viewMatch = styleController.getBorderDashMatchesEdgeDash(node); mSetBorderDashMatchesEdgeDash.setValue(match != null); mBorderDashMatchesEdgeDash.setValue(viewMatch); } }
@Override void setStyleOnExternalChange(NodeModel node) { final NodeStyleController styleController = NodeStyleController.getController(); final Boolean italic = NodeStyleModel.isItalic(node); final Boolean viewitalic = styleController.isItalic(node); mSetNodeFontItalic.setValue(italic != null); mNodeFontItalic.setValue(viewitalic); } }
@Override void setStyleOnExternalChange(NodeModel node) { final NodeStyleController styleController = NodeStyleController.getController(); final Boolean nodeNumbering = NodeStyleModel.getNodeNumbering(node); final Boolean viewNodeNumbering = styleController.getNodeNumbering(node); mSetNodeNumbering.setValue(nodeNumbering != null); mNodeNumbering.setValue(viewNodeNumbering); } }
@Override protected void actionPerformed(final ActionEvent e, final NodeModel node) { ((MNodeStyleController) NodeStyleController.getController()).setShape(node, actionShape.toString()); } }
@Override void setStyleOnExternalChange(NodeModel node) { final NodeStyleController styleController = NodeStyleController.getController(); final Boolean strikeThrough = NodeStyleModel.isStrikedThrough(node); final Boolean viewstrikeThrough = styleController.isStrikedThrough(node); mSetNodeFontStrikeThrough.setValue(strikeThrough != null); mNodeFontStrikeThrough.setValue(viewstrikeThrough); } }
private void writeAttributes(final ITreeWriter writer, final NodeModel node, final NodeSizeModel size, final boolean forceFormatting) { final Quantity<LengthUnits> maxTextWidth = forceFormatting ? nsc.getMaxWidth(node) : size.getMaxNodeWidth(); if (maxTextWidth != null) { BackwardCompatibleQuantityWriter.forWriter(writer).writeQuantity("MAX_WIDTH", maxTextWidth); } final Quantity<LengthUnits> minTextWidth = forceFormatting ? nsc.getMinWidth(node) : size.getMinNodeWidth(); if (minTextWidth != null) { BackwardCompatibleQuantityWriter.forWriter(writer).writeQuantity("MIN_WIDTH", minTextWidth); } }
public static void setShapeUniform(final NodeModel node, final boolean uniform) { final NodeStyleModel styleModel = NodeStyleModel.createNodeStyleModel(node); styleModel.setShapeConfiguration(styleModel.getShapeConfiguration().withUniform(uniform)); }
public void setShape(final String shape) { try { this.setShapeConfiguration(getShapeConfiguration().withShape(shape != null ? Shape.valueOf(shape) : null)); } catch (IllegalArgumentException e) { LogUtils.warn("unknown shape " + shape); } }
public void setShape(final Shape shape) { this.setShapeConfiguration(getShapeConfiguration().withShape(shape)); }
public Shape getShape() { return getShapeConfiguration().getShape(); }
public boolean isStrikedThrough(NodeModel node) { return FontUtils.isStrikedThrough(getFont(node)); } }
public void copyTo(NodeSizeModel to) { if(maxTextWidth != null) to.setMaxNodeWidth(maxTextWidth); if(minNodeWidth != null) to.setMinNodeWidth(minNodeWidth); } }
public void setAttribute(final Object userObject, final String value) { final NodeModel node = (NodeModel) userObject; NodeStyleModel.setShape(node, value); } };
public void setAttribute(final Object userObject, final String value) { final NodeModel node = (NodeModel) userObject; NodeStyleModel.setNodeFormat(node, value); } };
public Font getProperty(final NodeModel node, final Font currentValue) { final Font defaultFont = NodeStyleController.getDefaultFont(); return defaultFont; } });