|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Component
org.apache.pivot.wtk.Container
org.apache.pivot.wtk.Window
@DefaultProperty(value="content") public class Window
Top-level container representing the entry point into a user interface. Windows are direct descendants of the display.
Nested Class Summary | |
---|---|
static class |
Window.ActionMapping
Class representing a mapping from keystrokes to actions. |
class |
Window.ActionMappingSequence
|
class |
Window.IconImageSequence
|
static interface |
Window.Skin
Window skin interface. |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Container |
---|
Container.EDT_Checker |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.Component |
---|
Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence |
---|
Sequence.Tree<T> |
Constructor Summary | |
---|---|
Window()
|
|
Window(Component content)
|
Method Summary | |
---|---|
void |
align(Bounds bounds,
HorizontalAlignment horizontalAlignment,
int horizontalOffset,
VerticalAlignment verticalAlignment,
int verticalOffset)
|
void |
align(Bounds bounds,
HorizontalAlignment horizontalAlignment,
VerticalAlignment verticalAlignment)
|
static void |
clearActive()
Clears the active window. |
void |
clearFocusDescendant()
Clears the window descendant to which focus will be restored when this window is moved to the front, meaning that when this window is moved to front, focus will not be restored to the window. |
void |
close()
Closes the window and all of its owned windows. |
protected void |
descendantGainedFocus(Component descendant,
Component previousFocusedComponent)
|
protected void |
descendantRemoved(Component descendant)
|
Window.ActionMappingSequence |
getActionMappings()
Returns the action mappings for this window. |
static Window |
getActiveWindow()
Returns the currently active window. |
Bounds |
getClientArea()
Returns the bounds of the window's client area. |
Component |
getContent()
|
Component |
getFocusDescendant()
Returns the window descendant to which focus will be restored when this window is moved to the front. |
Window.IconImageSequence |
getIcons()
Returns the icons for this window. |
Window |
getOwnedWindow(int index)
|
int |
getOwnedWindowCount()
|
Window |
getOwner()
|
Window |
getRootOwner()
|
String |
getTitle()
Returns the window's title. |
ListenerList<WindowActionMappingListener> |
getWindowActionMappingListeners()
|
static ListenerList<WindowClassListener> |
getWindowClassListeners()
|
ListenerList<WindowListener> |
getWindowListeners()
|
ListenerList<WindowStateListener> |
getWindowStateListeners()
|
boolean |
isActive()
Returns the window's active state. |
boolean |
isBottomMost()
Determines if this is the bottom-most window. |
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. |
boolean |
isTopMost()
Determines if this is the top-most window. |
boolean |
keyPressed(int keyCode,
Keyboard.KeyLocation keyLocation)
|
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(Display display,
Window ownerArgument)
Opens the window. |
void |
open(Window ownerArgument)
Opens the window. |
Sequence<Component> |
remove(int index,
int count)
Removes one or more items from the sequence. |
boolean |
requestActive()
Requests that this window become the active window. |
protected void |
setActive(boolean active,
Window obverseWindow)
Called to notify a window that its active state has changed. |
void |
setContent(Component content)
|
void |
setEnabled(boolean enabled)
Sets the component's enabled state. |
void |
setIcon(String iconName)
Sets the window's icon by resource name. |
void |
setIcon(URL iconURL)
Sets the window's icon by URL. |
void |
setMaximized(boolean maximized)
|
protected void |
setParent(Container parent)
|
void |
setTitle(String title)
Sets the window's title. |
void |
setVisible(boolean visible)
Sets the component's visibility. |
Methods inherited from class org.apache.pivot.wtk.Container |
---|
add, assertEventDispatchThread, assertEventDispatchThread, clear, containsFocus, descendantAdded, descendantLostFocus, get, getComponentAt, getContainerListeners, getContainerMouseListeners, getDescendantAt, getFocusTraversalPolicy, getGraphics, getLength, getNamedComponent, indexOf, insert, invalidate, isAncestor, isDoubleBuffered, iterator, layout, load, mouseClick, mouseDown, mouseMove, mouseOut, mouseUp, mouseWheel, move, paint, remove, removeAll, repaint, requestFocus, setDoubleBuffered, setEventDispatchThreadChecker, setFocusTraversalPolicy, store, transferFocus, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Window()
public Window(Component content)
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 setVisible(boolean visible)
Component
setVisible
in class Container
visible
- true if the component should be painted; false,
otherwise.public void setEnabled(boolean enabled)
Component
setEnabled
in class Component
enabled
- true if the component is enabled; false, otherwise.public Window getOwner()
public Window getRootOwner()
public Window getOwnedWindow(int index)
public int getOwnedWindowCount()
public boolean isOwner(Window window)
window
-
public boolean isOpen()
public boolean isOpening()
public final void open(Display display)
display
- public final void open(Window ownerArgument)
ownerArgument
- The window's owner. The window is opened on the owner's display.public void open(Display display, Window ownerArgument)
Note that this method is not a synchronous call, it schedules an event to open the window.
display
- The display on which the window will be opened.ownerArgument
- The window's owner, or null if the window has no 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 Window.IconImageSequence getIcons()
public void setIcon(URL iconURL)
If the icon already exists in the application context resource cache, the cached value will be used. Otherwise, the icon will be loaded synchronously and added to the cache.
iconURL
- The location of the icon to set.public void setIcon(String iconName)
iconName
- The resource name of the icon to set.setIcon(URL)
public Component getContent()
public void setContent(Component content)
public Bounds getClientArea()
public boolean isActive()
public boolean requestActive()
protected void setActive(boolean active, Window obverseWindow)
active
- obverseWindow
- public static Window getActiveWindow()
public static void clearActive()
public Component getFocusDescendant()
public void clearFocusDescendant()
protected void descendantGainedFocus(Component descendant, Component previousFocusedComponent)
descendantGainedFocus
in class Container
protected void descendantRemoved(Component descendant)
descendantRemoved
in class Container
public Window.ActionMappingSequence getActionMappings()
public boolean isTopMost()
public boolean isBottomMost()
public void moveToFront()
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)
public boolean keyPressed(int keyCode, Keyboard.KeyLocation keyLocation)
keyPressed
in class Component
public ListenerList<WindowListener> getWindowListeners()
public ListenerList<WindowStateListener> getWindowStateListeners()
public ListenerList<WindowActionMappingListener> getWindowActionMappingListeners()
public static ListenerList<WindowClassListener> getWindowClassListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |