All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.gui.tickertape.TickerTape
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----ejmf.toolkit.gui.tickertape.TickerTape
- public class TickerTape
- extends Panel
- implements Runnable
The Tickertape class is a generic tickertape that slowly
scrolls text across the viewable window. The TickerTape class
provides a the basis of the Multi-Image Player.
-
TickerTape(String)
- Constructs a TickerTape to display the given message.
-
appendMessage(String)
- Append the given message to the current message being
displayed in this TickerTape.
-
getLoop()
- Returns a boolean indicating whether the TickerTape's
message will loop.
-
getMessage()
- Get the message being displayed in this TickerTape.
-
getPreferredSize()
- Returns the preferred size of the TickerTape.
-
getRate()
- Gets the rate for this TickerTape.
-
getShadow()
- Get the color of the shadow.
-
getShadowEnabled()
- Gets the status of the TickerTape's shadow.
-
getShadowXOffset()
- Gets the number of pixels ofsetting the message from it's
shadow on the X-plain.
-
getShadowYOffset()
- Gets the number of pixels ofsetting the message from it's
shadow on the X-plain.
-
invalidate()
-
-
invalidateImage()
- Forces the message image to be reconstructed within the
TickerTape.
-
invalidateMetrics()
- Forces the message image to be reconstructed within the
TickerTape.
-
paint(Graphics)
- Paint the TickerTape.
-
printable(String)
- Converts all control characters of a String to spaces.
-
run()
- Called when the TickerTape is started with start().
-
setBackground(Color)
- Gets the font of this TickerTape.
-
setFont(Font)
- Sets the font of this TickerTape.
-
setForeground(Color)
- Sets the text color of this TickerTape.
-
setLoop(boolean)
- Enable/disable the looping of the TickerTape's text.
-
setMessage(String)
- Set the message to be displayed by this TickerTape.
-
setRate(int)
- Sets the rate for this TickerTape.
-
setShadow(Color)
- Set the color of the shadow.
-
setShadowEnabled(boolean)
- Enable/disable the display of the TickerTape's shadow.
-
setShadowXOffset(int)
- Set the number of pixels ofsetting the message from it's
shadow on the X-plain.
-
setShadowYOffset(int)
- Set the number of pixels ofsetting the message from it's
shadow on the Y-plain.
-
start()
- Start the TickerTape.
-
stop()
- Stop the TickerTape.
-
update(Graphics)
-
TickerTape
public TickerTape(String message)
- Constructs a TickerTape to display the given message.
setMessage
public void setMessage(String newMessage)
- Set the message to be displayed by this TickerTape.
appendMessage
public void appendMessage(String message)
- Append the given message to the current message being
displayed in this TickerTape.
getMessage
public String getMessage()
- Get the message being displayed in this TickerTape.
setShadowXOffset
public void setShadowXOffset(int shadowX)
- Set the number of pixels ofsetting the message from it's
shadow on the X-plain.
getShadowXOffset
public int getShadowXOffset()
- Gets the number of pixels ofsetting the message from it's
shadow on the X-plain.
setShadowYOffset
public void setShadowYOffset(int shadowY)
- Set the number of pixels ofsetting the message from it's
shadow on the Y-plain.
getShadowYOffset
public int getShadowYOffset()
- Gets the number of pixels ofsetting the message from it's
shadow on the X-plain.
setShadow
public void setShadow(Color shadow)
- Set the color of the shadow.
getShadow
public Color getShadow()
- Get the color of the shadow.
setShadowEnabled
public void setShadowEnabled(boolean shadowEnabled)
- Enable/disable the display of the TickerTape's shadow.
getShadowEnabled
public boolean getShadowEnabled()
- Gets the status of the TickerTape's shadow.
setLoop
public void setLoop(boolean loop)
- Enable/disable the looping of the TickerTape's text. If
true, the message will be repeatedly replayed once it has
been shown.
getLoop
public boolean getLoop()
- Returns a boolean indicating whether the TickerTape's
message will loop.
setRate
public void setRate(int rate)
- Sets the rate for this TickerTape.
getRate
public int getRate()
- Gets the rate for this TickerTape.
setFont
public void setFont(Font f)
- Sets the font of this TickerTape.
- Overrides:
- setFont in class Component
setBackground
public void setBackground(Color c)
- Gets the font of this TickerTape.
- Overrides:
- setBackground in class Component
setForeground
public void setForeground(Color c)
- Sets the text color of this TickerTape.
- Overrides:
- setForeground in class Component
invalidateImage
public void invalidateImage()
- Forces the message image to be reconstructed within the
TickerTape.
invalidateMetrics
public void invalidateMetrics()
- Forces the message image to be reconstructed within the
TickerTape.
start
public synchronized void start()
- Start the TickerTape.
stop
public void stop()
- Stop the TickerTape.
run
public synchronized void run()
- Called when the TickerTape is started with start(). This
method should not be called directly.
paint
public synchronized void paint(Graphics g)
- Paint the TickerTape.
- Overrides:
- paint in class Container
update
public void update(Graphics g)
- Overrides:
- update in class Container
getPreferredSize
public Dimension getPreferredSize()
- Returns the preferred size of the TickerTape. By default,
it is 4h x h, where h is the height of the TickerTape's
font.
- Overrides:
- getPreferredSize in class Container
invalidate
public void invalidate()
- Overrides:
- invalidate in class Container
printable
public static String printable(String convert)
- Converts all control characters of a String to spaces.
- Parameters:
- convert
- The String to convert.
- Returns:
- The converted String.
All Packages Class Hierarchy This Package Previous Next Index