All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.bwt.JCSeparator

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----jclass.bwt.JCComponent
                           |
                           +----jclass.bwt.JCSeparator

public class JCSeparator
extends JCComponent
JCSeparator is a simple component that separates items in a display. The shadow is drawn centered horizontally or vertically, depending on the separator's orientation.

Properties

Name Method
Background setBackground
DoubleBuffer setDoubleBuffer
Insets setInsets
Orientation setOrientation
PreferredSize setPreferredSize
UserData setUserData


Variable Index

 o HORIZONTAL
 o VERTICAL

Constructor Index

 o JCSeparator()
Constructs a horizontal separator.
 o JCSeparator(int)
Constructs a separator with the specified orientation.
 o JCSeparator(int, Applet, String)
Creates a separator which reads parameters from the applet's HTML file.

Method Index

 o getOrientation()
Gets the orientation.
 o getParameters()
Reads the parameter values from the HTML page using the component's applet.
 o paint(Graphics)
Draws a shadow centered horizontally or vertically, depending on the orientation.
 o preferredHeight()
Returns the shadow thickness value if this is a horizontal separator; 100 otherwise.
 o preferredWidth()
Returns the shadow thickness value if this is a vertical separator; 100 otherwise.
 o setOrientation(int)
Sets the orientation.

Variables

 o HORIZONTAL
 public static final int HORIZONTAL
 o VERTICAL
 public static final int VERTICAL

Constructors

 o JCSeparator
 public JCSeparator()
Constructs a horizontal separator.

 o JCSeparator
 public JCSeparator(int dir)
Constructs a separator with the specified orientation.

Parameters:
dir - either HORIZONTAL or VERTICAL
 o JCSeparator
 public JCSeparator(int dir,
                    Applet applet,
                    String name)
Creates a separator 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

Methods

 o 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 JCComponent
 o getOrientation
 public int getOrientation()
Gets the orientation.

 o setOrientation
 public void setOrientation(int dir)
Sets the orientation. This must be called before the scrollbar is visible (ie before it is added to its parent).

HTML param name/value: "Orientation"/enum

Parameters:
dir - either HORIZONTAL or VERTICAL
Throws: IllegalArgumentException
If an invalid value was set
 o preferredWidth
 protected int preferredWidth()
Returns the shadow thickness value if this is a vertical separator; 100 otherwise.

Overrides:
preferredWidth in class JCComponent
 o preferredHeight
 protected int preferredHeight()
Returns the shadow thickness value if this is a horizontal separator; 100 otherwise.

Overrides:
preferredHeight in class JCComponent
 o paint
 public void paint(Graphics gc)
Draws a shadow centered horizontally or vertically, depending on the orientation.

Overrides:
paint in class JCComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index