public abstract class WindowWidget extends WidgetContainer
Constructor and Description |
---|
WindowWidget() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Close the window, and dispose of all resources associated with it.
|
java.awt.Window |
getComponent()
Get the java.awt.Component corresponding to this Widget.
|
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(java.awt.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.
|
getChildCount, getChildren, isOpaque, remove, removeAll, setOpaque
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, hasFocus, isEnabled, isFocusable, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName
addEventLink, addEventLink, removeEventLink
public java.awt.Window getComponent()
Widget
getComponent
in class Widget
public void setBounds(java.awt.Rectangle bounds)
public Widget getContent()
public void setContent(Widget contentWidget)
public void pack()
public void layoutChildren()
layoutChildren
in class WidgetContainer
public void dispose()
public void toFront()
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.
public void toBack()
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.
public boolean isVisible()
public void setVisible(boolean visible)
setVisible
in class Widget
public BButton getDefaultButton()
public void setDefaultButton(BButton button)
Written by Peter Eastman.