All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.bwt.JCContainer

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

public class JCContainer
extends Panel
The base class for all BWT containers.

Properties

Name Method
Background setBackground
Font setFont
Foreground setForeground
Insets setInsets
PreferredSize setPreferredSize
UserData setUserData


Variable Index

 o applet
The parent applet.
 o dblbuffer_image
Current double-buffer image.
 o version

Constructor Index

 o JCContainer()
This creates an empty container.
 o JCContainer(Applet, String)
This creates a container which reads parameters from the applet's HTML file.

Method Index

 o add(Component)
Adds the specified component to this container, if it is not already a child.
 o addNotify()
Creates the Panel's peer.
 o disable()
Disables all the container's children.
 o enable()
Enables all the container's children.
 o enable11Events(long)
For JDK1.1, calls Component.enableEvents (which is final).
 o fillBackground(Graphics)
Fills the component with the background color (called by paint).
 o getAppletContext()
Gets the container's applet's context.
 o getComponent(Component)
Returns the position of the child, or BWTEnum.NOTFOUND.
 o getComponent(int)
Gets the child at the specified position.
 o getConverter()
Gets the converter used for converting strings to internal values.
 o getDoubleBufferGraphics()
Creates a double-buffer image
 o getPaintRect()
Returns the area currently being painted, relative to the component's origin.
 o getParameters()
Reads the parameter values from the HTML page using the container's applet.
 o getParameters(Applet)
Reads the parameter values from the HTML page using the specified applet.
 o getParameters(Applet, String)
Reads the parameter values from the file.
 o getUserData()
Gets the UserData value.
 o insets()
Returns the previously set insets, or the superclass' insets if none have been set.
 o minimumSize()
Returns preferredSize().
 o paint(Graphics)
Paints all children.
 o paintInterior(Graphics)
Called by paint, to allow subclasses to draw before their children are painted.
 o preferredHeight()
Gets the subclass' preferred height (default: 100).
 o preferredSize()
Returns the preferred size of this container.
 o preferredWidth()
Gets the subclass' preferred width (default: 100).
 o printAll(Graphics)
Disables double-buffering, and calls Container.printAll
 o processMouseEvent(MouseEvent)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
 o processMouseMotionEvent(MouseEvent)
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.
 o repaint()
Overrides Component.repaint(), which sometimes doesn't call paint().
 o repaint(int, int, int, int)
Repaints part of the component by calling paint directly.
 o repaint(Rectangle)
Repaints part of the component by calling paint directly.
 o reshape(int, int, int, int)
Reshapes the Container to the specified bounding box.
 o setConverter(JCConverter)
Sets the converter to be used for converting strings to internal values.
 o setCursor(int)
Sets the cursor in the parent frame.
 o setInsets(Insets)
Sets the container's margins.
 o setPreferredSize(int, int)
Sets the container's preferred size.
 o setUserData(Object)
Sets an application-defined object that can be attached to the container.
 o updateParent()
Forces the parent to relayout this container.
 o validate()
Validates this Container and all of the components contained within it.

Variables

 o version
  public final static String version
 o applet
  protected transient Applet applet
The parent applet.

 o dblbuffer_image
  protected transient Image dblbuffer_image
Current double-buffer image.

Constructors

 o JCContainer
  public JCContainer()
This creates an empty container. No parameters are read from an HTML file.

 o JCContainer
  public JCContainer(Applet applet,
                     String name)
This creates a container 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 container's applet. The values will override those previously set. Subclasses may override this method to set their own values - in this case, the method should first call super.getParameters().

 o getParameters
  public void getParameters(Applet applet)
Reads the parameter values from the HTML page using the specified applet. The values will override those previously set.

See Also:
getParameter
 o getParameters
  public void getParameters(Applet applet,
                            String file)
Reads the parameter values from the file. The values will override those previously set.

Parameters:
applet - if not null and in a browser, its documentBase() is used to construct a complete filename if necessary
file - if an http protocol is not specified (if a ":" is not present), the current working directory is used
 o setConverter
  public static void setConverter(JCConverter c)
Sets the converter to be used for converting strings to internal values.

See Also:
JCConverter
 o getConverter
  public static JCConverter getConverter()
Gets the converter used for converting strings to internal values.

See Also:
JCConverter
 o getUserData
  public Object getUserData()
Gets the UserData value.

See Also:
setUserData
 o setUserData
  public void setUserData(Object v)
Sets an application-defined object that can be attached to the container.

 o add
  public Component add(Component comp)
Adds the specified component to this container, if it is not already a child.

Overrides:
add in class Container
 o enable
  public synchronized void enable()
Enables all the container's children.

Overrides:
enable in class Component
 o disable
  public synchronized void disable()
Disables all the container's children.

Overrides:
disable in class Component
 o repaint
  public synchronized void repaint()
Overrides Component.repaint(), which sometimes doesn't call paint().

Overrides:
repaint in class Component
 o repaint
  public synchronized void repaint(Rectangle r)
Repaints part of the component by calling paint directly.

 o repaint
  public synchronized void repaint(int x,
                                   int y,
                                   int width,
                                   int height)
Repaints part of the component by calling paint directly.

Overrides:
repaint in class Component
 o updateParent
  public void updateParent()
Forces the parent to relayout this container.

 o validate
  public void validate()
Validates this Container and all of the components contained within it.

Overrides:
validate in class Container
 o enable11Events
  protected void enable11Events(long mask)
For JDK1.1, calls Component.enableEvents (which is final).

 o addNotify
  public void addNotify()
Creates the Panel's peer.

Overrides:
addNotify in class Panel
 o getAppletContext
  public AppletContext getAppletContext()
Gets the container's applet's context. The applet context lets an applet control the applet's environment which is usually the browser or the applet viewer.

Returns:
null if the container is not in an applet or the applet is not in a browser
See Also:
getAppletContext
 o minimumSize
  public Dimension minimumSize()
Returns preferredSize().

Overrides:
minimumSize in class Container
 o setInsets
  public void setInsets(Insets insets)
Sets the container's margins. This value may be set from an HTML file using a PARAM tag with a "Insets" name and an Insets value.

See Also:
insets, Insets, toInsets
 o insets
  public Insets insets()
Returns the previously set insets, or the superclass' insets if none have been set.

Overrides:
insets in class Container
See Also:
setInsets
 o preferredWidth
  protected int preferredWidth()
Gets the subclass' preferred width (default: 100). The subclass should not include the inset sizes in its calculation; these will be added by JCContainer.

 o preferredHeight
  protected int preferredHeight()
Gets the subclass' preferred height (default: 100). The subclass should not include the inset sizes in its calculation; these will be added by JCContainer.

 o setPreferredSize
  public void setPreferredSize(int w,
                               int h)
Sets the container's preferred size. If either dimension is set to BWTEnum.NOVALUE, it is calculated by the subclass. This value may be set from an HTML file using a PARAM tag with a "preferredWidth" name and an int value, and/or a "preferredHeight" name and an int value.

See Also:
preferredSize, toInt
 o preferredSize
  public Dimension preferredSize()
Returns the preferred size of this container. If the app has set the preferred size, it is returned. Otherwise the subclass' preferredWidth and/or preferredHeight method is called.

Overrides:
preferredSize in class Container
See Also:
setPreferredSize, preferredWidth, preferredHeight
 o reshape
  public synchronized void reshape(int x,
                                   int y,
                                   int width,
                                   int height)
Reshapes the Container to the specified bounding box.

Overrides:
reshape in class Component
 o setCursor
  public void setCursor(int cursor)
Sets the cursor in the parent frame.

 o getComponent
  public Component getComponent(int pos)
Gets the child at the specified position.

Overrides:
getComponent in class Container
 o getComponent
  public int getComponent(Component comp)
Returns the position of the child, or BWTEnum.NOTFOUND.

 o getDoubleBufferGraphics
  protected synchronized Graphics getDoubleBufferGraphics()
Creates a double-buffer image

Returns:
the Graphics instance for the image
 o paintInterior
  public synchronized void paintInterior(Graphics gc)
Called by paint, to allow subclasses to draw before their children are painted.

 o fillBackground
  protected void fillBackground(Graphics gc)
Fills the component with the background color (called by paint).

 o getPaintRect
  public Rectangle getPaintRect()
Returns the area currently being painted, relative to the component's origin.

Returns:
null if no area is being drawn
See Also:
paint
 o paint
  public void paint(Graphics gc)
Paints all children.

Overrides:
paint in class Container
 o printAll
  public void printAll(Graphics gc)
Disables double-buffering, and calls Container.printAll

Overrides:
printAll in class Component
 o processMouseEvent
  protected void processMouseEvent(MouseEvent mouse_ev)
Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

Overrides:
processMouseEvent in class Component
 o processMouseMotionEvent
  protected void processMouseMotionEvent(MouseEvent mouse_ev)
Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.

Overrides:
processMouseMotionEvent in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index