|
||||||||||
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.BSplitPane
public class BSplitPane
BSplitPane is a WidgetContainer whose space is divided between two child Widgets. A drag bar is placed between them, which the user can move to change how much space is given to each child.
In addition to the event types generated by all Widgets, BSplitPanes generate the following event types:
Nested Class Summary | |
---|---|
static class |
BSplitPane.Orientation
This inner class represents an orientation (horizontal or vertical) for the split. |
Field Summary | |
---|---|
static BSplitPane.Orientation |
HORIZONTAL
|
static BSplitPane.Orientation |
VERTICAL
|
Constructor Summary | |
---|---|
BSplitPane()
Create a new BSplitPane which is split horizontally to place its children side by side. |
|
BSplitPane(BSplitPane.Orientation orient)
Create a new BSplitPane. |
|
BSplitPane(BSplitPane.Orientation orient,
Widget child1,
Widget child2)
Create a new BSplitPane. |
Method Summary | |
---|---|
void |
add(Widget widget,
int index)
Add a Widget to this container. |
Widget |
getChild(int index)
Get one of the child Widgets. |
int |
getChildCount()
Get the number of children in this container. |
java.util.Collection<Widget> |
getChildren()
Get a Collection containing all child Widgets of this container. |
javax.swing.JSplitPane |
getComponent()
Get the java.awt.Component corresponding to this Widget. |
int |
getDividerLocation()
Get the location of the divider (in pixels). |
java.awt.Dimension |
getMinimumSize()
Get the smallest size at which this Widget can reasonably be drawn. |
BSplitPane.Orientation |
getOrientation()
Get which way the container is split, HORIZONTAL or VERTICAL. |
java.awt.Dimension |
getPreferredSize()
Get the preferred size at which this Widget will look best. |
double |
getResizeWeight()
Get how extra space is divided between the two child widgets. |
boolean |
isContinuousLayout()
Get whether the container should continuously resize its children as the divider bar is dragged, or only when the mouse is released. |
boolean |
isOneTouchExpandable()
Get whether the divider provides a control to collapse or expand the split with a single click. |
void |
layoutChildren()
Layout the child Widgets. |
void |
remove(int index)
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 |
resetToPreferredSizes()
Reposition the divider based on the minimum and preferred sizes of the child widgets, and the current resize weight. |
void |
setContinuousLayout(boolean continuous)
Set whether the container should continuously resize its children as the divider bar is dragged, or only when the mouse is released. |
void |
setDividerLocation(double location)
Set the location of the divider as a fraction of the total size of the container. |
void |
setDividerLocation(int location)
Set the location of the divider (in pixels). |
void |
setOneTouchExpandable(boolean expandable)
Set whether the divider provides a control to collapse or expand the split with a single click. |
void |
setOrientation(BSplitPane.Orientation orient)
Set which way the container is split, HORIZONTAL or VERTICAL. |
void |
setResizeWeight(double weight)
Set how extra space is divided between the two child widgets. |
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 BSplitPane.Orientation HORIZONTAL
public static final BSplitPane.Orientation VERTICAL
Constructor Detail |
---|
public BSplitPane()
public BSplitPane(BSplitPane.Orientation orient)
orient
- the split orientation (HORIZONTAL or VERTICAL)public BSplitPane(BSplitPane.Orientation orient, Widget child1, Widget child2)
orient
- the split orientation (HORIZONTAL or VERTICAL)child1
- the first (top or left) child Widgetchild2
- the second (bottom or right) child WidgetMethod Detail |
---|
public javax.swing.JSplitPane getComponent()
Widget
getComponent
in class Widget
public int getDividerLocation()
public void setDividerLocation(int location)
public void setDividerLocation(double location)
public void resetToPreferredSizes()
public BSplitPane.Orientation getOrientation()
public void setOrientation(BSplitPane.Orientation orient)
public boolean isContinuousLayout()
public void setContinuousLayout(boolean continuous)
public boolean isOneTouchExpandable()
public void setOneTouchExpandable(boolean expandable)
public double getResizeWeight()
public void setResizeWeight(double weight)
public int getChildCount()
getChildCount
in class WidgetContainer
public java.util.Collection<Widget> getChildren()
getChildren
in class WidgetContainer
public Widget getChild(int index)
index
- the index of the Widget to get (0 or 1)public void layoutChildren()
layoutChildren
in class WidgetContainer
public void add(Widget widget, int index)
widget
- the Widget to addindex
- the position at which to add it (0 or 1)public void remove(Widget widget)
remove
in class WidgetContainer
widget
- the Widget to removepublic void remove(int index)
index
- the index of the Widget to remove (0 or 1)public void removeAll()
removeAll
in class WidgetContainer
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 |