public IEntity getHistorical() { final Group g = getCurrentGroup(); if (g == null) { return getOrCreateEntity("*historical", EntityType.PSEUDO_STATE); } return getOrCreateEntity("*historical*" + g.getCode(), EntityType.PSEUDO_STATE); }
public IEntity getStart() { final Group g = getCurrentGroup(); if (g == null) { return getOrCreateEntity("*start", EntityType.CIRCLE_START); } return getOrCreateEntity("*start*" + g.getCode(), EntityType.CIRCLE_START); }
public IEntity getEnd() { final Group p = getCurrentGroup(); if (p == null) { return getOrCreateEntity("*end", EntityType.CIRCLE_END); } return getOrCreateEntity("*end*" + p.getCode(), EntityType.CIRCLE_END); }
public CucaDiagramSimplifier2(CucaDiagram diagram, List<String> dotStrings) throws IOException, InterruptedException { this.diagram = diagram; boolean changed; do { changed = false; final Collection<Group> groups = new ArrayList<Group>(diagram.getGroups(false)); for (Group g : groups) { if (diagram.isAutarkic(g)) { final EntityType type; if (g.getType() == GroupType.CONCURRENT_STATE) { type = EntityType.STATE_CONCURRENT; } else if (g.getType() == GroupType.STATE) { type = EntityType.STATE; } else if (g.getType() == GroupType.INNER_ACTIVITY) { type = EntityType.ACTIVITY; } else if (g.getType() == GroupType.CONCURRENT_ACTIVITY) { type = EntityType.ACTIVITY_CONCURRENT; } else { throw new IllegalStateException(); } final Entity proxy = new Entity( "#" + g.getCode(), g.getDisplay(), type, g.getParent(), diagram.getHides()); // if (type == EntityType.STATE) { // manageBackColorForState(diagram, g, proxy); // } for (Member field : g.getEntityCluster().getFieldsToDisplay()) { proxy.addField(field); } computeImageGroup(g, proxy, dotStrings); diagram.overideGroup(g, proxy); if (proxy.getImageFile() != null) { diagram.ensureDelete(proxy.getImageFile()); } // final IEntity entityCluster = g.getEntityCluster(); // if (entityCluster != null && entityCluster.getImageFile() // != null) { // proxy.addSubImage(entityCluster.getImageFile()); // } // if (entityCluster != null) { // proxy.addSubImage((Entity) entityCluster); // } for (IEntity sub : g.entities().values()) { final DrawFile subImage = sub.getImageFile(); if (subImage != null) { proxy.addSubImage(subImage); } } changed = true; } } } while (changed); }
public IEntity getHistorical(String codeGroup) { final Group g = getOrCreateGroup(codeGroup, null, null, GroupType.STATE, null); final IEntity result = getOrCreateEntity("*historical*" + g.getCode(), EntityType.PSEUDO_STATE); endGroup(); return result; }