|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.plaf.basic.BasicSplitPaneDivider
public class BasicSplitPaneDivider
Divider used by BasicSplitPaneUI. Subclassers may wish to override paint to do something more interesting. The border effect is drawn in BasicSplitPaneUI, so if you don't like that border, reset it there. To conditionally drag from certain areas subclass mousePressed and call super when you wish the dragging to begin.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans
package.
Please see XMLEncoder
.
Nested Class Summary | |
---|---|
protected class |
BasicSplitPaneDivider.DividerLayout
Used to layout a BasicSplitPaneDivider . |
protected class |
BasicSplitPaneDivider.DragController
Handles the events during a dragging session for a HORIZONTAL_SPLIT oriented split pane. |
protected class |
BasicSplitPaneDivider.MouseHandler
MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods. |
protected class |
BasicSplitPaneDivider.VerticalDragController
Handles the events during a dragging session for a VERTICAL_SPLIT oriented split pane. |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected int |
dividerSize
Size of the divider. |
protected BasicSplitPaneDivider.DragController |
dragger
Handles mouse dragging message to do the actual dragging. |
protected Component |
hiddenDivider
Divider that is used for noncontinuous layout mode. |
protected JButton |
leftButton
Button for quickly toggling the left component. |
protected BasicSplitPaneDivider.MouseHandler |
mouseHandler
Handles mouse events from both this class, and the split pane. |
protected static int |
ONE_TOUCH_OFFSET
|
protected static int |
ONE_TOUCH_SIZE
Width or height of the divider based on orientation BasicSplitPaneUI adds two to this. |
protected int |
orientation
Orientation of the JSplitPane. |
protected JButton |
rightButton
Button for quickly toggling the right component. |
protected JSplitPane |
splitPane
JSplitPane the receiver is contained in. |
protected BasicSplitPaneUI |
splitPaneUI
UI this instance was created from. |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BasicSplitPaneDivider(BasicSplitPaneUI ui)
Creates an instance of BasicSplitPaneDivider. |
Method Summary | |
---|---|
protected JButton |
createLeftOneTouchButton()
Creates and return an instance of JButton that can be used to collapse the left component in the split pane. |
protected JButton |
createRightOneTouchButton()
Creates and return an instance of JButton that can be used to collapse the right component in the split pane. |
protected void |
dragDividerTo(int location)
Messages the BasicSplitPaneUI with dragDividerTo that this instance is contained in. |
protected void |
finishDraggingTo(int location)
Messages the BasicSplitPaneUI with finishDraggingTo that this instance is contained in. |
BasicSplitPaneUI |
getBasicSplitPaneUI()
Returns the SplitPaneUI the receiver is currently
in. |
Border |
getBorder()
Returns the border of this component or null if no border is currently set. |
int |
getDividerSize()
Returns the size of the divider, that is the width if the splitpane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT. |
Insets |
getInsets()
If a border has been set on this component, returns the border's insets, else calls super.getInsets. |
Dimension |
getMinimumSize()
Returns dividerSize x dividerSize |
Dimension |
getPreferredSize()
Returns dividerSize x dividerSize |
boolean |
isMouseOver()
Returns whether or not the mouse is currently over the divider |
protected void |
oneTouchExpandableChanged()
Messaged when the oneTouchExpandable value of the JSplitPane the receiver is contained in changes. |
void |
paint(Graphics g)
Paints the divider. |
protected void |
prepareForDragging()
Message to prepare for dragging. |
void |
propertyChange(PropertyChangeEvent e)
Property change event, presumably from the JSplitPane, will message updateOrientation if necessary. |
void |
setBasicSplitPaneUI(BasicSplitPaneUI newUI)
Sets the SplitPaneUI that is using the receiver. |
void |
setBorder(Border border)
Sets the border of this component. |
void |
setDividerSize(int newSize)
Sets the size of the divider to newSize . |
protected void |
setMouseOver(boolean mouseOver)
Sets whether or not the mouse is currently over the divider. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int ONE_TOUCH_SIZE
protected static final int ONE_TOUCH_OFFSET
protected BasicSplitPaneDivider.DragController dragger
protected BasicSplitPaneUI splitPaneUI
protected int dividerSize
protected Component hiddenDivider
protected JSplitPane splitPane
protected BasicSplitPaneDivider.MouseHandler mouseHandler
protected int orientation
protected JButton leftButton
protected JButton rightButton
Constructor Detail |
---|
public BasicSplitPaneDivider(BasicSplitPaneUI ui)
Method Detail |
---|
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI)
public BasicSplitPaneUI getBasicSplitPaneUI()
SplitPaneUI
the receiver is currently
in.
public void setDividerSize(int newSize)
newSize
. That is
the width if the splitpane is HORIZONTAL_SPLIT
, or
the height of VERTICAL_SPLIT
.
public int getDividerSize()
public void setBorder(Border border)
public Border getBorder()
setBorder(javax.swing.border.Border)
public Insets getInsets()
getInsets
in class Container
setBorder(javax.swing.border.Border)
protected void setMouseOver(boolean mouseOver)
mouseOver
- whether or not the mouse is currently over the dividerpublic boolean isMouseOver()
Returns
- whether or not the mouse is currently over the dividerpublic Dimension getPreferredSize()
getPreferredSize
in class Container
Dimension
that represents
the preferred size of this container.Container.getMinimumSize()
,
Container.getLayout()
,
LayoutManager.preferredLayoutSize(Container)
,
Component.getPreferredSize()
public Dimension getMinimumSize()
getMinimumSize
in class Container
Dimension
that represents
the minimum size of this container.Container.getPreferredSize()
,
Container.getLayout()
,
LayoutManager.minimumLayoutSize(Container)
,
Component.getMinimumSize()
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
e
- A PropertyChangeEvent object describing the event source
and the property that has changed.public void paint(Graphics g)
paint
in class Container
g
- the specified Graphics windowComponent.update(Graphics)
protected void oneTouchExpandableChanged()
leftButton
and rightButton
if they
are null. invalidates the receiver as well.
protected JButton createLeftOneTouchButton()
protected JButton createRightOneTouchButton()
protected void prepareForDragging()
protected void dragDividerTo(int location)
protected void finishDraggingTo(int location)
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.