|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.Component
pivot.wtk.Container
pivot.wtk.Window
public class Window
Top-level container representing the entry point into a user interface. Windows are direct descendants of the display.
Nested Class Summary | |
---|---|
class |
Window.ActionDictionary
Action dictionary implementation. |
Nested classes/interfaces inherited from class pivot.wtk.Component |
---|
Component.Attributes, Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Nested classes/interfaces inherited from interface pivot.collections.Sequence |
---|
Sequence.Search, Sequence.Sort, Sequence.Tree |
Constructor Summary | |
---|---|
Window()
|
|
Window(boolean auxilliary)
|
|
Window(Component content)
|
|
Window(Component content,
boolean auxilliary)
|
Method Summary | |
---|---|
void |
align(Bounds bounds,
HorizontalAlignment horizontalAlignment,
int horizontalOffset,
VerticalAlignment verticalAlignment,
int verticalOffset)
|
void |
align(Bounds bounds,
HorizontalAlignment horizontalAlignment,
VerticalAlignment verticalAlignment)
|
void |
close()
Closes the window. |
Window.ActionDictionary |
getActions()
Returns the global action map for this window. |
Component |
getActiveDescendant()
Returns the window descendant that currently has the focus. |
static Window |
getActiveWindow()
Returns the currently active window. |
Component |
getContent()
|
Image |
getIcon()
Returns the window's icon. |
Window |
getOwnedWindow(int index)
|
int |
getOwnedWindowCount()
|
Window |
getOwner()
|
Window |
getRootOwner()
|
String |
getTitle()
Returns the window's title. |
static ListenerList<WindowClassListener> |
getWindowClassListeners()
|
ListenerList<WindowListener> |
getWindowListeners()
|
ListenerList<WindowStateListener> |
getWindowStateListeners()
|
boolean |
isActive()
Returns the window's active state. |
boolean |
isAuxilliary()
Returns the window's auxilliary flag. |
boolean |
isClosed()
Returns this window's closed state. |
boolean |
isClosing()
Returns this window's closing state. |
boolean |
isMaximized()
|
boolean |
isOpen()
Returns this window's open state. |
boolean |
isOpening()
Returns this window's opening state. |
boolean |
isOwner(Window window)
Tests whether this window is an owning ancestor of a given window. |
protected boolean |
mouseDown(Mouse.Button button,
int x,
int y)
|
void |
moveToBack()
Moves the window to the bottom of the window stack. |
void |
moveToFront()
Moves the window to the top of the window stack. |
void |
open(Display display)
Opens the window. |
void |
open(Window owner)
Opens the window. |
Sequence<Component> |
remove(int index,
int count)
Removes one or more items from the sequence. |
protected void |
setActive(boolean active)
Called to notify a window that its active state has changed. |
protected void |
setActiveDescendant(Component activeDescendant)
Sets the window's active descendant, the descendant that currently has the focus. |
static void |
setActiveWindow(Window activeWindow)
Sets the active window. |
void |
setContent(Component content)
|
void |
setDisplayable(boolean displayable)
Sets the displayable state of this window and all of its owned descendant windows. |
void |
setEnabled(boolean enabled)
Sets the enabled state of this window and all of its owned descendant windows. |
void |
setIcon(Image icon)
Sets the window's icon. |
void |
setIcon(String icon)
Sets the window's icon by resource name. |
void |
setIcon(URL icon)
Sets the window's icon by URL. |
void |
setMaximized(boolean maximized)
|
void |
setOwner(Window owner)
|
protected void |
setParent(Container parent)
|
void |
setTitle(String title)
Sets the window's title. |
Methods inherited from class pivot.wtk.Container |
---|
add, containsFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getContextKey, getDescendantAt, getFocusTraversalPolicy, getLength, indexOf, insert, isAncestor, isFocusable, iterator, load, mouseClick, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, requestFocus, setContextKey, setFocusTraversalPolicy, setTooltip, setVisible, store, update, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Window()
public Window(boolean auxilliary)
public Window(Component content)
public Window(Component content, boolean auxilliary)
Method Detail |
---|
protected void setParent(Container parent)
setParent
in class Container
public Sequence<Component> remove(int index, int count)
Sequence
remove
in interface Sequence<Component>
remove
in class Container
index
- The starting index to remove.count
- The number of items to remove, beginning with index.
public void setDisplayable(boolean displayable)
setDisplayable
in class Component
displayable
- If true, the window and its owned descendants are displayable;
otherwise, they are not displayable.public void setEnabled(boolean enabled)
setEnabled
in class Container
enabled
- If true, the window and its owned descendants are enabled;
otherwise, they are not enabled.public Window getOwner()
public void setOwner(Window owner)
public Window getRootOwner()
public Window getOwnedWindow(int index)
public int getOwnedWindowCount()
public boolean isOwner(Window window)
window
-
public boolean isOpen()
public boolean isOpening()
public void open(Display display)
display
- The display on which the window will be opened.public void open(Window owner)
owner
- The window's owner.public boolean isClosed()
public boolean isClosing()
public void close()
public String getTitle()
public void setTitle(String title)
title
- The new title, or null for no title.public Image getIcon()
public void setIcon(Image icon)
icon
- The window's icon, or null for no icon.public void setIcon(URL icon)
icon
- The location of the icon to set.public void setIcon(String icon)
icon
- The resource name of the icon to set.public Component getContent()
public void setContent(Component content)
public boolean isAuxilliary()
public boolean isActive()
protected void setActive(boolean active)
active
- public static Window getActiveWindow()
public static void setActiveWindow(Window activeWindow)
activeWindow
- The window to activate, or null to clear the active window.public Component getActiveDescendant()
protected void setActiveDescendant(Component activeDescendant)
activeDescendant
- public Window.ActionDictionary getActions()
public void moveToFront()
All windows owned by this window are subsequently moved to the front, ensuring that this window's owned windows remain on top of it.
Finally, the window is made active and focus is restored to the most recently focused decendant component.
public void moveToBack()
public boolean isMaximized()
public void setMaximized(boolean maximized)
public void align(Bounds bounds, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)
public void align(Bounds bounds, HorizontalAlignment horizontalAlignment, int horizontalOffset, VerticalAlignment verticalAlignment, int verticalOffset)
protected boolean mouseDown(Mouse.Button button, int x, int y)
mouseDown
in class Container
public ListenerList<WindowListener> getWindowListeners()
public ListenerList<WindowStateListener> getWindowStateListeners()
public static ListenerList<WindowClassListener> getWindowClassListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |