mirror of
https://github.com/octoleo/plantuml.git
synced 2025-04-07 02:31:51 +00:00
Add minor correction and some test test
This commit is contained in:
parent
efab37d3ce
commit
c2eadfd3e4
@ -48,6 +48,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
|
|||||||
import net.sourceforge.plantuml.Direction;
|
import net.sourceforge.plantuml.Direction;
|
||||||
import net.sourceforge.plantuml.FontParam;
|
import net.sourceforge.plantuml.FontParam;
|
||||||
import net.sourceforge.plantuml.ISkinParam;
|
import net.sourceforge.plantuml.ISkinParam;
|
||||||
|
import net.sourceforge.plantuml.LineBreakStrategy;
|
||||||
import net.sourceforge.plantuml.UseStyle;
|
import net.sourceforge.plantuml.UseStyle;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
|
import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
|
||||||
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractFtile;
|
||||||
@ -143,6 +144,7 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
|
|||||||
final FontConfiguration fc;
|
final FontConfiguration fc;
|
||||||
|
|
||||||
final double shadowing;
|
final double shadowing;
|
||||||
|
final LineBreakStrategy wrapWidth;
|
||||||
if (UseStyle.useBetaStyle()) {
|
if (UseStyle.useBetaStyle()) {
|
||||||
final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
final Style style = getDefaultStyleDefinition().getMergedStyle(skinParam.getCurrentStyleBuilder())
|
||||||
.eventuallyOverride(note.getColors());
|
.eventuallyOverride(note.getColors());
|
||||||
@ -150,18 +152,20 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil, Stylea
|
|||||||
borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet());
|
borderColor = style.value(PName.LineColor).asColor(getIHtmlColorSet());
|
||||||
fc = style.getFontConfiguration(getIHtmlColorSet());
|
fc = style.getFontConfiguration(getIHtmlColorSet());
|
||||||
shadowing = style.value(PName.Shadowing).asDouble();
|
shadowing = style.value(PName.Shadowing).asDouble();
|
||||||
|
wrapWidth = style.wrapWidth();
|
||||||
} else {
|
} else {
|
||||||
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
noteBackgroundColor = rose.getHtmlColor(skinParam, ColorParam.noteBackground);
|
||||||
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
borderColor = rose.getHtmlColor(skinParam, ColorParam.noteBorder);
|
||||||
fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
fc = new FontConfiguration(skinParam, FontParam.NOTE, null);
|
||||||
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
shadowing = skinParam.shadowing(null) ? 4 : 0;
|
||||||
|
wrapWidth = skinParam.wrapWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
final HorizontalAlignment align = skinParam.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null,
|
final HorizontalAlignment align = skinParam.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null,
|
||||||
false);
|
false);
|
||||||
final Sheet sheet = Parser.build(fc, align, skinParam, CreoleMode.FULL).createSheet(note.getDisplay());
|
final Sheet sheet = Parser.build(fc, align, skinParam, CreoleMode.FULL).createSheet(note.getDisplay());
|
||||||
final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, skinParam.wrapWidth(), skinParam.getPadding()),
|
final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, wrapWidth, skinParam.getPadding()), this,
|
||||||
this, new UStroke(1));
|
new UStroke(1));
|
||||||
opale = new Opale(shadowing, borderColor, noteBackgroundColor, text, withLink);
|
opale = new Opale(shadowing, borderColor, noteBackgroundColor, text, withLink);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ public class Version {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int beta() {
|
public static int beta() {
|
||||||
final int beta = 0;
|
final int beta = 1;
|
||||||
return beta;
|
return beta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
26
test/nonreg/A0000.java
Normal file
26
test/nonreg/A0000.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package nonreg;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
@startuml
|
||||||
|
Alice -> Bob : Hello
|
||||||
|
@enduml
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
class A0000 {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testSimple() throws IOException {
|
||||||
|
final File source = new File("test/nonreg", getClass().getSimpleName() + ".java");
|
||||||
|
assertTrue(source.exists());
|
||||||
|
assertTrue(source.canRead());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user