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=e5a2f1b3d64907292ef59c6eae076354510e8641;hpb=f43598131014c6a1db57e885cc0ac21605633e9d 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;