|
JIDE 3.5.15 | ||||||||
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.JComponent javax.swing.JPanel com.jidesoft.swing.JideSplitPaneDivider
public class JideSplitPaneDivider
Divider used by JideSplitPane.
Nested Class Summary | |
---|---|
protected class |
JideSplitPaneDivider.DragController
Handles the events during a dragging session for a HORIZONTAL_SPLIT oriented split pane. |
protected class |
JideSplitPaneDivider.MouseHandler
MouseHandler is responsible for converting mouse events (released, dragged...) into the appropriate DragController methods. |
protected class |
JideSplitPaneDivider.OneTouchActionHandler
The actionListener that will listen for button presses on either the leftButton or the rightButton. |
protected class |
JideSplitPaneDivider.VerticalDragController
Handles the events during a dragging session for a VERTICAL_SPLIT oriented split pane. |
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected int |
_dividerSize
Size of the divider. |
protected JideSplitPaneDivider.DragController |
_dragger
Handles mouse dragging message to do the actual dragging. |
protected JideSplitPane |
_jideSplitPane
JideSplitPane the receiver is contained in. |
protected JButton |
_leftButton
Button for quickly toggling the left component. |
protected JideSplitPaneDivider.MouseHandler |
_mouseHandler
Handles mouse events from both this class, and the split pane. |
protected int |
_orientation
Orientation of the JideSplitPane. |
protected JButton |
_rightButton
Button for quickly toggling the right component. |
static int |
COLLAPSED_STATE
Indicates that the pane of the left of this component has been collapse by the one-touch button. |
static int |
DEFAULT_STATE
Indicates that this divider has not been expanded or collapsed. |
static int |
EXPANDED_STATE
Indicates that the pane of the right of this component has been collapse by the one-touch button. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
---|---|
JideSplitPaneDivider(JideSplitPane splitPane)
Creates an instance of BasicJideSplitPaneDivider. |
Method Summary | |
---|---|
void |
collapse()
Collapses the divider to the left side (or to the top if vertically). |
protected JButton |
createLeftOneTouchButton()
Builds the Button that can be used to collapse the component to the left/above this divider. |
protected JideSplitPaneDivider.MouseHandler |
createMouseHandler()
|
protected JButton |
createRightOneTouchButton()
Builds the rightButton that can be used to expand/collapse a split panes divider to the right. |
protected void |
dragDividerTo(int location)
|
void |
expand()
Expands the divider to the right side (or to the bottom if vertically). |
protected void |
finishDraggingTo(int location)
|
int |
getCurrentState()
Gets the current collapse/expand state. |
protected Color |
getDarkShadowColor()
Returns a dark shadow color. |
int |
getDividerSize()
Returns the size of the divider, that is the width if the split pane is HORIZONTAL_SPLIT, or the height of VERTICAL_SPLIT. |
Component |
getFirstComponent(boolean ignoreVisibility)
Gets the first component. |
JideSplitPane |
getJideSplitPane()
Gets the JideSplitPane . |
Dimension |
getMinimumSize()
Returns dividerSize x dividerSize |
protected int |
getNextDividerLocation(boolean ignoreVisibility,
boolean reversed)
|
Dimension |
getPreferredSize()
Returns dividerSize x dividerSize |
protected int |
getPreviousDividerLocation(boolean ignoreVisibility,
boolean reversed)
|
Component |
getSecondComponent(boolean ignoreVisibility)
Gets the second component. |
protected void |
oneTouchExpandableChanged()
Invoked when the oneTouchExpandable value of the JideSplitPane changes. |
void |
paintComponent(Graphics g)
Paints the divider. |
protected void |
prepareForDragging()
Message to prepare for dragging. |
void |
propertyChange(PropertyChangeEvent e)
Property change event, presumably from the JideSplitPane, will message updateOrientation if necessary. |
void |
setDefaultResizeCursor()
|
void |
setDividerSize(int newSize)
Sets the size of the divider to newSize . |
void |
setJideSplitPane(JideSplitPane splitPane)
Sets the JideSplitPane that is using this divider. |
void |
updateUI()
Resets the UI property to a value from the current look and feel. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JideSplitPaneDivider.DragController _dragger
protected int _dividerSize
protected JideSplitPane _jideSplitPane
protected JideSplitPaneDivider.MouseHandler _mouseHandler
protected int _orientation
public static final int COLLAPSED_STATE
public static final int DEFAULT_STATE
public static final int EXPANDED_STATE
protected JButton _leftButton
protected JButton _rightButton
Constructor Detail |
---|
public JideSplitPaneDivider(JideSplitPane splitPane)
splitPane
- the JideSplitPane.Method Detail |
---|
public void setDefaultResizeCursor()
public JideSplitPane getJideSplitPane()
JideSplitPane
.
JideSplitPane
public void setJideSplitPane(JideSplitPane splitPane)
splitPane
- the JideSplitPane.protected JideSplitPaneDivider.MouseHandler createMouseHandler()
public void setDividerSize(int newSize)
newSize
. That is the width if the split pane is
HORIZONTAL_SPLIT
, or the height of VERTICAL_SPLIT
.
newSize
- the new divider size.public int getDividerSize()
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
public void updateUI()
JComponent
subclasses must
override this method like this:
public void updateUI() { setUI((SliderUI)UIManager.getUI(this); }
updateUI
in class JPanel
JPanel.setUI(javax.swing.plaf.PanelUI)
,
UIManager.getLookAndFeel()
,
UIManager.getUI(javax.swing.JComponent)
public void paintComponent(Graphics g)
paintComponent
in class JComponent
protected void prepareForDragging()
protected void dragDividerTo(int location)
protected void finishDraggingTo(int location)
protected int getPreviousDividerLocation(boolean ignoreVisibility, boolean reversed)
protected int getNextDividerLocation(boolean ignoreVisibility, boolean reversed)
public Component getFirstComponent(boolean ignoreVisibility)
ignoreVisibility
- true to not check if the component is visible.
public Component getSecondComponent(boolean ignoreVisibility)
ignoreVisibility
- true to not check if the component is visible.
protected void oneTouchExpandableChanged()
Responsible for creating the one-touch buttons and revalidating the UI. #see JideSplitePane#setOneTouchExpandable(boolean)
protected JButton createLeftOneTouchButton()
public int getCurrentState()
JideSplitPane.isOneTouchExpandable()
returns false.
It could be EXPANDED_STATE or COLLAPSED_STATE when one touch expandable is activated.
protected JButton createRightOneTouchButton()
protected Color getDarkShadowColor()
public void collapse()
public void expand()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |