|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.MarqueeIcon
public class MarqueeIcon
MarqueeIcon is a class that displays text and an image
that when incremented or decremented moves there position based
on the direction the marquee is set to.
AnimationIconInterface
,
Marquee
,
Serialized FormConstructor Summary | |
---|---|
MarqueeIcon()
Default constructor. |
Method Summary | |
---|---|
void |
decrement()
Decrement the position of the marquee content. |
int |
getDirection()
Get the direction of the content movement. |
int |
getHorizontalContentAlignment()
Get the horizontal content alignment. |
int |
getHorizontalImageAlignment()
Get the horizontal image alignment. |
int |
getHorizontalTextAlignment()
Get the horizontal text alignment. |
int |
getImageAnimationSpeed()
Get the image animation speed. |
int |
getImageTextGap()
Get the gap between the text and the image. |
java.awt.Insets |
getInsets()
Get the insets for the MarqueeIcon. |
java.awt.Dimension |
getPreferredSize()
Get the preferredSize of the MarqueeIcon. |
int |
getScrollingSpeed()
Get the speed at which the contents scroll across the Marquee component. |
java.lang.String[] |
getSourceSequence()
Get the sequence of image file names for the images to be displayed on the Marquee. |
java.lang.String |
getText()
Get the text displayed in the marquee. |
int |
getTextJustification()
Get the justification of the text. |
int |
getTextPosition()
Get the position of the text relative to the image. |
java.net.URL[] |
getURLSequence()
Returns an array of URLs that contain the sources of the images to be displayed |
int |
getVerticalContentAlignment()
Get the vertical content alignment. |
int |
getVerticalImageAlignment()
Get the vertical image alignment. |
int |
getVerticalTextAlignment()
Get the vertical text alignment. |
void |
increment()
Increment the position of the marquee content. |
boolean |
isSourceAppletRelative()
Indicates whether or not the images' source path is relative to where the applet is loaded from. |
protected java.awt.Image |
loadImage(java.lang.String source)
Load an image from an image name. |
protected java.awt.Image |
loadImage(java.net.URL source)
|
protected java.awt.Image[] |
loadImageSequence(java.lang.String[] srcs)
Load the java.awt.Image objects based on the image file names. |
protected java.awt.Image[] |
loadImageSequence(java.net.URL[] srcs)
Load the java.awt.Image objects based on the image URL. |
protected void |
loadImageSize()
Load the dimensions of the loaded image objects. |
void |
paint(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint the marquee. |
void |
paintAnimation(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint the MarqueeIcon in its current state. |
protected void |
paintContent(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint the text and image of the MarqueeIcon. |
void |
reset()
Reset the marquee state to its initial state. |
void |
setDefaultValues()
Set the default internal values for the AnimationIconView. |
void |
setDirection(int d)
Set the direction to scroll the Marquee. |
void |
setHorizontalContentAlignment(int align)
Set the horizontal content alignment. |
void |
setHorizontalImageAlignment(int align)
Set the horizontal image alignment. |
void |
setHorizontalTextAlignment(int align)
Set the horizontal text alignment. |
void |
setImageAnimationSpeed(int animateSpeed)
Set the image animation speed. |
void |
setImageSequence(java.awt.Image[] imgs)
Sets images to hold all the items in the Image array passed in |
void |
setImageTextGap(int g)
Set the gap between the text and the image. |
void |
setScrollingSpeed(int speed)
Set the speed at which the contents scroll across the Marquee component. |
void |
setSourceAppletRelative(boolean b)
Sets whether or not the images' source path is relative to where the applet is loaded from. |
void |
setSourceSequence(java.lang.String[] sources)
Set the sequence of file names for the images to be displayed. |
void |
setText(java.lang.String txt)
Set the text displayed in the marquee. |
void |
setTextJustification(int j)
Set the text justification. |
void |
setTextPosition(int pos)
Set the position of the text relative to the image. |
void |
setURLSequence(java.net.URL[] sources)
Sets the sources of images in an array of URLs |
void |
setVerticalContentAlignment(int align)
Set the vertical content alignment. |
void |
setVerticalImageAlignment(int align)
Set the vertical image alignment. |
void |
setVerticalTextAlignment(int align)
Set the vertical text alignment. |
Field Detail |
---|
protected java.lang.String precedingText
protected java.lang.String trailingText
protected java.lang.String text
protected int imgTextGap
protected int hContentAlign
protected int vContentAlign
protected int hTextAlign
protected int vTextAlign
protected int hImageAlign
protected int vImageAlign
protected int direction
protected int scrollingSpeed
protected int imageAnimationSpeed
protected int startingPosition
protected int textPosition
protected int textJustification
protected java.lang.String[] imageSources
protected java.net.URL[] imageURLs
protected boolean appletRelative
protected transient java.awt.Font prevFont
protected transient java.awt.Dimension imageSize
protected transient java.awt.Dimension currentTextSize
protected transient com.sas.collection.StringCollection multilineText
protected transient java.awt.Image offScreen
protected transient java.awt.Graphics offScreenGraphics
protected transient int count
protected transient int rollingI
protected transient java.util.Vector images
protected transient java.util.Vector lineWidths
protected transient java.awt.MediaTracker tracker
protected transient ImageView img
Constructor Detail |
---|
public MarqueeIcon()
Method Detail |
---|
public java.awt.Dimension getPreferredSize()
getPreferredSize
in interface com.sas.visuals.IconInterface
getPreferredSize
in class java.awt.Component
public int getDirection()
Direction
,
setDirection(int)
public int getTextJustification()
setTextJustification(int)
public int getHorizontalContentAlignment()
setHorizontalContentAlignment(int)
public int getVerticalContentAlignment()
setVerticalContentAlignment(int)
public int getHorizontalTextAlignment()
setHorizontalTextAlignment(int)
public int getVerticalTextAlignment()
setVerticalTextAlignment(int)
public int getHorizontalImageAlignment()
setHorizontalImageAlignment(int)
public int getVerticalImageAlignment()
setVerticalImageAlignment(int)
public int getImageAnimationSpeed()
setImageAnimationSpeed(int)
public int getImageTextGap()
setImageTextGap(int)
public java.awt.Insets getInsets()
getInsets
in interface com.sas.visuals.PainterInterface
public java.lang.String getText()
setText(java.lang.String)
,
StringDataInterface
public int getTextPosition()
setTextPosition(int)
public int getScrollingSpeed()
setScrollingSpeed(int)
public java.lang.String[] getSourceSequence()
setImageSequence(java.awt.Image[])
public java.net.URL[] getURLSequence()
setURLSequence(java.net.URL[])
public boolean isSourceAppletRelative()
setSourceAppletRelative(boolean)
public void setSourceAppletRelative(boolean b)
setSourceAppletRelative(boolean)
public void setDirection(int d)
d
- one of the Direction values.Direction
,
getDirection()
public void setTextJustification(int j)
j
- one of LEFT, RIGHT, or CENTER.getTextJustification()
public void setHorizontalContentAlignment(int align)
align
- a horizontal alignment value: LEFT, RIGHT, or CENTER.getHorizontalContentAlignment()
public void setVerticalContentAlignment(int align)
align
- a vertical alignment value: TOP, BOTTOM, or CENTER.getVerticalContentAlignment()
public void setHorizontalTextAlignment(int align)
align
- a horizontal alignment value: LEFT, RIGHT, or CENTER.getHorizontalTextAlignment()
public void setVerticalTextAlignment(int align)
align
- a vertical alignment value: TOP, BOTTOM, or CENTER.getVerticalTextAlignment()
public void setHorizontalImageAlignment(int align)
align
- a horizontal alignment value: LEFT, RIGHT, or CENTER.getHorizontalImageAlignment()
public void setVerticalImageAlignment(int align)
align
- a vertical alignment value: TOP, BOTTOM, or CENTER.getVerticalImageAlignment()
public void setImageAnimationSpeed(int animateSpeed)
animateSpeed
- the speed the images are being switchedgetImageAnimationSpeed()
public void setImageTextGap(int g)
g
- the pixel value space between the text and the image.getImageTextGap()
public void setText(java.lang.String txt)
getText()
,
StringDataInterface
public void setTextPosition(int pos)
pos
- the text position: TOP, BOTTOM, LEFT, or RIGHT.getTextPosition()
public void setScrollingSpeed(int speed)
speed
- the content scrolling speed.getScrollingSpeed()
public void setSourceSequence(java.lang.String[] sources)
sources
- an array of image file namesgetSourceSequence()
public void setURLSequence(java.net.URL[] sources)
sources
- an array of URLs to be set on imageURLsgetURLSequence()
public void setImageSequence(java.awt.Image[] imgs)
img
- and array of Image objectspublic void reset()
reset
in interface AnimationIconInterface
public void increment()
increment
in interface AnimationIconInterface
public void decrement()
decrement
in interface AnimationIconInterface
public void paint(java.awt.Component comp, java.awt.Graphics g, int x, int y, int width, int height)
paint
in interface com.sas.visuals.PainterInterface
comp
- the java.awt.Component to paint ong
- the graphics context to use for paintingx
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightpublic void paintAnimation(java.awt.Component comp, java.awt.Graphics g, int x, int y, int width, int height)
paintAnimation
in interface AnimationIconInterface
comp
- the java.awt.Component to paint ong
- the graphics context to use for paintingx
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightPainterInterface.paint(java.awt.Component, java.awt.Graphics, int, int, int, int)
protected void paintContent(java.awt.Component comp, java.awt.Graphics g, int x, int y, int width, int height)
comp
- the java.awt.Component to paint ong
- the graphics context to use for paintingx
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightprotected java.awt.Image[] loadImageSequence(java.lang.String[] srcs)
srcs
- the image file namesprotected java.awt.Image[] loadImageSequence(java.net.URL[] srcs)
srcs
- the image file namesprotected java.awt.Image loadImage(java.lang.String source)
source
- the source can be the image file name and path
or a URL to the image file name and path.
protected java.awt.Image loadImage(java.net.URL source)
protected void loadImageSize()
public void setDefaultValues()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |