mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 02:49:06 +00:00
version 8034
This commit is contained in:
parent
83478c0403
commit
703a77ee1c
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 16390 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -64,7 +64,9 @@ public class CMapData {
|
||||
appendString("\" href=\"");
|
||||
appendString(url.getUrl());
|
||||
appendString("\" title=\"");
|
||||
appendString(url.getTooltip());
|
||||
final String tooltip = url.getTooltip().replaceAll("\\\\n", "\n").replaceAll("&", "&")
|
||||
.replaceAll("\"", """).replaceAll("\'", "'");
|
||||
appendString(tooltip);
|
||||
appendString("\" alt=\"\" coords=\"");
|
||||
appendString(url.getCoords(scale));
|
||||
appendString("\"/>");
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 17433 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
@ -48,6 +48,7 @@ public enum ColorParam {
|
||||
activityEnd(HtmlColorUtils.BLACK),
|
||||
activityBar(HtmlColorUtils.BLACK),
|
||||
activityArrow(HtmlColorUtils.MY_RED, ColorType.ARROW),
|
||||
swimlaneBorder(HtmlColorUtils.BLACK),
|
||||
|
||||
usecaseBorder(HtmlColorUtils.MY_RED, ColorType.LINE),
|
||||
usecaseBackground(HtmlColorUtils.MY_YELLOW, ColorType.BACK),
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 15096 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 17341 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 12235 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
@ -46,12 +46,21 @@ public class EmptyImageBuilder {
|
||||
|
||||
private final BufferedImage im;
|
||||
private final Graphics2D g2d;
|
||||
static final private int LIMIT = 4096;
|
||||
|
||||
public EmptyImageBuilder(double width, double height, Color background) {
|
||||
this((int) width, (int) height, background);
|
||||
}
|
||||
|
||||
public EmptyImageBuilder(int width, int height, Color background) {
|
||||
if (width > LIMIT) {
|
||||
Log.info("Width too large " + width);
|
||||
width = LIMIT;
|
||||
}
|
||||
if (height > LIMIT) {
|
||||
Log.info("Height too large " + height);
|
||||
height = LIMIT;
|
||||
}
|
||||
Log.info("Creating image " + width + "x" + height);
|
||||
im = new BufferedImage(width, height, background == null ? BufferedImage.TYPE_INT_ARGB
|
||||
: BufferedImage.TYPE_INT_RGB);
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 14586 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 14056 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 17071 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
@ -88,6 +88,7 @@ public enum FontParam {
|
||||
STATE_ATTRIBUTE(12, Font.PLAIN), //
|
||||
LEGEND(14, Font.PLAIN), //
|
||||
TITLE(18, Font.PLAIN), //
|
||||
SWIMLANE_TITLE(18, Font.PLAIN), //
|
||||
FOOTER(10, Font.PLAIN, "#888888", FontParamConstant.FAMILY), //
|
||||
HEADER(10, Font.PLAIN, "#888888", FontParamConstant.FAMILY), //
|
||||
USECASE(14, Font.PLAIN), //
|
||||
@ -106,7 +107,9 @@ public enum FontParam {
|
||||
DATABASE_STEREOTYPE(14, Font.ITALIC), //
|
||||
QUEUE_STEREOTYPE(14, Font.ITALIC), //
|
||||
ACTOR_STEREOTYPE(14, Font.ITALIC), //
|
||||
SEQUENCE_STEREOTYPE(14, Font.ITALIC); //
|
||||
SEQUENCE_STEREOTYPE(14, Font.ITALIC), //
|
||||
PARTITION(14, Font.PLAIN); //
|
||||
|
||||
|
||||
private final int defaultSize;
|
||||
private final int fontStyle;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 17137 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -60,11 +60,11 @@ public interface ISkinParam extends ISkinSimple {
|
||||
|
||||
public Colors getColors(ColorParam param, Stereotype stereotype);
|
||||
|
||||
public HtmlColor getFontHtmlColor(FontParam param, Stereotype stereotype);
|
||||
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param);
|
||||
|
||||
public UStroke getThickness(LineParam param, Stereotype stereotype);
|
||||
|
||||
public UFont getFont(FontParam fontParam, Stereotype stereotype, boolean inPackageTitle);
|
||||
public UFont getFont(Stereotype stereotype, boolean inPackageTitle, FontParam... fontParam);
|
||||
|
||||
public HorizontalAlignment getHorizontalAlignment(AlignParam param);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -43,7 +43,9 @@ public enum LineParam {
|
||||
sequenceLifeLineBorder,
|
||||
sequenceParticipantBorder, noteBorder, sequenceGroupBorder, sequenceReferenceBorder,
|
||||
classBorder, objectBorder,
|
||||
packageBorder;
|
||||
partitionBorder,
|
||||
packageBorder,
|
||||
swimlaneBorder;
|
||||
// sequenceBoxBorder(0.1);
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 14532 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -66,6 +66,10 @@ public class NewpagedDiagram extends AbstractPSystem {
|
||||
return super.toString() + " SIZE=" + diagrams.size() + " " + diagrams;
|
||||
}
|
||||
|
||||
public Diagram getLastDiagram() {
|
||||
return diagrams.get(diagrams.size() - 1);
|
||||
}
|
||||
|
||||
public CommandExecutionResult executeCommand(Command cmd, BlocLines lines) {
|
||||
final int nb = diagrams.size();
|
||||
final CommandExecutionResult tmp = cmd.execute(diagrams.get(nb - 1), lines);
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 14727 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 16562 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
@ -53,11 +53,13 @@ public class OptionFlags {
|
||||
static public final boolean USE_HECTOR = false;
|
||||
static public boolean ADD_NICE_FOR_DOT = false;
|
||||
static public final boolean STRICT_SELFMESSAGE_POSITION = true;
|
||||
static public final boolean USE_NEW_IF = true;
|
||||
|
||||
// static public final boolean USE_IF_VERTICAL = true;
|
||||
static public final boolean FORCE_TEOZ = false;
|
||||
static public final boolean USE_INTERFACE_EYE1 = false;
|
||||
static public final boolean USE_INTERFACE_EYE2 = false;
|
||||
static public final boolean SWI2 = false;
|
||||
static public final boolean USE_COMPOUND = false;
|
||||
|
||||
public void reset() {
|
||||
reset(false);
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 14028 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -120,7 +120,7 @@ public class PSystemBuilder {
|
||||
factories.add(new StateDiagramFactory());
|
||||
factories.add(new ActivityDiagramFactory3());
|
||||
factories.add(new CompositeDiagramFactory());
|
||||
factories.add(new ObjectDiagramFactory());
|
||||
// factories.add(new ObjectDiagramFactory());
|
||||
factories.add(new PostIdDiagramFactory());
|
||||
factories.add(new PrintSkinFactory());
|
||||
factories.add(new PSystemLicenseFactory());
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 16367 $
|
||||
* Revision $Revision: 18280 $
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -65,6 +65,11 @@ public class Pragma {
|
||||
return isDefine("horizontallinebetweendifferentpackageallowed");
|
||||
}
|
||||
|
||||
public boolean useVerticalIf() {
|
||||
final String teoz = getValue("useverticalif");
|
||||
return "true".equalsIgnoreCase(teoz) || "on".equalsIgnoreCase(teoz);
|
||||
}
|
||||
|
||||
public boolean useTeozLayout() {
|
||||
final String teoz = getValue("teoz");
|
||||
return "true".equalsIgnoreCase(teoz) || "on".equalsIgnoreCase(teoz);
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 15892 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 12235 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 12235 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 17444 $
|
||||
* Revision $Revision: 18291 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
@ -63,6 +63,7 @@ import net.sourceforge.plantuml.ugraphic.ColorMapper;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
|
||||
import net.sourceforge.plantuml.ugraphic.ColorMapperMonochrome;
|
||||
import net.sourceforge.plantuml.ugraphic.Sprite;
|
||||
import net.sourceforge.plantuml.ugraphic.SpriteImage;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
import net.sourceforge.plantuml.ugraphic.UStroke;
|
||||
|
||||
@ -198,78 +199,88 @@ public class SkinParam implements ISkinParam {
|
||||
// }
|
||||
}
|
||||
|
||||
private int getFontSize(FontParam param, Stereotype stereotype) {
|
||||
private int getFontSize(Stereotype stereotype, FontParam... param) {
|
||||
if (stereotype != null) {
|
||||
checkStereotype(stereotype);
|
||||
final String value2 = getValue(param.name() + "fontsize" + stereotype.getLabel(false));
|
||||
final String value2 = getFirstValueNonNullWithSuffix("fontsize" + stereotype.getLabel(false), param);
|
||||
if (value2 != null && value2.matches("\\d+")) {
|
||||
return Integer.parseInt(value2);
|
||||
}
|
||||
}
|
||||
String value = getValue(param.name() + "fontsize");
|
||||
String value = getFirstValueNonNullWithSuffix("fontsize", param);
|
||||
if (value == null || value.matches("\\d+") == false) {
|
||||
value = getValue("defaultfontsize");
|
||||
}
|
||||
if (value == null || value.matches("\\d+") == false) {
|
||||
return param.getDefaultSize(this);
|
||||
return param[0].getDefaultSize(this);
|
||||
}
|
||||
return Integer.parseInt(value);
|
||||
}
|
||||
|
||||
private String getFontFamily(FontParam param, Stereotype stereotype) {
|
||||
private String getFontFamily(Stereotype stereotype, FontParam... param) {
|
||||
if (stereotype != null) {
|
||||
checkStereotype(stereotype);
|
||||
final String value2 = getValue(param.name() + "fontname" + stereotype.getLabel(false));
|
||||
final String value2 = getFirstValueNonNullWithSuffix("fontname" + stereotype.getLabel(false), param);
|
||||
if (value2 != null) {
|
||||
return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value2);
|
||||
}
|
||||
}
|
||||
// Times, Helvetica, Courier or Symbol
|
||||
String value = getValue(param.name() + "fontname");
|
||||
String value = getFirstValueNonNullWithSuffix("fontname", param);
|
||||
if (value != null) {
|
||||
return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value);
|
||||
}
|
||||
if (param != FontParam.CIRCLED_CHARACTER) {
|
||||
if (param[0] != FontParam.CIRCLED_CHARACTER) {
|
||||
value = getValue("defaultfontname");
|
||||
if (value != null) {
|
||||
return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value);
|
||||
}
|
||||
}
|
||||
return param.getDefaultFamily();
|
||||
return param[0].getDefaultFamily();
|
||||
}
|
||||
|
||||
public HtmlColor getFontHtmlColor(FontParam param, Stereotype stereotype) {
|
||||
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
|
||||
String value = null;
|
||||
if (stereotype != null) {
|
||||
checkStereotype(stereotype);
|
||||
value = getValue(param.name() + "fontcolor" + stereotype.getLabel(false));
|
||||
value = getFirstValueNonNullWithSuffix("fontcolor" + stereotype.getLabel(false), param);
|
||||
}
|
||||
if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) {
|
||||
value = getValue(param.name() + "fontcolor");
|
||||
value = getFirstValueNonNullWithSuffix("fontcolor", param);
|
||||
}
|
||||
if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) {
|
||||
value = getValue("defaultfontcolor");
|
||||
}
|
||||
if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) {
|
||||
value = param.getDefaultColor();
|
||||
value = param[0].getDefaultColor();
|
||||
}
|
||||
return getIHtmlColorSet().getColorIfValid(value);
|
||||
}
|
||||
|
||||
private int getFontStyle(FontParam param, Stereotype stereotype, boolean inPackageTitle) {
|
||||
private String getFirstValueNonNullWithSuffix(String suffix, FontParam... param) {
|
||||
for (FontParam p : param) {
|
||||
final String v = getValue(p.name() + suffix);
|
||||
if (v != null) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private int getFontStyle(Stereotype stereotype, boolean inPackageTitle, FontParam... param) {
|
||||
String value = null;
|
||||
if (stereotype != null) {
|
||||
checkStereotype(stereotype);
|
||||
value = getValue(param.name() + "fontstyle" + stereotype.getLabel(false));
|
||||
value = getFirstValueNonNullWithSuffix("fontstyle" + stereotype.getLabel(false), param);
|
||||
}
|
||||
if (value == null) {
|
||||
value = getValue(param.name() + "fontstyle");
|
||||
value = getFirstValueNonNullWithSuffix("fontstyle", param);
|
||||
}
|
||||
if (value == null) {
|
||||
value = getValue("defaultfontstyle");
|
||||
}
|
||||
if (value == null) {
|
||||
return param.getDefaultFontStyle(this, inPackageTitle);
|
||||
return param[0].getDefaultFontStyle(this, inPackageTitle);
|
||||
}
|
||||
int result = Font.PLAIN;
|
||||
if (StringUtils.goLowerCase(value).contains("bold")) {
|
||||
@ -281,13 +292,13 @@ public class SkinParam implements ISkinParam {
|
||||
return result;
|
||||
}
|
||||
|
||||
public UFont getFont(FontParam fontParam, Stereotype stereotype, boolean inPackageTitle) {
|
||||
public UFont getFont(Stereotype stereotype, boolean inPackageTitle, FontParam... fontParam) {
|
||||
if (stereotype != null) {
|
||||
checkStereotype(stereotype);
|
||||
}
|
||||
final String fontFamily = getFontFamily(fontParam, stereotype);
|
||||
final int fontStyle = getFontStyle(fontParam, stereotype, inPackageTitle);
|
||||
final int fontSize = getFontSize(fontParam, stereotype);
|
||||
final String fontFamily = getFontFamily(stereotype, fontParam);
|
||||
final int fontStyle = getFontStyle(stereotype, inPackageTitle, fontParam);
|
||||
final int fontSize = getFontSize(stereotype, fontParam);
|
||||
return new UFont(fontFamily, fontStyle, fontSize);
|
||||
}
|
||||
|
||||
@ -299,7 +310,7 @@ public class SkinParam implements ISkinParam {
|
||||
// return 11;
|
||||
// Log.println("SIZE1="+getFontSize(FontParam.CIRCLED_CHARACTER));
|
||||
// Log.println("SIZE1="+getFontSize(FontParam.CIRCLED_CHARACTER)/3);
|
||||
return getFontSize(FontParam.CIRCLED_CHARACTER, null) / 3 + 6;
|
||||
return getFontSize(null, FontParam.CIRCLED_CHARACTER) / 3 + 6;
|
||||
}
|
||||
|
||||
public int classAttributeIconSize() {
|
||||
@ -494,7 +505,11 @@ public class SkinParam implements ISkinParam {
|
||||
}
|
||||
|
||||
public Sprite getSprite(String name) {
|
||||
return sprites.get(name);
|
||||
Sprite result = sprites.get(name);
|
||||
if (result == null) {
|
||||
result = SpriteImage.fromInternal(name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean useUml2ForComponent() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -62,6 +62,7 @@ public class SkinParamBackcolored extends SkinParamDelegator {
|
||||
this.backColorGeneral = backColorGeneral;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HtmlColor getBackgroundColor() {
|
||||
if (backColorGeneral != null) {
|
||||
return backColorGeneral;
|
||||
@ -69,6 +70,7 @@ public class SkinParamBackcolored extends SkinParamDelegator {
|
||||
return super.getBackgroundColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
|
||||
if (param.isBackground() && backColorElement != null) {
|
||||
return backColorElement;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -48,6 +48,7 @@ public class SkinParamBackcoloredReference extends SkinParamDelegator {
|
||||
this.sequenceReferenceHeaderBackground = sequenceReferenceHeaderBackground;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
|
||||
if (param == ColorParam.sequenceReferenceHeaderBackground && sequenceReferenceHeaderBackground != null) {
|
||||
return sequenceReferenceHeaderBackground;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -60,14 +60,16 @@ public class SkinParamColors extends SkinParamDelegator {
|
||||
return colors.getShadowing();
|
||||
}
|
||||
|
||||
public HtmlColor getFontHtmlColor(FontParam param, Stereotype stereotype) {
|
||||
@Override
|
||||
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
|
||||
final HtmlColor value = colors.getColor(ColorType.TEXT);
|
||||
if (value == null) {
|
||||
return super.getFontHtmlColor(param, stereotype);
|
||||
return super.getFontHtmlColor(stereotype, param);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
|
||||
final ColorType type = param.getColorType();
|
||||
if (type == null) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -69,12 +69,12 @@ public class SkinParamDelegator implements ISkinParam {
|
||||
return skinParam.getCircledCharacterRadius();
|
||||
}
|
||||
|
||||
public UFont getFont(FontParam fontParam, Stereotype stereotype, boolean inPackageTitle) {
|
||||
return skinParam.getFont(fontParam, stereotype, false);
|
||||
public UFont getFont(Stereotype stereotype, boolean inPackageTitle, FontParam... fontParam) {
|
||||
return skinParam.getFont(stereotype, false, fontParam);
|
||||
}
|
||||
|
||||
public HtmlColor getFontHtmlColor(FontParam param, Stereotype stereotype) {
|
||||
return skinParam.getFontHtmlColor(param, stereotype);
|
||||
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
|
||||
return skinParam.getFontHtmlColor(stereotype, param);
|
||||
}
|
||||
|
||||
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -47,6 +47,7 @@ public class SkinParamForceColor extends SkinParamDelegator {
|
||||
this.colorParam = colorParam;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
|
||||
if (colorParam == param) {
|
||||
return color;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -33,6 +33,7 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.HtmlColor;
|
||||
|
||||
public class SkinParamForecolored extends SkinParamDelegator {
|
||||
@ -44,7 +45,8 @@ public class SkinParamForecolored extends SkinParamDelegator {
|
||||
this.forecolor = forecolor;
|
||||
}
|
||||
|
||||
public HtmlColor getHtmlColor(ColorParam param, String stereotype, boolean clickable) {
|
||||
@Override
|
||||
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
|
||||
return forecolor;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -42,6 +42,7 @@ public class SkinParamSameClassWidth extends SkinParamDelegator {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double minClassWidth() {
|
||||
return width;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -43,11 +43,11 @@ public class SkinParamUtils {
|
||||
private static final Rose rose = new Rose();
|
||||
|
||||
public static UFont getFont(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) {
|
||||
return skinParam.getFont(fontParam, stereo, false);
|
||||
return skinParam.getFont(stereo, false, fontParam);
|
||||
}
|
||||
|
||||
public static HtmlColor getFontColor(ISkinParam skinParam, FontParam fontParam, Stereotype stereo) {
|
||||
return skinParam.getFontHtmlColor(fontParam, stereo);
|
||||
return skinParam.getFontHtmlColor(stereo, fontParam);
|
||||
}
|
||||
|
||||
public static HtmlColor getColor(ISkinParam skinParam, ColorParam colorParam, Stereotype stereo) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -36,6 +36,7 @@ package net.sourceforge.plantuml;
|
||||
import java.awt.Color;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@ -471,5 +472,13 @@ public class StringUtils {
|
||||
return arg.subSequence(i, j + 1).toString();
|
||||
}
|
||||
|
||||
public static List<String> splitHiddenNewLine(String s) {
|
||||
return Arrays.asList(s.split("" + hiddenNewLine()));
|
||||
}
|
||||
|
||||
public static String manageNewLine(String string) {
|
||||
return string.replace(hiddenNewLine(), '\n');
|
||||
}
|
||||
|
||||
// http://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 16613 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 12235 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -56,7 +56,7 @@ public class Url implements EnsureVisible {
|
||||
if (tooltip == null) {
|
||||
this.tooltip = url;
|
||||
} else {
|
||||
this.tooltip = tooltip;
|
||||
this.tooltip = StringUtils.manageNewLine(tooltip);
|
||||
}
|
||||
if (label == null) {
|
||||
this.label = url;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -44,7 +44,21 @@ public class UrlBuilder {
|
||||
STRICT, AT_START, ANYWHERE, AT_END
|
||||
}
|
||||
|
||||
private static final String URL_PATTERN = "\\[\\[([%g][^%g]+[%g]|[^{}%s\\]\\[]*)(?:[%s]*\\{((?:[^{}]|\\{[^{}]*\\})+)\\})?(?:[%s]*([^\\]\\[]+))?\\]\\]";
|
||||
private static String level0() {
|
||||
return "(?:[^{}]|\\{[^{}]*\\})+";
|
||||
}
|
||||
|
||||
private static String levelN(int n) {
|
||||
if (n == 0) {
|
||||
return level0();
|
||||
}
|
||||
return "(?:[^{}]|\\{" + levelN(n - 1) + "\\})+";
|
||||
}
|
||||
|
||||
private static final String URL_PATTERN_OLD = "\\[\\[([%g][^%g]+[%g]|[^{}%s\\]\\[]*)(?:[%s]*\\{((?:[^{}]|\\{[^{}]*\\})+)\\})?(?:[%s]*([^\\]\\[]+))?\\]\\]";
|
||||
|
||||
private static final String URL_PATTERN = "\\[\\[([%g][^%g]+[%g]|[^{}%s\\]\\[]*)(?:[%s]*\\{" + "(" + levelN(3)
|
||||
+ ")" + "\\})?(?:[%s]*([^\\]\\[]+))?\\]\\]";
|
||||
|
||||
private final String topurl;
|
||||
private ModeUrl mode;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 14721 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 12235 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram.command;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
* Revision $Revision: 17003 $
|
||||
* Revision $Revision: 18280 $
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.activitydiagram.command;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -78,7 +78,7 @@ public class ActivityDiagram3 extends UmlDiagram {
|
||||
|
||||
private SwimlaneStrategy swimlaneStrategy;
|
||||
|
||||
private final Swimlanes swinlanes = new Swimlanes(getSkinParam());
|
||||
private final Swimlanes swinlanes = new Swimlanes(getSkinParam(), getPragma());
|
||||
|
||||
private void manageSwimlaneStrategy() {
|
||||
if (swimlaneStrategy == null) {
|
||||
@ -233,12 +233,12 @@ public class ActivityDiagram3 extends UmlDiagram {
|
||||
|
||||
private final UFont getFont(FontParam fontParam) {
|
||||
final ISkinParam skinParam = getSkinParam();
|
||||
return skinParam.getFont(fontParam, null, false);
|
||||
return skinParam.getFont(null, false, fontParam);
|
||||
}
|
||||
|
||||
private final HtmlColor getFontColor(FontParam fontParam, Stereotype stereotype2) {
|
||||
final ISkinParam skinParam = getSkinParam();
|
||||
return skinParam.getFontHtmlColor(fontParam, stereotype2);
|
||||
return skinParam.getFontHtmlColor(stereotype2, fontParam);
|
||||
}
|
||||
|
||||
public void fork() {
|
||||
@ -388,10 +388,10 @@ public class ActivityDiagram3 extends UmlDiagram {
|
||||
return CommandExecutionResult.ok();
|
||||
}
|
||||
|
||||
public void startGroup(Display name, HtmlColor backColor, HtmlColor titleColor) {
|
||||
public void startGroup(Display name, HtmlColor backColor, HtmlColor titleColor, HtmlColor borderColor) {
|
||||
manageSwimlaneStrategy();
|
||||
final InstructionGroup instructionGroup = new InstructionGroup(current(), name, backColor, titleColor,
|
||||
swinlanes.getCurrentSwimlane());
|
||||
swinlanes.getCurrentSwimlane(), borderColor);
|
||||
current().add(instructionGroup);
|
||||
setCurrent(instructionGroup);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
@ -47,16 +47,18 @@ public class InstructionGroup implements Instruction, InstructionCollection {
|
||||
private final InstructionList list;
|
||||
private final Instruction parent;
|
||||
private final HtmlColor backColor;
|
||||
private final HtmlColor borderColor;
|
||||
private final HtmlColor titleColor;
|
||||
|
||||
private final Display test;
|
||||
private Display headerNote = Display.NULL;
|
||||
|
||||
public InstructionGroup(Instruction parent, Display test, HtmlColor backColor, HtmlColor titleColor,
|
||||
Swimlane swimlane) {
|
||||
Swimlane swimlane, HtmlColor borderColor) {
|
||||
this.list = new InstructionList(swimlane);
|
||||
this.parent = parent;
|
||||
this.test = test;
|
||||
this.borderColor = borderColor;
|
||||
this.backColor = backColor;
|
||||
this.titleColor = titleColor;
|
||||
}
|
||||
@ -66,7 +68,7 @@ public class InstructionGroup implements Instruction, InstructionCollection {
|
||||
}
|
||||
|
||||
public Ftile createFtile(FtileFactory factory) {
|
||||
return factory.createGroup(list.createFtile(factory), test, backColor, titleColor, headerNote);
|
||||
return factory.createGroup(list.createFtile(factory), test, backColor, titleColor, headerNote, borderColor);
|
||||
}
|
||||
|
||||
public Instruction getParent() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* (C) Copyright 2009-2014, Arnaud Roques
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.sourceforge.net
|
||||
*
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user