com.sas.swing.visuals
Class FlatSplitPane

com.sas.swing.visuals.FlatSplitPane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class FlatSplitPane

FlatSplitPane provides a way of displaying a JSplitPane divider bar with no other decorations. It does this by removing the outer border of a split pane and then overriding the pane's paint method to only draw the divider. It handles various java Look & Feels, although there is an issue with the drag point for the Motif L&F.

See Also:
Serialized Form

Field Summary
protected  int bottomRightOffset
           
static int HORIZONTAL
           
protected  javax.swing.JSplitPane splitter
           
protected  int topLeftOffset
           
static int VERTICAL
           
protected  boolean visible
           
 
Constructor Summary
FlatSplitPane()
          Default constructor.
FlatSplitPane(int orientation)
          Constructor taking an orientation parameter, using default start/end offsets.
FlatSplitPane(int orientation, int offsetTopLeft, int offsetBottomRight)
          Constructor taking an orientation parameter and start/end offsets.
 
Method Summary
protected  void addAllListeners()
           
 javax.swing.JSplitPane getSplitter()
          Returns the internal JSplitPane.
 void setVisible(boolean mode)
          Sets the visibility state of the component.
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
See Also:
Constant Field Values

splitter

protected javax.swing.JSplitPane splitter

topLeftOffset

protected int topLeftOffset

bottomRightOffset

protected int bottomRightOffset

visible

protected boolean visible
Constructor Detail

FlatSplitPane

public FlatSplitPane()
Default constructor. Builds a vertical divider with default start/end offsets.


FlatSplitPane

public FlatSplitPane(int orientation)
Constructor taking an orientation parameter, using default start/end offsets.

Parameters:
orientation - Determines the orientation of the divider, either HORIZONTAL or VERTICAL.

FlatSplitPane

public FlatSplitPane(int orientation,
                     int offsetTopLeft,
                     int offsetBottomRight)
Constructor taking an orientation parameter and start/end offsets. If an offset of -1 is specified, the default value is used, which is 1/7th the dimension of the pane. If an offset less than -1, the offset is 1/(-X)th the dimension of the pane. Positive offsets represent the absolute number of pixels to use.

Parameters:
orientation - Determines the orientation of the divider, either HORIZONTAL or VERTICAL.
offsetTopLeft - The gap between the top or left edge of the panel and the divider.
offsetBottomRight - The gap between the bottom or right edge of the panel and the divider.
Method Detail

getSplitter

public javax.swing.JSplitPane getSplitter()
Returns the internal JSplitPane.

Returns:
The internal instance of JSplitPane.

setVisible

public void setVisible(boolean mode)
Sets the visibility state of the component.

Overrides:
setVisible in class javax.swing.JComponent
Parameters:
mode - Set to true to make the component visible, false otherwise.

addAllListeners

protected void addAllListeners()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.