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
-
HORIZONTAL
-
-
VERTICAL
-
-
JCSeparator()
- Constructs a horizontal separator.
-
JCSeparator(int)
- Constructs a separator with the specified orientation.
-
JCSeparator(int, Applet, String)
- Creates a separator which reads parameters from the applet's HTML file.
-
getOrientation()
- Gets the orientation.
-
getParameters()
- Reads the parameter values from the HTML page using the component's applet.
-
paint(Graphics)
- Draws a shadow centered horizontally or vertically, depending on
the orientation.
-
preferredHeight()
- Returns the shadow thickness value if this is a horizontal separator;
100 otherwise.
-
preferredWidth()
- Returns the shadow thickness value if this is a vertical separator;
100 otherwise.
-
setOrientation(int)
- Sets the orientation.
HORIZONTAL
public static final int HORIZONTAL
VERTICAL
public static final int VERTICAL
JCSeparator
public JCSeparator()
- Constructs a horizontal separator.
JCSeparator
public JCSeparator(int dir)
- Constructs a separator with the specified orientation.
- Parameters:
- dir - either HORIZONTAL or VERTICAL
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
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
getOrientation
public int getOrientation()
- Gets the orientation.
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
preferredWidth
protected int preferredWidth()
- Returns the shadow thickness value if this is a vertical separator;
100 otherwise.
- Overrides:
- preferredWidth in class JCComponent
preferredHeight
protected int preferredHeight()
- Returns the shadow thickness value if this is a horizontal separator;
100 otherwise.
- Overrides:
- preferredHeight in class JCComponent
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