diff --git a/src/net/sourceforge/plantuml/sequencediagram/NoteStyle.java b/src/net/sourceforge/plantuml/sequencediagram/NoteStyle.java index 8de7a1bc6..bb5ff3d5f 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/NoteStyle.java +++ b/src/net/sourceforge/plantuml/sequencediagram/NoteStyle.java @@ -44,21 +44,22 @@ public enum NoteStyle { NORMAL, HEXAGONAL, BOX; public static NoteStyle getNoteStyle(String s) { - if (s.equalsIgnoreCase("hnote")) { + if (s.equalsIgnoreCase("hnote")) return NoteStyle.HEXAGONAL; - } else if (s.equalsIgnoreCase("rnote")) { + + if (s.equalsIgnoreCase("rnote")) return NoteStyle.BOX; - } + return NoteStyle.NORMAL; } public ComponentType getNoteComponentType() { - if (this == NoteStyle.HEXAGONAL) { + if (this == NoteStyle.HEXAGONAL) return ComponentType.NOTE_HEXAGONAL; - } - if (this == NoteStyle.BOX) { + + if (this == NoteStyle.BOX) return ComponentType.NOTE_BOX; - } + return ComponentType.NOTE; } diff --git a/src/net/sourceforge/plantuml/sequencediagram/graphic/Step1MessageExo.java b/src/net/sourceforge/plantuml/sequencediagram/graphic/Step1MessageExo.java index 63ba0a34e..be9146eb4 100644 --- a/src/net/sourceforge/plantuml/sequencediagram/graphic/Step1MessageExo.java +++ b/src/net/sourceforge/plantuml/sequencediagram/graphic/Step1MessageExo.java @@ -46,7 +46,6 @@ import net.sourceforge.plantuml.sequencediagram.Note; import net.sourceforge.plantuml.skin.ArrowComponent; import net.sourceforge.plantuml.skin.ArrowConfiguration; import net.sourceforge.plantuml.skin.Component; -import net.sourceforge.plantuml.skin.ComponentType; import net.sourceforge.plantuml.style.ISkinParam; class Step1MessageExo extends Step1Abstract { @@ -69,7 +68,8 @@ class Step1MessageExo extends Step1Abstract { for (Note noteOnMessage : noteOnMessages) { final ISkinParam skinParam = noteOnMessage.getSkinParamBackcolored(drawingSet.getSkinParam()); final Component note = drawingSet.getSkin().createComponentNote(noteOnMessage.getUsedStyles(), - ComponentType.NOTE, skinParam, noteOnMessage.getDisplay(), noteOnMessage.getColors()); + noteOnMessage.getNoteStyle().getNoteComponentType(), skinParam, noteOnMessage.getDisplay(), + noteOnMessage.getColors()); addNote(note); }