mirror of
https://github.com/octoleo/plantuml.git
synced 2024-12-22 10:59:01 +00:00
This commit is contained in:
parent
a5d39f6dda
commit
cc840383e3
@ -53,6 +53,8 @@ import net.sourceforge.plantuml.cucadiagram.GroupType;
|
|||||||
import net.sourceforge.plantuml.cucadiagram.Ident;
|
import net.sourceforge.plantuml.cucadiagram.Ident;
|
||||||
import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy;
|
import net.sourceforge.plantuml.cucadiagram.NamespaceStrategy;
|
||||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||||
|
import net.sourceforge.plantuml.graphic.USymbol;
|
||||||
|
import net.sourceforge.plantuml.graphic.USymbols;
|
||||||
import net.sourceforge.plantuml.graphic.color.ColorParser;
|
import net.sourceforge.plantuml.graphic.color.ColorParser;
|
||||||
import net.sourceforge.plantuml.graphic.color.ColorType;
|
import net.sourceforge.plantuml.graphic.color.ColorType;
|
||||||
import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException;
|
import net.sourceforge.plantuml.ugraphic.color.NoSuchColorException;
|
||||||
@ -112,8 +114,15 @@ public class CommandNamespace extends SingleLineCommand2<ClassDiagram> {
|
|||||||
return status;
|
return status;
|
||||||
final IEntity p = diagram.getCurrentGroup();
|
final IEntity p = diagram.getCurrentGroup();
|
||||||
final String stereotype = arg.get("STEREOTYPE", 0);
|
final String stereotype = arg.get("STEREOTYPE", 0);
|
||||||
if (stereotype != null)
|
if (stereotype != null) {
|
||||||
|
final USymbol usymbol = USymbols.fromString(stereotype, diagram.getSkinParam().actorStyle(),
|
||||||
|
diagram.getSkinParam().componentStyle(), diagram.getSkinParam().packageStyle());
|
||||||
|
if (usymbol == null)
|
||||||
p.setStereotype(Stereotype.build(stereotype));
|
p.setStereotype(Stereotype.build(stereotype));
|
||||||
|
else
|
||||||
|
p.setUSymbol(usymbol);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
final String urlString = arg.get("URL", 0);
|
final String urlString = arg.get("URL", 0);
|
||||||
if (urlString != null) {
|
if (urlString != null) {
|
||||||
|
@ -250,6 +250,9 @@ public class StyleParser {
|
|||||||
ins.jump();
|
ins.jump();
|
||||||
} else if (current == '@') {
|
} else if (current == '@') {
|
||||||
result.add(new StyleToken(StyleTokenType.AROBASE_MEDIA, readArobaseMedia(ins)));
|
result.add(new StyleToken(StyleTokenType.AROBASE_MEDIA, readArobaseMedia(ins)));
|
||||||
|
} else if (current == '\"') {
|
||||||
|
final String s = readQuotedString(ins);
|
||||||
|
result.add(new StyleToken(StyleTokenType.STRING, s));
|
||||||
} else {
|
} else {
|
||||||
final String s = readString(ins);
|
final String s = readString(ins);
|
||||||
if (s.startsWith("<"))
|
if (s.startsWith("<"))
|
||||||
@ -298,6 +301,21 @@ public class StyleParser {
|
|||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String readQuotedString(CharInspector ins) {
|
||||||
|
final StringBuilder result = new StringBuilder();
|
||||||
|
if (ins.peek(0) != '\"')
|
||||||
|
throw new IllegalStateException();
|
||||||
|
ins.jump();
|
||||||
|
while (ins.peek(0) != 0 && ins.peek(0) != '\"') {
|
||||||
|
char ch = ins.peek(0);
|
||||||
|
ins.jump();
|
||||||
|
result.append(ch);
|
||||||
|
}
|
||||||
|
if (ins.peek(0) == '\"')
|
||||||
|
ins.jump();
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
private static String readString(CharInspector ins) {
|
private static String readString(CharInspector ins) {
|
||||||
final StringBuilder result = new StringBuilder();
|
final StringBuilder result = new StringBuilder();
|
||||||
while (ins.peek(0) != 0) {
|
while (ins.peek(0) != 0) {
|
||||||
|
@ -42,6 +42,12 @@ import net.sourceforge.plantuml.svek.Side;
|
|||||||
|
|
||||||
public class ExtremityFactoryCircleCrowfoot extends AbstractExtremityFactory implements ExtremityFactory {
|
public class ExtremityFactoryCircleCrowfoot extends AbstractExtremityFactory implements ExtremityFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UDrawable createUDrawable(XPoint2D p0, double angle, Side side) {
|
||||||
|
angle -= Math.PI / 2;
|
||||||
|
return new ExtremityCircleCrowfoot(p0, angle);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UDrawable createUDrawable(XPoint2D p0, XPoint2D p1, XPoint2D p2, Side side) {
|
public UDrawable createUDrawable(XPoint2D p0, XPoint2D p1, XPoint2D p2, Side side) {
|
||||||
final double ortho = atan2(p0, p2);
|
final double ortho = atan2(p0, p2);
|
||||||
|
@ -42,6 +42,12 @@ import net.sourceforge.plantuml.svek.Side;
|
|||||||
|
|
||||||
public class ExtremityFactoryCircleLine extends AbstractExtremityFactory implements ExtremityFactory {
|
public class ExtremityFactoryCircleLine extends AbstractExtremityFactory implements ExtremityFactory {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UDrawable createUDrawable(XPoint2D p0, double angle, Side side) {
|
||||||
|
angle -= Math.PI / 2;
|
||||||
|
return new ExtremityCircleLine(p0, angle);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UDrawable createUDrawable(XPoint2D p0, XPoint2D p1, XPoint2D p2, Side side) {
|
public UDrawable createUDrawable(XPoint2D p0, XPoint2D p1, XPoint2D p2, Side side) {
|
||||||
final double ortho = atan2(p0, p2);
|
final double ortho = atan2(p0, p2);
|
||||||
|
@ -81,7 +81,7 @@ public class Version {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int beta() {
|
public static int beta() {
|
||||||
final int beta = 0;
|
final int beta = 1;
|
||||||
return beta;
|
return beta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ skinparam useBetaStyle false
|
|||||||
''
|
''
|
||||||
'' Global Default Values
|
'' Global Default Values
|
||||||
''
|
''
|
||||||
skinparam defaultFontName IBM Plex Sans, Noto Sans, Verdana
|
skinparam defaultFontName "IBM Plex Sans, Noto Sans, Verdana"
|
||||||
skinparam defaultFontSize 12
|
skinparam defaultFontSize 12
|
||||||
'skinparam dpi 125
|
'skinparam dpi 125
|
||||||
skinparam shadowing false
|
skinparam shadowing false
|
||||||
@ -534,17 +534,17 @@ boardDiagram {
|
|||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
BackGroundColor $PRIMARY
|
BackGroundColor $PRIMARY
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
FontName IBM Plex Sans, Noto Sans, Verdana
|
FontName "IBM Plex Sans, Noto Sans, Verdana"
|
||||||
'FontColor
|
'FontColor
|
||||||
FontSize 12
|
FontSize 12
|
||||||
'FontStyle bold
|
'FontStyle bold
|
||||||
RoundCorner 0
|
RoundCorner 0
|
||||||
'LineThickness 2
|
'LineThickness 2
|
||||||
'LineStyle 10;5
|
'LineStyle 10-5
|
||||||
separator {
|
separator {
|
||||||
LineThickness $LINE_THICKNESS
|
LineThickness $LINE_THICKNESS
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
'LineStyle 1;5
|
'LineStyle 1-5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -586,7 +586,7 @@ ganttDiagram {
|
|||||||
FontStyle bold
|
FontStyle bold
|
||||||
'BackGroundColor GreenYellow
|
'BackGroundColor GreenYellow
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
'LineStyle 8.0;13.0
|
'LineStyle 8.0-13.0
|
||||||
'LineThickness 3.0
|
'LineThickness 3.0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,7 +599,7 @@ ganttDiagram {
|
|||||||
}
|
}
|
||||||
separator {
|
separator {
|
||||||
BackgroundColor $PRIMARY
|
BackgroundColor $PRIMARY
|
||||||
`LineStyle 8.0;3.0
|
'LineStyle 8.0-3.0
|
||||||
LineColor $PRIMARY
|
LineColor $PRIMARY
|
||||||
LineThickness 1.0
|
LineThickness 1.0
|
||||||
FontSize 12
|
FontSize 12
|
||||||
@ -619,24 +619,24 @@ jsonDiagram {
|
|||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
BackGroundColor $PRIMARY
|
BackGroundColor $PRIMARY
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
FontName IBM Plex Sans, Noto Sans, Verdana
|
FontName "IBM Plex Sans, Noto Sans, Verdana"
|
||||||
'FontColor
|
'FontColor
|
||||||
FontSize 12
|
FontSize 12
|
||||||
'FontStyle bold
|
'FontStyle bold
|
||||||
RoundCorner 0
|
RoundCorner 0
|
||||||
'LineThickness 2
|
'LineThickness 2
|
||||||
'LineStyle 10;5
|
'LineStyle 10-5
|
||||||
separator {
|
separator {
|
||||||
LineThickness $LINE_THICKNESS
|
LineThickness $LINE_THICKNESS
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
'LineStyle 1;5
|
'LineStyle 1-5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arrow {
|
arrow {
|
||||||
BackGroundColor $PRIMARY_DARK
|
BackGroundColor $PRIMARY_DARK
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
LineThickness $LINE_THICKNESS
|
LineThickness $LINE_THICKNESS
|
||||||
LineStyle 3;6
|
LineStyle 3-6
|
||||||
}
|
}
|
||||||
highlight {
|
highlight {
|
||||||
BackGroundColor $PRIMARY_DARK
|
BackGroundColor $PRIMARY_DARK
|
||||||
@ -742,24 +742,24 @@ yamlDiagram {
|
|||||||
$primary_scheme()
|
$primary_scheme()
|
||||||
BackGroundColor $PRIMARY
|
BackGroundColor $PRIMARY
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
FontName IBM Plex Sans, Noto Sans, Verdana
|
FontName "IBM Plex Sans, Noto Sans, Verdana"
|
||||||
'FontColor
|
'FontColor
|
||||||
FontSize 12
|
FontSize 12
|
||||||
'FontStyle bold
|
'FontStyle bold
|
||||||
RoundCorner 0
|
RoundCorner 0
|
||||||
'LineThickness 2
|
'LineThickness 2
|
||||||
'LineStyle 10;5
|
'LineStyle 10-5
|
||||||
separator {
|
separator {
|
||||||
LineThickness $LINE_THICKNESS
|
LineThickness $LINE_THICKNESS
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
'LineStyle 1;5
|
'LineStyle 1-5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arrow {
|
arrow {
|
||||||
BackGroundColor $PRIMARY_DARK
|
BackGroundColor $PRIMARY_DARK
|
||||||
LineColor $PRIMARY_DARK
|
LineColor $PRIMARY_DARK
|
||||||
LineThickness $LINE_THICKNESS
|
LineThickness $LINE_THICKNESS
|
||||||
LineStyle 3;6
|
LineStyle 3-6
|
||||||
}
|
}
|
||||||
highlight {
|
highlight {
|
||||||
BackGroundColor $PRIMARY_DARK
|
BackGroundColor $PRIMARY_DARK
|
||||||
|
Loading…
Reference in New Issue
Block a user