X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fdata%2FParagraph.java;fp=src%2Fbe%2Fnikiroo%2Ffanfix%2Fdata%2FParagraph.java;h=0ed61fbb614f494725ebbc0f1c632a7ffcd7a29a;hp=e7ef04581fc3b2d70c05d19d1b203971ba2136b2;hb=76f58e5637fb3b329ce15d847987f24b9fdaf04d;hpb=c17f31dd9bdaa3eb8d73ee88ddf6617d14ef5e71 diff --git a/src/be/nikiroo/fanfix/data/Paragraph.java b/src/be/nikiroo/fanfix/data/Paragraph.java index e7ef045..0ed61fb 100644 --- a/src/be/nikiroo/fanfix/data/Paragraph.java +++ b/src/be/nikiroo/fanfix/data/Paragraph.java @@ -23,7 +23,19 @@ public class Paragraph implements Cloneable { /** Quotation (dialogue) */ QUOTE, /** An image (no text) */ - IMAGE, + IMAGE, ; + + /** + * This paragraph type is of a text kind (quote or not). + * + * @param allowEmpty + * allow empty text as text, too (blanks, breaks...) + * @return TRUE if it is + */ + public boolean isText(boolean allowEmpty) { + return (this == NORMAL || this == QUOTE) + || (allowEmpty && (this == BLANK || this == BREAK)); + } } private ParagraphType type;