All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.wizards.panels.AnimationVisual
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----com.sun.wizards.panels.ProgressVisual
|
+----com.sun.wizards.panels.AnimationVisual
- public class AnimationVisual
- extends ProgressVisual
- implements ImageObserver, Runnable
This classes is used to provide animcations within a Wizard
panel. The images are stored into the WizardResources, and
retrieved at runtime when this panel is displayed. The images
composing the animation are updated in a separate thread.
-
AnimationVisual(String[], int)
- Constructor used by the builder.
-
AnimationVisual(String[], int, boolean)
- Constructor used by the builder with looping.
-
AnimationVisual(WizardTreeManager, Route)
- Constructor to create new Panel with no images
-
addRuntimeResources(Vector)
- Get the runtime classes required by this visual.
-
deserialize(DataInput)
- Deserialize this ProgressVisual from the specified input
stream.
-
getMinimumSize()
- The minimum size of this panel.
-
getPreferredSize()
- The preferred size of this panel.
-
imageUpdate(Image, int, int, int, int, int)
- Sets allImagesLoaded, if they have indeed been loaded.
-
paint(Graphics)
-
Paints the current frame pointed to by currentFrame.
-
run()
- Begins the movie from the beginning and plays once.
-
serialize(DataOutput)
- Serialize this ProgressVisual to the specified output
stream.
-
start()
- This method is called when all images are loaded and ready
to be displayed.
-
stop()
- This method is called when the movie thread should be stopped
to be displayed.
AnimationVisual
public AnimationVisual(WizardTreeManager wizardManager,
Route route)
- Constructor to create new Panel with no images
- Parameters:
- wizardManager - The WizardTreeManager that will manage this panel
- route - The desired route to the component
AnimationVisual
public AnimationVisual(String imageNames[],
int fps)
- Constructor used by the builder.
- Parameters:
- imageNames - The names of the images stored in the WizardState that make up the
animation
- fps - Frames Per Seconds, the number of frames of animcation to show per
second.
AnimationVisual
public AnimationVisual(String imageNames[],
int fps,
boolean loop)
- Constructor used by the builder with looping.
- Parameters:
- imageNames - The names of the images stored in the WizardState that make up the
animation
- fps - Frames Per Seconds, the number of frames of animcation to show per
second.
- loop - If set to true, the animation will loop forever.
getMinimumSize
public Dimension getMinimumSize()
- The minimum size of this panel. Usually the same as the image size.
- Returns:
- The minimum size of this panel.
- Overrides:
- getMinimumSize in class Container
getPreferredSize
public Dimension getPreferredSize()
- The preferred size of this panel. Usually the same as the minimum size.
- Returns:
- The preferred size of this panel.
- Overrides:
- getPreferredSize in class Container
stop
public void stop()
- This method is called when the movie thread should be stopped
to be displayed.
- Overrides:
- stop in class ProgressVisual
start
public void start()
- This method is called when all images are loaded and ready
to be displayed.
- Overrides:
- start in class ProgressVisual
run
public void run()
- Begins the movie from the beginning and plays once.
paint
public void paint(Graphics g)
- Paints the current frame pointed to by currentFrame. Waits
until each picture is fully loaded before painting.
- Parameters:
- g - The Graphics context for this panel. Use getGraphics() to obtain.
- Overrides:
- paint in class Container
imageUpdate
public boolean imageUpdate(Image image,
int infoFlags,
int x,
int y,
int width,
int height)
- Sets allImagesLoaded, if they have indeed been loaded. Returns result.
- Parameters:
- image - The image in question
- infoFlags - Flags determining what information is available about
the image
- x - Not used
- y - Not used
- width - The image's width, if it can be determined
- height - The image's height, if it can be determined
- Returns:
- Whether the image has been loaded fully or not
- Overrides:
- imageUpdate in class Component
serialize
public void serialize(DataOutput out)
- Serialize this ProgressVisual to the specified output
stream.
- Parameters:
- out - The output stream to which this ProgressVisual will be
serialized.
- Overrides:
- serialize in class ProgressVisual
deserialize
public void deserialize(DataInput in)
- Deserialize this ProgressVisual from the specified input
stream.
- Parameters:
- in - The input stream from which this ProgressVisual will be
deserialized.
- Overrides:
- deserialize in class ProgressVisual
addRuntimeResources
public void addRuntimeResources(Vector resourceVector)
- Get the runtime classes required by this visual.
- Parameters:
- resourceVector - The vector containing all runtime resources for this wizard.
- Overrides:
- addRuntimeResources in class ProgressVisual
All Packages Class Hierarchy This Package Previous Next Index