com.sas.visuals
Class Marquee

com.sas.visuals.Marquee
All Implemented Interfaces:
com.sas.awt.print.PrintableInterface, VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.lang.StringDataInterface, 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 Marquee
implements com.sas.lang.StringDataInterface

Marquee is a class that increments and decrements a MarqueeIcon object when an alarm is fired and paints the MarqueeIcon in that state.

Notes:


See Also:
AnimationIconInterface, MarqueeIcon, Serialized Form

Field Summary
protected  MarqueeIcon marqueeIcon
          The MarqueeIcon that is being 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
Marquee()
          Default constructor.
 
Method Summary
protected  AnimationIconView createIconObject(AnimationIconView icon)
          Creates a clone of itself and sets the properties of the MarqueeIcon, which is part of the AnimationIconView object.
static int getDefaultHeight()
          Returns the default height in pixels
static int getDefaultWidth()
          Returns the default width in pixels
 int getDirection()
          Gets the direction of the content movement.
static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
          Returns information used by the com.sas.beans.Introspector to augment the automatically introspected information about this Marquee.
 int getHorizontalContentAlignment()
          Gets the horizontal content alignment.
 int getHorizontalImageAlignment()
          Gets the horizontal image alignment.
 int getHorizontalTextAlignment()
          Gets the horizontal text alignment.
 int getImageAnimationSpeed()
          Gets the image animation speed in.
 java.lang.String[] getImageSequence()
          Gets the sequence of image file names for the images to be displayed on the Marquee.
 int getImageTextGap()
          Gets the gap between the text and the image.
 java.net.URL[] getImageURLSequence()
          Return the sequence of file names for the images to be displayed.
 int getScrollingSpeed()
          Gets the speed at which the contents scroll across the Marquee component.
 java.lang.String getText()
          Gets the text displayed in the marquee.
 int getTextJustification()
          Gets the justification of the text.
 int getTextPosition()
          Gets the position of the text relative to the image.
 int getVerticalContentAlignment()
          Gets the vertical content alignment.
 int getVerticalImageAlignment()
          Gets the vertical image alignment.
 int getVerticalTextAlignment()
          Gets the vertical text alignment.
 boolean isSourceAppletRelative()
          Returns whether or not the image sources are relative to the lacation of where the applet is loaded from.
static void setDefaultHeight(int newHeight)
          Sets the default height in pixels
 void setDefaultValues()
          Sets the default internal values for the Marquee.
static void setDefaultWidth(int newWidth)
          Sets the default width in pixels
 void setDirection(int d)
          Sets the direction to scroll the Marquee.
 void setHorizontalContentAlignment(int align)
          Sets the horizontal content alignment.
 void setHorizontalImageAlignment(int align)
          Sets the horizontal image alignment.
 void setHorizontalTextAlignment(int align)
          Sets the horizontal text alignment.
 void setImageAnimationSpeed(int animateSpeed)
          Sets the image animation speed.
 void setImageSequence(java.lang.String[] sources)
          Sets the sequence of image file names for the images to be displayed on the Marquee.
 void setImageTextGap(int g)
          Sets the gap between the text and the image.
 void setImageURLSequence(java.net.URL[] sources)
          Sets the sequence of file names for the images to be displayed.
 void setScrollingSpeed(int speed)
          Sets the speed at which the contents scroll across the Marquee component.
 void setSourceAppletRelative(boolean b)
          If true, assumes that the path is relative to the directory where the applet is loaded from, else full path assumed.
 void setText(java.lang.String txt)
          Sets the text displayed in the marquee.
 void setTextJustification(int j)
          Sets the text justification.
 void setTextPosition(int pos)
          Sets the position of the text relative to the image.
 void setVerticalContentAlignment(int align)
          Sets the vertical content alignment.
 void setVerticalImageAlignment(int align)
          Sets the vertical image alignment.
 void setVerticalTextAlignment(int align)
          Sets the vertical text alignment.
 
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, setBounds, 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

marqueeIcon

protected MarqueeIcon marqueeIcon
The MarqueeIcon that is being manipulated

Constructor Detail

Marquee

public Marquee()
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 Marquee.

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 width in pixels

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

createIconObject

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

Overrides:
createIconObject in class AnimationIconView
Returns:
copy of the AnimationIconView Object passed in, with new properties.

getDirection

public int getDirection()
Gets the direction of the content movement. The values can be: BOTTOM_TO_TOP, LEFT_TO_RIGHT, RIGHT_TO_LEFT, or TOP_TO_BOTTOM

See Also:
Direction, setDirection(int)

getTextJustification

public int getTextJustification()
Gets the justification of the text. Values returned are of com.sas.geometry.Orientations

Returns:
one of LEFT, RIGHT, or CENTER.
See Also:
setTextJustification(int), Orientations

getHorizontalContentAlignment

public int getHorizontalContentAlignment()
Gets the horizontal content alignment. Values returned are of com.sas.geometry.Orientations

Returns:
a horizontal alignment value: LEFT, RIGHT, or CENTER.
See Also:
setHorizontalContentAlignment(int), Orientations

getVerticalContentAlignment

public int getVerticalContentAlignment()
Gets the vertical content alignment. Values returned are of com.sas.geometry.Orientations

Returns:
a vertical alignment value: TOP, BOTTOM, or CENTER.
See Also:
setVerticalContentAlignment(int), Orientations

getHorizontalTextAlignment

public int getHorizontalTextAlignment()
Gets the horizontal text alignment. Values returned are of com.sas.geometry.Orientations

Returns:
a horizontal alignment value: LEFT, RIGHT, or CENTER.
See Also:
setHorizontalTextAlignment(int), Orientations

getVerticalTextAlignment

public int getVerticalTextAlignment()
Gets the vertical text alignment. Values returned are of com.sas.geometry.Orientations

Returns:
a vertical alignment value: TOP, BOTTOM, or CENTER.
See Also:
setVerticalTextAlignment(int), Orientations

getHorizontalImageAlignment

public int getHorizontalImageAlignment()
Gets the horizontal image alignment. Values returned are of com.sas.geometry.Orientations

Returns:
a horizontal alignment value: LEFT, RIGHT, or CENTER.
See Also:
setHorizontalImageAlignment(int), Orientations

getVerticalImageAlignment

public int getVerticalImageAlignment()
Gets the vertical image alignment. Values returned are of com.sas.geometry.Orientations

Returns:
a vertical alignment value: TOP, BOTTOM, or CENTER.
See Also:
setVerticalImageAlignment(int), Orientations

getImageAnimationSpeed

public int getImageAnimationSpeed()
Gets the image animation speed in. The int returned is the numer of pixels the image moves every time the alarm fires.

Returns:
the speed the images are being switched
See Also:
setImageAnimationSpeed(int)

getImageTextGap

public int getImageTextGap()
Gets the gap between the text and the image.

Returns:
the pixel value space between the text and the image.
See Also:
setImageTextGap(int)

getTextPosition

public int getTextPosition()
Gets the position of the text relative to the image.

Returns:
the text position: TOP, BOTTOM, LEFT, or RIGHT.
See Also:
setTextPosition(int)

getText

public java.lang.String getText()
Gets the text displayed in the marquee.

Specified by:
getText in interface com.sas.lang.StringDataInterface
See Also:
setText(java.lang.String), StringDataInterface

getScrollingSpeed

public int getScrollingSpeed()
Gets the speed at which the contents scroll across the Marquee component.

Returns:
the content scrolling speed.
See Also:
setScrollingSpeed(int)

getImageSequence

public java.lang.String[] getImageSequence()
Gets the sequence of image file names for the images to be displayed on the Marquee.

Returns:
sequence of image file names
See Also:
setImageSequence(java.lang.String[])

isSourceAppletRelative

public boolean isSourceAppletRelative()
Returns whether or not the image sources are relative to the lacation of where the applet is loaded from.

Returns:
boolean value representing if the image source is relative to the applet.

setDirection

public void setDirection(int d)
Sets the direction to scroll the Marquee.

Parameters:
d - one of the Direction values. The values can be: BOTTOM_TO_TOP, LEFT_TO_RIGHT, RIGHT_TO_LEFT, or TOP_TO_BOTTOM
See Also:
Direction, getDirection()

setSourceAppletRelative

public void setSourceAppletRelative(boolean b)
If true, assumes that the path is relative to the directory where the applet is loaded from, else full path assumed.

Parameters:
b - the boolean value for whether or not image sources whould be relative to the applet
See Also:
isSourceAppletRelative()

setTextJustification

public void setTextJustification(int j)
Sets the text justification.

Parameters:
j - one of LEFT, RIGHT, or CENTER.
See Also:
getTextJustification(), Orientations

setHorizontalContentAlignment

public void setHorizontalContentAlignment(int align)
Sets the horizontal content alignment.

Parameters:
align - a horizontal alignment value: LEFT, RIGHT, or CENTER.
See Also:
getHorizontalContentAlignment(), Orientations

setVerticalContentAlignment

public void setVerticalContentAlignment(int align)
Sets the vertical content alignment.

Parameters:
align - a vertical alignment value: TOP, BOTTOM, or CENTER.
See Also:
getVerticalContentAlignment(), Orientations

setHorizontalTextAlignment

public void setHorizontalTextAlignment(int align)
Sets the horizontal text alignment.

Parameters:
align - a horizontal alignment value: LEFT, RIGHT, or CENTER.
See Also:
getHorizontalTextAlignment(), Orientations

setVerticalTextAlignment

public void setVerticalTextAlignment(int align)
Sets the vertical text alignment.

Parameters:
align - a vertical alignment value: TOP, BOTTOM, or CENTER.
See Also:
getVerticalTextAlignment(), Orientations

setHorizontalImageAlignment

public void setHorizontalImageAlignment(int align)
Sets the horizontal image alignment.

Parameters:
align - a horizontal alignment value: LEFT, RIGHT, or CENTER.
See Also:
getHorizontalImageAlignment(), Orientations

setVerticalImageAlignment

public void setVerticalImageAlignment(int align)
Sets the vertical image alignment.

Parameters:
align - a vertical alignment value: TOP, BOTTOM, or CENTER.
See Also:
getVerticalImageAlignment(), Orientations

setImageAnimationSpeed

public void setImageAnimationSpeed(int animateSpeed)
Sets the image animation speed.

Parameters:
animateSpeed - the speed the images are being switched
See Also:
getImageAnimationSpeed()

setImageTextGap

public void setImageTextGap(int g)
Sets the gap between the text and the image.

Parameters:
g - the pixel value space between the text and the image.
See Also:
getImageTextGap()

setText

public void setText(java.lang.String txt)
Sets the text displayed in the marquee.

Specified by:
setText in interface com.sas.lang.StringDataInterface
Parameters:
txt - the text to be displayed in the Marquee
See Also:
getText(), StringDataInterface

setTextPosition

public void setTextPosition(int pos)
Sets the position of the text relative to the image.

Parameters:
pos - the text position: TOP, BOTTOM, LEFT, or RIGHT.
See Also:
getTextPosition()

setScrollingSpeed

public void setScrollingSpeed(int speed)
Sets the speed at which the contents scroll across the Marquee component.

Parameters:
speed - the content scrolling speed.
See Also:
getScrollingSpeed()

setImageSequence

public void setImageSequence(java.lang.String[] sources)
Sets the sequence of image file names for the images to be displayed on the Marquee.

Parameters:
sources - sequence of image file names
See Also:
getImageSequence()

getImageURLSequence

public java.net.URL[] getImageURLSequence()
Return the sequence of file names for the images to be displayed.

Returns:
an array of image file names
See Also:
setImageURLSequence(java.net.URL[])

setImageURLSequence

public void setImageURLSequence(java.net.URL[] sources)
Sets the sequence of file names for the images to be displayed.

Parameters:
sources - an array of image file names
See Also:
getImageURLSequence()

setDefaultValues

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

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



Copyright © 2009 SAS Institute Inc. All Rights Reserved.