|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.plaf.basic.BasicSplitPaneDivider
public class BasicSplitPaneDivider
The divider that separates the two parts of a JSplitPane in the Basic look and feel.
Implementation status: We do not have a real implementation yet. Currently, it is mostly a stub to allow compiling other parts of the javax.swing.plaf.basic package, although some parts are already functional.
Nested Class Summary | |
---|---|
protected class |
BasicSplitPaneDivider.DividerLayout
This helper class acts as the Layout Manager for the divider. |
protected class |
BasicSplitPaneDivider.DragController
Performs the tasks associated with an ongoing drag operation. |
protected class |
BasicSplitPaneDivider.MouseHandler
The listener for handling mouse events from both the divider and the containing JSplitPane . |
protected class |
BasicSplitPaneDivider.VerticalDragController
This is a helper class that controls dragging when the orientation is VERTICAL_SPLIT. |
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
The thickness of the divider in pixels. |
protected BasicSplitPaneDivider.DragController |
dragger
An object that performs the tasks associated with an ongoing drag operation, or null if the user is currently not dragging
the divider. |
protected Component |
hiddenDivider
A divider that is used for layout purposes. |
protected JButton |
leftButton
The button for showing and hiding the left (or top) component of the JSplitPane . |
protected BasicSplitPaneDivider.MouseHandler |
mouseHandler
The listener for handling mouse events from both the divider and the containing JSplitPane . |
protected static int |
ONE_TOUCH_OFFSET
The distance the one touch buttons will sit from the divider's edges. |
protected static int |
ONE_TOUCH_SIZE
The width and height of the little buttons for showing and hiding parts of a JSplitPane in a single mouse click. |
protected int |
orientation
The current orientation of the containing JSplitPane , which
is either JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT . |
protected JButton |
rightButton
The button for showing and hiding the right (or bottom) component of the JSplitPane . |
protected JSplitPane |
splitPane
The JSplitPane containing this divider. |
protected BasicSplitPaneUI |
splitPaneUI
The delegate object that is responsible for the UI of the JSplitPane that contains this divider. |
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)
Constructs a new divider. |
Method Summary | |
---|---|
protected JButton |
createLeftOneTouchButton()
Creates a button for showing and hiding the left (or top) part of a JSplitPane . |
protected JButton |
createRightOneTouchButton()
Creates a button for showing and hiding the right (or bottom) part of a JSplitPane . |
protected void |
dragDividerTo(int location)
Drags the divider to a given location by calling the dragDividerTo method of the UI delegate of the enclosing
JSplitPane . |
protected void |
finishDraggingTo(int location)
Finishes a dragging gesture by calling the finishDraggingTo
method of the UI delegate of the enclosing JSplitPane . |
BasicSplitPaneUI |
getBasicSplitPaneUI()
Returns the delegate object that is responsible for the UI of the JSplitPane containing this divider. |
Border |
getBorder()
Retrieves the border of this divider. |
int |
getDividerSize()
Retrieves the thickness of the divider. |
Insets |
getInsets()
Retrieves the insets of the divider. |
Dimension |
getMinimumSize()
Returns the minimal size of this divider, which is dividerSize by dividerSize pixels. |
Dimension |
getPreferredSize()
Returns the preferred size of this divider, which is dividerSize by dividerSize pixels. |
protected void |
oneTouchExpandableChanged()
Reacts to changes of the oneToughExpandable property of the
containing JSplitPane . |
void |
paint(Graphics g)
Paints the divider by painting its border. |
protected void |
prepareForDragging()
Prepares the divider for dragging by calling the startDragging method of the UI delegate of the enclosing
JSplitPane . |
void |
propertyChange(PropertyChangeEvent e)
Processes events from the JSplitPane that contains this
divider. |
void |
setBasicSplitPaneUI(BasicSplitPaneUI newUI)
Sets the delegate object that is responsible for the UI of the JSplitPane containing this divider. |
void |
setBorder(Border border)
Sets the border of this divider. |
void |
setDividerSize(int newSize)
Sets the thickness of 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
null
if the user is currently not dragging
the divider.
protected BasicSplitPaneUI splitPaneUI
JSplitPane
that contains this divider.
protected int dividerSize
protected Component hiddenDivider
protected JSplitPane splitPane
protected BasicSplitPaneDivider.MouseHandler mouseHandler
JSplitPane
.
The reason for also handling MouseEvents from the containing
JSplitPane
is that users should be able to start a drag
gesture from inside the JSplitPane, but slightly outisde the divider.
protected int orientation
JSplitPane
, which
is either JSplitPane.HORIZONTAL_SPLIT
or JSplitPane.VERTICAL_SPLIT
.
protected JButton leftButton
JSplitPane
.
protected JButton rightButton
JSplitPane
.
Constructor Detail |
---|
public BasicSplitPaneDivider(BasicSplitPaneUI ui)
ui
- the UI delegate of the enclosing JSplitPane
.Method Detail |
---|
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI)
JSplitPane
containing this divider.
newUI
- the UI delegate, or null
to release the
connection to the current delegate.public BasicSplitPaneUI getBasicSplitPaneUI()
JSplitPane
containing this divider.
public void setDividerSize(int newSize)
newSize
- the new width or height in pixels.public int getDividerSize()
public void setBorder(Border border)
border
- the new border. Typically, this will be an instance of
BasicBorders.SplitPaneBorder
.public Border getBorder()
null
if no border has been
set.public Insets getInsets()
getBorderInsets
method is returned. Otherwise, the inherited implementation will be
invoked.
getInsets
in class Container
Border.getBorderInsets(java.awt.Component)
public Dimension getPreferredSize()
dividerSize
by dividerSize
pixels.
getPreferredSize
in class Container
Component.getMinimumSize()
,
Component.setPreferredSize(Dimension)
,
LayoutManager
public Dimension getMinimumSize()
dividerSize
by dividerSize
pixels.
getMinimumSize
in class Container
Component.getPreferredSize()
,
Component.setMinimumSize(Dimension)
,
LayoutManager
public void propertyChange(PropertyChangeEvent e)
JSplitPane
that contains this
divider.
propertyChange
in interface PropertyChangeListener
e
- The PropertyChangeEvent.public void paint(Graphics g)
paint
in class Container
g
- The Graphics Object to paint with.Component.update(Graphics)
protected void oneTouchExpandableChanged()
oneToughExpandable
property of the
containing JSplitPane
.
protected JButton createLeftOneTouchButton()
JSplitPane
.
protected JButton createRightOneTouchButton()
JSplitPane
.
protected void prepareForDragging()
startDragging
method of the UI delegate of the enclosing
JSplitPane
.
BasicSplitPaneUI.startDragging()
protected void dragDividerTo(int location)
dragDividerTo
method of the UI delegate of the enclosing
JSplitPane
.
location
- the new location of the divider.BasicSplitPaneUI.dragDividerTo(int location)
protected void finishDraggingTo(int location)
finishDraggingTo
method of the UI delegate of the enclosing JSplitPane
.
location
- the new, final location of the divider.BasicSplitPaneUI.finishDraggingTo(int location)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |