/** * Called after the start element but before the end element to indicate * each child tag that has been processed */ public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException { children.add(child); child.parent = this; child.setDiagram(diagram); //Add info to track if we've scanned animation element if (child instanceof AnimationElement) { trackManager.addTrackElement((AnimationElement)child); } }
public TrackBase getTrack(String name, int type) { //Handle AUTO, which will match either CSS or XML (in that order) if (type == AnimationElement.AT_AUTO) { TrackBase t = getTrack(name, AnimationElement.AT_CSS); if (t != null) return t; t = getTrack(name, AnimationElement.AT_XML); if (t != null) return t; return null; } //Get requested attribute TrackKey key = new TrackKey(name, type); TrackBase t = (TrackBase)tracks.get(key); if (t != null) return t; //If that didn't exist, see if one exists of type AUTO key = new TrackKey(name, AnimationElement.AT_AUTO); return (TrackBase)tracks.get(key); }
public TrackBase getTrack(String name, int type) { //Handle AUTO, which will match either CSS or XML (in that order) if (type == AnimationElement.AT_AUTO) { TrackBase t = getTrack(name, AnimationElement.AT_CSS); if (t != null) return t; t = getTrack(name, AnimationElement.AT_XML); if (t != null) return t; return null; } //Get requested attribute TrackKey key = new TrackKey(name, type); TrackBase t = (TrackBase)tracks.get(key); if (t != null) return t; //If that didn't exist, see if one exists of type AUTO key = new TrackKey(name, AnimationElement.AT_AUTO); return (TrackBase)tracks.get(key); }
/** * Called after the start element but before the end element to indicate * each child tag that has been processed */ public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException { children.add(child); child.parent = this; child.setDiagram(diagram); //Add info to track if we've scanned animation element if (child instanceof AnimationElement) { trackManager.addTrackElement((AnimationElement) child); } }
public TrackBase getTrack(String name, int type) { //Handle AUTO, which will match either CSS or XML (in that order) if (type == AnimationElement.AT_AUTO) { TrackBase t = getTrack(name, AnimationElement.AT_CSS); if (t != null) return t; t = getTrack(name, AnimationElement.AT_XML); if (t != null) return t; return null; } //Get requested attribute TrackKey key = new TrackKey(name, type); TrackBase t = (TrackBase)tracks.get(key); if (t != null) return t; //If that didn't exist, see if one exists of type AUTO key = new TrackKey(name, AnimationElement.AT_AUTO); return (TrackBase)tracks.get(key); }
/** * Called after the start element but before the end element to indicate * each child tag that has been processed * @param helper * @param child * @throws com.kitfox.svg.SVGElementException */ public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException { children.add(child); child.parent = this; child.setDiagram(diagram); //Add info to track if we've scanned animation element if (child instanceof AnimationElement) { trackManager.addTrackElement((AnimationElement) child); } }
public TrackBase getTrack(String name, int type) { //Handle AUTO, which will match either CSS or XML (in that order) if (type == AnimationElement.AT_AUTO) { TrackBase t = getTrack(name, AnimationElement.AT_CSS); if (t != null) return t; t = getTrack(name, AnimationElement.AT_XML); if (t != null) return t; return null; } //Get requested attribute TrackKey key = new TrackKey(name, type); TrackBase t = (TrackBase)tracks.get(key); if (t != null) return t; //If that didn't exist, see if one exists of type AUTO key = new TrackKey(name, AnimationElement.AT_AUTO); return (TrackBase)tracks.get(key); }
/** * Called after the start element but before the end element to indicate * each child tag that has been processed * @param helper * @param child * @throws com.kitfox.svg.SVGElementException */ public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException { children.add(child); child.parent = this; child.setDiagram(diagram); //Add info to track if we've scanned animation element if (child instanceof AnimationElement) { trackManager.addTrackElement((AnimationElement) child); } }
/** * Copies the presentation attribute into the passed one. * @return - True if attribute was read successfully */ public boolean getPres(StyleAttribute attrib) throws SVGException { String presName = attrib.getName(); //Make sure we have a coresponding presentation attribute StyleAttribute presAttr = (StyleAttribute)presAttribs.get(presName); //Copy presentation value directly attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue()); //Evalutate coresponding track, if one exists TrackBase track = trackManager.getTrack(presName, AnimationElement.AT_XML); if (track != null) { track.getValue(attrib, diagram.getUniverse().getCurTime()); return true; } //Return if we found presentation attribute if (presAttr != null) return true; return false; }
/** * Copies the presentation attribute into the passed one. * * @return - True if attribute was read successfully */ public boolean getPres(StyleAttribute attrib) throws SVGException { String presName = attrib.getName(); //Make sure we have a coresponding presentation attribute StyleAttribute presAttr = (StyleAttribute) presAttribs.get(presName); //Copy presentation value directly attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue()); //Evalutate coresponding track, if one exists TrackBase track = trackManager.getTrack(presName, AnimationElement.AT_XML); if (track != null) { track.getValue(attrib, diagram.getUniverse().getCurTime()); return true; } //Return if we found presentation attribute if (presAttr != null) { return true; } return false; }
/** * Copies the presentation attribute into the passed one. * * @param attrib * @return - True if attribute was read successfully * @throws com.kitfox.svg.SVGException */ public boolean getPres(StyleAttribute attrib) throws SVGException { String presName = attrib.getName(); //Make sure we have a coresponding presentation attribute StyleAttribute presAttr = (StyleAttribute) presAttribs.get(presName); //Copy presentation value directly attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue()); //Evalutate coresponding track, if one exists TrackBase track = trackManager.getTrack(presName, AnimationElement.AT_XML); if (track != null) { track.getValue(attrib, diagram.getUniverse().getCurTime()); return true; } //Return if we found presentation attribute if (presAttr != null) { return true; } return false; }
/** * Copies the presentation attribute into the passed one. * * @param attrib * @return - True if attribute was read successfully * @throws com.kitfox.svg.SVGException */ public boolean getPres(StyleAttribute attrib) throws SVGException { String presName = attrib.getName(); //Make sure we have a coresponding presentation attribute StyleAttribute presAttr = (StyleAttribute) presAttribs.get(presName); //Copy presentation value directly attrib.setStringValue(presAttr == null ? "" : presAttr.getStringValue()); //Evalutate coresponding track, if one exists TrackBase track = trackManager.getTrack(presName, AnimationElement.AT_XML); if (track != null) { track.getValue(attrib, diagram.getUniverse().getCurTime()); return true; } //Return if we found presentation attribute if (presAttr != null) { return true; } return false; }