com.sas.visuals
Class Fireworks

com.sas.visuals.Fireworks
All Implemented Interfaces:
com.sas.awt.print.PrintableInterface, VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, com.sas.PublicClonable, AlarmListener, com.sas.ViewInterface, com.sas.visuals.IconInterface, MultipleValueEventSourceInterface, com.sas.visuals.PainterInterface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class Fireworks

Fireworks is a class that increments and decrements a FireworkIcon object when an alarm is fired and paints the icon in that state.

Notes:


See Also:
AnimationIconInterface, FireworkIcon, Serialized Form

Field Summary
protected  FireworkIcon fireworkIcon
          FireworkIcon to be manipulated in this class
static java.lang.String RB_KEY
           
 
Fields inherited from class com.sas.visuals.AnimationIconView
alarm, animationIcon, decrement, running
 
Fields inherited from class com.sas.visuals.IconView
icon
 
Constructor Summary
Fireworks()
          Default constructor.
 
Method Summary
 void addNotify()
          Overridden to determine set the correct background based on the parent.
protected  AnimationIconView createIconObject(AnimationIconView icon)
          Called by super in AnimationIconView during cloning.
static int getDefaultHeight()
          Returns the default height in pixels
static int getDefaultWidth()
          Returns the default width in pixels
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this Fireworks object.
 int getGravity()
          Gets the gravity affecting the rockets.
 int getMaxRocketExplosionEnergy()
          Gets the maximum rocket explosion energy.
 int getMaxRocketNumber()
          Gets the maximum number of rockets created.
 int getMaxRocketPatchLength()
          Gets the maximum rocket patch length.
 int getMaxRocketPatchNumber()
          Gets the maximum rocket patch number.
 int getRocketStyleVariability()
          Gets the preferredSize that was set on the FireworkIcon
 void propertyChanged(java.beans.PropertyChangeEvent e)
          Invoked when the parent of this component sends a PropertyChangeEvent.
 void removeNotify()
          Removes the property changed listener attached to the Fireworks object
 void setBounds(int x, int y, int width, int height)
          Sets the bounds of the Fireworks component.
static void setDefaultHeight(int newHeight)
          Sets the default height in pixels
 void setDefaultValues()
          Sets the default internal values for the Fireworks object.
static void setDefaultWidth(int newWidth)
          Sets the default widthin pixels
 void setGravity(int g)
          Sets the gravity.
 void setMaxRocketExplosionEnergy(int e)
          Sets the maximum rocket explosion energy.
 void setMaxRocketNumber(int n)
          Sets the maximum rocket number.
 void setMaxRocketPatchLength(int l)
          Sets the maximum rocket patch length.
 void setMaxRocketPatchNumber(int p)
          Sets the maximum rocket patch number.
 void setRocketStyleVariability(int var)
          Sets the rocket style variability.
 
Methods inherited from class com.sas.visuals.AnimationIconView
clone, fireAlarm, getAlarm, getAnimationIcon, isDecrement, isRunning, setAlarm, setAnimationIcon, setDecrement, setRunning, start, stop
 
Methods inherited from class com.sas.visuals.IconView
computePreferredSize, getIcon, getInsets, paint, paint, setIcon, update
 
Methods inherited from class com.sas.awt.Component
getMinimumSize
 
Methods inherited from class com.sas.awt.ComponentVisualComponent
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, detachModel, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getModelInterface, getPageBounds, getPreferredSize, getPrePainter, getPrintOptionsPanel, getRequiredInterfaces, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, pageExists, print, printFinalize, printInitialize, propertyChange, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setComponentDescription, setComponentSupportInfo, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, validateObject
 
Methods inherited from interface com.sas.visuals.IconInterface
getPreferredSize
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

fireworkIcon

protected FireworkIcon fireworkIcon
FireworkIcon to be manipulated in this class

Constructor Detail

Fireworks

public Fireworks()
Default constructor.

Method Detail

getExtendedBeanInfo

public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this Fireworks object.

Returns:
the ExtendedBeanInfo for this class

getDefaultHeight

public static int getDefaultHeight()
Returns the default height in pixels

Returns:
pixel value of the default height
See Also:
setDefaultHeight(int)

getDefaultWidth

public static int getDefaultWidth()
Returns the default width in pixels

Returns:
pixel value of default width
See Also:
setDefaultWidth(int)

setDefaultHeight

public static void setDefaultHeight(int newHeight)
Sets the default height in pixels

Parameters:
newHeight - the desired default height in pixels
See Also:
getDefaultHeight()

setDefaultWidth

public static void setDefaultWidth(int newWidth)
Sets the default widthin pixels

Parameters:
newWidth - the desired default width in pixels
See Also:
setDefaultWidth(int)

addNotify

public void addNotify()
Overridden to determine set the correct background based on the parent.

Overrides:
addNotify in class java.awt.Component

removeNotify

public void removeNotify()
Removes the property changed listener attached to the Fireworks object

Overrides:
removeNotify in class java.awt.Component

propertyChanged

public void propertyChanged(java.beans.PropertyChangeEvent e)
Invoked when the parent of this component sends a PropertyChangeEvent. If the parent's background color is changed and this component is transparent, its background color is also changed.

Parameters:
e - the property event that changed

createIconObject

protected AnimationIconView createIconObject(AnimationIconView icon)
Called by super in AnimationIconView during cloning. Creates a clone of itself and sets the properties of the FireworkIcon, which is part of the AnimationIconView object.

Overrides:
createIconObject in class AnimationIconView
Parameters:
icon - an AnimationIconView specifically a FireworkIcon to be cloned
Returns:
copy of the AnimationIconView Object passed in, with new properties.

getGravity

public int getGravity()
Gets the gravity affecting the rockets.

Returns:
int value representing the amount of gravity affecting the rockets
See Also:
setGravity(int), FireworkIcon.getGravity()

getMaxRocketNumber

public int getMaxRocketNumber()
Gets the maximum number of rockets created.

Returns:
int value representing maximum number of rockets to be painted at one time
See Also:
setMaxRocketNumber(int), FireworkIcon.getMaxRocketNumber()

getMaxRocketExplosionEnergy

public int getMaxRocketExplosionEnergy()
Gets the maximum rocket explosion energy.

Returns:
int value representing the maximum rocket explosion variable
See Also:
setMaxRocketExplosionEnergy(int), FireworkIcon.getMaxRocketExplosionEnergy()

getMaxRocketPatchNumber

public int getMaxRocketPatchNumber()
Gets the maximum rocket patch number.

Returns:
int value representing the patch number
See Also:
setMaxRocketPatchNumber(int), FireworkIcon.getMaxRocketPatchNumber()

getMaxRocketPatchLength

public int getMaxRocketPatchLength()
Gets the maximum rocket patch length.

See Also:
setMaxRocketPatchLength(int), FireworkIcon.getMaxRocketPatchLength()

getRocketStyleVariability

public int getRocketStyleVariability()
Gets the preferredSize that was set on the FireworkIcon

Returns:
int value representing the variability of the rockets
See Also:
ComponentVisualComponent.setPreferredSize(java.awt.Dimension), FireworkIcon.getRocketStyleVariability()

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Sets the bounds of the Fireworks component.

Specified by:
setBounds in interface VisualInterface
Overrides:
setBounds in class ComponentVisualComponent
See Also:
ComponentVisualComponent.setBounds(int, int, int, int)

setDefaultValues

public void setDefaultValues()
Sets the default internal values for the Fireworks object.

Specified by:
setDefaultValues in interface VisualInterface
Specified by:
setDefaultValues in interface com.sas.ComponentInterface
Overrides:
setDefaultValues in class AnimationIconView
See Also:
ComponentInterface.setDefaultValues()

setGravity

public void setGravity(int g)
Sets the gravity.

Parameters:
g - the desired gravity int value
See Also:
getGravity(), FireworkIcon.setGravity(int)

setMaxRocketNumber

public void setMaxRocketNumber(int n)
Sets the maximum rocket number.

Parameters:
n - maximum number of rockets to be painted at one time
See Also:
getMaxRocketNumber(), FireworkIcon.setMaxRocketNumber(int)

setMaxRocketExplosionEnergy

public void setMaxRocketExplosionEnergy(int e)
Sets the maximum rocket explosion energy.

Parameters:
e - the desired maximum rocket explosion value. The higher the value, the greater the explosive energy of the rockets.
See Also:
getMaxRocketExplosionEnergy(), FireworkIcon.setMaxRocketExplosionEnergy(int)

setMaxRocketPatchNumber

public void setMaxRocketPatchNumber(int p)
Sets the maximum rocket patch number.

Parameters:
p - value of the maximum rocket patch allowed
See Also:
getMaxRocketPatchNumber(), FireworkIcon.setMaxRocketPatchNumber(int)

setMaxRocketPatchLength

public void setMaxRocketPatchLength(int l)
Sets the maximum rocket patch length.

Parameters:
l - the desired maximum length of the rocket trails
See Also:
getMaxRocketPatchLength(), FireworkIcon.setMaxRocketPatchLength(int)

setRocketStyleVariability

public void setRocketStyleVariability(int var)
Sets the rocket style variability. The higher the value, a greater variation of rockets will be generated and displayed based on explosive energy, patch number, and rocket trails.

Parameters:
var - the value to determine the variability of the rockets painted.
See Also:
getRocketStyleVariability(), FireworkIcon.setRocketStyleVariability(int)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.