- java.lang.Object
-
- com.googlecode.lanterna.gui2.WindowList
-
public class WindowList extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Window
activeWindow
private boolean
hadWindowAtSomePoint
private java.util.List<Window>
stableOrderingOfWindows
private java.util.List<Window>
windows
-
Constructor Summary
Constructors Constructor Description WindowList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addWindow(Window window)
void
cycleActiveWindow(boolean reverse)
Switches the active window by cyclically shuffling the window list.Window
getActiveWindow()
private Window
getNextWindow(boolean reverse, Window window)
java.util.List<Window>
getWindowsInStableOrder()
java.util.List<Window>
getWindowsInZOrder()
boolean
isHadWindowAtSomePoint()
void
moveToBottom(Window window)
void
moveToTop(Window window)
boolean
removeWindow(Window window)
Removes the window from this WindowList.void
setActiveWindow(Window activeWindow)
-
-
-
Method Detail
-
getWindowsInZOrder
public java.util.List<Window> getWindowsInZOrder()
-
getWindowsInStableOrder
public java.util.List<Window> getWindowsInStableOrder()
-
setActiveWindow
public void setActiveWindow(Window activeWindow)
-
getActiveWindow
public Window getActiveWindow()
-
addWindow
public void addWindow(Window window)
-
removeWindow
public boolean removeWindow(Window window)
Removes the window from this WindowList.- Returns:
- true if this WindowList contained the specified Window
-
isHadWindowAtSomePoint
public boolean isHadWindowAtSomePoint()
-
moveToTop
public void moveToTop(Window window)
-
moveToBottom
public void moveToBottom(Window window)
-
cycleActiveWindow
public void cycleActiveWindow(boolean reverse)
Switches the active window by cyclically shuffling the window list. Ifreverse
parameter isfalse
then the current top window is placed at the bottom of the stack and the window immediately behind it is the new top. Ifreverse
is set totrue
then the window at the bottom of the stack is moved up to the front and the previous top window will be immediately below it- Parameters:
reverse
- Direction to cycle through the windows
-
-