org.activemath.webapp.speech
Class SpeechItemList

java.lang.Object
  extended by org.activemath.webapp.speech.SpeechItemList
All Implemented Interfaces:
SpeechItemListInterface

public class SpeechItemList
extends Object
implements SpeechItemListInterface


Constructor Summary
SpeechItemList()
           
 
Method Summary
 void addFullItem(SpeechItem item)
          Adds an SpeechItem to the List.
 void addItem(String id)
          Adds an empty Item to the List, to prepare all Items in the List with content use prepareItemList
 int getEye()
           
 String getEyedItemContent()
           
 SpeechItem getItem(int num)
           
 String getItemTitle(int pos)
           
 String[] getItemTitles()
           
 LinkedList getList()
           
 void nextItem()
          Set the Eye to the next Item, if the actual eyed Item is not the last in List.
 void prepareList(PresentationTool presentTool)
          when the list is complete, the prepareList function computes the titles, content and type of the items in the list.
 void prevItem()
          Set the Eye to the previous Item, if the actual eyed Item is not the first in the List.
 void setEye(int pos)
          Set the Eye-position to pos.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpeechItemList

public SpeechItemList()
Method Detail

addItem

public void addItem(String id)
Description copied from interface: SpeechItemListInterface
Adds an empty Item to the List, to prepare all Items in the List with content use prepareItemList

Specified by:
addItem in interface SpeechItemListInterface
Parameters:
id - - The itemId of the item

prepareList

public void prepareList(PresentationTool presentTool)
when the list is complete, the prepareList function computes the titles, content and type of the items in the list.

Specified by:
prepareList in interface SpeechItemListInterface
Parameters:
presentTool - - the Presentationtool to get the transformer

getItemTitle

public String getItemTitle(int pos)
Specified by:
getItemTitle in interface SpeechItemListInterface
Parameters:
pos - - Position of the Item in the List
Returns:
Title of the Item on the Position pos in the List. When the List is not prepared this method returns an empty String

size

public int size()
Specified by:
size in interface SpeechItemListInterface
Returns:
- The size of the List, look also LinkedList.size()

getList

public LinkedList getList()
Specified by:
getList in interface SpeechItemListInterface
Returns:
LinkedList Object of the ItemList. This is needed in the velocity to use the 'for each' expression

getItem

public SpeechItem getItem(int num)
Specified by:
getItem in interface SpeechItemListInterface
Parameters:
num - - The position of the Item in the List
Returns:
SpeechItem of the List on position pos

setEye

public void setEye(int pos)
Description copied from interface: SpeechItemListInterface
Set the Eye-position to pos.

Specified by:
setEye in interface SpeechItemListInterface

getEye

public int getEye()
Specified by:
getEye in interface SpeechItemListInterface
Returns:
- The actual Eye-Position of the List

prevItem

public void prevItem()
Description copied from interface: SpeechItemListInterface
Set the Eye to the previous Item, if the actual eyed Item is not the first in the List.

Specified by:
prevItem in interface SpeechItemListInterface

nextItem

public void nextItem()
Description copied from interface: SpeechItemListInterface
Set the Eye to the next Item, if the actual eyed Item is not the last in List.

Specified by:
nextItem in interface SpeechItemListInterface

addFullItem

public void addFullItem(SpeechItem item)
Description copied from interface: SpeechItemListInterface
Adds an SpeechItem to the List.

Specified by:
addFullItem in interface SpeechItemListInterface
Parameters:
item - - The SpeechItem which should be added.

getEyedItemContent

public String getEyedItemContent()
Specified by:
getEyedItemContent in interface SpeechItemListInterface
Returns:
The content of the Item the Eye looked at.

getItemTitles

public String[] getItemTitles()