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
-
CENTER
-
-
LEFT
-
-
RIGHT
-
-
shadow
- The container's shadow thickness.
-
JCGroupBox()
- Creates an empty groupBox.
-
JCGroupBox(Applet, String)
- Creates a GroupBox which reads parameters from the applet's HTML file.
-
JCGroupBox(Object)
- Creates a groupBox with the specified title.
-
addNotify()
- Creates the Panel's peer.
-
calcTitleSize()
- Calculates the title size.
-
drawShadow(Graphics, int, int, int, int)
- Draws an ETCHED_IN shadow.
-
drawTitle(Graphics)
- Draws the title.
-
getParameters()
- Reads the parameter values from the HTML page using the component's applet.
-
getShadowThickness()
- Gets the shadow's thickness.
-
getTitle()
- Gets the title.
-
getTitleString()
- Gets the title as a String.
-
insets()
- Modifies the default insets to account for the shadows and title.
-
layout()
- Lays out the boxes's internal elements.
-
paintInterior(Graphics)
- Draws the shadows and title.
-
preferredWidth()
- Includes the title width in the preferred size.
-
reshape(int, int, int, int)
- Reshapes the Container to the specified bounding box.
-
setShadowThickness(int)
- Sets the shadow's thickness (default: 2).
HTML param name/value: "ShadowThickness"/int
-
setTitle(Object)
- Sets a string to be used as the panel's title, with LEFT alignment.
HTML param name/value: "Title"/string
-
setTitle(Object, int)
- Sets a string to be used as the panel's title.
-
setTitleString(String)
- Sets a string to be used as the panel's title, with LEFT alignment.
HTML param name/value: "Title"/string
LEFT
public static final int LEFT
CENTER
public static final int CENTER
RIGHT
public static final int RIGHT
shadow
protected int shadow
- The container's shadow thickness.
JCGroupBox
public JCGroupBox()
- Creates an empty groupBox. No parameters are read from an HTML file.
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
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
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
getShadowThickness
public int getShadowThickness()
- Gets the shadow's thickness.
- See Also:
- setShadowThickness
setShadowThickness
public void setShadowThickness(int v)
- Sets the shadow's thickness (default: 2).
HTML param name/value: "ShadowThickness"/int
getTitle
public Object getTitle()
- Gets the title.
- See Also:
- setTitle
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
getTitleString
public String getTitleString()
- Gets the title as a String.
- See Also:
- setTitle
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
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
addNotify
public void addNotify()
- Creates the Panel's peer.
- Overrides:
- addNotify in class JCContainer
calcTitleSize
protected void calcTitleSize()
- Calculates the title size.
layout
public synchronized void layout()
- Lays out the boxes's internal elements.
- Overrides:
- layout in class Container
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
insets
public Insets insets()
- Modifies the default insets to account for the shadows and title.
- Overrides:
- insets in class JCContainer
drawShadow
protected void drawShadow(Graphics g,
int x,
int y,
int w,
int h)
- Draws an ETCHED_IN shadow.
drawTitle
protected void drawTitle(Graphics gc)
- Draws the title.
paintInterior
public void paintInterior(Graphics gc)
- Draws the shadows and title.
- Overrides:
- paintInterior in class JCContainer
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