From: Niki Roo Date: Wed, 13 Mar 2019 17:06:17 +0000 (+0100) Subject: Move TSizeConstraint into new package X-Git-Tag: fanfix-swing-0.0.1~12^2~259 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=0bcb5c7ff5300deb01c5136cf0d26d65d9455100;p=fanfix-swing.git Move TSizeConstraint into new package --- diff --git a/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java b/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java index 6523cfa0..cbca857d 100644 --- a/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java +++ b/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java @@ -23,6 +23,7 @@ import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.fanfix.library.BasicLibrary; import be.nikiroo.fanfix.output.BasicOutput.OutputType; import be.nikiroo.fanfix.reader.Reader; +import be.nikiroo.jexer.TSizeConstraint; /** * The library window, that will list all the (filtered) stories available in diff --git a/src/be/nikiroo/fanfix/reader/tui/TuiReaderStoryWindow.java b/src/be/nikiroo/fanfix/reader/tui/TuiReaderStoryWindow.java index 79840b9d..6ab92347 100644 --- a/src/be/nikiroo/fanfix/reader/tui/TuiReaderStoryWindow.java +++ b/src/be/nikiroo/fanfix/reader/tui/TuiReaderStoryWindow.java @@ -19,6 +19,7 @@ import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.fanfix.data.Paragraph; import be.nikiroo.fanfix.data.Paragraph.ParagraphType; import be.nikiroo.fanfix.data.Story; +import be.nikiroo.jexer.TSizeConstraint; import be.nikiroo.jexer.TTable; import be.nikiroo.utils.StringUtils; diff --git a/src/be/nikiroo/fanfix/reader/tui/TSizeConstraint.java b/src/be/nikiroo/jexer/TSizeConstraint.java similarity index 91% rename from src/be/nikiroo/fanfix/reader/tui/TSizeConstraint.java rename to src/be/nikiroo/jexer/TSizeConstraint.java index 859a6c35..39daa206 100644 --- a/src/be/nikiroo/fanfix/reader/tui/TSizeConstraint.java +++ b/src/be/nikiroo/jexer/TSizeConstraint.java @@ -1,4 +1,4 @@ -package be.nikiroo.fanfix.reader.tui; +package be.nikiroo.jexer; import java.util.List; @@ -54,12 +54,12 @@ public class TSizeConstraint { } // coordinates < 0 = from the other side, x2 or y2 = 0 = max size - static void setSize(List sizeConstraints, TWidget child, + static public void setSize(List sizeConstraints, TWidget child, Integer x1, Integer y1, Integer x2, Integer y2) { sizeConstraints.add(new TSizeConstraint(child, x1, y1, x2, y2)); } - static void resize(List sizeConstraints) { + static public void resize(List sizeConstraints) { for (TSizeConstraint sizeConstraint : sizeConstraints) { TWidget widget = sizeConstraint.getWidget(); Integer x1 = sizeConstraint.getX1();