1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-03 09:00:48 +00:00
plantuml/src/net/sourceforge/plantuml/svek/DotStringFactory.java

498 lines
16 KiB
Java
Raw Normal View History

2011-08-08 17:48:29 +00:00
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
2019-01-16 18:34:41 +00:00
* (C) Copyright 2009-2020, Arnaud Roques
2011-08-08 17:48:29 +00:00
*
2016-03-06 16:47:34 +00:00
* Project Info: http://plantuml.com
2011-08-08 17:48:29 +00:00
*
2017-03-15 19:13:31 +00:00
* If you like this project or if you find it useful, you can support us at:
*
* http://plantuml.com/patreon (only 1$ per month!)
* http://plantuml.com/paypal
*
2011-08-08 17:48:29 +00:00
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
2013-12-10 19:36:50 +00:00
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
2011-08-08 17:48:29 +00:00
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
*
* Original Author: Arnaud Roques
*
*
*/
package net.sourceforge.plantuml.svek;
import java.awt.geom.Point2D;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
2016-05-11 21:31:47 +00:00
import net.sourceforge.plantuml.BaseFile;
2016-03-06 16:47:34 +00:00
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.StringUtils;
2011-08-08 17:48:29 +00:00
import net.sourceforge.plantuml.UmlDiagramType;
2016-03-06 16:47:34 +00:00
import net.sourceforge.plantuml.cucadiagram.CucaDiagram;
2013-12-10 19:36:50 +00:00
import net.sourceforge.plantuml.cucadiagram.IGroup;
import net.sourceforge.plantuml.cucadiagram.Rankdir;
import net.sourceforge.plantuml.cucadiagram.dot.DotData;
2016-01-30 12:20:07 +00:00
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
2011-08-08 17:48:29 +00:00
import net.sourceforge.plantuml.cucadiagram.dot.Graphviz;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
2013-12-10 19:36:50 +00:00
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersion;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizVersions;
import net.sourceforge.plantuml.cucadiagram.dot.ProcessState;
2011-08-08 17:48:29 +00:00
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
2011-09-08 10:42:27 +00:00
import net.sourceforge.plantuml.posimo.Moveable;
2016-06-19 14:16:41 +00:00
import net.sourceforge.plantuml.vizjs.GraphvizJs;
import net.sourceforge.plantuml.vizjs.GraphvizJsRuntimeException;
2011-08-08 17:48:29 +00:00
2011-09-08 10:42:27 +00:00
public class DotStringFactory implements Moveable {
2011-08-08 17:48:29 +00:00
2013-12-10 19:36:50 +00:00
private final Bibliotekon bibliotekon = new Bibliotekon();
2011-08-08 17:48:29 +00:00
final private Set<String> rankMin = new HashSet<String>();
private final ColorSequence colorSequence;
private final Cluster root;
2013-12-10 19:36:50 +00:00
2011-08-08 17:48:29 +00:00
private Cluster current;
2016-03-06 16:47:34 +00:00
private final UmlDiagramType umlDiagramType;
private final ISkinParam skinParam;
private final DotMode dotMode;
2011-08-08 17:48:29 +00:00
private final StringBounder stringBounder;
2016-07-25 19:25:28 +00:00
public DotStringFactory(StringBounder stringBounder, DotData dotData) {
2016-03-06 16:47:34 +00:00
this.skinParam = dotData.getSkinParam();
this.umlDiagramType = dotData.getUmlDiagramType();
this.dotMode = dotData.getDotMode();
2016-07-25 19:25:28 +00:00
this.colorSequence = new ColorSequence();
2016-03-06 16:47:34 +00:00
this.stringBounder = stringBounder;
this.root = new Cluster(colorSequence, skinParam, dotData.getRootGroup());
this.current = root;
}
2016-07-25 19:25:28 +00:00
public DotStringFactory(StringBounder stringBounder, CucaDiagram diagram) {
2016-03-06 16:47:34 +00:00
this.skinParam = diagram.getSkinParam();
this.umlDiagramType = diagram.getUmlDiagramType();
this.dotMode = DotMode.NORMAL;
2016-07-25 19:25:28 +00:00
this.colorSequence = new ColorSequence();
2011-08-08 17:48:29 +00:00
this.stringBounder = stringBounder;
2016-03-06 16:47:34 +00:00
this.root = new Cluster(colorSequence, skinParam, diagram.getEntityFactory().getRootGroup());
2011-08-08 17:48:29 +00:00
this.current = root;
}
public void addShape(Shape shape) {
current.addShape(shape);
}
private void printMinRanking(StringBuilder sb) {
if (rankMin.size() == 0) {
return;
}
sb.append("{ rank = min;");
for (String id : rankMin) {
sb.append(id);
sb.append(";");
}
sb.append("}");
}
private double getHorizontalDzeta() {
double max = 0;
2013-12-10 19:36:50 +00:00
for (Line l : bibliotekon.allLines()) {
2011-08-08 17:48:29 +00:00
final double c = l.getHorizontalDzeta(stringBounder);
if (c > max) {
max = c;
}
}
return max / 10;
}
private double getVerticalDzeta() {
double max = 0;
2013-12-10 19:36:50 +00:00
for (Line l : bibliotekon.allLines()) {
2011-08-08 17:48:29 +00:00
final double c = l.getVerticalDzeta(stringBounder);
if (c > max) {
max = c;
}
}
return max / 10;
}
2013-12-10 19:36:50 +00:00
String createDotString(String... dotStrings) {
2011-08-08 17:48:29 +00:00
final StringBuilder sb = new StringBuilder();
double nodesep = getHorizontalDzeta();
if (nodesep < getMinNodeSep()) {
nodesep = getMinNodeSep();
}
2016-03-06 16:47:34 +00:00
if (skinParam.getNodesep() != 0) {
nodesep = skinParam.getNodesep();
2013-12-10 19:36:50 +00:00
}
2011-08-08 17:48:29 +00:00
final String nodesepInches = SvekUtils.pixelToInches(nodesep);
2013-12-10 19:36:50 +00:00
// Log.println("nodesep=" + nodesepInches);
2011-08-08 17:48:29 +00:00
double ranksep = getVerticalDzeta();
if (ranksep < getMinRankSep()) {
ranksep = getMinRankSep();
}
2016-03-06 16:47:34 +00:00
if (skinParam.getRanksep() != 0) {
ranksep = skinParam.getRanksep();
2013-12-10 19:36:50 +00:00
}
2011-08-08 17:48:29 +00:00
final String ranksepInches = SvekUtils.pixelToInches(ranksep);
2013-12-10 19:36:50 +00:00
// Log.println("ranksep=" + ranksepInches);
2011-08-08 17:48:29 +00:00
sb.append("digraph unix {");
SvekUtils.println(sb);
for (String s : dotStrings) {
if (s.startsWith("ranksep")) {
sb.append("ranksep=" + ranksepInches + ";");
} else if (s.startsWith("nodesep")) {
sb.append("nodesep=" + nodesepInches + ";");
} else {
sb.append(s);
}
SvekUtils.println(sb);
}
2015-04-07 18:18:37 +00:00
// sb.append("newrank=true;");
// SvekUtils.println(sb);
2011-08-08 17:48:29 +00:00
sb.append("remincross=true;");
SvekUtils.println(sb);
sb.append("searchsize=500;");
SvekUtils.println(sb);
2016-03-06 16:47:34 +00:00
// if (OptionFlags.USE_COMPOUND) {
// sb.append("compound=true;");
// SvekUtils.println(sb);
// }
2016-01-30 12:20:07 +00:00
2016-03-06 16:47:34 +00:00
final DotSplines dotSplines = skinParam.getDotSplines();
2016-01-30 12:20:07 +00:00
if (dotSplines == DotSplines.POLYLINE) {
sb.append("splines=polyline;");
SvekUtils.println(sb);
} else if (dotSplines == DotSplines.ORTHO) {
sb.append("splines=ortho;");
SvekUtils.println(sb);
}
2016-03-06 16:47:34 +00:00
if (skinParam.getRankdir() == Rankdir.LEFT_TO_RIGHT) {
2013-12-10 19:36:50 +00:00
sb.append("rankdir=LR;");
SvekUtils.println(sb);
}
manageMinMaxCluster(sb);
2016-08-25 20:45:37 +00:00
root.printCluster1(sb, bibliotekon.allLines(), stringBounder);
2013-12-10 19:36:50 +00:00
for (Line line : bibliotekon.lines0()) {
2016-11-04 21:39:29 +00:00
line.appendLine(getGraphvizVersion(), sb, dotMode);
2011-09-08 10:42:27 +00:00
}
2011-08-08 17:48:29 +00:00
root.fillRankMin(rankMin);
2016-03-06 16:47:34 +00:00
root.printCluster2(sb, bibliotekon.allLines(), stringBounder, dotMode, getGraphvizVersion(), umlDiagramType);
2011-08-08 17:48:29 +00:00
printMinRanking(sb);
2013-12-10 19:36:50 +00:00
for (Line line : bibliotekon.lines1()) {
2016-11-04 21:39:29 +00:00
line.appendLine(getGraphvizVersion(), sb, dotMode);
2011-08-08 17:48:29 +00:00
}
SvekUtils.println(sb);
sb.append("}");
return sb.toString();
}
2013-12-10 19:36:50 +00:00
private void manageMinMaxCluster(final StringBuilder sb) {
final List<String> minPointCluster = new ArrayList<String>();
final List<String> maxPointCluster = new ArrayList<String>();
for (Cluster cluster : bibliotekon.allCluster()) {
2016-03-06 16:47:34 +00:00
final String minPoint = cluster.getMinPoint(umlDiagramType);
2013-12-10 19:36:50 +00:00
if (minPoint != null) {
minPointCluster.add(minPoint);
}
2016-03-06 16:47:34 +00:00
final String maxPoint = cluster.getMaxPoint(umlDiagramType);
2013-12-10 19:36:50 +00:00
if (maxPoint != null) {
maxPointCluster.add(maxPoint);
}
}
if (minPointCluster.size() > 0) {
sb.append("{rank=min;");
for (String s : minPointCluster) {
sb.append(s);
sb.append(" [shape=point,width=.01,label=\"\"]");
sb.append(";");
}
sb.append("}");
SvekUtils.println(sb);
}
if (maxPointCluster.size() > 0) {
sb.append("{rank=max;");
for (String s : maxPointCluster) {
sb.append(s);
sb.append(" [shape=point,width=.01,label=\"\"]");
sb.append(";");
}
sb.append("}");
SvekUtils.println(sb);
}
}
2011-08-08 17:48:29 +00:00
private int getMinRankSep() {
2016-03-06 16:47:34 +00:00
if (umlDiagramType == UmlDiagramType.ACTIVITY) {
2013-12-10 19:36:50 +00:00
// return 29;
return 40;
2011-08-08 17:48:29 +00:00
}
return 60;
}
private int getMinNodeSep() {
2016-03-06 16:47:34 +00:00
if (umlDiagramType == UmlDiagramType.ACTIVITY) {
2013-12-10 19:36:50 +00:00
// return 15;
return 20;
2011-08-08 17:48:29 +00:00
}
2013-12-10 19:36:50 +00:00
return 35;
}
2016-06-19 14:16:41 +00:00
private GraphvizVersion graphvizVersion;
2013-12-10 19:36:50 +00:00
public GraphvizVersion getGraphvizVersion() {
2016-06-19 14:16:41 +00:00
if (graphvizVersion == null) {
graphvizVersion = getGraphvizVersionInternal();
}
return graphvizVersion;
}
private GraphvizVersion getGraphvizVersionInternal() {
2016-04-04 19:05:10 +00:00
final Graphviz graphviz = GraphvizUtils.create(skinParam, "foo;", "svg");
2016-06-19 14:16:41 +00:00
if (graphviz instanceof GraphvizJs) {
return GraphvizJs.getGraphvizVersion(false);
}
2013-12-10 19:36:50 +00:00
final File f = graphviz.getDotExe();
return GraphvizVersions.getInstance().getVersion(f);
2011-08-08 17:48:29 +00:00
}
2016-06-19 14:16:41 +00:00
public String getSvg(BaseFile basefile, String[] dotOptions) throws IOException {
String dotString = createDotString(dotOptions);
2013-12-10 19:36:50 +00:00
2016-05-11 21:31:47 +00:00
if (basefile != null) {
final File f = basefile.getTraceFile("svek.dot");
SvekUtils.traceString(f, dotString);
2013-12-10 19:36:50 +00:00
}
2011-08-08 17:48:29 +00:00
2016-06-19 14:16:41 +00:00
Graphviz graphviz = GraphvizUtils.create(skinParam, dotString, "svg");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
final ProcessState state = graphviz.createFile3(baos);
baos.close();
if (state.differs(ProcessState.TERMINATED_OK())) {
throw new IllegalStateException("Timeout4 " + state, state.getCause());
}
} catch (GraphvizJsRuntimeException e) {
System.err.println("GraphvizJsRuntimeException");
graphvizVersion = GraphvizJs.getGraphvizVersion(true);
dotString = createDotString(dotOptions);
graphviz = GraphvizUtils.create(skinParam, dotString, "svg");
baos = new ByteArrayOutputStream();
final ProcessState state = graphviz.createFile3(baos);
baos.close();
if (state.differs(ProcessState.TERMINATED_OK())) {
throw new IllegalStateException("Timeout4 " + state, state.getCause());
}
2013-12-10 19:36:50 +00:00
}
2011-08-08 17:48:29 +00:00
final byte[] result = baos.toByteArray();
final String s = new String(result, "UTF-8");
2016-05-11 21:31:47 +00:00
if (basefile != null) {
final File f = basefile.getTraceFile("svek.svg");
SvekUtils.traceString(f, s);
2013-12-10 19:36:50 +00:00
}
2011-08-08 17:48:29 +00:00
return s;
}
public boolean illegalDotExe() {
2016-04-04 19:05:10 +00:00
final Graphviz graphviz = GraphvizUtils.create(skinParam, "svg");
2016-06-19 14:16:41 +00:00
if (graphviz instanceof GraphvizJs) {
return false;
}
2011-08-08 17:48:29 +00:00
final File dotExe = graphviz.getDotExe();
return dotExe == null || dotExe.isFile() == false || dotExe.canRead() == false;
}
public File getDotExe() {
2016-04-04 19:05:10 +00:00
final Graphviz graphviz = GraphvizUtils.create(skinParam, "svg");
2011-08-08 17:48:29 +00:00
return graphviz.getDotExe();
}
2018-03-09 21:37:34 +00:00
public ClusterPosition solve(final String svg) throws IOException, InterruptedException {
2013-12-10 19:36:50 +00:00
if (svg.length() == 0) {
throw new EmptySvgException();
}
2011-08-08 17:48:29 +00:00
final Pattern pGraph = Pattern.compile("(?m)\\<svg\\s+width=\"(\\d+)pt\"\\s+height=\"(\\d+)pt\"");
final Matcher mGraph = pGraph.matcher(svg);
if (mGraph.find() == false) {
throw new IllegalStateException();
}
final int fullWidth = Integer.parseInt(mGraph.group(1));
final int fullHeight = Integer.parseInt(mGraph.group(2));
2013-12-10 19:36:50 +00:00
final MinFinder corner1 = new MinFinder();
2018-03-09 21:37:34 +00:00
final Point2DFunction move = new YDelta(fullHeight);
final SvgResult svgResult = new SvgResult(svg, move);
2013-12-10 19:36:50 +00:00
for (Shape sh : bibliotekon.allShapes()) {
2011-08-08 17:48:29 +00:00
int idx = svg.indexOf("<title>" + sh.getUid() + "</title>");
2016-07-04 19:06:50 +00:00
if (sh.getType() == ShapeType.RECTANGLE || sh.getType() == ShapeType.RECTANGLE_HTML_FOR_PORTS
2018-05-06 19:59:19 +00:00
|| sh.getType() == ShapeType.RECTANGLE_WITH_CIRCLE_INSIDE || sh.getType() == ShapeType.FOLDER
|| sh.getType() == ShapeType.DIAMOND) {
2018-03-09 21:37:34 +00:00
final List<Point2D.Double> points = svgResult.substring(idx).extractList(SvgResult.POINTS_EQUALS);
2011-08-08 17:48:29 +00:00
final double minY = SvekUtils.getMinY(points);
2018-12-22 11:11:40 +00:00
final double overscanX = sh.getOverscanX(stringBounder);
final double minX = SvekUtils.getMinX(points);
corner1.manage(minX - overscanX, minY);
2013-12-10 19:36:50 +00:00
sh.moveSvek(minX, minY);
2011-08-08 17:48:29 +00:00
} else if (sh.getType() == ShapeType.ROUND_RECTANGLE) {
2013-12-10 19:36:50 +00:00
final int idx2 = svg.indexOf("d=\"", idx + 1);
2011-08-08 17:48:29 +00:00
idx = svg.indexOf("points=\"", idx + 1);
2013-12-10 19:36:50 +00:00
final List<Point2D.Double> points;
2015-04-07 18:18:37 +00:00
if (idx2 != -1 && (idx == -1 || idx2 < idx)) {
2013-12-10 19:36:50 +00:00
// GraphViz 2.30
2018-03-09 21:37:34 +00:00
points = svgResult.substring(idx2).extractList(SvgResult.D_EQUALS);
2013-12-10 19:36:50 +00:00
} else {
2018-03-09 21:37:34 +00:00
points = svgResult.substring(idx).extractList(SvgResult.POINTS_EQUALS);
2013-12-10 19:36:50 +00:00
for (int i = 0; i < 3; i++) {
idx = svg.indexOf("points=\"", idx + 1);
2018-03-09 21:37:34 +00:00
points.addAll(svgResult.substring(idx).extractList(SvgResult.POINTS_EQUALS));
2013-12-10 19:36:50 +00:00
}
2011-08-08 17:48:29 +00:00
}
final double minX = SvekUtils.getMinX(points);
final double minY = SvekUtils.getMinY(points);
2013-12-10 19:36:50 +00:00
corner1.manage(minX, minY);
sh.moveSvek(minX, minY);
2015-04-07 18:18:37 +00:00
} else if (sh.getType() == ShapeType.OCTAGON) {
idx = svg.indexOf("points=\"", idx + 1);
2018-03-09 21:37:34 +00:00
final int starting = idx;
final List<Point2D.Double> points = svgResult.substring(starting).extractList(SvgResult.POINTS_EQUALS);
2015-04-07 18:18:37 +00:00
final double minX = SvekUtils.getMinX(points);
final double minY = SvekUtils.getMinY(points);
corner1.manage(minX, minY);
sh.moveSvek(minX, minY);
sh.setOctagon(minX, minY, points);
2011-08-08 17:48:29 +00:00
} else if (sh.getType() == ShapeType.CIRCLE || sh.getType() == ShapeType.CIRCLE_IN_RECT
|| sh.getType() == ShapeType.OVAL) {
final double cx = SvekUtils.getValue(svg, idx, "cx");
final double cy = SvekUtils.getValue(svg, idx, "cy") + fullHeight;
final double rx = SvekUtils.getValue(svg, idx, "rx");
final double ry = SvekUtils.getValue(svg, idx, "ry");
2013-12-10 19:36:50 +00:00
sh.moveSvek(cx - rx, cy - ry);
2011-08-08 17:48:29 +00:00
} else {
throw new IllegalStateException(sh.getType().toString() + " " + sh.getUid());
}
}
2013-12-10 19:36:50 +00:00
for (Cluster cluster : bibliotekon.allCluster()) {
int idx = getClusterIndex(svg, cluster.getColor());
2018-03-09 21:37:34 +00:00
final int starting = idx;
final List<Point2D.Double> points = svgResult.substring(starting).extractList(SvgResult.POINTS_EQUALS);
2011-08-08 17:48:29 +00:00
final double minX = SvekUtils.getMinX(points);
final double minY = SvekUtils.getMinY(points);
final double maxX = SvekUtils.getMaxX(points);
final double maxY = SvekUtils.getMaxY(points);
cluster.setPosition(minX, minY, maxX, maxY);
2013-12-10 19:36:50 +00:00
corner1.manage(minX, minY);
2011-08-08 17:48:29 +00:00
2013-12-10 19:36:50 +00:00
if (cluster.getTitleAndAttributeWidth() == 0 || cluster.getTitleAndAttributeHeight() == 0) {
2011-08-08 17:48:29 +00:00
continue;
}
2013-12-10 19:36:50 +00:00
idx = getClusterIndex(svg, cluster.getTitleColor());
2018-03-09 21:37:34 +00:00
final int starting1 = idx;
final List<Point2D.Double> pointsTitle = svgResult.substring(starting1)
.extractList(SvgResult.POINTS_EQUALS);
2011-08-08 17:48:29 +00:00
final double minXtitle = SvekUtils.getMinX(pointsTitle);
final double minYtitle = SvekUtils.getMinY(pointsTitle);
cluster.setTitlePosition(minXtitle, minYtitle);
}
2013-12-10 19:36:50 +00:00
for (Line line : bibliotekon.allLines()) {
2018-03-09 21:37:34 +00:00
line.solveLine(svgResult, corner1);
2011-08-08 17:48:29 +00:00
}
2011-09-07 20:41:58 +00:00
2013-12-10 19:36:50 +00:00
for (Line line : bibliotekon.allLines()) {
line.manageCollision(bibliotekon.allShapes());
2011-08-08 17:48:29 +00:00
}
2013-12-10 19:36:50 +00:00
corner1.manage(0, 0);
return new ClusterPosition(corner1.getMinX(), corner1.getMinY(), fullWidth, fullHeight);
// return new ClusterPosition(0, 0, fullWidth, fullHeight);
2011-08-08 17:48:29 +00:00
}
2013-12-10 19:36:50 +00:00
private int getClusterIndex(final String svg, int colorInt) {
2015-04-07 18:18:37 +00:00
final String colorString = StringUtils.goLowerCase(StringUtils.getAsHtml(colorInt));
2013-12-10 19:36:50 +00:00
final String keyTitle1 = "=\"" + colorString + "\"";
int idx = svg.indexOf(keyTitle1);
if (idx == -1) {
final String keyTitle2 = "stroke:" + colorString + ";";
idx = svg.indexOf(keyTitle2);
2011-09-08 10:42:27 +00:00
}
2013-12-10 19:36:50 +00:00
if (idx == -1) {
throw new IllegalStateException("Cannot find color " + colorString);
2011-09-08 10:42:27 +00:00
}
2013-12-10 19:36:50 +00:00
return idx;
2011-08-08 17:48:29 +00:00
}
2013-12-10 19:36:50 +00:00
public void openCluster(IGroup g, int titleAndAttributeWidth, int titleAndAttributeHeight, TextBlock title,
TextBlock stereo) {
this.current = current.createChild(g, titleAndAttributeWidth, titleAndAttributeHeight, title, stereo,
2016-03-06 16:47:34 +00:00
colorSequence, skinParam);
2013-12-10 19:36:50 +00:00
bibliotekon.addCluster(this.current);
2011-08-08 17:48:29 +00:00
}
public void closeCluster() {
if (current.getParent() == null) {
throw new IllegalStateException();
}
this.current = current.getParent();
}
2011-09-08 10:42:27 +00:00
public void moveSvek(double deltaX, double deltaY) {
2013-12-10 19:36:50 +00:00
for (Shape sh : bibliotekon.allShapes()) {
2011-09-08 10:42:27 +00:00
sh.moveSvek(deltaX, deltaY);
}
2013-12-10 19:36:50 +00:00
for (Line line : bibliotekon.allLines()) {
2011-09-08 10:42:27 +00:00
line.moveSvek(deltaX, deltaY);
}
2013-12-10 19:36:50 +00:00
for (Cluster cl : bibliotekon.allCluster()) {
2011-09-08 10:42:27 +00:00
cl.moveSvek(deltaX, deltaY);
}
}
2013-12-10 19:36:50 +00:00
public final Bibliotekon getBibliotekon() {
return bibliotekon;
}
2016-04-04 19:05:10 +00:00
public ColorSequence getColorSequence() {
return colorSequence;
}
2011-08-08 17:48:29 +00:00
}