All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.SplitterPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.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 MOUSE_DRAG event 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.


Variable Index

 o moveSplitCursor
Determines the cursor to use when dragging the split between panels.
 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_VER
Indicates a vertical panel split.
 o SPLIT_VERTICAL
Vertical panel split constant for the SplitterPanel constructor.
 o use3dBdr
This flag specifies how to draw the border around panels.

Constructor Index

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

Method Index

 o add(Component)
Adds a component to the end of this container.
 o add(Component, int)
Adds a component to the end of this container.
 o gapColor()
Gets the color of the gap between and around panels.
 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 getComponents()
Returns all of the components in this container.
 o getEnforceMinDim()
Gets the current "enforce minimum dimension" mode.
 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 getPropResize()
Gets the current "resize propagation" mode.
 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 handleEvent(Event)
Processes events for this component.
 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 layout()
Handles the laying out of components within this component.
 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(Event)
Override this method if you want a behavior when events occur in the outer gap.
 o oGapWidth()
Gets the size of the split around the inside of the SplitterPanel border.
 o paint(Graphics)
Paints this component using the given graphics context.
 o preferredSize()
Returns the recommended dimensions to properly display this component.
 o remove(Component)
Removes the specified component from this container.
 o removeAll()
Removes all the components from this container.
 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 setBdrSizes(int)
Sets the size of the border drawn between panels and around the outside of the SplitterPanel.
 o setBdrSizes(int, int)
Sets the size of the border drawn between panels and around the outside of the SplitterPanel.
 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 setPreferredSize(Dimension)
Sets the preferred size of this SplitterPanel.
 o setPropResize(boolean)
Sets the "resize propagation" mode.
 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 SPLIT_VER
  public final static int SPLIT_VER
Indicates a vertical panel split. The panel contains/will contain two subpanels, left and right.

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

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

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

 o SPLIT_BOTH
  public final static 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 final static 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 SPLIT3_LEFT
  public final static 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 final static 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 final static 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 SPLIT3_BOTTOM
  public final static 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 use3dBdr
  public 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 moveSplitCursor
  public int moveSplitCursor
Determines the cursor to use when dragging the split between panels. Use Frame.HAND_CURSOR, etc to choose a cursor or set to Integer.MIN_VALUE to prevent cursor change.

See Also:
Frame

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, setBdrSizes
 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, setBdrSizes
 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, setBdrSizes
 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, setBdrSizes
 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, setBdrSizes

Methods

 o setGapColor
  public void setGapColor(Color c)
Sets the color of the gap between panels and around the outside border.

Parameters:
c - the color to use
See Also:
getGapColor
 o getGapColor
  public Color getGapColor()
Gets the color of the gap between panels and around the outside border.

Returns:
the current gap color
See Also:
setGapColor
 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 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 gapColor
  public Color gapColor()
Gets the color of the gap between and around panels.

Returns:
the current gap color
See Also:
setGapColor
 o setEnforceMinDim
  public void setEnforceMinDim(boolean theFlag)
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
See Also:
getEnforceMinDim
 o getEnforceMinDim
  public boolean getEnforceMinDim()
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 setPropResize
  public void setPropResize(boolean theFlag)
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
See Also:
getPropResize
 o getPropResize
  public boolean getPropResize()
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 getSplitType
  public int getSplitType()
Gets the type of split for this SplitterPanel.

Returns:
the splitType: SPLIT_VER or SPLIT_HOR
See Also:
SPLIT_VER, SPLIT_HOR
 o getSubPanel
  public 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 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 getSub2Panel
  public 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
 o getTopPanel
  public 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 getBottomPanel
  public 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 getLeftPanel
  public 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 getRightPanel
  public 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 getTopLeftPanel
  public 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 getTopRightPanel
  public 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 getBottomLeftPanel
  public 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 getBottomRightPanel
  public 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 handleEvent
  public boolean handleEvent(Event evt)
Processes events for this component. This is a standard Java AWT method which gets called by the AWT to handle this component's events. The default handler for components dispatches to one of the following methods as needed: action(), gotFocus(), lostFocus(), keyDown(), keyUp(), mouseEnter(), mouseExit(), mouseMove(), mouseDrag(), mouseDown(), or mouseUp(). If the event is for a topmost (outer) SplitterPanel, it is dispatched to method oGapThis() for handling.

Do not override this method.

Parameters:
evt - the event to handle
Returns:
true if the event was handled and no further action is needed, false to pass the event to this component's parent
Overrides:
handleEvent in class Component
See Also:
action, gotFocus, lostFocus, keyDown, keyUp, mouseEnter, mouseExit, mouseMove, mouseDrag, mouseDown, mouseUp, oGapThis
 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 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 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 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 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 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 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 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 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 Component
See Also:
repaint, paint
 o paint
  public synchronized 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 getComponent
  public Component getComponent()
Gets the component in this SplitterPanel.

Returns:
the component in this SplitterPanel
 o getComponents
  public 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 preferredSize
  public 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 minimumSize
  public 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 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 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 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 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 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 add
  public synchronized 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 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 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 split
  public 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 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 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 oGapThis
  public boolean oGapThis(Event evt)
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:
evt - the event that occurred in the outer gap around a SplitterPanel
 o toString
  public 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

All Packages  Class Hierarchy  This Package  Previous  Next  Index