Class symantec.itools.awt.SplitterPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.SplitterPanel

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----symantec.itools.awt.SplitterPanel

public class SplitterPanel
extends Panel
Use to create a container that can be divided into a number of subpanels which holds visual components and other panels, and specifically to: The SplitterPanel component is the parent Panel containing a set of subpanels. You must write code to divide the parent panel into subpanels. You must set panel defaults in your project source code.

The SplitterPanel automatically recognizes the mouseDragged as the command to resize the appropriate subpanel boundary.

Subpanels can be resized at runtime by dragging panel borders with the mouse.

This code example splits a SplitterPanel into four subpanels and adds a button to two of the subpanels.

Individual subpanels can be accessed in code using any of these methods: getBottomLeftPanel, getBottomPanel, getBottomRightPanel, getLeftPanel, getRightPanel, getSub2Panel, getSubPanel, getTopLeftPanel, getTopPanel, getTopRightPanel.

Version:
1.1, July 15, 1997
Author:
Symantec

Variable Index

 o SPLIT3_BOTTOM
Panel split constant for the SplitterPanel constructor.
 o SPLIT3_LEFT
Panel split constant for the SplitterPanel constructor.
 o SPLIT3_RIGHT
Panel split constant for the SplitterPanel constructor.
 o SPLIT3_TOP
Panel split constant for the SplitterPanel constructor.
 o SPLIT_BOTH
Panel split constant for the SplitterPanel constructor.
 o SPLIT_BOTH_V
Panel split constant for the SplitterPanel constructor.
 o SPLIT_HOR
Indicates a horizontal panel split.
 o SPLIT_HORIZONTAL
Horizontal panel split constant for the SplitterPanel constructor.
 o SPLIT_NONE
Panel contains no subpanels, initial state.
 o SPLIT_VER
Indicates a vertical panel split.
 o SPLIT_VERTICAL
Vertical panel split constant for the SplitterPanel constructor.
 o allowDynamicMoving
This flag specifies if moving of a split in a splitter panel will be real time, or delayed until mouse released.
 o bOsFlag
Internal use only.
 o curDim
Current component dimensions.
 o curLoc
The current location of this component.
 o cursorCh
Internal use only.
 o cursorChanged
Internal use only.
 o doMoveSplit
Internal flag indicating split being moved.
 o enforceMinDim
Enforce minimum dimension mode flag.
 o errors
Error strings.
 o gapColor
The color of the gap between panels and around the outside border.
 o heightOnly
Internal flag indicating a reshape in height only.
 o iBdrSize
The size of the border drawn between panels, in pixels.
 o iGapHeight
The split height between panels, in pixels.
 o iGapWidth
The split width between panels, in pixels.
 o innerSP
Internal use only.
 o isOuter
Internal use only.
 o minDim
Dimension variables.
 o moveFromX
Internal use only.
 o moveFromY
Internal use only.
 o moveSplitCursor
Determines the cursor to use when dragging the split between panels.
 o oBdrSize
The size of the border drawn around the outside of the SplitterPanel, in pixels.
 o oGapHeight
The gap height inside the border, in pixels.
 o oGapWidth
The gap width inside the border, in pixels.
 o outerSP
Internal use only.
 o prefDim
Dimension variables.
 o propResize
The "resize propagation" mode flag.
 o spComponent
The component contained within this panel.
 o splitType
The type of split for this SplitterPanel.
 o sub1
Sub-panel 1 of 2.
 o sub2
Sub-panel 2 of 2.
 o use3dBdr
This flag specifies how to draw the border around panels.
 o widthOnly
Internal flag indicating a reshape in width only.

Constructor Index

 o symantec.itools.awt.SplitterPanel()
Constructs a new default SplitterPanel.
 o symantec.itools.awt.SplitterPanel(int, int)
Constructs a new SplitterPanel of the specified size which is ready to be split into panels.
 o symantec.itools.awt.SplitterPanel(int, int, int)
Constructs a new SplitterPanel of specified size which is split into panels.
 o symantec.itools.awt.SplitterPanel(int)
Constructs a new SplitterPanel which is split into panels.
 o symantec.itools.awt.SplitterPanel(int, Component, Component, Component, Component)
Constructs a new SplitterPanel which is split into panels to which components are added.

Method Index

 o add(Component, int)
Adds a component to the end of this container.
 o add(Component)
Adds a component to the end of this container.
 o addNotify()
Tells this component that it has been added to a container.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addSplitTypeListener(PropertyChangeListener)
Adds a property listener for SplitType changes.
 o addSplitTypeListener(VetoableChangeListener)
Adds a vetoable listener for SplitType changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o adjustOGapBdr()
Utility method to constrain the gap width/height inside the border to good values.
 o draw3DBdr(Graphics, int, int, int, int, int, Color, boolean)
Utility method to draw the border.
 o gapColor()
 o getBottomLeftPanel()
Gets the bottom left panel.
 o getBottomPanel()
Gets the bottom panel of a horizontally split SplitterPanel.
 o getBottomRightPanel()
Gets the bottom right panel.
 o getComponent()
Gets the component in this SplitterPanel.
 o getComponentCount()
Returns number of components in this container.
 o getComponents()
Returns all of the components in this container.
 o getEnforceMinDim()
 o getGapColor()
Gets the color of the gap between panels and around the outside border.
 o getLeftPanel()
Gets the left panel of a vertically split SplitterPanel.
 o getMouseListener()
Returns the mouse event handling object.
 o getMoveSplitCursor()
The cursor to use when dragging the split between panels.
 o getPropResize()
 o getRightPanel()
Gets the right panel of a vertically split SplitterPanel.
 o getSplitType()
Gets the type of split for this SplitterPanel.
 o getSub2Panel(int, int, int, int)
Gets a panel within a doubly split SplitterPanel with specified split types.
 o getSubPanel(int)
Gets a panel within a SplitterPanel.
 o getSubPanel(int, int)
Gets a panel within a SplitterPanel of specified type.
 o getTopLeftPanel()
Gets the top left panel.
 o getTopPanel()
Gets the top panel of a horizontally split SplitterPanel.
 o getTopRightPanel()
Gets the top right panel.
 o iBdrSize()
Gets the size of the border drawn between panels.
 o iGapHeight()
Gets the size of the split between panels.
 o iGapWidth()
Gets the size of the split between panels.
 o inComponent(Component, int, int)
Utility method to determine if the given location is within the given component.
 o inGap(int, int)
Utility method to determine if the given location is in the gap between any nested sub-panels.
 o inGap1(int, int)
Utility method to determine if the given location is in the gap between this panel's sub-panels.
 o inOutBoarder(int, int)
Utility method to determine if the given location is in the border around this component.
 o isAllowDynamicMoving()
This flag specifies if moving of a split in a splitter panel will be real time, or delayed until mouse released.
 o isEnforceMinDim()
Gets the current "enforce minimum dimension" mode.
 o isPropResize()
Gets the current "resize propagation" mode.
 o isUse3DBorder()
This flag specifies how to draw the border around panels.
 o isValidSplitType(int)
Checks to see if a given SplitType is a valid split type.
 o layout()
Handles the laying out of components within this component.
 o maxDimOf(Dimension, Dimension)
Utility method to create a new Dimension that encompasses the two input Dimensions.
 o minimumSize()
Returns the minimum dimensions to properly display this component.
 o moveSplit(int, int)
Moves the location of the gap between panels.
 o oBdrSize()
Gets the size of the border drawn around the outside of the SplitterPanel.
 o oGapHeight()
Gets the size of the split around the inside of the SplitterPanel border.
 o oGapThis(int, int)
Override this method if you want a behavior when events occur in the outer gap.
 o oGapThis(Event)
 o oGapWidth()
Gets the size of the split around the inside of the SplitterPanel border.
 o optSize(int, int, int, int, int, int)
Utility method to calculate the optimum width or height of a sub-panel.
 o paint(Graphics)
Paints this component using the given graphics context.
 o placeComponents()
Utility method to lay out this component.
 o preferredSize()
Returns the recommended dimensions to properly display this component.
 o propagateChanges()
Utility method to update the gap/border/etc properties in sub-panels.
 o propagateChangesSP(SplitterPanel)
Utility method to update the gap/border/etc properties in another panel.
 o remove(Component)
Removes the specified component from this container.
 o removeAll()
Removes all the components from this container.
 o removeNotify()
Tells this component that it is being removed from a container.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeSplitTypeListener(PropertyChangeListener)
Removes a property listener for SplitType changes.
 o removeSplitTypeListener(VetoableChangeListener)
Removes a vetoable listener for SplitType changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o resetCursor()
Utility method to set the cursor to the default one.
 o reshape(int, int, int, int)
Moves and/or resizes this component.
 o reshapeHeight(int, int)
Reshapes the height and/or vertical position.
 o reshapeWidth(int, int)
Reshapes the width and/or horizontal position.
 o setAllowDynamicMoving(boolean)
This flag specifies if moving of a split in a splitter panel will be real time, or delayed until mouse released.
 o setBdrSizes(int, int)
Sets the size of the border drawn between panels and around the outside of the SplitterPanel.
 o setBdrSizes(int)
Sets the size of the border drawn between panels and around the outside of the SplitterPanel.
 o setCursor(Cursor)
Sets the currently used cursor.
 o setEnforceMinDim(boolean)
Sets the "enforce minimum dimension" mode.
 o setGapColor(Color)
Sets the color of the gap between panels and around the outside border.
 o setGapSizes(int)
Sets the size of the split between panels and around the inside of the SplitterPanel border.
 o setGapSizes(int, int)
Sets the size of the split between panels and around the inside of the SplitterPanel border.
 o setGapSizes(int, int, int, int)
Sets the size of the split between panels and around the inside of the SplitterPanel border.
 o setLayout(LayoutManager)
Takes no action.
 o setMinimumSize(Dimension)
Sets the minimum size of this SplitterPanel.
 o setMoveSplitCursor(Cursor)
Determines the cursor to use when dragging the split between panels.
 o setMoveSplitCursor(int)
Determines the cursor to use when dragging the split between panels.
 o setPreferredSize(Dimension)
Sets the preferred size of this SplitterPanel.
 o setPropResize(boolean)
Sets the "resize propagation" mode.
 o setUse3DBorder(boolean)
This flag specifies how to draw the border around panels.
 o split(int)
Splits a SplitterPanel into two panels.
 o split(int, Component, Component)
Splits a SplitterPanel into two panels and adds two components.
 o toString()
Returns a string representation of this component.
 o update(Graphics)
Handles redrawing of this component on the screen.

Variables

 o SPLIT3_BOTTOM
public static final int SPLIT3_BOTTOM
Panel split constant for the SplitterPanel constructor. This splits the panel into three panels, with a single larger panel on the top.

 o SPLIT3_LEFT
public static final int SPLIT3_LEFT
Panel split constant for the SplitterPanel constructor. This splits the panel into three panels, with a single larger panel on the right.

 o SPLIT3_RIGHT
public static final int SPLIT3_RIGHT
Panel split constant for the SplitterPanel constructor. This splits the panel into three panels, with a single larger panel on the left.

 o SPLIT3_TOP
public static final int SPLIT3_TOP
Panel split constant for the SplitterPanel constructor. This splits the panel into three panels, with a single larger panel on the bottom.

 o SPLIT_BOTH
public static final int SPLIT_BOTH
Panel split constant for the SplitterPanel constructor. This splits the panel into four panels by first splitting horizontally then splitting vertically.

 o SPLIT_BOTH_V
public static final int SPLIT_BOTH_V
Panel split constant for the SplitterPanel constructor. This splits the panel into four panels by first splitting vertically then splitting horizontally.

 o SPLIT_HOR
public static final int SPLIT_HOR
Indicates a horizontal panel split. The panel contains/will contain two subpanels, top and bottom.

See Also:
split
 o SPLIT_HORIZONTAL
public static final int SPLIT_HORIZONTAL
Horizontal panel split constant for the SplitterPanel constructor. This splits the panel into two horizontal panels.

 o SPLIT_NONE
protected static final int SPLIT_NONE
Panel contains no subpanels, initial state.

 o SPLIT_VER
public static final int SPLIT_VER
Indicates a vertical panel split. The panel contains/will contain two subpanels, left and right.

See Also:
split
 o SPLIT_VERTICAL
public static final int SPLIT_VERTICAL
Vertical panel split constant for the SplitterPanel constructor. This splits the panel into two vertical panels.

 o allowDynamicMoving
protected boolean allowDynamicMoving
This flag specifies if moving of a split in a splitter panel will be real time, or delayed until mouse released.

See Also:
isAllowDynamicMoving, setAllowDynamicMoving
 o bOsFlag
protected transient boolean bOsFlag
Internal use only.

 o curDim
protected java.awt.Dimension curDim
Current component dimensions.

 o curLoc
protected java.awt.Point curLoc
The current location of this component.

 o cursorCh
protected static symantec.itools.awt.SplitterPanel cursorCh
Internal use only.

 o cursorChanged
protected transient boolean cursorChanged
Internal use only.

 o doMoveSplit
protected transient boolean doMoveSplit
Internal flag indicating split being moved.

 o enforceMinDim
protected boolean enforceMinDim
Enforce minimum dimension mode flag. This mode prevents the dragging of a split between panels from making a panel smaller than the minimum size of its component. If true, enforces minimum panel dimensions.

See Also:
isEnforceMinDim, setEnforceMinDim
 o errors
protected transient java.util.ResourceBundle errors
Error strings.

 o gapColor
protected java.awt.Color gapColor
The color of the gap between panels and around the outside border.

See Also:
getGapColor, setGapColor
 o heightOnly
protected boolean heightOnly
Internal flag indicating a reshape in height only.

 o iBdrSize
protected int iBdrSize
The size of the border drawn between panels, in pixels.

 o iGapHeight
protected int iGapHeight
The split height between panels, in pixels.

 o iGapWidth
protected int iGapWidth
The split width between panels, in pixels.

 o innerSP
protected symantec.itools.awt.SplitterPanel innerSP
Internal use only.

 o isOuter
protected boolean isOuter
Internal use only.

 o minDim
protected java.awt.Dimension minDim
Dimension variables. Note that these should be set explicitly if you wish to override the built in calculation of these dimensions. For instance, do not set (or set to zeros), the value for prefDim if you want the SplitterPanel to calculate this as the sum of the subcomponents prefDims. minDim is used when the user explicitly sets the minimum size; prefDim is used when the user explicitly sets the preferred size.

See Also:
prefDim
 o moveFromX
protected int moveFromX
Internal use only.

 o moveFromY
protected int moveFromY
Internal use only.

 o moveSplitCursor
protected java.awt.Cursor moveSplitCursor
Determines the cursor to use when dragging the split between panels. Use Cursor.HAND_CURSOR, etc to choose a cursor.

See Also:
Cursor
 o oBdrSize
protected int oBdrSize
The size of the border drawn around the outside of the SplitterPanel, in pixels.

 o oGapHeight
protected int oGapHeight
The gap height inside the border, in pixels.

 o oGapWidth
protected int oGapWidth
The gap width inside the border, in pixels.

 o outerSP
protected symantec.itools.awt.SplitterPanel outerSP
Internal use only.

 o prefDim
protected java.awt.Dimension prefDim
Dimension variables. Note that these should be set explicitly if you wish to override the built in calculation of these dimensions. For instance, do not set (or set to zeros), the value for prefDim if you want the SplitterPanel to calculate this as the sum of the subcomponents prefDims. minDim is used when the user explicitly sets the minimum size; prefDim is used when the user explicitly sets the preferred size.

See Also:
minDim
 o propResize
protected boolean propResize
The "resize propagation" mode flag. If this is false, resizing of SplitterPanel panels does not automatically call the contained component's resize() method. The default behavior propagates the resizing effect of dragging the split between panes by calling move and resize for the panels that have been added to those panes. Clearing this introduces a clipping effect, rather than a scaling effect.

See Also:
isPropResize, setPropResize
 o spComponent
protected java.awt.Component spComponent
The component contained within this panel.

 o splitType
protected int splitType
The type of split for this SplitterPanel. Value is one of: SPLIT_VERTICAL or SPLIT_HORIZONTAL.

See Also:
SPLIT_VERTICAL, SPLIT_HORIZONTAL, SPLIT_NONE
 o sub1
protected symantec.itools.awt.SplitterPanel sub1
Sub-panel 1 of 2.

 o sub2
protected symantec.itools.awt.SplitterPanel sub2
Sub-panel 2 of 2.

 o use3dBdr
protected boolean use3dBdr
This flag specifies how to draw the border around panels. If true, the border around the panel is drawn with a three-dimensional effect.

 o widthOnly
protected boolean widthOnly
Internal flag indicating a reshape in width only.

Constructors

 o SplitterPanel
public SplitterPanel()
Constructs a new default SplitterPanel. By default, all the gap sizes are 3 and all the border sizes 2.

See Also:
setGapSizes(int, int, int, int), setBdrSizes(int, int)
 o SplitterPanel
public SplitterPanel(int spWidth,
                     int spHeight)
Constructs a new SplitterPanel of the specified size which is ready to be split into panels. By default, all the gap sizes are 3 and all the border sizes 2.

Parameters:
spWidth - the initial width of the SplitterPanel, in pixels
spHeight - the initial height of the SplitterPanel, in pixels
See Also:
setGapSizes(int, int, int, int), setBdrSizes(int, int)
 o SplitterPanel
public SplitterPanel(int spWidth,
                     int spHeight,
                     int splitSpec)
Constructs a new SplitterPanel of specified size which is split into panels. By default, all the gap sizes are 3 and all the border sizes 2.

Parameters:
spWidth - the initial width of the SplitterPanel, in pixels
spHeight - the initial height of the SplitterPanel, in pixels
splitSpec - specifies how to split up the panel
See Also:
SPLIT_VERTICAL, SPLIT_HORIZONTAL, SPLIT_BOTH, SPLIT_BOTH_V, SPLIT3_LEFT, SPLIT3_RIGHT, SPLIT3_TOP, SPLIT3_BOTTOM, setGapSizes(int, int, int, int), setBdrSizes(int, int)
 o SplitterPanel
public SplitterPanel(int splitSpec)
Constructs a new SplitterPanel which is split into panels. By default, all the gap sizes are 3 and all the border sizes 2.

Parameters:
splitSpec - specifies how to split up the panel
See Also:
SPLIT_VERTICAL, SPLIT_HORIZONTAL, SPLIT_BOTH, SPLIT_BOTH_V, SPLIT3_LEFT, SPLIT3_RIGHT, SPLIT3_TOP, SPLIT3_BOTTOM, setGapSizes(int, int, int, int), setBdrSizes(int, int)
 o SplitterPanel
public SplitterPanel(int splitSpec,
                     Component compR1C1,
                     Component compR1C2,
                     Component compR2C1,
                     Component compR2C2)
Constructs a new SplitterPanel which is split into panels to which components are added. By default, all the gap sizes are 3 and all the border sizes 2.

Parameters:
splitSpec - specifies how to split up the panel
compR1C1 - specifies the component in row 1, column 1 (top, left)
compR1C2 - specifies the component in row 1, column 2 (top, right)
compR2C1 - specifies the component in row 2, column 1 (bottom, left)
compR2C2 - specifies the component in row 2, column 2 (bottom, right)
See Also:
SPLIT_VERTICAL, SPLIT_HORIZONTAL, SPLIT_BOTH, SPLIT_BOTH_V, SPLIT3_LEFT, SPLIT3_RIGHT, SPLIT3_TOP, SPLIT3_BOTTOM, setGapSizes(int, int, int, int), setBdrSizes(int, int)

Methods

 o add
public synchronized java.awt.Component add(Component comp,
                                           int pos)
Adds a component to the end of this container. This is a standard Java AWT method which gets called to add a component to a container. Typically, the specified component is added to this container at the given zero-relative position index. A position index of -1 would append the component to the end. It is overridden here to set the only component in this SplitterPanel. This is the component that is displayed in a panel. The SplitterPanel can only contain one component. Any previous component will be removed before the new one is added.

Parameters:
comp - the component to add
pos - the zero-relative index at which to add the component or -1 for end (IGNORED)
Returns:
the added component
Overrides:
add in class Container
See Also:
remove
 o add
public java.awt.Component add(Component comp)
Adds a component to the end of this container. This is a standard Java AWT method which gets called to add a component to a container. Typically, the specified component is added to the end of this container. It is overridden here to set the only component in this SplitterPanel. This is the component that is displayed in a panel. The SplitterPanel can only contain one component. Any previous component will be removed before the new one is added.

Parameters:
comp - the component to add
Returns:
the added component
Overrides:
add in class Container
See Also:
remove
 o addNotify
public synchronized void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to hook-up event listeners.

Overrides:
addNotify in class Panel
See Also:
removeNotify
 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
listener - the listener to add.
See Also:
removePropertyChangeListener
 o addSplitTypeListener
public synchronized void addSplitTypeListener(PropertyChangeListener listener)
Adds a property listener for SplitType changes.

Parameters:
listener - the listener to add.
See Also:
removeSplitTypeListener
 o addSplitTypeListener
public synchronized void addSplitTypeListener(VetoableChangeListener listener)
Adds a vetoable listener for SplitType changes.

Parameters:
listener - the listener to add.
See Also:
removeSplitTypeListener
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
listener - the listener to add.
See Also:
removeVetoableChangeListener
 o adjustOGapBdr
protected void adjustOGapBdr()
Utility method to constrain the gap width/height inside the border to good values.

 o draw3DBdr
protected void draw3DBdr(Graphics g,
                         int x,
                         int y,
                         int width,
                         int height,
                         int bdrSize,
                         Color c,
                         boolean raised)
Utility method to draw the border.

 o gapColor
public java.awt.Color gapColor()
Note: gapColor() is deprecated.

See Also:
getGapColor
 o getBottomLeftPanel
public symantec.itools.awt.SplitterPanel getBottomLeftPanel()
Gets the bottom left panel. It doesn't matter if this SplitterPanel is initially split horizontally or vertically.

Returns:
the panel, or null if it doesn't exist
See Also:
getTopPanel, getBottomPanel, getLeftPanel, getRightPanel, getTopLeftPanel, getTopRightPanel, getBottomRightPanel
 o getBottomPanel
public symantec.itools.awt.SplitterPanel getBottomPanel()
Gets the bottom panel of a horizontally split SplitterPanel.

Returns:
the panel, or null if this panel is not split or is split vertically
See Also:
getTopPanel, getLeftPanel, getRightPanel, getTopLeftPanel, getTopRightPanel, getBottomLeftPanel, getBottomRightPanel
 o getBottomRightPanel
public symantec.itools.awt.SplitterPanel getBottomRightPanel()
Gets the bottom right panel. It doesn't matter if this SplitterPanel is initially split horizontally or vertically.

Returns:
the panel, or null if it doesn't exist
See Also:
getTopPanel, getBottomPanel, getLeftPanel, getRightPanel, getTopLeftPanel, getTopRightPanel, getBottomLeftPanel
 o getComponent
public java.awt.Component getComponent()
Gets the component in this SplitterPanel.

Returns:
the component in this SplitterPanel
 o getComponentCount
public int getComponentCount()
Returns number of components in this container.

Returns:
the number of components in this container
Overrides:
getComponentCount in class Container
 o getComponents
public java.awt.Component[] getComponents()
Returns all of the components in this container. This is a standard Java AWT method which gets called to return an array of all of the components in this container.

Returns:
an array of components in this container
Overrides:
getComponents in class Container
 o getEnforceMinDim
public boolean getEnforceMinDim()
Note: getEnforceMinDim() is deprecated.

See Also:
isEnforceMinDim
 o getGapColor
public java.awt.Color getGapColor()
Gets the color of the gap between panels and around the outside border.

Returns:
the current gap color
See Also:
setGapColor
 o getLeftPanel
public symantec.itools.awt.SplitterPanel getLeftPanel()
Gets the left panel of a vertically split SplitterPanel.

Returns:
the panel, or null if this panel is not split or is split horizontally
See Also:
getTopPanel, getBottomPanel, getRightPanel, getTopLeftPanel, getTopRightPanel, getBottomLeftPanel, getBottomRightPanel
 o getMouseListener
protected java.awt.event.MouseListener getMouseListener()
Returns the mouse event handling object.

 o getMoveSplitCursor
public java.awt.Cursor getMoveSplitCursor()
The cursor to use when dragging the split between panels.

Returns:
the Cursor to be used when dragginf the split between panels.
See Also:
setMoveSplitCursor(java.awt.Cursor), setMoveSplitCursor(int)
 o getPropResize
public boolean getPropResize()
Note: getPropResize() is deprecated.

See Also:
isPropResize
 o getRightPanel
public symantec.itools.awt.SplitterPanel getRightPanel()
Gets the right panel of a vertically split SplitterPanel.

Returns:
the panel, or null if this panel is not split or is split horizontally
See Also:
getTopPanel, getBottomPanel, getLeftPanel, getTopLeftPanel, getTopRightPanel, getBottomLeftPanel, getBottomRightPanel
 o getSplitType
public int getSplitType()
Gets the type of split for this SplitterPanel.

Returns:
the splitType: SPLIT_VERTICAL or SPLIT_HORIZONTAL
See Also:
SPLIT_VERTICAL, SPLIT_HORIZONTAL
 o getSub2Panel
public symantec.itools.awt.SplitterPanel getSub2Panel(int n1,
                                                      int theSplitType1,
                                                      int n2,
                                                      int theSplitType2)
Gets a panel within a doubly split SplitterPanel with specified split types. This method is equivalent to calling getSubPanel() twice, the second time with the results from the first.

Parameters:
n1 - panel number (1 for first panel, or 2 for second panel)
theSplitType1 - the type of split this panel has (SPLIT_VER or SPLIT_HOR)
n2 - panel number (1 for first panel, or 2 for second panel)
theSplitType2 - the type of split the subpanel has (SPLIT_VER or SPLIT_HOR)
Returns:
the panel, or null if none of the specified type
See Also:
SPLIT_VER, SPLIT_HOR, getSubPanel(int, int)
 o getSubPanel
public symantec.itools.awt.SplitterPanel getSubPanel(int n)
Gets a panel within a SplitterPanel.

Parameters:
n - panel number (1 for first panel, or 2 for second panel)
Returns:
the panel, or null if none
See Also:
getSub2Panel
 o getSubPanel
public symantec.itools.awt.SplitterPanel getSubPanel(int n,
                                                     int theSplitType)
Gets a panel within a SplitterPanel of specified type. For example, if "aPanel" was a horizontally split SplitterPanel, the call aPanel.getSubPanel(1,SPLIT_HOR) would retrieve the first (topmost) panel, and the call aPanel.getSubPanel(1,SPLIT_VER) would return null since aPanel is not split vertically.

Parameters:
n - panel number (1 for first panel, or 2 for second panel)
theSplitType - the type of split this panel has (SPLIT_VER or SPLIT_HOR)
Returns:
the panel, or null if none of the specified type
See Also:
SPLIT_VER, SPLIT_HOR, getSub2Panel
 o getTopLeftPanel
public symantec.itools.awt.SplitterPanel getTopLeftPanel()
Gets the top left panel. It doesn't matter if this SplitterPanel is initially split horizontally or vertically.

Returns:
the panel, or null if it doesn't exist
See Also:
getTopPanel, getBottomPanel, getLeftPanel, getRightPanel, getTopRightPanel, getBottomLeftPanel, getBottomRightPanel
 o getTopPanel
public symantec.itools.awt.SplitterPanel getTopPanel()
Gets the top panel of a horizontally split SplitterPanel.

Returns:
the panel, or null if this panel is not split or is split vertically
See Also:
getBottomPanel, getLeftPanel, getRightPanel, getTopLeftPanel, getTopRightPanel, getBottomLeftPanel, getBottomRightPanel
 o getTopRightPanel
public symantec.itools.awt.SplitterPanel getTopRightPanel()
Gets the top right panel. It doesn't matter if this SplitterPanel is initially split horizontally or vertically.

Returns:
the panel, or null if it doesn't exist
See Also:
getTopPanel, getBottomPanel, getLeftPanel, getRightPanel, getTopLeftPanel, getBottomLeftPanel, getBottomRightPanel
 o iBdrSize
public int iBdrSize()
Gets the size of the border drawn between panels.

Returns:
the border size between panels, in pixels
See Also:
oBdrSize()
 o iGapHeight
public int iGapHeight()
Gets the size of the split between panels.

Returns:
the split height between panels, in pixels
See Also:
iGapWidth(), oGapWidth(), oGapHeight()
 o iGapWidth
public int iGapWidth()
Gets the size of the split between panels.

Returns:
the split width between panels, in pixels
See Also:
iGapHeight(), oGapWidth(), oGapHeight()
 o inComponent
protected boolean inComponent(Component comp,
                              int x,
                              int y)
Utility method to determine if the given location is within the given component.

Parameters:
comp - the component
x - the horizontal location
y - the vertical location
Returns:
true if the location is within the component
 o inGap
protected boolean inGap(int evtX,
                        int evtY)
Utility method to determine if the given location is in the gap between any nested sub-panels.

Parameters:
evtX - the horizontal location
evtY - the vertical location
Returns:
true if the location is within the gap
 o inGap1
protected boolean inGap1(int evtX,
                         int evtY)
Utility method to determine if the given location is in the gap between this panel's sub-panels.

Parameters:
evtX - the horizontal location
evtY - the vertical location
Returns:
true if the location is within the gap
 o inOutBoarder
protected boolean inOutBoarder(int evtX,
                               int evtY)
Utility method to determine if the given location is in the border around this component.

Parameters:
evtX - the horizontal location
evtY - the vertical location
Returns:
true if the location is within the border
 o isAllowDynamicMoving
public boolean isAllowDynamicMoving()
This flag specifies if moving of a split in a splitter panel will be real time, or delayed until mouse released.

Returns:
true if when a split is moved, it will dynamically resize the panels the split affects. If false, the resizing will happen when the mouse is released.
See Also:
setAllowDynamicMoving
 o isEnforceMinDim
public boolean isEnforceMinDim()
Gets the current "enforce minimum dimension" mode. This mode prevents the dragging of a split between panels from making a panel smaller than the minimum size of its component.

Returns:
true if minimum panel dimensions are enforced
See Also:
setEnforceMinDim
 o isPropResize
public boolean isPropResize()
Gets the current "resize propagation" mode. When this mode is enabled, the resizing effect of dragging the split between panes is propagated by reshaping the panels that have been added to those panes. This results in a scaling effect. When this mode is disabled this doesn't happen, resulting in a clipping effect. This mode is enabled by default.

Returns:
the current "resize propagation" mode
See Also:
setPropResize
 o isUse3DBorder
public boolean isUse3DBorder()
This flag specifies how to draw the border around panels.

Returns:
flag if true, the border around the panel is drawn in a three dimensional way.
See Also:
setUse3DBorder
 o isValidSplitType
public boolean isValidSplitType(int testSplitType)
Checks to see if a given SplitType is a valid split type.

Parameters:
testSplitType - the split type to test
Returns:
true if testSplitType is acceptable, false if not.
 o layout
public synchronized void layout()
Handles the laying out of components within this component. This is a standard Java AWT method which gets called by the AWT when this component is validated with the validate() method.

Overrides:
layout in class Container
See Also:
validate
 o maxDimOf
protected java.awt.Dimension maxDimOf(Dimension dim1,
                                      Dimension dim2)
Utility method to create a new Dimension that encompasses the two input Dimensions.

Parameters:
dim1 - a dimension
dim2 - another dimension
Returns:
a Dimension that has the larger of each input dimensions axis
 o minimumSize
public java.awt.Dimension minimumSize()
Returns the minimum dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the minimum size of this component.

For each axis, returns the larger of the actual size needed to show all the components at their minimum size, and the minimum size set by the setMinimumSize() method.

Overrides:
minimumSize in class Container
See Also:
preferredSize
 o moveSplit
public void moveSplit(int spX,
                      int spY)
Moves the location of the gap between panels.

Parameters:
spX - specifies relative movement in pixels along horizontal axis
spY - specifies relative movement in pixels along vertical axis
 o oBdrSize
public int oBdrSize()
Gets the size of the border drawn around the outside of the SplitterPanel.

Returns:
the border size around the outside of the SplitterPanel, in pixels
See Also:
iBdrSize()
 o oGapHeight
public int oGapHeight()
Gets the size of the split around the inside of the SplitterPanel border.

Returns:
the gap height inside the border, in pixels
See Also:
iGapWidth(), iGapHeight(), oGapWidth()
 o oGapThis
public void oGapThis(int x,
                     int y)
Override this method if you want a behavior when events occur in the outer gap. Be sure to call super.oGapThis if you do override this method. Note that it is recommended that you place a SplitterPanel inside of a frame and set outer border and gap sizes to zero if you want the end user to be able to resize.

Parameters:
x - the x coordinate of where the event occured.
y - the y coordinate of where the event occured.
 o oGapThis
public boolean oGapThis(Event evt)
Note: oGapThis() is deprecated.

See Also:
oGapThis(int, int)
 o oGapWidth
public int oGapWidth()
Gets the size of the split around the inside of the SplitterPanel border.

Returns:
the gap width inside the border, in pixels
See Also:
iGapWidth(), iGapHeight(), oGapHeight()
 o optSize
protected int optSize(int total,
                      int _gap,
                      int _min1,
                      int _min2,
                      int _pref1,
                      int _pref2)
Utility method to calculate the optimum width or height of a sub-panel.

 o paint
public void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its [0,0] coordinate is this component's top-left corner. Overriding this method is not advised.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Container
See Also:
repaint, update
 o placeComponents
protected void placeComponents()
Utility method to lay out this component.

 o preferredSize
public java.awt.Dimension preferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component.

For each axis, returns the larger of the actual size needed to show all the components at their preferred size, and the preferred size set by the setPreferredSize() method.

Overrides:
preferredSize in class Container
See Also:
minimumSize, setPreferredSize
 o propagateChanges
protected void propagateChanges()
Utility method to update the gap/border/etc properties in sub-panels.

 o propagateChangesSP
protected void propagateChangesSP(SplitterPanel spTarget)
Utility method to update the gap/border/etc properties in another panel. The current property values of this object are copied into the target object's properties.

Parameters:
spTarget - the panel to update the properties of
 o remove
public synchronized void remove(Component comp)
Removes the specified component from this container. This is a standard Java AWT method which gets called to remove a component from a container. When this happens the component's removeNotify() will also get called to indicate component removal.

Parameters:
comp - the component to remove
Overrides:
remove in class Container
See Also:
removeAll, add
 o removeAll
public synchronized void removeAll()
Removes all the components from this container. This is a standard Java AWT method which gets called to remove all the components from a container. When this happens each component's removeNotify() will also get called to indicate component removal.

Split panels are preserved.

Overrides:
removeAll in class Container
See Also:
remove, add
 o removeNotify
public synchronized void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to unhook event listeners.

Overrides:
removeNotify in class Container
See Also:
addNotify
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
listener - the listener to remove.
See Also:
addPropertyChangeListener
 o removeSplitTypeListener
public synchronized void removeSplitTypeListener(PropertyChangeListener listener)
Removes a property listener for SplitType changes.

Parameters:
listener - the listener to remove.
See Also:
addSplitTypeListener
 o removeSplitTypeListener
public synchronized void removeSplitTypeListener(VetoableChangeListener listener)
Removes a vetoable listener for SplitType changes.

Parameters:
listener - the listener to remove.
See Also:
addSplitTypeListener
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
listener - the listener to remove.
See Also:
addVetoableChangeListener
 o resetCursor
protected void resetCursor()
Utility method to set the cursor to the default one.

 o reshape
public synchronized void reshape(int x,
                                 int y,
                                 int width,
                                 int height)
Moves and/or resizes this component. This is a standard Java AWT method which gets called to move and/or resize this component. Components that are in containers with layout managers should not call this method, but rely on the layout manager instead.

Parameters:
x - horizontal position in the parent's coordinate space
y - vertical position in the parent's coordinate space
width - the new width
height - the new height
Overrides:
reshape in class Component
See Also:
reshapeHeight, reshapeWidth
 o reshapeHeight
public synchronized void reshapeHeight(int y,
                                       int height)
Reshapes the height and/or vertical position. This prevents horizontal adjustments when the layout is computed.

Parameters:
y - vertical position in the parent's coordinate space
height - the new height, in pixels
See Also:
reshapeWidth, reshape
 o reshapeWidth
public synchronized void reshapeWidth(int x,
                                      int width)
Reshapes the width and/or horizontal position. This prevents vertical adjustments when the layout is computed.

Parameters:
x - horizontal position in the parent's coordinate space
width - the new width, in pixels
See Also:
reshapeHeight, reshape
 o setAllowDynamicMoving
public void setAllowDynamicMoving(boolean flag) throws PropertyVetoException
This flag specifies if moving of a split in a splitter panel will be real time, or delayed until mouse released.

Parameters:
flag - if true, when a split is moved, it will dynamically resize the panels the split affects. If false, the resizing will happen when the mouse is released.
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isAllowDynamicMoving
 o setBdrSizes
public void setBdrSizes(int iBdrSize,
                        int oBdrSize)
Sets the size of the border drawn between panels and around the outside of the SplitterPanel. The default for all border sizes is 2.

Parameters:
iBdrSize - the border size between panels, in pixels
oBdrSize - the border size around the outside of the SplitterPanel, in pixels
 o setBdrSizes
public void setBdrSizes(int bdrSize)
Sets the size of the border drawn between panels and around the outside of the SplitterPanel.

Parameters:
bdrSize - the size in pixels
 o setCursor
public synchronized void setCursor(Cursor cursor)
Sets the currently used cursor.

Parameters:
cursor - the new cursor to use
Overrides:
setCursor in class Component
 o setEnforceMinDim
public void setEnforceMinDim(boolean theFlag) throws PropertyVetoException
Sets the "enforce minimum dimension" mode. This mode prevents the dragging of a split between panels from making a panel smaller than the minimum size of its component.

Parameters:
theFlag - if true enforces minimum panel dimensions
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isEnforceMinDim
 o setGapColor
public void setGapColor(Color c) throws PropertyVetoException
Sets the color of the gap between panels and around the outside border.

Parameters:
c - the color to use
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getGapColor
 o setGapSizes
public void setGapSizes(int gapSize)
Sets the size of the split between panels and around the inside of the SplitterPanel border. The default for all gap sizes is 3.

Parameters:
gapSize - the split size in pixels
 o setGapSizes
public void setGapSizes(int gapWidth,
                        int gapHeight)
Sets the size of the split between panels and around the inside of the SplitterPanel border. The default for all gap sizes is 3.

Parameters:
gapWidth - the split width in pixels
gapHeight - the split height in pixels
 o setGapSizes
public void setGapSizes(int iGapWidth,
                        int iGapHeight,
                        int oGapWidth,
                        int oGapHeight)
Sets the size of the split between panels and around the inside of the SplitterPanel border. The default for all gap sizes is 3.

Parameters:
iGapWidth - the split width between panels, in pixels
iGapHeight - the split height between panels, in pixels
oGapWidth - the gap width inside the border, in pixels
oGapHeight - the gap height inside the border, in pixels
 o setLayout
public void setLayout(LayoutManager mgr)
Takes no action. This is a standard Java AWT method which gets called to specify which layout manager should be used to layout the components in standard containers. Since layout managers CANNOT BE USED with this container the standard setLayout has been OVERRIDDEN for this container and does nothing.

Parameters:
l - the layout manager to use to layout this container's components (IGNORED)
Overrides:
setLayout in class Container
See Also:
getLayout
 o setMinimumSize
public void setMinimumSize(Dimension theDim)
Sets the minimum size of this SplitterPanel. This will override the calculated minimum size when the calculated size is smaller.

Parameters:
theDim - the minimum dimensions
 o setMoveSplitCursor
public void setMoveSplitCursor(Cursor newCursor) throws PropertyVetoException
Determines the cursor to use when dragging the split between panels. Use Cursor.HAND_CURSOR, etc to choose a cursor

Parameters:
newCursor - the new Cursor to use.
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getMoveSplitCursor, setMoveSplitCursor(int)
 o setMoveSplitCursor
public void setMoveSplitCursor(int newCursor) throws PropertyVetoException, IllegalArgumentException
Determines the cursor to use when dragging the split between panels. Use Cursor.HAND_CURSOR, etc to choose a cursor

Parameters:
newCursor - the integer value of a Cursor to use.
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getMoveSplitCursor, setMoveSplitCursor(java.awt.Cursor), DEFAULT_CURSOR, CROSSHAIR_CURSOR, TEXT_CURSOR, WAIT_CURSOR, SW_RESIZE_CURSOR, SE_RESIZE_CURSOR, NW_RESIZE_CURSOR, NE_RESIZE_CURSOR, N_RESIZE_CURSOR, S_RESIZE_CURSOR, W_RESIZE_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR
 o setPreferredSize
public void setPreferredSize(Dimension theDim)
Sets the preferred size of this SplitterPanel. This will override the calculated preferred size when the calculated size is smaller.

Parameters:
theDim - the preferred dimensions
 o setPropResize
public void setPropResize(boolean theFlag) throws PropertyVetoException
Sets the "resize propagation" mode. Set this to false to prevent the automatic resizing of SplitterPanel panels from also calling resize() for the component that you add. The default behavior propagates the resizing effect of dragging the split between panes by calling move and resize for the panels that have been added to those panes. Clearing this introduces a clipping effect, rather than a scaling effect.

Parameters:
theFlag - if true, resize propagation is enabled; if false, resize propagation is disabled
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isPropResize
 o setUse3DBorder
public void setUse3DBorder(boolean flag) throws PropertyVetoException
This flag specifies how to draw the border around panels.

Parameters:
flag - if true, the border around the panel is drawn in a three dimensional way.
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isUse3DBorder
 o split
public symantec.itools.awt.SplitterPanel split(int splitType)
Splits a SplitterPanel into two panels. This creates two new SplitterPanels which are nested within the original SplitterPanel. If the split type is SPLIT_VER the new panels are arranged side-by-side with a splitter bar vertically between them. If the split type is SPLIT_HOR the new panels are arranged one above the other with a splitter bar horizontally between them.

Parameters:
splitType - SPLIT_VER or SPLIT_HOR to request a vertical or horizontal split
Returns:
the first new SplitterPanel if successful (left or top)
See Also:
SPLIT_VER, SPLIT_HOR
 o split
public synchronized symantec.itools.awt.SplitterPanel split(int splitType,
                                                            Component theComp1,
                                                            Component theComp2)
Splits a SplitterPanel into two panels and adds two components. This creates two new SplitterPanels which are nested within the original SplitterPanel.

If the split type is SPLIT_VER the new panels are arranged side-by-side with a splitter bar vertically between them. Component theComp1 would be placed in the left panel, theComp2 in the right.

If the split type is SPLIT_HOR the new panels are arranged one above the other with a splitter bar horizontally between them. Component theComp1 would be placed in the top panel, theComp2 in the bottom.

Parameters:
splitType - SPLIT_VER or SPLIT_HOR to request vertical or horizontal splits
theComp1 - the first component (left or top)
theComp2 - the second component (right or bottom)
Returns:
the first new SplitterPanel if successful (left or top)
See Also:
SPLIT_VER, SPLIT_HOR
 o toString
public java.lang.String toString()
Returns a string representation of this component. This is a standard Java AWT method which gets called to generate a string that represents this component.

Returns:
a meaningful string about this object
Overrides:
toString in class Component
 o update
public void update(Graphics g)
Handles redrawing of this component on the screen. This is a standard Java AWT method which gets called by the Java AWT (repaint()) to handle repainting this component on the screen. The graphics context clipping region is set to the bounding rectangle of this component and its [0,0] coordinate is this component's top-left corner. Typically this method paints the background color to clear the component's drawing space, sets graphics context to be the foreground color, and then calls paint() to draw the component. It is overridden here to reduce flicker by eliminating the unnecessary clearing of the background.

Parameters:
g - the graphics context
Overrides:
update in class Container
See Also:
repaint, paint

All Packages  Class Hierarchy  This Package  Previous  Next  Index