public void setClosed(boolean newValue) { set(PATH_CLOSED, newValue); setConnectable(newValue); }
/** * Creates an empty BezierFigure, for example without any * <code>BezierPath.Node</code>s. * The BezierFigure will not draw anything, unless at least two nodes * are added to it. * * @param isClosed Specifies whether the <code>BezierPath</code> shall * be closed. */ public BezierFigure(boolean isClosed) { path = new BezierPath(); set(PATH_CLOSED, isClosed); //path.setClosed(isClosed); }
/** * Sets an attribute of the figure. * AttributeKey name and semantics are defined by the class implementing * the figure interface. */ @Override public <T> void set(AttributeKey<T> key, T newValue) { super.set(key, newValue); for (final BezierFigure figure : figures) { figure.set(key, newValue); } }
/** * Sets an attribute of the figure. * AttributeKey name and semantics are defined by the class implementing * the figure interface. */ @Override public <T> void set(AttributeKey<T> key, T newValue) { super.set(key, newValue); for (final BezierFigure figure : figures) { figure.set(key, newValue); } }
@SuppressWarnings("unchecked") protected BezierFigure createFigure() { BezierFigure f = (BezierFigure) prototype.clone(); getEditor().applyDefaultAttributesTo(f); if (attributes != null) { for (Map.Entry<AttributeKey, Object> entry : attributes.entrySet()) { f.set(entry.getKey(), entry.getValue()); } } return f; }
@Override public Figure createDefaultFigure() { final BezierFigure figure = new PolygonFigure(); initDefaultSettings(figure); figure.set(AttributeKeys.WINDING_RULE, AttributeKeys.WindingRule.EVEN_ODD); return figure; }