buoy.widget
Class WidgetContainer
public abstract class WidgetContainer
A WidgetContainer is a Widget which contains other Widgets. It is responsible for arranging them
on the screen. This is an abstract class. There are subclasses which provide different methods of
laying out Widgets.
abstract int | getChildCount() - Get the number of children in this container.
|
abstract Iterator | getChildren() - Get an Iterator listing all child Widgets.
|
boolean | isOpaque() - Determine whether this WidgetContainer is set to be opaque.
|
abstract void | layoutChildren() - Layout the child Widgets.
|
abstract void | remove(Widget widget) - Remove a child Widget from this container.
|
abstract void | removeAll() - Remove all child Widgets from this container.
|
void | setOpaque(boolean opaque) - Set whether this WidgetContainer should be opaque.
|
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 |
WidgetContainer
public WidgetContainer()
Create a WidgetContainer.
getChildCount
public abstract int getChildCount()
Get the number of children in this container.
getChildren
public abstract Iterator getChildren()
Get an Iterator listing all child Widgets.
isOpaque
public boolean isOpaque()
Determine whether this WidgetContainer is set to be opaque. If true, then it will be filled with its
background color before RepaintEvents are sent out for it or any of its children. If false, this Widget's
parent container will show through.
layoutChildren
public abstract 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.
remove
public abstract void remove(Widget widget)
Remove a child Widget from this container.
removeAll
public abstract void removeAll()
Remove all child Widgets from this container.
setOpaque
public void setOpaque(boolean opaque)
Set whether this WidgetContainer should be opaque. If true, then it will be filled with its background
color before RepaintEvents are sent out for it or any of its children. If false, this Widget's parent
container will show through.
Written by Peter Eastman.