    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class jclass.bwt.JCSplitterWindow

    java.lang.Object
       |
       +----java.awt.Component
               |
               +----java.awt.Container
                       |
                       +----java.awt.Panel
                               |
                               +----jclass.bwt.JCContainer
                                       |
                                       +----jclass.bwt.JCSplitterWindow

public class JCSplitterWindow
extends JCContainer

A container similar to Motif's XmPanedWindow, which manages 1 or more children oriented vertically or horizontally. A JCSeparator component separates each pair of children. The user can adjust the size of the panes by dragging the separator.

Properties

Name | Method
--- | ---
Background | setBackground
Font | setFont
Foreground | setForeground
Insets | setInsets
MinChildSize | setMinChildSize
Orientation | setOrientation
PreferredSize | setPreferredSize
UserData | setUserData

##

HORIZONTAL
VERTICAL

##

JCSplitterWindow()
  Creates an empty horizontal window (i.e.
JCSplitterWindow(int)
  Creates an empty window.
JCSplitterWindow(int, Applet, String)
  Creates a pane which reads parameters from the applet's HTML file.

##

addImpl(Component, Object, int)
  Adds the specified component to this container at the given position.
getMinChildSize()
  Gets the MinChildSize value.
getOrientation()
  Gets the direction of the panes.
getParameters()
  Reads the parameter values from the HTML page using the component's applet.
layout()
  Position's the window's internal elements.
preferredHeight()
  Returns the sum of all children's preferred height if orientation is vertical; otherwise returns the maximum preferred height of all children.
preferredWidth()
  Returns the sum of all children's preferred width if orientation is horizontal; otherwise returns the maximum preferred width of all children.
remove(Component)
  Removes the component and its adjoining JCSeparator from the window.
setLayout(LayoutManager)
  Sets the layout manager for this container.
setMinChildSize(int)
  Sets the minimum size (in pixels) to which a child can be resized by the user (default: 20).
setOrientation(int)
  Sets the orientation: HORIZONTAL or VERTICAL.

##

HORIZONTAL

     public static final int HORIZONTAL

VERTICAL

     public static final int VERTICAL

##

JCSplitterWindow

     public JCSplitterWindow()

  Creates an empty horizontal window (i.e. the children are layed out side-to-side). No parameters are read from an HTML file.

JCSplitterWindow

     public JCSplitterWindow(int dir)

  Creates an empty window. No parameters are read from an HTML file.

  Parameters:
    dir - either HORIZONTAL or VERTICAL

JCSplitterWindow

     public JCSplitterWindow(int dir,
                             Applet applet,
                             String name)

  Creates a pane which reads parameters from the applet's HTML file.

  Parameters:
    dir - either HORIZONTAL or VERTICAL
    applet - the applet whose PARAM tags are to be read
    name - if this is not null, only parameters preceded by this name are read
  See Also:
    getParameter

##

getParameters

     protected void getParameters()

  Reads the parameter values from the HTML page using the component's applet. The values will override those previously set.

  Overrides:
    getParameters in class JCContainer

getOrientation

     public int getOrientation()

  Gets the direction of the panes.

  See Also:
    setOrientation

setOrientation

     public void setOrientation(int v)

  Sets the orientation: HORIZONTAL or VERTICAL.

  Throws: IllegalArgumentException
    If an invalid value was set

getMinChildSize

     public int getMinChildSize()

  Gets the MinChildSize value.

  See Also:
    setMinChildSize

setMinChildSize

     public void setMinChildSize(int v)

  Sets the minimum size (in pixels) to which a child can be resized by the user (default: 20).

addImpl

     protected void addImpl(Component comp,
                            Object constraints,
                            int index)

  Adds the specified component to this container at the given position. A JCSeparator is added between each pair of children.

  Parameters:
    pos - the position at which to insert the component. -1 means insert at the end.
  Overrides:
    addImpl in class JCContainer
  See Also:
    JCSeparator /*

remove

     public void remove(Component comp)

  Removes the component and its adjoining JCSeparator from the window.

  Overrides:
    remove in class Container

preferredHeight

     protected int preferredHeight()

  Returns the sum of all children's preferred height if orientation is vertical; otherwise returns the maximum preferred height of all children.

  Overrides:
    preferredHeight in class JCContainer

preferredWidth

     protected int preferredWidth()

  Returns the sum of all children's preferred width if orientation is horizontal; otherwise returns the maximum preferred width of all children.

  Overrides:
    preferredWidth in class JCContainer

layout

     public void layout()

  Position's the window's internal elements.

  Overrides:
    layout in class Container

setLayout

     public final void setLayout(LayoutManager mgr)

  Sets the layout manager for this container. This method is overridden to prevent the layout mgr from being set.

  Overrides:
    setLayout in class Container

    All Packages  Class Hierarchy  This Package  Previous  Next  Index