|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbuoy.event.EventSource
buoy.widget.Widget
buoy.widget.WidgetContainer
buoy.widget.BorderContainer
public class BorderContainer
BorderContainer is a WidgetContainer which may have up to five children: one along each edge, and a fifth one in the center. When this container is resized, the center component grows to take up as much space as possible.
In addition to the event types generated by all Widgets, BorderContainers generate the following event types:
Nested Class Summary | |
---|---|
static class |
BorderContainer.Position
This inner class represents a position within the container. |
Field Summary | |
---|---|
static BorderContainer.Position |
CENTER
|
static BorderContainer.Position |
EAST
|
static BorderContainer.Position |
NORTH
|
static BorderContainer.Position |
SOUTH
|
static BorderContainer.Position |
WEST
|
Constructor Summary | |
---|---|
BorderContainer()
Create a new BorderContainer. |
Method Summary | |
---|---|
void |
add(Widget widget,
BorderContainer.Position where)
Add a Widget to this container, using the default LayoutInfo to position it. |
void |
add(Widget widget,
BorderContainer.Position where,
LayoutInfo layout)
Add a Widget to this container. |
Widget |
getChild(BorderContainer.Position where)
Get the child in a particular location. |
int |
getChildCount()
Get the number of children in this container. |
LayoutInfo |
getChildLayout(BorderContainer.Position where)
Get the LayoutInfo for the Widget in a particular location. |
LayoutInfo |
getChildLayout(Widget widget)
Get the LayoutInfo for a particular Widget. |
BorderContainer.Position |
getChildPosition(Widget widget)
Get the Position of a particular Widget. |
java.util.Collection<Widget> |
getChildren()
Get a Collection containing all child Widgets of this container. |
javax.swing.JPanel |
getComponent()
Get the java.awt.Component corresponding to this Widget. |
boolean |
getCornersAreVertical()
Get whether the vertical Widgets (EAST and WEST) or the horizontal Widgets (NORTH and SOUTH) extend all the way to the corners. |
LayoutInfo |
getDefaultLayout()
Get the default LayoutInfo. |
java.awt.Dimension |
getMinimumSize()
Get the smallest size at which this Widget can reasonably be drawn. |
java.awt.Dimension |
getPreferredSize()
Get the preferred size at which this Widget will look best. |
void |
layoutChildren()
Layout the child Widgets. |
void |
remove(BorderContainer.Position where)
Remove a child Widget from this container. |
void |
remove(Widget widget)
Remove a child Widget from this container. |
void |
removeAll()
Remove all child Widgets from this container. |
void |
setChildLayout(BorderContainer.Position where,
LayoutInfo layout)
Set the LayoutInfo for the Widget in a particular location. |
void |
setChildLayout(Widget widget,
LayoutInfo layout)
Set the LayoutInfo for a particular Widget. |
void |
setCornersAreVertical(boolean vertical)
Set whether the vertical Widgets (EAST and WEST) or the horizontal Widgets (NORTH and SOUTH) extend all the way to the corners. |
void |
setDefaultLayout(LayoutInfo layout)
Set the default LayoutInfo. |
Methods inherited from class buoy.widget.WidgetContainer |
---|
isOpaque, setOpaque |
Methods inherited from class buoy.widget.Widget |
---|
addEventLink, dispatchEvent, getBackground, getBounds, getCursor, getFont, getMaximumSize, getName, getParent, hasFocus, isEnabled, isFocusable, isVisible, repaint, requestFocus, setBackground, setCursor, setEnabled, setFocusable, setFont, setName, setVisible |
Methods inherited from class buoy.event.EventSource |
---|
addEventLink, addEventLink, removeEventLink |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final BorderContainer.Position CENTER
public static final BorderContainer.Position NORTH
public static final BorderContainer.Position EAST
public static final BorderContainer.Position SOUTH
public static final BorderContainer.Position WEST
Constructor Detail |
---|
public BorderContainer()
Method Detail |
---|
public javax.swing.JPanel getComponent()
Widget
getComponent
in class Widget
public int getChildCount()
getChildCount
in class WidgetContainer
public java.util.Collection<Widget> getChildren()
getChildren
in class WidgetContainer
public Widget getChild(BorderContainer.Position where)
where
- the location of the Widget to get (CENTER, NORTH, EAST, SOUTH, or WEST)public BorderContainer.Position getChildPosition(Widget widget)
widget
- the Widget for which to get the Position
public void layoutChildren()
layoutChildren
in class WidgetContainer
public void add(Widget widget, BorderContainer.Position where)
widget
- the Widget to addwhere
- the location to add it (CENTER, NORTH, EAST, SOUTH, or WEST)public void add(Widget widget, BorderContainer.Position where, LayoutInfo layout)
widget
- the Widget to addwhere
- the location to add it (CENTER, NORTH, EAST, SOUTH, or WEST)layout
- the LayoutInfo to use for this Widget. If null, the default LayoutInfo will be used.public LayoutInfo getChildLayout(BorderContainer.Position where)
where
- the location of the Widget (CENTER, NORTH, EAST, SOUTH, or WEST)
public void setChildLayout(BorderContainer.Position where, LayoutInfo layout)
where
- the location of the Widget (CENTER, NORTH, EAST, SOUTH, or WEST)layout
- the new LayoutInfo. If null, the default LayoutInfo will be used.public LayoutInfo getChildLayout(Widget widget)
widget
- the Widget for which to get the LayoutInfo
public void setChildLayout(Widget widget, LayoutInfo layout)
widget
- the Widget for which to set the LayoutInfolayout
- the new LayoutInfo. If null, the default LayoutInfo will be used.public LayoutInfo getDefaultLayout()
public void setDefaultLayout(LayoutInfo layout)
public void remove(Widget widget)
remove
in class WidgetContainer
widget
- the Widget to removepublic void remove(BorderContainer.Position where)
where
- the location of the Widget to remove (CENTER, NORTH, EAST, SOUTH, or WEST)public void removeAll()
removeAll
in class WidgetContainer
public boolean getCornersAreVertical()
public void setCornersAreVertical(boolean vertical)
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class Widget
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class Widget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |