buoy.widget
Class WindowWidget
public abstract class WindowWidget
A WindowWidget is a WidgetContainer corresponding to a window. This is an abstract class, with
subclasses for particular types of windows.
void | dispose() - Close the window, and dispose of all resources associated with it.
|
Window | getComponent()
|
Widget | getContent() - Get the Widget that holds the main contents of the window.
|
BButton | getDefaultButton() - Get the default button for this window.
|
boolean | isVisible() - Determine whether this Widget is currently visible.
|
void | layoutChildren() - Layout the child Widgets.
|
void | pack() - Select an appropriate size for the window, based on the preferred size of its contents, then re-layout
all of the window contents.
|
void | setBounds(Rectangle bounds) - Set the position and size of the window, then re-layout the window contents.
|
void | setContent(Widget contentWidget) - Set the Widget that holds the main contents of the window.
|
void | setDefaultButton(BButton button) - Set the default button for this window.
|
void | setVisible(boolean visible) - Set whether this Widget should be visible.
|
void | toBack() - Request that this window be sent to the back, so that it is displayed behind all other
windows.
|
void | toFront() - Request that this window be brought to the front, so that it is displayed over all other
windows.
|
addEventLink , dispatchEvent , getBackground , getBounds , getComponent , getCursor , getFont , getMaximumSize , getMinimumSize , getName , getParent , getPreferredSize , hasFocus , isEnabled , isFocusable , isVisible , repaint , requestFocus , setBackground , setCursor , setEnabled , setFocusable , setFont , setName , setVisible |
dispose
public void dispose()
Close the window, and dispose of all resources associated with it.
getContent
public Widget getContent()
Get the Widget that holds the main contents of the window.
getDefaultButton
public BButton getDefaultButton()
Get the default button for this window. If the user presses the Return or Enter key
while the window has focus, it will be treated as if they had clicked the default
button (unless another Widget first consumes the event). The default button is
typically drawn differently to indicate its special status. This may be null.
isVisible
public boolean isVisible()
Determine whether this Widget is currently visible.
- isVisible in interface Widget
layoutChildren
public void layoutChildren()
Layout the child Widgets. This may be invoked whenever something has changed (the size of this
WidgetContainer, the preferred size of one of its children, etc.) that causes the layout to no
longer be correct. If a child is itself a WidgetContainer, its layoutChildren() method will be
called in turn.
- layoutChildren in interface WidgetContainer
pack
public void pack()
Select an appropriate size for the window, based on the preferred size of its contents, then re-layout
all of the window contents.
setBounds
public void setBounds(Rectangle bounds)
Set the position and size of the window, then re-layout the window contents.
setContent
public void setContent(Widget contentWidget)
Set the Widget that holds the main contents of the window.
setDefaultButton
public void setDefaultButton(BButton button)
Set the default button for this window. If the user presses the Return or Enter key
while the window has focus, it will be treated as if they had clicked the default
button (unless another Widget first consumes the event). The default button is
typically drawn differently to indicate its special status. This may be null.
setVisible
public void setVisible(boolean visible)
Set whether this Widget should be visible.
- setVisible in interface Widget
toBack
public void toBack()
Request that this window be sent to the back, so that it is displayed behind all other
windows.
Note that the behavior of this method is highly platform dependent. It is not guaranteed
to work on all platforms. In addition, this method may or may not affect which Widget
has focus.
toFront
public void toFront()
Request that this window be brought to the front, so that it is displayed over all other
windows.
Note that the behavior of this method is highly platform dependent. It is not guaranteed
to work on all platforms. In addition, this method may or may not affect which Widget
has focus.
Written by Peter Eastman.