All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.bwt.JCGroupBox

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

public class JCGroupBox
extends JCContainer
JCGroupBox is a simple container used to enclose a single work area child in a shadow drawn by JCGroupBox. It performs geometry management so that its size always matches its child's outer size plus the JCGroupBox's margins and shadow thickness. It can also be assigned a title which is drawn at the top.

Properties

Name Method
Background setBackground
Font setFont
Foreground setForeground
Insets setInsets
PreferredSize setPreferredSize
ShadowThickness setShadowThickness
Title setTitle
UserData setUserData


Variable Index

 o CENTER
 o LEFT
 o RIGHT
 o shadow
The container's shadow thickness.

Constructor Index

 o JCGroupBox()
Creates an empty groupBox.
 o JCGroupBox(Applet, String)
Creates a GroupBox which reads parameters from the applet's HTML file.
 o JCGroupBox(Object)
Creates a groupBox with the specified title.

Method Index

 o addNotify()
Creates the Panel's peer.
 o calcTitleSize()
Calculates the title size.
 o drawShadow(Graphics, int, int, int, int)
Draws an ETCHED_IN shadow.
 o drawTitle(Graphics)
Draws the title.
 o getParameters()
Reads the parameter values from the HTML page using the component's applet.
 o getShadowThickness()
Gets the shadow's thickness.
 o getTitle()
Gets the title.
 o getTitleString()
Gets the title as a String.
 o insets()
Modifies the default insets to account for the shadows and title.
 o layout()
Lays out the boxes's internal elements.
 o paintInterior(Graphics)
Draws the shadows and title.
 o preferredWidth()
Includes the title width in the preferred size.
 o reshape(int, int, int, int)
Reshapes the Container to the specified bounding box.
 o setShadowThickness(int)
Sets the shadow's thickness (default: 2).

HTML param name/value: "ShadowThickness"/int

 o setTitle(Object)
Sets a string to be used as the panel's title, with LEFT alignment.

HTML param name/value: "Title"/string

 o setTitle(Object, int)
Sets a string to be used as the panel's title.
 o setTitleString(String)
Sets a string to be used as the panel's title, with LEFT alignment.

HTML param name/value: "Title"/string

Variables

 o LEFT
 public static final int LEFT
 o CENTER
 public static final int CENTER
 o RIGHT
 public static final int RIGHT
 o shadow
 protected int shadow
The container's shadow thickness.

Constructors

 o JCGroupBox
 public JCGroupBox()
Creates an empty groupBox. No parameters are read from an HTML file.

 o JCGroupBox
 public JCGroupBox(Object title)
Creates a groupBox with the specified title. No parameters are read from an HTML file.

Parameters:
title - a String, Image, JCString, or any object (in which case the object's toString() method is called to obtain a string)
See Also:
setTitle
 o JCGroupBox
 public JCGroupBox(Applet applet,
                   String name)
Creates a GroupBox which reads parameters from the applet's HTML file.

Parameters:
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 JCContainer
 o getShadowThickness
 public int getShadowThickness()
Gets the shadow's thickness.

See Also:
setShadowThickness
 o setShadowThickness
 public void setShadowThickness(int v)
Sets the shadow's thickness (default: 2).

HTML param name/value: "ShadowThickness"/int

 o getTitle
 public Object getTitle()
Gets the title.

See Also:
setTitle
 o setTitle
 public void setTitle(Object title)
Sets a string to be used as the panel's title, with LEFT alignment.

HTML param name/value: "Title"/string

Parameters:
title - a String, Image, JCString, or any object (in which case the object's toString() method is called to obtain a string)
See Also:
toJCString
 o getTitleString
 public String getTitleString()
Gets the title as a String.

See Also:
setTitle
 o setTitleString
 public void setTitleString(String title)
Sets a string to be used as the panel's title, with LEFT alignment.

HTML param name/value: "Title"/string

Parameters:
title - a String, Image, JCString, or any object (in which case the object's toString() method is called to obtain a string)
See Also:
toJCString
 o setTitle
 public void setTitle(Object title,
                      int alignment)
Sets a string to be used as the panel's title.

Parameters:
title - a String, Image, JCString, or any object (in which case the object's toString() method is called to obtain a string)
alignment: - LEFT, CENTER or RIGHT
Throws: IllegalArgumentException
If an invalid value is set
 o addNotify
 public void addNotify()
Creates the Panel's peer.

Overrides:
addNotify in class JCContainer
 o calcTitleSize
 protected void calcTitleSize()
Calculates the title size.

 o layout
 public synchronized void layout()
Lays out the boxes's internal elements.

Overrides:
layout in class Container
 o reshape
 public void reshape(int x,
                     int y,
                     int w,
                     int h)
Reshapes the Container to the specified bounding box.

Overrides:
reshape in class JCContainer
 o insets
 public Insets insets()
Modifies the default insets to account for the shadows and title.

Overrides:
insets in class JCContainer
 o drawShadow
 protected void drawShadow(Graphics g,
                           int x,
                           int y,
                           int w,
                           int h)
Draws an ETCHED_IN shadow.

 o drawTitle
 protected void drawTitle(Graphics gc)
Draws the title.

 o paintInterior
 public void paintInterior(Graphics gc)
Draws the shadows and title.

Overrides:
paintInterior in class JCContainer
 o preferredWidth
 protected int preferredWidth()
Includes the title width in the preferred size.

Overrides:
preferredWidth in class JCContainer

All Packages  Class Hierarchy  This Package  Previous  Next  Index