All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.multimedia.Plasma

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----symantec.itools.multimedia.Plasma

public class Plasma
extends Canvas
implements Runnable
Plasma component. Creates an animation of colored amorphous shapes, where colors gradually modulate as shapes merge and separate.


Constructor Index

 o Plasma()
Create default plasma component.

Method Index

 o addNotify()
Tells this component that it has been added to a container.
 o dopalette()
Setup Plasma Palette.
 o drawplasma()
Draws plasma data into an internal buffer.
 o getPreviewMode()
Gets the preview mode flag.
 o hide()
Makes this component invisible.
 o moveplasma()
Moves Plasma occurance location at random within component.
 o paint(Graphics)
Paints this component using the given graphics context.
 o removeNotify()
Tells this component that it is being removed from a container.
 o reshape(int, int, int, int)
Moves and/or resizes this component.
 o run()
Plasma thread body.
 o setPreviewMode(boolean)
Sets the preview mode flag.
 o setupcos()
Setup Plasma cosine table.
 o show()
Makes this component visible.
 o startPlasma()
Resume plasma animation.
 o stopPlasma()
Suspend plasma animation.
 o update(Graphics)
Handles redrawing of this component on the screen.

Constructors

 o Plasma
  public Plasma()
Create default plasma component.

Methods

 o addNotify
  public synchronized void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to start the plasma thread.

Overrides:
addNotify in class Canvas
See Also:
removeNotify
 o removeNotify
  public synchronized void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to stop the plasma thread.

Overrides:
removeNotify in class Component
See Also:
addNotify
 o startPlasma
  public void startPlasma()
Resume plasma animation.

 o stopPlasma
  public void stopPlasma()
Suspend plasma animation.

 o show
  public synchronized void show()
Makes this component visible. This is a standard Java AWT method which gets called to show this component. If this component was invisible due to a previous hide() call it make this component visible again.

Overrides:
show in class Component
See Also:
hide
 o hide
  public synchronized void hide()
Makes this component invisible. This is a standard Java AWT method which gets called to hide this component. A hidden component cannot be seen by the user nor does it take up space in its container, but it does continue to exist.

Overrides:
hide in class Component
See Also:
show
 o reshape
  public synchronized void reshape(int x,
                                   int y,
                                   int width,
                                   int height)
Moves and/or resizes this component. This is a standard Java AWT method which gets called to move and/or resize this component. Components that are in containers with layout managers should not call this method, but rely on the layout manager instead.

Parameters:
x - horizontal position in the parent's coordinate space
y - vertical position in the parent's coordinate space
width - the new width
height - the new height
Overrides:
reshape in class Component
 o setPreviewMode
  public void setPreviewMode(boolean f)
Sets the preview mode flag. This flag is used by Visual Cafe to determine if this component should be run during design time.

Parameters:
f - new preview mode
See Also:
getPreviewMode
 o getPreviewMode
  public boolean getPreviewMode()
Gets the preview mode flag. This flag is used by Visual Cafe to determine if this component should be run during design time.

Parameters:
f - new preview mode
See Also:
setPreviewMode
 o run
  public void run()
Plasma thread body. This method is called by the Java virtual machine to when this thread starts.

 o paint
  public void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its <0,0> coordinate is this component's top-left corner.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Canvas
See Also:
repaint, update
 o update
  public void update(Graphics g)
Handles redrawing of this component on the screen. This is a standard Java AWT method which gets called by the Java AWT (repaint()) to handle repainting this component on the screen. The graphics context clipping region is set to the bounding rectangle of this component and its <0,0> coordinate is this component's top-left corner. Typically this method paints the background color to clear the component's drawing space, sets graphics context to be the foreground color, and then calls paint() to draw the component. It is overridden here to reduce flicker by eliminating the uneeded clearing of the background.

Parameters:
g - the graphics context
Overrides:
update in class Component
See Also:
repaint, paint
 o drawplasma
  public void drawplasma()
Draws plasma data into an internal buffer. Not generally called directly.

 o moveplasma
  public void moveplasma()
Moves Plasma occurance location at random within component. Not generally called directly.

 o dopalette
  public void dopalette()
Setup Plasma Palette. Not generally called directly.

 o setupcos
  public void setupcos()
Setup Plasma cosine table. Not generally called directly.


All Packages  Class Hierarchy  This Package  Previous  Next  Index