|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BorderPanel
A Panel with nine component slots - all the compass points, plus a central component. The central component stretches to take up all available space. Other components are scaled to fit their desired sizes, similar to a Java BorderLayout.
There are three possible ways to handle corners.
Field Summary | |
---|---|
static int |
CENTRAL
BorderPanel slot: middle |
static int |
CORNERS_HORIZONTALFILL
Fill corners horizontally - if the NE corner is empty, then the N component will stretch horizontally to fill it. |
static int |
CORNERS_LEAVEBLANK
Leave corners blank - if the NE corner is empty, then it will remain empty; the panel will have a blank space there. |
static int |
CORNERS_VERTICALFILL
Fill corners vertically - if the NE corner is empty, then the E component will stretch vertically to fill it. |
static int |
EAST
BorderPanel slot: right |
static int |
NORTH
BorderPanel slot: top |
static int |
NORTHEAST
BorderPanel slot: top right |
static int |
NORTHWEST
BorderPanel slot: top left |
static int |
SOUTH
BorderPanel slot: bottom |
static int |
SOUTHEAST
BorderPanel slot: bottom right |
static int |
SOUTHWEST
BorderPanel slot: bottom left |
static int |
WEST
BorderPanel slot: left |
Method Summary | |
---|---|
Widget |
get(int slot)
Retrieves the widget in one slot of the BorderPanel |
void |
set(int slot,
Widget w)
Sets the component in one slot of the BorderPanel. |
void |
setCornerHandling(int corners)
Control the way corners are handled, if a component isn't placed in those slots. |
void |
setSpacing(int spacing)
Sets the margin between grid rows/columns. |
Methods inherited from interface com.leafdigital.ui.api.Panel |
---|
remove, removeAll, setBorder |
Methods inherited from interface com.leafdigital.ui.api.Widget |
---|
getID, getOwner, informClosed, isVisible, setOwner, setVisible |
Methods inherited from interface com.leafdigital.ui.api.WidgetParent |
---|
getWidgets |
Field Detail |
---|
static final int NORTH
static final int NORTHEAST
static final int EAST
static final int SOUTHEAST
static final int SOUTH
static final int SOUTHWEST
static final int WEST
static final int NORTHWEST
static final int CENTRAL
static final int CORNERS_HORIZONTALFILL
static final int CORNERS_VERTICALFILL
static final int CORNERS_LEAVEBLANK
Method Detail |
---|
void set(int slot, Widget w)
slot
- Slot ID (BorderPanel.NORTH, etc.)w
- New component for slot (may be null to remove existing component)Widget get(int slot)
slot
- Slot ID (BorderPanel.NORTH, etc.)
void setSpacing(int spacing)
spacing
- Spacing in pixels (if in doubt, use 4)void setCornerHandling(int corners)
corners
- A CORNER_xxx constant
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |