diagram.removeElement(this.id); diagram.setElement(value, this);
diagram.removeElement(this.id); diagram.setElement(value, this);
diagram.removeElement(this.id); diagram.setElement(value, this);
diagram.removeElement(this.id); diagram.setElement(value, this);
public void addAttribute(String name, int attribType, String value) throws SVGElementException { if (hasAttribute(name, attribType)) throw new SVGElementException(this, "Attribute " + name + "(" + AnimationElement.animationElementToString(attribType) + ") already exists"); //Alter layout for id attribute if ("id".equals(name)) { if (diagram != null) { diagram.removeElement(id); diagram.setElement(value, this); } this.id = value; } switch (attribType) { case AnimationElement.AT_CSS: inlineStyles.put(name, new StyleAttribute(name, value)); return; case AnimationElement.AT_XML: presAttribs.put(name, new StyleAttribute(name, value)); return; } throw new SVGElementException(this, "Invalid attribute type " + attribType); }
public void addAttribute(String name, int attribType, String value) throws SVGElementException { if (hasAttribute(name, attribType)) { throw new SVGElementException(this, "Attribute " + name + "(" + AnimationElement.animationElementToString(attribType) + ") already exists"); } //Alter layout for id attribute if ("id".equals(name)) { if (diagram != null) { diagram.removeElement(id); diagram.setElement(value, this); } this.id = value; } switch (attribType) { case AnimationElement.AT_CSS: inlineStyles.put(name, new StyleAttribute(name, value)); return; case AnimationElement.AT_XML: presAttribs.put(name, new StyleAttribute(name, value)); return; } throw new SVGElementException(this, "Invalid attribute type " + attribType); }
public void addAttribute(String name, int attribType, String value) throws SVGElementException { if (hasAttribute(name, attribType)) { throw new SVGElementException(this, "Attribute " + name + "(" + AnimationElement.animationElementToString(attribType) + ") already exists"); } //Alter layout for id attribute if ("id".equals(name)) { if (diagram != null) { diagram.removeElement(id); diagram.setElement(value, this); } this.id = value; } switch (attribType) { case AnimationElement.AT_CSS: inlineStyles.put(name, new StyleAttribute(name, value)); return; case AnimationElement.AT_XML: presAttribs.put(name, new StyleAttribute(name, value)); return; } throw new SVGElementException(this, "Invalid attribute type " + attribType); }
public void addAttribute(String name, int attribType, String value) throws SVGElementException { if (hasAttribute(name, attribType)) { throw new SVGElementException(this, "Attribute " + name + "(" + AnimationElement.animationElementToString(attribType) + ") already exists"); } //Alter layout for id attribute if ("id".equals(name)) { if (diagram != null) { diagram.removeElement(id); diagram.setElement(value, this); } this.id = value; } switch (attribType) { case AnimationElement.AT_CSS: inlineStyles.put(name, new StyleAttribute(name, value)); return; case AnimationElement.AT_XML: presAttribs.put(name, new StyleAttribute(name, value)); return; } throw new SVGElementException(this, "Invalid attribute type " + attribType); }
if (!newId.equals(id)) diagram.removeElement(id); id = newId; diagram.setElement(this.id, this);
if (!newId.equals(id)) diagram.removeElement(id); id = newId; diagram.setElement(this.id, this);
if (!newId.equals(id)) diagram.removeElement(id); id = newId; diagram.setElement(this.id, this);
/** * Called by internal processes to rebuild the geometry of this node * from it's presentation attributes, style attributes and animated tracks. */ protected void build() throws SVGException { StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("id"))) { String newId = sty.getStringValue(); if (!newId.equals(id)) { diagram.removeElement(id); id = newId; diagram.setElement(this.id, this); } } if (getPres(sty.setName("class"))) cssClass = sty.getStringValue(); if (getPres(sty.setName("xml:base"))) xmlBase = sty.getURIValue(); }