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:
- · Create a subcontainer that organizes container space within an Applet,
Frame or Dialog container. This simplifies your component layout task.
- · Hold other specialized Panel containers.
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.
splitterPanel1.split(splitterPanel1.SPLIT_HORIZONTAL);
splitterPanel1.getTopPanel().split(splitterPanel1.SPLIT_VERTICAL);
splitterPanel1.getBottomPanel().split(splitterPanel1.SPLIT_VERTICAL);
// add a button to the top left panel
splitterPanel1.getTopLeftPanel().add(new Button("Top Left"));
// add a button to the lower right panel
splitterPanel1.getBottomRightPanel().add(new Button("Bottom Right"));
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
-
SPLIT3_BOTTOM
- Panel split constant for the SplitterPanel constructor.
-
SPLIT3_LEFT
- Panel split constant for the SplitterPanel constructor.
-
SPLIT3_RIGHT
- Panel split constant for the SplitterPanel constructor.
-
SPLIT3_TOP
- Panel split constant for the SplitterPanel constructor.
-
SPLIT_BOTH
- Panel split constant for the SplitterPanel constructor.
-
SPLIT_BOTH_V
- Panel split constant for the SplitterPanel constructor.
-
SPLIT_HOR
- Indicates a horizontal panel split.
-
SPLIT_HORIZONTAL
- Horizontal panel split constant for the SplitterPanel constructor.
-
SPLIT_NONE
- Panel contains no subpanels, initial state.
-
SPLIT_VER
- Indicates a vertical panel split.
-
SPLIT_VERTICAL
- Vertical panel split constant for the SplitterPanel constructor.
-
allowDynamicMoving
- This flag specifies if moving of a split in a splitter panel will be real time,
or delayed until mouse released.
-
bOsFlag
- Internal use only.
-
curDim
- Current component dimensions.
-
curLoc
- The current location of this component.
-
cursorCh
- Internal use only.
-
cursorChanged
- Internal use only.
-
doMoveSplit
- Internal flag indicating split being moved.
-
enforceMinDim
- Enforce minimum dimension mode flag.
-
errors
- Error strings.
-
gapColor
- The color of the gap between panels and around the outside
border.
-
heightOnly
- Internal flag indicating a reshape in height only.
-
iBdrSize
- The size of the border drawn between panels, in pixels.
-
iGapHeight
- The split height between panels, in pixels.
-
iGapWidth
- The split width between panels, in pixels.
-
innerSP
- Internal use only.
-
isOuter
- Internal use only.
-
minDim
- Dimension variables.
-
moveFromX
- Internal use only.
-
moveFromY
- Internal use only.
-
moveSplitCursor
- Determines the cursor to use when dragging the split between panels.
-
oBdrSize
- The size of the border drawn around the outside of the SplitterPanel,
in pixels.
-
oGapHeight
- The gap height inside the border, in pixels.
-
oGapWidth
- The gap width inside the border, in pixels.
-
outerSP
- Internal use only.
-
prefDim
- Dimension variables.
-
propResize
- The "resize propagation" mode flag.
-
spComponent
- The component contained within this panel.
-
splitType
- The type of split for this SplitterPanel.
-
sub1
- Sub-panel 1 of 2.
-
sub2
- Sub-panel 2 of 2.
-
use3dBdr
- This flag specifies how to draw the border around panels.
-
widthOnly
- Internal flag indicating a reshape in width only.
-
symantec.itools.awt.SplitterPanel()
- Constructs a new default SplitterPanel.
-
symantec.itools.awt.SplitterPanel(int, int)
- Constructs a new SplitterPanel of the specified size which
is ready to be split into panels.
-
symantec.itools.awt.SplitterPanel(int, int, int)
- Constructs a new SplitterPanel of specified size which is
split into panels.
-
symantec.itools.awt.SplitterPanel(int)
- Constructs a new SplitterPanel which is split into panels.
-
symantec.itools.awt.SplitterPanel(int, Component, Component, Component, Component)
- Constructs a new SplitterPanel which is split into panels
to which components are added.
-
add(Component, int)
- Adds a component to the end of this container.
-
add(Component)
- Adds a component to the end of this container.
-
addNotify()
- Tells this component that it has been added to a container.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener for all event changes.
-
addSplitTypeListener(PropertyChangeListener)
- Adds a property listener for SplitType changes.
-
addSplitTypeListener(VetoableChangeListener)
- Adds a vetoable listener for SplitType changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a vetoable listener for all event changes.
-
adjustOGapBdr()
- Utility method to constrain the gap width/height inside the border to
good values.
-
draw3DBdr(Graphics, int, int, int, int, int, Color, boolean)
- Utility method to draw the border.
-
gapColor()
-
-
getBottomLeftPanel()
- Gets the bottom left panel.
-
getBottomPanel()
- Gets the bottom panel of a horizontally split SplitterPanel.
-
getBottomRightPanel()
- Gets the bottom right panel.
-
getComponent()
- Gets the component in this SplitterPanel.
-
getComponentCount()
- Returns number of components in this container.
-
getComponents()
- Returns all of the components in this container.
-
getEnforceMinDim()
-
-
getGapColor()
- Gets the color of the gap between panels and around the outside border.
-
getLeftPanel()
- Gets the left panel of a vertically split SplitterPanel.
-
getMouseListener()
- Returns the mouse event handling object.
-
getMoveSplitCursor()
- The cursor to use when dragging the split between panels.
-
getPropResize()
-
-
getRightPanel()
- Gets the right panel of a vertically split SplitterPanel.
-
getSplitType()
- Gets the type of split for this SplitterPanel.
-
getSub2Panel(int, int, int, int)
- Gets a panel within a doubly split SplitterPanel with
specified split types.
-
getSubPanel(int)
- Gets a panel within a SplitterPanel.
-
getSubPanel(int, int)
- Gets a panel within a SplitterPanel of specified type.
-
getTopLeftPanel()
- Gets the top left panel.
-
getTopPanel()
- Gets the top panel of a horizontally split SplitterPanel.
-
getTopRightPanel()
- Gets the top right panel.
-
iBdrSize()
- Gets the size of the border drawn between panels.
-
iGapHeight()
- Gets the size of the split between panels.
-
iGapWidth()
- Gets the size of the split between panels.
-
inComponent(Component, int, int)
- Utility method to determine if the given location is within
the given component.
-
inGap(int, int)
- Utility method to determine if the given location is in the gap
between any nested sub-panels.
-
inGap1(int, int)
- Utility method to determine if the given location is in the gap
between this panel's sub-panels.
-
inOutBoarder(int, int)
- Utility method to determine if the given location is in the
border around this component.
-
isAllowDynamicMoving()
- This flag specifies if moving of a split in a splitter panel will be real time, or delayed until mouse released.
-
isEnforceMinDim()
- Gets the current "enforce minimum dimension" mode.
-
isPropResize()
- Gets the current "resize propagation" mode.
-
isUse3DBorder()
- This flag specifies how to draw the border around panels.
-
isValidSplitType(int)
- Checks to see if a given SplitType is a valid split type.
-
layout()
- Handles the laying out of components within this component.
-
maxDimOf(Dimension, Dimension)
- Utility method to create a new Dimension that encompasses the
two input Dimensions.
-
minimumSize()
- Returns the minimum dimensions to properly display this component.
-
moveSplit(int, int)
- Moves the location of the gap between panels.
-
oBdrSize()
- Gets the size of the border drawn around the outside of the SplitterPanel.
-
oGapHeight()
- Gets the size of the split around the inside of the SplitterPanel border.
-
oGapThis(int, int)
- Override this method if you want a behavior when events
occur in the outer gap.
-
oGapThis(Event)
-
-
oGapWidth()
- Gets the size of the split around the inside of the SplitterPanel border.
-
optSize(int, int, int, int, int, int)
- Utility method to calculate the optimum width or height of a sub-panel.
-
paint(Graphics)
- Paints this component using the given graphics context.
-
placeComponents()
- Utility method to lay out this component.
-
preferredSize()
- Returns the recommended dimensions to properly display this component.
-
propagateChanges()
- Utility method to update the gap/border/etc properties in sub-panels.
-
propagateChangesSP(SplitterPanel)
- Utility method to update the gap/border/etc properties in another panel.
-
remove(Component)
- Removes the specified component from this container.
-
removeAll()
- Removes all the components from this container.
-
removeNotify()
- Tells this component that it is being removed from a container.
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a listener for all event changes.
-
removeSplitTypeListener(PropertyChangeListener)
- Removes a property listener for SplitType changes.
-
removeSplitTypeListener(VetoableChangeListener)
- Removes a vetoable listener for SplitType changes.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable listener for all event changes.
-
resetCursor()
- Utility method to set the cursor to the default one.
-
reshape(int, int, int, int)
- Moves and/or resizes this component.
-
reshapeHeight(int, int)
- Reshapes the height and/or vertical position.
-
reshapeWidth(int, int)
- Reshapes the width and/or horizontal position.
-
setAllowDynamicMoving(boolean)
- This flag specifies if moving of a split in a splitter panel will be real time, or delayed until mouse released.
-
setBdrSizes(int, int)
- Sets the size of the border drawn between panels and around the
outside of the SplitterPanel.
-
setBdrSizes(int)
- Sets the size of the border drawn between panels and around the
outside of the SplitterPanel.
-
setCursor(Cursor)
- Sets the currently used cursor.
-
setEnforceMinDim(boolean)
- Sets the "enforce minimum dimension" mode.
-
setGapColor(Color)
- Sets the color of the gap between panels and around the outside
border.
-
setGapSizes(int)
- Sets the size of the split between panels and around the inside of the
SplitterPanel border.
-
setGapSizes(int, int)
- Sets the size of the split between panels and around the inside of the
SplitterPanel border.
-
setGapSizes(int, int, int, int)
- Sets the size of the split between panels and around the inside of the
SplitterPanel border.
-
setLayout(LayoutManager)
- Takes no action.
-
setMinimumSize(Dimension)
- Sets the minimum size of this SplitterPanel.
-
setMoveSplitCursor(Cursor)
- Determines the cursor to use when dragging the split between panels.
-
setMoveSplitCursor(int)
- Determines the cursor to use when dragging the split between panels.
-
setPreferredSize(Dimension)
- Sets the preferred size of this SplitterPanel.
-
setPropResize(boolean)
- Sets the "resize propagation" mode.
-
setUse3DBorder(boolean)
- This flag specifies how to draw the border around panels.
-
split(int)
- Splits a SplitterPanel into two panels.
-
split(int, Component, Component)
- Splits a SplitterPanel into two panels and adds two components.
-
toString()
- Returns a string representation of this component.
-
update(Graphics)
- Handles redrawing of this component on the screen.
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.
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.
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.
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.
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.
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.
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
SPLIT_HORIZONTAL
public static final int SPLIT_HORIZONTAL
- Horizontal panel split constant for the SplitterPanel constructor.
This splits the panel into two horizontal panels.
SPLIT_NONE
protected static final int SPLIT_NONE
- Panel contains no subpanels, initial state.
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
SPLIT_VERTICAL
public static final int SPLIT_VERTICAL
- Vertical panel split constant for the SplitterPanel constructor.
This splits the panel into two vertical panels.
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
bOsFlag
protected transient boolean bOsFlag
- Internal use only.
curDim
protected java.awt.Dimension curDim
- Current component dimensions.
curLoc
protected java.awt.Point curLoc
- The current location of this component.
cursorCh
protected static symantec.itools.awt.SplitterPanel cursorCh
- Internal use only.
cursorChanged
protected transient boolean cursorChanged
- Internal use only.
doMoveSplit
protected transient boolean doMoveSplit
- Internal flag indicating split being moved.
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
errors
protected transient java.util.ResourceBundle errors
- Error strings.
gapColor
protected java.awt.Color gapColor
- The color of the gap between panels and around the outside
border.
- See Also:
- getGapColor, setGapColor
heightOnly
protected boolean heightOnly
- Internal flag indicating a reshape in height only.
iBdrSize
protected int iBdrSize
- The size of the border drawn between panels, in pixels.
iGapHeight
protected int iGapHeight
- The split height between panels, in pixels.
iGapWidth
protected int iGapWidth
- The split width between panels, in pixels.
innerSP
protected symantec.itools.awt.SplitterPanel innerSP
- Internal use only.
isOuter
protected boolean isOuter
- Internal use only.
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
moveFromX
protected int moveFromX
- Internal use only.
moveFromY
protected int moveFromY
- Internal use only.
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
oBdrSize
protected int oBdrSize
- The size of the border drawn around the outside of the SplitterPanel,
in pixels.
oGapHeight
protected int oGapHeight
- The gap height inside the border, in pixels.
oGapWidth
protected int oGapWidth
- The gap width inside the border, in pixels.
outerSP
protected symantec.itools.awt.SplitterPanel outerSP
- Internal use only.
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
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
spComponent
protected java.awt.Component spComponent
- The component contained within this panel.
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
sub1
protected symantec.itools.awt.SplitterPanel sub1
- Sub-panel 1 of 2.
sub2
protected symantec.itools.awt.SplitterPanel sub2
- Sub-panel 2 of 2.
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.
widthOnly
protected boolean widthOnly
- Internal flag indicating a reshape in width only.
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)
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)
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)
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)
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)
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
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
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
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener for all event changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removePropertyChangeListener
addSplitTypeListener
public synchronized void addSplitTypeListener(PropertyChangeListener listener)
- Adds a property listener for SplitType changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removeSplitTypeListener
addSplitTypeListener
public synchronized void addSplitTypeListener(VetoableChangeListener listener)
- Adds a vetoable listener for SplitType changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removeSplitTypeListener
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a vetoable listener for all event changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removeVetoableChangeListener
adjustOGapBdr
protected void adjustOGapBdr()
- Utility method to constrain the gap width/height inside the border to
good values.
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.
gapColor
public java.awt.Color gapColor()
- Note: gapColor() is deprecated.
-
- See Also:
- getGapColor
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
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
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
getComponent
public java.awt.Component getComponent()
- Gets the component in this SplitterPanel.
- Returns:
- the component in this SplitterPanel
getComponentCount
public int getComponentCount()
- Returns number of components in this container.
- Returns:
- the number of components in this container
- Overrides:
- getComponentCount in class Container
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
getEnforceMinDim
public boolean getEnforceMinDim()
- Note: getEnforceMinDim() is deprecated.
-
- See Also:
- isEnforceMinDim
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
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
getMouseListener
protected java.awt.event.MouseListener getMouseListener()
- Returns the mouse event handling object.
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)
getPropResize
public boolean getPropResize()
- Note: getPropResize() is deprecated.
-
- See Also:
- isPropResize
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
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
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)
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
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
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
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
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
iBdrSize
public int iBdrSize()
- Gets the size of the border drawn between panels.
- Returns:
- the border size between panels, in pixels
- See Also:
- oBdrSize()
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()
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()
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
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
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
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
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
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
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
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
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.
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
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
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
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
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()
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()
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.
oGapThis
public boolean oGapThis(Event evt)
- Note: oGapThis() is deprecated.
-
- See Also:
- oGapThis(int, int)
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()
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.
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
placeComponents
protected void placeComponents()
- Utility method to lay out this component.
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
propagateChanges
protected void propagateChanges()
- Utility method to update the gap/border/etc properties in sub-panels.
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
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
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
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
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a listener for all event changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addPropertyChangeListener
removeSplitTypeListener
public synchronized void removeSplitTypeListener(PropertyChangeListener listener)
- Removes a property listener for SplitType changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addSplitTypeListener
removeSplitTypeListener
public synchronized void removeSplitTypeListener(VetoableChangeListener listener)
- Removes a vetoable listener for SplitType changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addSplitTypeListener
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable listener for all event changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addVetoableChangeListener
resetCursor
protected void resetCursor()
- Utility method to set the cursor to the default one.
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
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
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
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
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
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
setCursor
public synchronized void setCursor(Cursor cursor)
- Sets the currently used cursor.
- Parameters:
- cursor - the new cursor to use
- Overrides:
- setCursor in class Component
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
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
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
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
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
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
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
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)
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
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
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
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
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
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
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
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