X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWindow.java;h=0e94808fd05c1b0e3e9342402f642d9b2ed7f5c2;hb=a06459bd6b0e65c9b590dbdf6ed9349043119215;hp=b850789ac380e9da32198f324cc14a07ce71dd7f;hpb=48e27807150e00bc9a92844382ebc8cedf1d265f;p=fanfix.git diff --git a/src/jexer/TWindow.java b/src/jexer/TWindow.java index b850789..0e94808 100644 --- a/src/jexer/TWindow.java +++ b/src/jexer/TWindow.java @@ -45,7 +45,7 @@ import static jexer.TKeypress.*; /** * TWindow is the top-level container and drawing surface for other widgets. */ -public class TWindow extends TWidget { +public class TWindow extends TWidget implements Comparable { /** * Window's parent TApplication. @@ -100,6 +100,24 @@ public class TWindow extends TWidget { */ private int z = 0; + /** + * Get Z order. Lower number means more in-front. + * + * @return Z value. Lower number means more in-front. + */ + public final int getZ() { + return z; + } + + /** + * Set Z order. Lower number means more in-front. + * + * @param z the new Z value. Lower number means more in-front. + */ + public final void setZ(final int z) { + this.z = z; + } + /** * If true, then the user clicked on the title bar and is moving the * window. @@ -275,8 +293,9 @@ public class TWindow extends TWidget { * @param that another TWindow instance * @return difference between this.z and that.z */ - public final int compare(final TWindow that) { - return (z - that.z); + @Override + public final int compareTo(final TWindow that) { + return (this.z - that.z); } /**