edu.berkeley.guir.ptk.output
Class TickerTextOutput
java.lang.Object
edu.berkeley.guir.ptk.PTK
edu.berkeley.guir.ptk.output.Output
edu.berkeley.guir.ptk.output.GraphicalTextOutput
edu.berkeley.guir.ptk.output.TickerTextOutput
- All Implemented Interfaces:
- Animatable, java.lang.Runnable
- Direct Known Subclasses:
- ActivityTickerOutput, AudioTickerOutput, AudioTickerOutput, NumPeopleTickerOutput, StockNewsTickerOutput
- public class TickerTextOutput
- extends GraphicalTextOutput
Extends GraphicalTextOutput to display text in a Java JPanel. Also, causes
the text to scroll across the ticker JPanel. For an example of an
application that uses this and the GraphicalTextOutput, see the
StockNewsAppNon.
- Author:
- jmankoff
|
Field Summary |
java.lang.String |
message
The message to be displayed on the ticker. |
TPanel |
tp
The java GUI panel upon which the graphical text will display. |
|
Method Summary |
protected void |
displayEvent(Event e)
Displays a text message from an event on the TPanel. |
protected void |
interDisplayEvent(long ptime)
Implements the interDisplayEvent() method from output, causing the text on the
JPanel to scroll. |
| Methods inherited from class edu.berkeley.guir.ptk.output.Output |
addDataID, addMetadataIWant, checkAction, doIWant, getAllMetadata, getDataIDs, getFirstMetadata, getHistory, handleEvent, isAnimatable, printMetadataIWant, run, setChangeblindTransitionSteps, setDataIDsIWant, setInterruptTransitionSteps, setMakeawareTransitionSteps, setTimeBetweenDisplayEvents, setTransition, setUnsetNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tp
public TPanel tp
- The java GUI panel upon which the graphical text will display.
message
public java.lang.String message
- The message to be displayed on the ticker. This is typically set by an
output wrapper.
TickerTextOutput
public TickerTextOutput()
TickerTextOutput
public TickerTextOutput(TPanel ntp)
- Partial Constructor
TickerTextOutput
public TickerTextOutput(TPanel ntp,
Transition t)
displayEvent
protected void displayEvent(Event e)
- Displays a text message from an event on the TPanel. Called by the PTK
when a new event arrives for the Output.
- Specified by:
displayEvent in class Output
- Parameters:
e - This event to be displayed
interDisplayEvent
protected void interDisplayEvent(long ptime)
- Implements the interDisplayEvent() method from output, causing the text on the
JPanel to scroll.
- Overrides:
interDisplayEvent in class Output
- Parameters:
ptime - the time in milliseconds that this function controls the
display