buoy.widget
Class BOutline
A BOutline is a WidgetContainer that draws an outline around another Widget. The appearance
of the outline is determined by a javax.swing.border.Border object. There are static methods
for creating several common types of outlines, or you can use a different type by providing
your own Border object.
BOutline() - Create a new BOutline with no content Widget and no border.
|
BOutline(Widget content, Border border) - Create a new BOutline.
|
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 |
BOutline
public BOutline()
Create a new BOutline with no content Widget and no border.
BOutline
public BOutline(Widget content,
Border border)
Create a new BOutline.
content
- the Widget to use as the content of the BOutlineborder
- the outline to draw around the content Widget
createBevelBorder
public static BOutline createBevelBorder(Widget content,
boolean raised)
Create a BOutline with a beveled border.
content
- the Widget to use as the content of the BOutlineraised
- if true, the border will have a raised appearance. If false, it will
have a lowered appearance.
createEmptyBorder
public static BOutline createEmptyBorder(Widget content,
int thickness)
Create a BOutline with an empty border.
content
- the Widget to use as the content of the BOutlinethickness
- the thickness of the border
createEtchedBorder
public static BOutline createEtchedBorder(Widget content,
boolean raised)
Create a BOutline with an etched border.
content
- the Widget to use as the content of the BOutlineraised
- if true, the border will have a raised appearance. If false, it will
have a lowered appearance.
createLineBorder
public static BOutline createLineBorder(Widget content,
Color color,
int thickness)
Create a BOutline with a line border.
content
- the Widget to use as the content of the BOutlinecolor
- the color of the borderthickness
- the thickness of the border
getBorder
public Border getBorder()
Get the Border object which draws this Widget's outline.
getChildren
public Collection getChildren()
Get a Collection containing all child Widgets of this container.
- getChildren in interface WidgetContainer
getContent
public Widget getContent()
Get the content Widget.
getMaximumSize
public Dimension getMaximumSize()
Get the largest size at which this Widget can reasonably be drawn. When a WidgetContainer lays out
its contents, it will attempt never to make this Widget larger than its maximum size.
- getMaximumSize in interface Widget
getMinimumSize
public Dimension getMinimumSize()
Get the smallest size at which this Widget can reasonably be drawn. When a WidgetContainer lays out
its contents, it will attempt never to make this Widget smaller than its minimum size.
- getMinimumSize in interface Widget
getPreferredSize
public Dimension getPreferredSize()
Get the preferred size at which this Widget will look best. When a WidgetContainer lays out
its contents, it will attempt to make this Widget as close as possible to its preferred size.
- getPreferredSize 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
setBorder
public void setBorder(Border border)
Set the Border object which draws this Widget's outline.
setContent
public void setContent(Widget contentWidget)
Set the content Widget.
Written by Peter Eastman.