![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.dot.CucaDiagramSimplifierActivity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.dot;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import net.sourceforge.plantuml.abel.Entity;
import net.sourceforge.plantuml.abel.LeafType;
import net.sourceforge.plantuml.cucadiagram.ICucaDiagram;
import net.sourceforge.plantuml.klimt.font.StringBounder;
import net.sourceforge.plantuml.svek.GroupMakerActivity;
import net.sourceforge.plantuml.svek.IEntityImage;
public final class CucaDiagramSimplifierActivity {
private final ICucaDiagram diagram;
private final StringBounder stringBounder;
public CucaDiagramSimplifierActivity(ICucaDiagram diagram, List dotStrings, StringBounder stringBounder)
throws IOException, InterruptedException {
this.diagram = diagram;
this.stringBounder = stringBounder;
boolean changed;
do {
changed = false;
final Collection groups = new ArrayList<>(diagram.getEntityFactory().groups());
for (Entity g : groups)
if (g.isAutarkic()) {
final IEntityImage img = computeImage(g);
g.overrideImage(img, LeafType.ACTIVITY);
changed = true;
}
} while (changed);
}
private IEntityImage computeImage(Entity g) throws IOException, InterruptedException {
final GroupMakerActivity maker = new GroupMakerActivity(diagram, g, stringBounder);
return maker.getImage();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy