1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 10:59:01 +00:00

version 8053

This commit is contained in:
Arnaud Roques 2016-12-21 23:10:29 +01:00
parent 3100d49b54
commit ae4cf31832
20 changed files with 422 additions and 218 deletions

View File

@ -35,7 +35,7 @@
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
<version>8053-SNAPSHOT</version>
<version>8054-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PlantUML</name>

View File

@ -47,7 +47,8 @@ public enum LineParam {
swimlaneBorder,
activityBorder,
titleBorder,
diagramBorder;
diagramBorder,
rectangleBorder;
// sequenceBoxBorder(0.1);
}

View File

@ -29,6 +29,7 @@
*/
package net.sourceforge.plantuml;
import java.awt.geom.Dimension2D;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
@ -44,10 +45,17 @@ import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.DiagramDescriptionImpl;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.eggs.PSystemEmpty;
import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
import net.sourceforge.plantuml.ugraphic.UChangeColor;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.txt.UGraphicTxt;
public class PSystemError extends AbstractPSystem {
@ -112,9 +120,28 @@ public class PSystemError extends AbstractPSystem {
}
final boolean useRed = fileFormat.isUseRedForError();
final TextBlockBackcolored result = GraphicStrings.createForError(getHtmlStrings(useRed), useRed);
final UDrawable udrawable;
final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, result.getBackcolor(),
getMetadata(), null, 0, 0, null, false);
imageBuilder.setUDrawable(result);
if (getSource().getTotalLineCount() < 4) {
final TextBlockBackcolored welcome = new PSystemEmpty(false).getGraphicStrings();
udrawable = new UDrawable() {
public void drawU(UGraphic ug) {
final Dimension2D dim1 = welcome.calculateDimension(ug.getStringBounder());
final Dimension2D dim2 = result.calculateDimension(ug.getStringBounder());
final URectangle frame = new URectangle(Math.max(dim1.getWidth(), dim2.getWidth()),
dim1.getHeight());
ug.apply(new UChangeBackColor(welcome.getBackcolor())).apply(new UTranslate(1, 1)).draw(frame);
welcome.drawU(ug);
ug = ug.apply(new UTranslate(0, dim1.getHeight()));
result.drawU(ug);
}
};
} else {
udrawable = result;
}
imageBuilder.setUDrawable(udrawable);
return imageBuilder.writeImageTOBEMOVED(fileFormat, os);
}

View File

@ -61,6 +61,8 @@ import net.sourceforge.plantuml.svek.PackageStyle;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ColorMapperMonochrome;
import net.sourceforge.plantuml.ugraphic.ColorMapperReverse;
import net.sourceforge.plantuml.ugraphic.ColorOrder;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
@ -331,10 +333,6 @@ public class SkinParam implements ISkinParam {
return 10;
}
private boolean isMonochrome() {
return "true".equals(getValue("monochrome"));
}
public static Collection<String> getPossibleValues() {
final Set<String> result = new TreeSet<String>();
result.add("Monochrome");
@ -472,10 +470,22 @@ public class SkinParam implements ISkinParam {
}
public ColorMapper getColorMapper() {
if (isMonochrome()) {
return new ColorMapperMonochrome();
final String monochrome = getValue("monochrome");
if ("true".equals(monochrome)) {
return new ColorMapperMonochrome(false);
}
return new ColorMapperIdentity();
if ("reverse".equals(monochrome)) {
return new ColorMapperMonochrome(true);
}
final String value = getValue("reversecolor");
if (value == null) {
return new ColorMapperIdentity();
}
final ColorOrder order = ColorOrder.fromString(value);
if (order == null) {
return new ColorMapperIdentity();
}
return new ColorMapperReverse(order);
}
public boolean shadowing() {

View File

@ -413,6 +413,20 @@ public class StringUtils {
return st;
}
public static String rot(String s) {
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if ((c >= 'a' && c <= 'm') || (c >= 'A' && c <= 'M')) {
c += 13;
} else if ((c >= 'n' && c <= 'z') || (c >= 'N' && c <= 'Z')) {
c -= 13;
}
sb.append(c);
}
return sb.toString();
}
public static String manageGuillemet(String st) {
return st.replaceAll("\\<\\<\\s?((?:\\<&\\w+\\>|[^<>])+?)\\s?\\>\\>", "\u00AB$1\u00BB");
}

View File

@ -90,7 +90,7 @@ public class FtileFactoryDelegatorRepeat extends FtileFactoryDelegator {
// printAllChild(repeat);
final Ftile diamondBreak = new FtileDiamond(repeat.skinParam(), backColor, borderColor, swimlane);
result = assembly(result, diamondBreak);
result = assembly(FtileUtils.addHorizontalMargin(result, 10, 0), diamondBreak);
final Genealogy genealogy = new Genealogy(result);
final FtileBreak ftileBreak = (FtileBreak) weldingPoints.get(0);

View File

@ -60,7 +60,7 @@ import net.sourceforge.plantuml.version.PSystemVersion;
public class PSystemDonors extends AbstractPSystem {
public static final String DONORS = "UDfTKqjosp0CtUCKN6lIGoXsxDQ_PEmqdSaEbc2BDaMu9ELKFaUlaaLdkki5VAH2RcNIuOeO0k1x3m-voVuVSl14WPpARM2hiO1dokBX6cOSG-SXxqjn3MCNdwY55QtH1urMBRYoaDkIdHepXHDrryr6Clfqj333v2CROAZxG1l8Osi-mgg945eOw-psM8P9ZxBni0fqgCYg0VD1-0txVyZ3jFvGoWu6RBHLIsuymQJvy9xjM8ZqmK73F46DTHhALxcX7sXBaNDGQUcwHTSAq-MLjjt28aKVJl1ez54AXhhO2_BhYxRmuA-jRG8YeoCCJxKEhbKphBX4c7IYlrOexPEyZ4mSbvnzAp9P398d-0JNv1zusj-migM4hX1DHhXsxPxV_5vB8oDbZoxe4toEsIN3N1SL6NMFshGf0tDAmNWF4qBxQOB5zuQy6ZPhXp9B4_c-y2vGKQcfGuyHqfR4eid4tZfdIOgQyb6dHhbOvMiah16MYNcxBrAUsKwg3ucjUDyfSyyEBPh3dNgbW7pmi1I2w4errTreOMJOTNhF__msvZBqQ0YJc5FiDBlQoM6lTZVrwfQHJnpI3Uq9UxCizGtyt6YrGYnbaToMr3UoMt9tQfu_VrdbqUWPMnZJpGAbEjX235Eh5-4m50jFOwQZRiwoEZCYU3YcUt14MCGcLFSWiuJKkD7YagOcDUA6GbIxy31AvtJX4hrXJwc80dUXj-AebQxZGWeWsUjDfplAZYUWCsFW_FFydhG_lvz_mQ2wMVGM_WAyB4jD";
public static final String DONORS = "UDfTL4josp0CtUCKN6lIGoXsxDQ_PEmqdSaEbc2BDaMu9ELKFaUlaaLdkki5VAH2RcNIuKeO0k1x3m_AJVR_a8Cd2kHKRWDRZGKyKnOFrp3Z63eFUL-AQnYxU4Kjh6YDFcYqQi6LXToMxDIOAPoe-zni9ADFHmipJ1wo0OQw3xI1FBRc8woQ2A65iSvkZsMOz2WR3wj0Xugi6Z0VXD-mVuSyJEiFfUnWm4PRjUJ64qoQ3_VPZeL87nmqp1FKMAUXF9KR-e6s53a7bPQkMtIjC5rUQTijB5BquGIFHX-bOAYBlI2_tcWB3_xQsYOWCZh2y5Jhu5ermufBX4ad-ck5qZx9oyZ4SSdPjoAJnI1vWazmJVw1f_qDArjAw0hHP8Hhr-xvpU-rD39IzkY2Fi7dc5qop7LHaL7tg4sRCZ2d58ptC26qdoPOV6_8gs6pTYYpD97l2-y25PMQElGO8Mr9B9fCxArpbgIeAHzrQfIBLRv6mXfXcPYtUoBbcUsa-f3OYlUTClViqA8vtAbN2iW73qiXYAvKKzsD5aQ6NQVt_CzlOov3ZuOmYJd5JhEhdHpsQdTJhsuPUNZ2tXvBVGCuDrgj44jP7RSbzOtibjoTckVFNrPvj7R65iPqip8fSrk8HMhr8gY7Ojffp7JKJLQMPKO43yVK-KU4HMn2TGyoIsYC6os-Q6fI8sueH7qB3wDqCXSkqGtsbCecS1TwAnvQwJgke02IJTvqIgDiTG8wCmREFy_lIVlp-_aN3AgRrMvbyPhrvKVWhEp2Nu66JIy0";
@Override
final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat)

View File

@ -50,8 +50,10 @@ import net.sourceforge.plantuml.version.PSystemVersion;
public class PSystemEmpty extends AbstractPSystem {
private final List<String> strings = new ArrayList<String>();
private final boolean withLogo;
public PSystemEmpty() {
public PSystemEmpty(boolean withLogo) {
this.withLogo = withLogo;
strings.add("<b>Welcome to PlantUML!");
strings.add(" ");
strings.add("If you use this software, you accept its license.");
@ -66,10 +68,12 @@ public class PSystemEmpty extends AbstractPSystem {
strings.add("\"\"class Example\"\"");
strings.add(" ");
strings.add("You will find more information about PlantUML syntax on <u>http://plantuml.com</u>");
strings.add(" ");
strings.add(" ");
strings.add(" ");
strings.add(" ");
if (withLogo) {
strings.add(" ");
strings.add(" ");
strings.add(" ");
strings.add(" ");
}
}
@Override
@ -83,10 +87,12 @@ public class PSystemEmpty extends AbstractPSystem {
return imageBuilder.writeImageTOBEMOVED(fileFormat, os);
}
private TextBlockBackcolored getGraphicStrings() throws IOException {
final TextBlockBackcolored result = GraphicStrings.createBlackOnWhite(strings,
PSystemVersion.getPlantumlImage(), GraphicPosition.BACKGROUND_CORNER_BOTTOM_RIGHT);
return result;
public TextBlockBackcolored getGraphicStrings() throws IOException {
if (withLogo) {
return GraphicStrings.createBlackOnWhite(strings, PSystemVersion.getPlantumlImage(),
GraphicPosition.BACKGROUND_CORNER_BOTTOM_RIGHT);
}
return GraphicStrings.createBlackOnWhite(strings);
}
public DiagramDescription getDescription() {

View File

@ -39,7 +39,7 @@ public class PSystemEmptyFactory implements PSystemFactory {
public Diagram createSystem(UmlSource source) {
if (source.getTotalLineCount() == 2) {
return new PSystemEmpty();
return new PSystemEmpty(true);
}
return null;
}

View File

@ -35,175 +35,171 @@ import java.util.List;
public class QuoteUtils {
static final List<String> quotes = Arrays
.asList(//
"He's dead, Jim.", //
"By Grabthar's hammer, by the sons of Worvan, you shall be avenged.", //
"Roads? Where we're going, we don't need roads.", //
"The time is out of joint.", //
"C'est curieux chez les marins ce besoin de faire des phrases.", //
"I'm talking about the other Peter, the one on the other side.", //
"May the Force be with you!", //
"Never give up, never surrender...", //
"Hasta la vista, baby.", //
"Hey, Doc, we better back up. We don't have enough road to get up to 88.", //
"Greetings, Professor Falken. Shall we play a game?", //
"I can't change the law of physics!", //
"A strange game. The only winning move is not to play.", //
"I'm the Gatekeeper, are you the Keymaster?", //
"I am the Master Control Program. No one User wrote me.", //
"Life? Don't talk to me about life.", //
"I always thought something was fundamentally wrong with the universe.", //
"A robot may not injure a human being or, through inaction, allow a human being to come to harm.", //
"Surrender may be our only option.", //
"Six by nine. Forty two.", //
"It's life, Jim, but not as we know it.", //
"Don't Panic!", //
"What do you mean? An African or European swallow?", //
"You forgot to say please...", //
"You have died of dysentery.", //
"Wouldn't you prefer a nice game of chess?", //
"When you have eliminated the impossible, whatever remains, however improbable, must be the truth.", //
"I know now why you cry. But it's something I can never do.", //
"Resistance is futile. You will be assimilated.", //
"Anything different is good.", //
"Cracked by Aldo Reset and Laurent Rueil.", //
"I'm both. I'm a celebrity in an emergency.", //
"Do you know this great great polish actor, Joseph Tura?", //
"To infinity and beyond!", //
"Space: the final frontier...", //
"Sur mon billet, tenez, y a ecrit Saint-Lazare, c'est mes yeux ou quoi ?", //
"The boy is important. He has to live.", //
"Once upon a time in a galaxy far, far away...", //
"And you know there's a long long way ahead of you...", //
"An allergy to oxygen? Elm blight?", //
"But alors you are French!", //
"N'ai-je donc tant vecu que pour cette infamie?", //
"Something is rotten in the State of Denmark.", //
"Hey, what do you want? Miracles?", //
"1.21 gigawatts! 1.21 gigawatts. Great Scott! ", //
"What the hell is a gigawatt?", //
"I need a vacation.", //
"On devrait jamais quitter Montauban.", //
"My force is a platform that you can climb on...", //
"There's something weird, and it don't look good...", //
"Et rien vraiment ne change mais tout est different", //
"Beam me up, Scotty.", //
"There is no spoon.", //
"Follow the white rabbit.", //
"Never send a human to do a machine's job.", //
"Guru meditation. Press left mouse button to continue.", //
"I don't think we're in Kansas anymore.", //
"Luke, I am your father.", //
"Blood, Sweat and Tears", //
"Houston, we have a problem.", //
"Keyboard failure, press any key to continue", //
"Big mistake!", //
"How many UML designers does it take to change a lightbulb ?", //
"Do you like movies about gladiators ?", //
"The spirit of learning is a lasting frontier.", //
"It is curious for sailors this need for making sentences.", //
"Hoping for the best, but expecting the worst", //
"The will to go on when I'm hurt deep inside.", //
"If it bleeds, we can kill it.", //
"Houston, I have a bad feeling about this mission.", //
"Mama always said life was like a box of chocolates. You never know what you're gonna get.", //
"By the way, is there anyone on board who knows how to fly a plane?", //
"Dave, this conversation can serve no purpose anymore. Goodbye.", //
"It can only be attributable to human error.", //
"Looks like I picked the wrong week to quit smoking.", //
"You humans act so strange. Everything you create is used to destroy.", //
"Where did you learn how to negotiate like that?", //
"Sir, are you classified as human?", //
"We're not gonna make it, are we?", //
"It's in your nature to destroy yourselves.", //
"The more contact I have with humans, the more I learn.", //
"Would it save you a lot of time if I just gave up and went mad now?", //
"Reality is frequently inaccurate.", //
"Don't believe anything you read on the net. Except this. Well, including this, I suppose.", //
"A cup of tea would restore my normality.", //
"Anything that thinks logically can be fooled by something else that thinks at least as logically as it does.", //
"In an infinite Universe anything can happen.", //
"Sometimes if you received an answer, the question might be taken away.", //
"Please call me Eddie if it will help you to relax.", //
"I don't believe it. Prove it to me and I still won't believe it.", //
"Totally mad, utter nonsense. But we'll do it because it's brilliant nonsense.", //
"This sentence is not true.", //
"I would rather die standing than live on my knees.", //
"You are being watched.", //
"Did you feed them after midnight?", //
"How do you explain school to higher intelligence?", //
"People sometimes make mistakes.", //
"Look, I don't have time for a conversation right now.", //
"All problems in computer science can be solved by another level of indirection", //
"...except for the problem of too many levels of indirection", //
"I know because I built it", //
"Even the smallest person can change the course of the future.", //
"If you are a friend, you speak the password, and the doors will open.", //
"You Shall Not Pass", //
"73.6% Of All Statistics Are Made Up", //
"We can neither confirm nor deny that this is crashing", //
"When the beating of your heart echoes the beating of the drums", //
"Never trust a computer you can't throw out a window", //
"Yeah, I'm calm. I'm a calm person. Is there some reason I shouldn't be calm?", //
"Everybody just stay calm. The situation is under control.", //
"Hippy, you think everything is a conspiracy.", //
"These guys are about as much fun as a tax audit.", //
"There is something down there! Something not us.", //
"I saw a glimpse of my future and everything's changed for me now.", //
"In space no one can hear you scream", //
"I can't lie to you about your chances, but... you have my sympathies.", //
"There is an explanation for this, you know.", //
"I'm afraid I have some bad news.", //
"Do me a favour. Disconnect me. I could be reworked, but I'll never be top of the line again.", //
"Take it easy, don't push the little button on the joystick!", //
"I'm a very private person.", //
"To sculpt an elephant from a big block of marble, just knock away all the bits that don't look like an elephant.", //
"Who said you could talk to me? Have I got something on my face ?", //
"We've been through worst", //
"United we stand", //
"We shall never surrender", //
"Absolute honesty isn't always the most diplomatic nor the safest form of communication with emotional beings.", //
// "Humor: seventy-five percent. [Confirmed] Self destruct sequence in T minus 10, 9... ", //
"It's... complicated.", //
"Do not open until 1985", //
"I still mess up but I'll just start again", //
"I won't give up, no I won't give in; Till I reach the end; And then I'll start again", //
"I wanna try even though I could fail", //
"Sometimes we come last but we did our best", //
"If you see something, say something", //
"In theory there is no difference between theory and practice. But, in practice, there is.", //
"Daylight, I must wait for the sunrise. I must think of a new life. And I mustn't give in.", //
"If I cannot bring you comfort then at least I bring you hope", //
"We all must learn from small misfortune, count the blessings that are real", //
"Prepare Three Sealed Envelopes...", //
"You know that thing you just did? Don't do that", //
"It took me a long time to understand that if you want to do this job well you have to stay detached.", //
"Do you like your morning tea weak or strong ?", //
"Winter is coming", //
"What fools these mortals be!", //
"Something wicked this way comes.", //
"I think I get it, what was it? Poker Night? Bachelor Party?", //
"It's alright to be scared. Remember, there is no courage without fear.", //
"Through readiness and discipline we are masters of our fate.", //
"With great power comes great responsibility", //
"If a machine can learn the value of human life, maybe we can too ?", //
"Only going forward 'cause we can't find reverse.", //
"We're not gonna sit in silence, we're not gonna live with fear", //
"Bon, dans dix minutes je nous considere comme definitivement perdus.", //
"Ca sera surement bien quand ca sera fini.", //
"It's the last piece of the puzzle but you just can't make it fit", //
"Doctor says you're cured but you still feel the pain", //
"Is artificial intelligence the exact opposite of natural stupidity ?", //
"Forcement, ca depend, ca depasse...", //
"There's been a pattern of insubordinate behavior recently.", //
"No. We are not an effective team.", //
"Our job is not to remember... remember?", //
"This is mission control. How are you all doing this lovely morning?", //
"If you could see your whole life laid out in front of you, would you change things?", //
"Is this a non-zero-sum game?", //
"Now that's a proper introduction." //
);
static private final List<String> quotes = Arrays
.asList("Ur'f qrnq, Wvz.",
"Ol Tenogune'f unzzre, ol gur fbaf bs Jbeina, lbh funyy or niratrq.",
"Ebnqf? Jurer jr'er tbvat, jr qba'g arrq ebnqf.",
"Gur gvzr vf bhg bs wbvag.",
"P'rfg phevrhk purm yrf znevaf pr orfbva qr snver qrf cuenfrf.",
"V'z gnyxvat nobhg gur bgure Crgre, gur bar ba gur bgure fvqr.",
"Znl gur Sbepr or jvgu lbh!",
"Arire tvir hc, arire fheeraqre...",
"Unfgn yn ivfgn, onol.",
"Url, Qbp, jr orggre onpx hc. Jr qba'g unir rabhtu ebnq gb trg hc gb 88.",
"Terrgvatf, Cebsrffbe Snyxra. Funyy jr cynl n tnzr?",
"V pna'g punatr gur ynj bs culfvpf!",
"N fgenatr tnzr. Gur bayl jvaavat zbir vf abg gb cynl.",
"V'z gur Tngrxrrcre, ner lbh gur Xrlznfgre?",
"V nz gur Znfgre Pbageby Cebtenz. Ab bar Hfre jebgr zr.",
"Yvsr? Qba'g gnyx gb zr nobhg yvsr.",
"V nyjnlf gubhtug fbzrguvat jnf shaqnzragnyyl jebat jvgu gur havirefr.",
"N ebobg znl abg vawher n uhzna orvat be, guebhtu vanpgvba, nyybj n uhzna orvat gb pbzr gb unez.",
"Fheeraqre znl or bhe bayl bcgvba.",
"Fvk ol avar. Sbegl gjb.",
"Vg'f yvsr, Wvz, ohg abg nf jr xabj vg.",
"Qba'g Cnavp!",
"Jung qb lbh zrna? Na Nsevpna be Rhebcrna fjnyybj?",
"Lbh sbetbg gb fnl cyrnfr...",
"Lbh unir qvrq bs qlfragrel.",
"Jbhyqa'g lbh cersre n avpr tnzr bs purff?",
"Jura lbh unir ryvzvangrq gur vzcbffvoyr, jungrire erznvaf, ubjrire vzcebonoyr, zhfg or gur gehgu.",
"V xabj abj jul lbh pel. Ohg vg'f fbzrguvat V pna arire qb.",
"Erfvfgnapr vf shgvyr. Lbh jvyy or nffvzvyngrq.",
"Nalguvat qvssrerag vf tbbq.",
"Penpxrq ol Nyqb Erfrg naq Ynherag Ehrvy.",
"V'z obgu. V'z n pryroevgl va na rzretrapl.",
"Qb lbh xabj guvf terng terng cbyvfu npgbe, Wbfrcu Ghen?",
"Gb vasvavgl naq orlbaq!",
"Fcnpr: gur svany sebagvre...",
"Fhe zba ovyyrg, grarm, l n rpevg Fnvag-Ynmner, p'rfg zrf lrhk bh dhbv ?",
"Gur obl vf vzcbegnag. Ur unf gb yvir.",
"Bapr hcba n gvzr va n tnynkl sne, sne njnl...",
"Naq lbh xabj gurer'f n ybat ybat jnl nurnq bs lbh...",
"Na nyyretl gb bkltra? Ryz oyvtug?",
"Ohg nybef lbh ner Serapu!",
"A'nv-wr qbap gnag irph dhr cbhe prggr vasnzvr?",
"Fbzrguvat vf ebggra va gur Fgngr bs Qraznex.",
"Url, jung qb lbh jnag? Zvenpyrf?",
"1.21 tvtnjnggf! 1.21 tvtnjnggf. Terng Fpbgg! ",
"Jung gur uryy vf n tvtnjngg?",
"V arrq n inpngvba.",
"Ba qrienvg wnznvf dhvggre Zbagnhona.",
"Zl sbepr vf n cyngsbez gung lbh pna pyvzo ba...",
"Gurer'f fbzrguvat jrveq, naq vg qba'g ybbx tbbq...",
"Rg evra ienvzrag ar punatr znvf gbhg rfg qvssrerag",
"Ornz zr hc, Fpbggl.",
"Gurer vf ab fcbba.",
"Sbyybj gur juvgr enoovg.",
"Arire fraq n uhzna gb qb n znpuvar'f wbo.",
"Theh zrqvgngvba. Cerff yrsg zbhfr ohggba gb pbagvahr.",
"V qba'g guvax jr'er va Xnafnf nalzber.",
"Yhxr, V nz lbhe sngure.",
"Oybbq, Fjrng naq Grnef",
"Ubhfgba, jr unir n ceboyrz.",
"Xrlobneq snvyher, cerff nal xrl gb pbagvahr",
"Ovt zvfgnxr!",
"Ubj znal HZY qrfvtaref qbrf vg gnxr gb punatr n yvtugohyo ?",
"Qb lbh yvxr zbivrf nobhg tynqvngbef ?",
"Gur fcvevg bs yrneavat vf n ynfgvat sebagvre.",
"Vg vf phevbhf sbe fnvybef guvf arrq sbe znxvat fragraprf.",
"Ubcvat sbe gur orfg, ohg rkcrpgvat gur jbefg",
"Gur jvyy gb tb ba jura V'z uheg qrrc vafvqr.",
"Vs vg oyrrqf, jr pna xvyy vg.",
"Ubhfgba, V unir n onq srryvat nobhg guvf zvffvba.",
"Znzn nyjnlf fnvq yvsr jnf yvxr n obk bs pubpbyngrf. Lbh arire xabj jung lbh'er tbaan trg.",
"Ol gur jnl, vf gurer nalbar ba obneq jub xabjf ubj gb syl n cynar?",
"Qnir, guvf pbairefngvba pna freir ab checbfr nalzber. Tbbqolr.",
"Vg pna bayl or nggevohgnoyr gb uhzna reebe.",
"Ybbxf yvxr V cvpxrq gur jebat jrrx gb dhvg fzbxvat.",
"Lbh uhznaf npg fb fgenatr. Rirelguvat lbh perngr vf hfrq gb qrfgebl.",
"Jurer qvq lbh yrnea ubj gb artbgvngr yvxr gung?",
"Fve, ner lbh pynffvsvrq nf uhzna?",
"Jr'er abg tbaan znxr vg, ner jr?",
"Vg'f va lbhe angher gb qrfgebl lbhefryirf.",
"Gur zber pbagnpg V unir jvgu uhznaf, gur zber V yrnea.",
"Jbhyq vg fnir lbh n ybg bs gvzr vs V whfg tnir hc naq jrag znq abj?",
"Ernyvgl vf serdhragyl vanpphengr.",
"Qba'g oryvrir nalguvat lbh ernq ba gur arg. Rkprcg guvf. Jryy, vapyhqvat guvf, V fhccbfr.",
"N phc bs grn jbhyq erfgber zl abeznyvgl.",
"Nalguvat gung guvaxf ybtvpnyyl pna or sbbyrq ol fbzrguvat ryfr gung guvaxf ng yrnfg nf ybtvpnyyl nf vg qbrf.",
"Va na vasvavgr Havirefr nalguvat pna unccra.",
"Fbzrgvzrf vs lbh erprvirq na nafjre, gur dhrfgvba zvtug or gnxra njnl.",
"Cyrnfr pnyy zr Rqqvr vs vg jvyy uryc lbh gb erynk.",
"V qba'g oryvrir vg. Cebir vg gb zr naq V fgvyy jba'g oryvrir vg.",
"Gbgnyyl znq, hggre abafrafr. Ohg jr'yy qb vg orpnhfr vg'f oevyyvnag abafrafr.",
"Guvf fragrapr vf abg gehr.",
"V jbhyq engure qvr fgnaqvat guna yvir ba zl xarrf.",
"Lbh ner orvat jngpurq.",
"Qvq lbh srrq gurz nsgre zvqavtug?",
"Ubj qb lbh rkcynva fpubby gb uvture vagryyvtrapr?",
"Crbcyr fbzrgvzrf znxr zvfgnxrf.",
"Ybbx, V qba'g unir gvzr sbe n pbairefngvba evtug abj.",
"Nyy ceboyrzf va pbzchgre fpvrapr pna or fbyirq ol nabgure yriry bs vaqverpgvba",
"...rkprcg sbe gur ceboyrz bs gbb znal yriryf bs vaqverpgvba",
"V xabj orpnhfr V ohvyg vg",
"Rira gur fznyyrfg crefba pna punatr gur pbhefr bs gur shgher.",
"Vs lbh ner n sevraq, lbh fcrnx gur cnffjbeq, naq gur qbbef jvyy bcra.",
"Lbh Funyy Abg Cnff",
"73.6% Bs Nyy Fgngvfgvpf Ner Znqr Hc",
"Jr pna arvgure pbasvez abe qral gung guvf vf penfuvat",
"Jura gur orngvat bs lbhe urneg rpubrf gur orngvat bs gur qehzf",
"Arire gehfg n pbzchgre lbh pna'g guebj bhg n jvaqbj",
"Lrnu, V'z pnyz. V'z n pnyz crefba. Vf gurer fbzr ernfba V fubhyqa'g or pnyz?",
"Rirelobql whfg fgnl pnyz. Gur fvghngvba vf haqre pbageby.",
"Uvccl, lbh guvax rirelguvat vf n pbafcvenpl.",
"Gurfr thlf ner nobhg nf zhpu sha nf n gnk nhqvg.",
"Gurer vf fbzrguvat qbja gurer! Fbzrguvat abg hf.",
"V fnj n tyvzcfr bs zl shgher naq rirelguvat'f punatrq sbe zr abj.",
"Va fcnpr ab bar pna urne lbh fpernz",
"V pna'g yvr gb lbh nobhg lbhe punaprf, ohg... lbh unir zl flzcnguvrf.",
"Gurer vf na rkcynangvba sbe guvf, lbh xabj.",
"V'z nsenvq V unir fbzr onq arjf.",
"Qb zr n snibhe. Qvfpbaarpg zr. V pbhyq or erjbexrq, ohg V'yy arire or gbc bs gur yvar ntnva.",
"Gnxr vg rnfl, qba'g chfu gur yvggyr ohggba ba gur wblfgvpx!",
"V'z n irel cevingr crefba.",
"Gb fphycg na ryrcunag sebz n ovt oybpx bs zneoyr, whfg xabpx njnl nyy gur ovgf gung qba'g ybbx yvxr na ryrcunag.",
"Jub fnvq lbh pbhyq gnyx gb zr? Unir V tbg fbzrguvat ba zl snpr ?",
"Jr'ir orra guebhtu jbefg",
"Havgrq jr fgnaq",
"Jr funyy arire fheeraqre",
"Nofbyhgr ubarfgl vfa'g nyjnlf gur zbfg qvcybzngvp abe gur fnsrfg sbez bs pbzzhavpngvba jvgu rzbgvbany orvatf.",
"Vg'f... pbzcyvpngrq.",
"Qb abg bcra hagvy 1985",
"V fgvyy zrff hc ohg V'yy whfg fgneg ntnva",
"V jba'g tvir hc, ab V jba'g tvir va; Gvyy V ernpu gur raq; Naq gura V'yy fgneg ntnva",
"V jnaan gel rira gubhtu V pbhyq snvy",
"Fbzrgvzrf jr pbzr ynfg ohg jr qvq bhe orfg",
"Vs lbh frr fbzrguvat, fnl fbzrguvat",
"Va gurbel gurer vf ab qvssrerapr orgjrra gurbel naq cenpgvpr. Ohg, va cenpgvpr, gurer vf.",
"Qnlyvtug, V zhfg jnvg sbe gur fhaevfr. V zhfg guvax bs n arj yvsr. Naq V zhfga'g tvir va.",
"Vs V pnaabg oevat lbh pbzsbeg gura ng yrnfg V oevat lbh ubcr",
"Jr nyy zhfg yrnea sebz fznyy zvfsbeghar, pbhag gur oyrffvatf gung ner erny",
"Cercner Guerr Frnyrq Rairybcrf...",
"Lbh xabj gung guvat lbh whfg qvq? Qba'g qb gung",
"Vg gbbx zr n ybat gvzr gb haqrefgnaq gung vs lbh jnag gb qb guvf wbo jryy lbh unir gb fgnl qrgnpurq.",
"Qb lbh yvxr lbhe zbeavat grn jrnx be fgebat ?", "Jvagre vf pbzvat",
"Jung sbbyf gurfr zbegnyf or!", "Fbzrguvat jvpxrq guvf jnl pbzrf.",
"V guvax V trg vg, jung jnf vg? Cbxre Avtug? Onpurybe Cnegl?",
"Vg'f nyevtug gb or fpnerq. Erzrzore, gurer vf ab pbhentr jvgubhg srne.",
"Guebhtu ernqvarff naq qvfpvcyvar jr ner znfgref bs bhe sngr.",
"Jvgu terng cbjre pbzrf terng erfcbafvovyvgl",
"Vs n znpuvar pna yrnea gur inyhr bs uhzna yvsr, znlor jr pna gbb ?",
"Bayl tbvat sbejneq 'pnhfr jr pna'g svaq erirefr.",
"Jr'er abg tbaan fvg va fvyrapr, jr'er abg tbaan yvir jvgu srne",
"Oba, qnaf qvk zvahgrf wr abhf pbafvqrer pbzzr qrsvavgvirzrag creqhf.",
"Pn fren fherzrag ovra dhnaq pn fren svav.",
"Vg'f gur ynfg cvrpr bs gur chmmyr ohg lbh whfg pna'g znxr vg svg",
"Qbpgbe fnlf lbh'er pherq ohg lbh fgvyy srry gur cnva",
"Vf negvsvpvny vagryyvtrapr gur rknpg bccbfvgr bs angheny fghcvqvgl ?",
"Sbeprzrag, pn qrcraq, pn qrcnffr...",
"Gurer'f orra n cnggrea bs vafhobeqvangr orunivbe erpragyl.", "Ab. Jr ner abg na rssrpgvir grnz.",
"Bhe wbo vf abg gb erzrzore... erzrzore?",
"Guvf vf zvffvba pbageby. Ubj ner lbh nyy qbvat guvf ybiryl zbeavat?",
"Vs lbh pbhyq frr lbhe jubyr yvsr ynvq bhg va sebag bs lbh, jbhyq lbh punatr guvatf?",
"Vf guvf n aba-mreb-fhz tnzr?", "Abj gung'f n cebcre vagebqhpgvba.",
"Rirelguvat unf punatrq naq vg jba'g fgbc punatvat nalgvzr fbba.",
"Jung znxrf lbh qvssrerag znxrf lbh qnatrebhf", "Qviretrapr vf rkgerzryl qnatrebhf",
"V'z Qviretrag. Naq V pna'g or pbagebyyrq", "Znl gur bqqf or rire va lbhe snibe");
private QuoteUtils() {
}

View File

@ -33,7 +33,9 @@ package net.sourceforge.plantuml.graphic;
import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.LineParam;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.ugraphic.UStroke;
public class SkinParameter {
@ -136,4 +138,15 @@ public class SkinParameter {
return skinParam.getRoundCorner(name.toLowerCase(), stereotype);
}
public UStroke getStroke(ISkinParam skinParam, Stereotype stereotype) {
UStroke result = null;
if (name.equals("RECTANGLE")) {
result = skinParam.getThickness(LineParam.rectangleBorder, stereotype);
}
if (result == null) {
result = new UStroke(1.5);
}
return result;
}
}

View File

@ -62,6 +62,7 @@ import net.sourceforge.plantuml.ColorParam;
import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.UmlDiagram;
import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.core.ImageData;
@ -542,7 +543,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
exception.printStackTrace();
final List<String> strings = new ArrayList<String>();
strings.add("An error has occured : " + exception);
final String quote = QuoteUtils.getSomeQuote();
final String quote = StringUtils.rot(QuoteUtils.getSomeQuote());
strings.add("<i>" + quote);
strings.add(" ");
GraphvizCrash.addProperties(strings);

View File

@ -97,7 +97,10 @@ public class StatsUtils {
}
prefs.putInt("VERSION", VERSION);
}
reloadNow();
restoreNow();
if (historicalData != null) {
historicalData.reset();
}
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
@ -107,7 +110,7 @@ public class StatsUtils {
});
}
public static void reloadNow() {
private static void restoreNow() {
try {
prefs.sync();
fullEver = ParsedGenerated.loadDated(prefs, "full");
@ -205,7 +208,7 @@ public class StatsUtils {
public static void loopStats() throws InterruptedException {
int linesUsed = 0;
while (true) {
StatsUtils.reloadNow();
restoreNow();
clearScreen(System.out, linesUsed);
final TextConverter textConverter = new TextConverter(getStats());
textConverter.printMe(System.out);

View File

@ -55,27 +55,18 @@ public class StatsUtilsIncrement {
final private static ConcurrentMap<String, ParsedGenerated> byTypeEver = StatsUtils.byTypeEver;
final private static ConcurrentMap<String, ParsedGenerated> byTypeCurrent = StatsUtils.byTypeCurrent;
final private static HistoricalData historicalData = StatsUtils.historicalData;
final private static ParsedGenerated fullEver = StatsUtils.fullEver;
final private static FormatCounter formatCounterCurrent = StatsUtils.formatCounterCurrent;
final private static FormatCounter formatCounterEver = StatsUtils.formatCounterEver;
static {
// StatsUtils.jvmCounting = prefs.getLong("JVMcounting", 0) + 1;
// prefs.putLong("JVMcounting", StatsUtils.jvmCounting);
historicalData.reset();
}
public static void onceMoreParse(long duration, Class<? extends Diagram> type) {
getByTypeCurrent(type).parsed().addValue(duration);
final ParsedGenerated byTypeEver = getByTypeEver(type);
byTypeEver.parsed().addValue(duration);
fullEver.parsed().addValue(duration);
historicalData.current().parsed().addValue(duration);
StatsUtils.fullEver.parsed().addValue(duration);
StatsUtils.historicalData.current().parsed().addValue(duration);
historicalData.current().parsed().save(prefs);
fullEver.parsed().save(prefs);
StatsUtils.historicalData.current().parsed().save(prefs);
StatsUtils.fullEver.parsed().save(prefs);
byTypeEver.parsed().save(prefs);
realTimeExport();
}
@ -84,14 +75,14 @@ public class StatsUtilsIncrement {
getByTypeCurrent(type).generated().addValue(duration);
final ParsedGenerated byTypeEver = getByTypeEver(type);
byTypeEver.generated().addValue(duration);
fullEver.generated().addValue(duration);
historicalData.current().generated().addValue(duration);
StatsUtils.fullEver.generated().addValue(duration);
StatsUtils.historicalData.current().generated().addValue(duration);
formatCounterCurrent.plusOne(fileFormat, duration);
formatCounterEver.plusOne(fileFormat, duration);
formatCounterEver.save(prefs, fileFormat);
historicalData.current().generated().save(prefs);
fullEver.generated().save(prefs);
StatsUtils.historicalData.current().generated().save(prefs);
StatsUtils.fullEver.generated().save(prefs);
byTypeEver.generated().save(prefs);
realTimeExport();
}

View File

@ -37,6 +37,7 @@ import java.util.List;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.OptionPrint;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
import net.sourceforge.plantuml.flashcode.FlashCodeFactory;
import net.sourceforge.plantuml.flashcode.FlashCodeUtils;
@ -72,7 +73,7 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage {
} else {
strings.add("An error has occured : " + exception);
}
final String quote = QuoteUtils.getSomeQuote();
final String quote = StringUtils.rot(QuoteUtils.getSomeQuote());
strings.add("<i>" + quote);
strings.add(" ");
return strings;

View File

@ -91,9 +91,11 @@ public class EntityImageDescription extends AbstractEntityImage {
backcolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBack(), getStereo());
}
// backcolor = HtmlColorUtils.BLUE;
final HtmlColor forecolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBorder(), getStereo());
assert getStereo() == stereotype;
final HtmlColor forecolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBorder(), stereotype);
final double roundCorner = symbol.getSkinParameter().getRoundCorner(getSkinParam(), stereotype);
final SymbolContext ctx = new SymbolContext(backcolor, forecolor).withStroke(new UStroke(1.5))
final UStroke stroke = symbol.getSkinParameter().getStroke(getSkinParam(), stereotype);
final SymbolContext ctx = new SymbolContext(backcolor, forecolor).withStroke(stroke)
.withShadow(getSkinParam().shadowing2(symbol.getSkinParameter())).withRoundCorner(roundCorner);
TextBlock stereo = TextBlockUtils.empty(0, 0);

View File

@ -36,12 +36,21 @@ import net.sourceforge.plantuml.graphic.HtmlColor;
public class ColorMapperMonochrome implements ColorMapper {
private final boolean reverse;
public ColorMapperMonochrome(boolean reverse) {
this.reverse = reverse;
}
public Color getMappedColor(HtmlColor htmlColor) {
if (htmlColor == null) {
return null;
}
final Color color = new ColorMapperIdentity().getMappedColor(htmlColor);
final int grayScale = (int) (color.getRed() * .3 + color.getGreen() * .59 + color.getBlue() * .11);
int grayScale = (int) (color.getRed() * .3 + color.getGreen() * .59 + color.getBlue() * .11);
if (reverse) {
grayScale = 255 - grayScale;
}
return new Color(grayScale, grayScale, grayScale);
}
}

View File

@ -0,0 +1,57 @@
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2017, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* 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
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* 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.ugraphic;
import java.awt.Color;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorSimple;
public class ColorMapperReverse implements ColorMapper {
private final ColorOrder order;
public ColorMapperReverse(ColorOrder order) {
this.order = order;
}
public Color getMappedColor(HtmlColor color) {
if (color == null) {
return null;
}
return getReverse(((HtmlColorSimple) color).getColor999());
}
private Color getReverse(Color color) {
return order.getReverse(color);
}
}

View File

@ -0,0 +1,73 @@
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2017, Arnaud Roques
*
* Project Info: http://plantuml.com
*
* 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
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* 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.ugraphic;
import java.awt.Color;
public enum ColorOrder {
RGB, RBG, GRB, GBR, BRG, BGR;
public Color getColor(Color color) {
if (this == RGB) {
return new Color(color.getRed(), color.getGreen(), color.getBlue());
}
if (this == RBG) {
return new Color(color.getRed(), color.getBlue(), color.getGreen());
}
if (this == GRB) {
return new Color(color.getGreen(), color.getRed(), color.getBlue());
}
if (this == GBR) {
return new Color(color.getGreen(), color.getBlue(), color.getRed());
}
if (this == BRG) {
return new Color(color.getBlue(), color.getRed(), color.getGreen());
}
if (this == BGR) {
return new Color(color.getBlue(), color.getGreen(), color.getRed());
}
throw new IllegalStateException();
}
public Color getReverse(Color color) {
color = this.getColor(color);
return new Color(255 - color.getRed(), 255 - color.getGreen(), 255 - color.getBlue());
}
public static ColorOrder fromString(String order) {
try {
return ColorOrder.valueOf(order.toUpperCase());
} catch (Exception e) {
return null;
}
}
}

View File

@ -36,7 +36,7 @@ import java.util.Date;
public class Version {
public static int version() {
return 8052;
return 8053;
}
public static String versionString() {
@ -68,7 +68,7 @@ public class Version {
}
public static long compileTime() {
return 1481739310760L;
return 1482342693198L;
}
public static String compileTimeString() {