charva.awt
Class Window
- Runnable
public class Window
implements Runnable
The Window class represents a "toplevel" window with
no decorative frame. The window is initially invisible; you must use
the show() method to make it visible.
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT , _alignmentX , _alignmentY , _background , _cursesColor , _enabled , _focusListeners , _foreground , _keyListeners , _origin , _parent , _visible |
void | addWindowListener(WindowListener listener_) - Register a WindowListener object for this window.
|
void | adjustLocation() - Adjust the position of the window so that it fits inside the screen.
|
void | debug(int level_)
|
void | draw() - Draw all the components in this window, and request the keyboard focus.
|
Point | getLocationOnScreen() - Overrides the method in the Component superclass, because a Window
has no parent container.
|
Window | getOwner() - Return the Window that is the "owner" of this Window.
|
void | hide() - Hide this window and all of its contained components.
|
boolean | isDisplayed() - Returns true if this Window is currently displayed.
|
boolean | isFocusTraversable() - A Window component will not receive input focus during keyboard focus
traversal using Tab and Shift-Tab.
|
void | pack() - Causes this Window to be sized to fit the preferred sizes and
layouts of its contained components.
|
protected void | processEvent(AWTEvent evt_) - Process an event off the event queue.
|
protected void | processWindowEvent(WindowEvent evt_) - Process window events occurring on this window by dispatching them
to any registered WindowListener objects.
|
void | run()
|
void | show() - Lay out the contained components, draw the window and its contained
components, and then read input events off the EventQueue and send
them to the component that has the input focus.
|
add , add , debug , doLayout , draw , getComponent , getComponentAt , getComponentAt , getComponentCount , getComponents , getCurrentFocus , getHeight , getInsets , getSize , getWidth , invalidate , isFocusTraversable , isValid , minimumSize , nextFocus , previousFocus , processKeyEvent , remove , requestFocus , setBackground , setFocus , setForeground , setHeight , setLayout , setSize , setSize , setWidth , validate |
addFocusListener , addKeyListener , contains , contains , debug , draw , getAlignmentX , getAlignmentY , getAncestorWindow , getBackground , getBounds , getCursesColor , getForeground , getHeight , getLocation , getLocationOnScreen , getName , getParent , getSize , getWidth , hasFocus , hide , invalidate , isDisplayed , isEnabled , isFocusTraversable , isTotallyObscured , isValid , isVisible , minimumSize , processEvent , processFocusEvent , processKeyEvent , processMouseEvent , repaint , requestFocus , requestSync , setBackground , setBounds , setBounds , setBounds , setEnabled , setForeground , setLocation , setLocation , setName , setParent , setVisible , show , validate , validateCursesColor |
Window
public Window(Frame owner_)
Window
public Window(Window owner_)
addWindowListener
public void addWindowListener(WindowListener listener_)
Register a WindowListener object for this window.
adjustLocation
public void adjustLocation()
Adjust the position of the window so that it fits inside the screen.
draw
public void draw()
Draw all the components in this window, and request the keyboard focus.
- draw in interface Container
getLocationOnScreen
public Point getLocationOnScreen()
Overrides the method in the Component superclass, because a Window
has no parent container.
Note that we return a COPY of the origin, not a reference to it, so
that the caller cannot modify our location via the returned value.
- getLocationOnScreen in interface Component
getOwner
public Window getOwner()
Return the Window that is the "owner" of this Window.
hide
public void hide()
Hide this window and all of its contained components.
This is done by putting a WINDOW_CLOSING event onto the queue.
- hide in interface Component
isDisplayed
public boolean isDisplayed()
Returns true if this Window is currently displayed.
- isDisplayed in interface Component
isFocusTraversable
public boolean isFocusTraversable()
A Window component will not receive input focus during keyboard focus
traversal using Tab and Shift-Tab.
- isFocusTraversable in interface Container
pack
public void pack()
Causes this Window to be sized to fit the preferred sizes and
layouts of its contained components.
processEvent
protected void processEvent(AWTEvent evt_)
Process an event off the event queue. This method can be extended by
subclasses of Window to deal with application-specific events.
- processEvent in interface Component
processWindowEvent
protected void processWindowEvent(WindowEvent evt_)
Process window events occurring on this window by dispatching them
to any registered WindowListener objects.
show
public void show()
Lay out the contained components, draw the window and its contained
components, and then read input events off the EventQueue and send
them to the component that has the input focus.
- show in interface Component