edu.berkeley.guir.ptk.output
Class TickerTextOutput

java.lang.Object
  extended byedu.berkeley.guir.ptk.PTK
      extended byedu.berkeley.guir.ptk.output.Output
          extended byedu.berkeley.guir.ptk.output.GraphicalTextOutput
              extended byedu.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.
 
Fields inherited from class edu.berkeley.guir.ptk.output.GraphicalTextOutput
NUM_STEPS
 
Fields inherited from class edu.berkeley.guir.ptk.output.Output
animatable, d_queue, data_ids_I_want, history, ITEMS_LENGTH, metadata_I_want, num_ids, num_metadata, output_cycle_time, transition
 
Fields inherited from class edu.berkeley.guir.ptk.PTK
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG
 
Constructor Summary
TickerTextOutput()
           
TickerTextOutput(TPanel ntp)
          Partial Constructor
TickerTextOutput(TPanel ntp, Transition t)
           
 
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.GraphicalTextOutput
alternateStep, changeblindTransStep, endTransition, interruptTransStep, main, makeawareTransStep, startTransition
 
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 edu.berkeley.guir.ptk.PTK
getMAX, getMED, getMIN, getNO, printDebug, printDebug, printError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

TickerTextOutput

public TickerTextOutput()

TickerTextOutput

public TickerTextOutput(TPanel ntp)
Partial Constructor


TickerTextOutput

public TickerTextOutput(TPanel ntp,
                        Transition t)
Method Detail

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