|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.visuals.ImageAnimation
public class ImageAnimation
ImageAnimation is a class that increments and decrements an ImageAnimationIcon
object when an alarm is fired and paints the image in that state. The ImageAnimationIcon
displays .jpg or .gif image files. The images can be scrolled or flipped through in
several directions. The model is an ordered list of image file names.
Notes:
AnimationIconInterface,
AnimationIconView,
ImageAnimationIcon,
Serialized Form| Field Summary | |
|---|---|
protected OrderedCollection |
defaultSequenceModel
OrderedCollection of images to be in the sequence of the animation |
protected ImageAnimationIcon |
imgAnimation
ImageAnimationIcon object that is to be displayed and manipulated |
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 | |
|---|---|
ImageAnimation()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
contentsChanged(com.sas.collection.ContentsChangedEvent evt)
Called when the contents of the model have changed. |
protected AnimationIconView |
createIconObject(AnimationIconView icon)
Creates a clone of itself and sets the properties of the ImageAnimationIcon, which is part of the AnimationIconView object. |
void |
detachModel(ModelInterface model)
Detach the model from the ImageAnimation. |
static int |
getDefaultHeight()
Returns the default height in pixels |
static int |
getDefaultWidth()
Returns the default width in pixels |
int |
getDirection()
Gets the direction the images will scroll in if imageScroll property is true. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to
augment the automatically introspected information about this ImageAnimation. |
java.lang.String[] |
getImageSequence()
Returns the sequence of file names for the images to be displayed. |
java.net.URL[] |
getImageURLSequence()
Returns the sequence of file names for the images to be displayed. |
java.util.Vector |
getRequiredInterfaces()
Returns the required interfaces Vector for this component. |
int |
getScrollingSpeed()
Gets the speed at which the images will scroll. |
boolean |
isDefaultModelAttached()
Indicates whether defaultModel is attached or not |
boolean |
isImageScroll()
Returns if the images are supposed to scroll over the area of the ImageAnimation component. |
boolean |
isSourceAppletRelative()
|
void |
refresh(ModelInterface model)
Refresh the images from the model list of image file names. |
protected void |
refreshSequence(StaticOrderedCollectionInterface model)
Refresh the sequence of images from a specified collection object. |
void |
setAnimationIcon(AnimationIconInterface animIcon)
Sets the AnimationIconInterface object to be incremented/decremented and painted. |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the bounds of the ImageAnimation component. |
static void |
setDefaultHeight(int newHeight)
Sets the default height in pixels |
void |
setDefaultValues()
Sets the default internal values for the ImageAnimation. |
static void |
setDefaultWidth(int newWidth)
Sets the default width in pixels |
void |
setDirection(int d)
Sets the direction the images will scroll in if imageScroll property is true. |
void |
setImageScroll(boolean s)
Sets the images to scroll if set to true. |
void |
setImageSequence(java.lang.String[] sources)
Sets the sequence of file names for the images to be displayed. |
void |
setImageURLSequence(java.net.URL[] sources)
Sets the sequence of file names for the images to be displayed. |
void |
setScrollingSpeed(int s)
Sets the speed at which the images will scroll. |
void |
setSourceAppletRelative(boolean b)
Sets the source to be relative to the applet location. |
| Methods inherited from class com.sas.visuals.AnimationIconView |
|---|
clone, fireAlarm, getAlarm, getAnimationIcon, isDecrement, isRunning, setAlarm, 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 interface com.sas.ViewInterface |
|---|
attachModel, getModelInterface, getViewInterfaceSupportInfo, removeInterfaceTraps, setModelInterface, setRequiredInterfaces, setViewInterfaceSupportInfo, supportsRequiredInterfaces, trapInterfaceEvents |
| Methods inherited from interface com.sas.visuals.IconInterface |
|---|
getPreferredSize |
| Field Detail |
|---|
public static final java.lang.String RB_KEY
protected transient ImageAnimationIcon imgAnimation
protected OrderedCollection defaultSequenceModel
| Constructor Detail |
|---|
public ImageAnimation()
| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
com.sas.beans.Introspector to
augment the automatically introspected information about this ImageAnimation.
public static int getDefaultHeight()
setDefaultHeight(int)public static int getDefaultWidth()
setDefaultWidth(int)public static void setDefaultHeight(int newHeight)
newHeight - the desired default height in pixelsgetDefaultHeight()public static void setDefaultWidth(int newWidth)
newWidth - the desired default width in pixelssetDefaultWidth(int)public java.util.Vector getRequiredInterfaces()
getRequiredInterfaces in interface ViewInterfacegetRequiredInterfaces in class ComponentVisualComponentViewInterface.getRequiredInterfaces()public boolean isDefaultModelAttached()
isDefaultModelAttached in interface ViewDefaultModelInterfacetrue if the component is using the default
model, and false otherwise.public boolean isImageScroll()
setImageScroll(boolean)public void setImageScroll(boolean s)
s - if true the images will scroll over the component area;
otherwise the images will be displayed in sequence in the same
position.isImageScroll()
public void setBounds(int x,
int y,
int width,
int height)
setBounds in interface VisualInterfacesetBounds in class ComponentVisualComponentComponentVisualComponent.setBounds(int, int, int, int)public int getDirection()
setDirection(int)public void setDirection(int d)
d - one of the Direction values.
The values can be: BOTTOM_TO_TOP, LEFT_TO_RIGHT,
RIGHT_TO_LEFT, or TOP_TO_BOTTOMgetDirection()public int getScrollingSpeed()
public void setScrollingSpeed(int s)
s - the number of pixels the images should chift every time the
alarm is fired.public void contentsChanged(com.sas.collection.ContentsChangedEvent evt)
contentsChanged in interface com.sas.collection.ContentsChangedListenerevt - the ContentsChangedEvent from the model that changed.protected AnimationIconView createIconObject(AnimationIconView icon)
createIconObject in class AnimationIconViewpublic void detachModel(ModelInterface model)
detachModel in interface ViewInterfacedetachModel in class ComponentVisualComponentmodel - ModelInterface object to be removed from this ImageAnimation objectViewInterface.detachModel(com.sas.ModelInterface)public void refresh(ModelInterface model)
refresh in interface ViewInterfacerefresh in class ComponentVisualComponentmodel - ModelInterface object that is refreshed when it is changedViewInterface.refresh(com.sas.ModelInterface)protected void refreshSequence(StaticOrderedCollectionInterface model)
model - the collection object to refresh the images with.public void setDefaultValues()
setDefaultValues in interface VisualInterfacesetDefaultValues in interface ComponentInterfacesetDefaultValues in class AnimationIconViewComponentInterface.setDefaultValues()public boolean isSourceAppletRelative()
public void setSourceAppletRelative(boolean b)
true, then the images' path can be relative to
where the applet is loaded from, else full path names of the image is required.
b - true to set image paths relative to where applet is loaded.public java.lang.String[] getImageSequence()
setImageSequence(java.lang.String[])public void setImageSequence(java.lang.String[] sources)
sources - an array of image file namesgetImageSequence()public java.net.URL[] getImageURLSequence()
setImageURLSequence(java.net.URL[])public void setImageURLSequence(java.net.URL[] sources)
sources - an array of image file namesgetImageURLSequence()public void setAnimationIcon(AnimationIconInterface animIcon)
setAnimationIcon in class AnimationIconViewanimIcon - the AnimationIconInterface object animated by this class.AnimationIconView.getAnimationIcon()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||