public <T> T getAttribute(String key) { return manager.graph.getAttribute(String.format("%s.%s", completeId, key)); }
protected void lookForExistingSprites() throws InvalidSpriteIDException { if (graph.getAttributeCount() > 0) { for (String attr : graph.getAttributeKeySet()) { if (attr.startsWith("ui.sprite.")) { String id = attr.substring(10); if (id.indexOf('.') < 0) { addSprite(id); } else { String sattr = id.substring(id.indexOf('.') + 1); id = id.substring(0, id.indexOf('.')); Sprite s = getSprite(id); if (s == null) s = addSprite(id); s.addAttribute(sattr, graph.getAttribute(attr)); } } } } }
@Override protected void exportGraph(Graph graph) { String graphId = graph.getId(); long timeId = 0; for (String key : graph.getAttributeKeySet()) graphAttributeAdded(graphId, timeId++, key, graph.getAttribute(key)); for (Node node : graph) { String nodeId = node.getId(); out.printf("\t\"%s\" %s;%n", nodeId, outputAttributes(node)); } for (Edge edge : graph.getEachEdge()) { String fromNodeId = edge.getNode0().getId(); String toNodeId = edge.getNode1().getId(); String attr = outputAttributes(edge); if (digraph) { out.printf("\t\"%s\" -> \"%s\"", fromNodeId, toNodeId); if (!edge.isDirected()) out.printf(" -> \"%s\"", fromNodeId); } else out.printf("\t\"%s\" -- \"%s\"", fromNodeId, toNodeId); out.printf(" %s;%n", attr); } }
@Override protected void exportGraph(Graph graph) { String graphId = graph.getId(); long timeId = 0; for (String key : graph.getAttributeKeySet()) graphAttributeAdded(graphId, timeId++, key, graph.getAttribute(key)); for (Node node : graph) { String nodeId = node.getId(); out.printf("\t\"%s\" %s;%n", nodeId, outputAttributes(node)); } for (Edge edge : graph.getEachEdge()) { String fromNodeId = edge.getNode0().getId(); String toNodeId = edge.getNode1().getId(); String attr = outputAttributes(edge); if (digraph) { out.printf("\t\"%s\" -> \"%s\"", fromNodeId, toNodeId); if (!edge.isDirected()) out.printf(" -> \"%s\"", fromNodeId); } else out.printf("\t\"%s\" -- \"%s\"", fromNodeId, toNodeId); out.printf(" %s;%n", attr); } }
protected void lookForExistingSprites() throws InvalidSpriteIDException { if (graph.getAttributeCount() > 0) { for (String attr : graph.getAttributeKeySet()) { if (attr.startsWith("ui.sprite.")) { String id = attr.substring(10); if (id.indexOf('.') < 0) { addSprite(id); } else { String sattr = id.substring(id.indexOf('.') + 1); id = id.substring(0, id.indexOf('.')); Sprite s = getSprite(id); if (s == null) s = addSprite(id); s.addAttribute(sattr, graph.getAttribute(attr)); } } } } }
public <T> T getAttribute(String key, Class<T> clazz) { return manager.graph.getAttribute( String.format("%s.%s", completeId, key), clazz); }
this.graph.addAttribute(key, graph.getAttribute(key));
public <T> T getAttribute(String key, Class<T> clazz) { return manager.graph.getAttribute( String.format("%s.%s", completeId, key), clazz); }
this.graph.addAttribute(key, graph.getAttribute(key));
public <T> T getAttribute(String key) { return manager.graph.getAttribute(String.format("%s.%s", completeId, key)); }
sendGraphAttributeAdded(sourceId, key, graph.getAttribute(key));
public void graphAttributeChanged(String sourceId, long timeId, String attribute, Object oldValue, Object newValue) { Event e; e = new AttributeChanged(ElementType.GRAPH, null, attribute, newValue, g.getAttribute(attribute)); events.add(e); }
sendGraphAttributeAdded(sourceId, key, graph.getAttribute(key));
public void graphAttributeRemoved(String sourceId, long timeId, String attribute) { Event e; e = new AttributeRemoved(ElementType.GRAPH, null, attribute, g.getAttribute(attribute)); events.add(e); }
graphAttributeAdded(graphId, timeId++, key, graph.getAttribute(key));
public void graphAttributeRemoved(String sourceId, long timeId, String attribute) { Event e; e = new AttributeRemoved(ElementType.GRAPH, null, attribute, g.getAttribute(attribute)); events.add(e); }
public void graphAttributeChanged(String sourceId, long timeId, String attribute, Object oldValue, Object newValue) { Event e; e = new AttributeChanged(ElementType.GRAPH, null, attribute, newValue, g.getAttribute(attribute)); events.add(e); }
public void graphAttributeChanged(String sourceId, long timeId, String attribute, Object oldValue, Object newValue) { if (sinkTime.isNewEvent(sourceId, timeId)) { passYourWay = true; if (oldValue == null) oldValue = g.getAttribute(attribute); try { g.changeAttribute(attribute, newValue); } finally { passYourWay = false; } sendGraphAttributeChanged(sourceId, timeId, attribute, oldValue, newValue); } }
public void graphAttributeChanged(String sourceId, long timeId, String attribute, Object oldValue, Object newValue) { if (sinkTime.isNewEvent(sourceId, timeId)) { passYourWay = true; if (oldValue == null) oldValue = g.getAttribute(attribute); try { g.changeAttribute(attribute, newValue); } finally { passYourWay = false; } sendGraphAttributeChanged(sourceId, timeId, attribute, oldValue, newValue); } }
} else { this.position = SpriteManager.getPositionValue(manager.graph .getAttribute(completeId));