uk.org.ury.common.show
Class ShowChannel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by uk.org.ury.common.show.ShowChannel
All Implemented Interfaces:
java.io.Serializable, javax.swing.ListModel

public class ShowChannel
extends javax.swing.AbstractListModel

A channel of ShowItems in a show.

Author:
Matt Windsor
See Also:
Serialized Form

Constructor Summary
ShowChannel()
          Constructs a new, empty channel.
 
Method Summary
 void add(int index, ShowItem item)
          Adds a new item to the channel.
 void add(ShowItem item)
          Adds a new item to the end of the channel.
 ShowItem get(int index)
          Retrieves an item from the channel.
 java.lang.Object getElementAt(int index)
          List model retrieval wrapper for get.
 int getSize()
           
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, getListDataListeners, getListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShowChannel

public ShowChannel()
Constructs a new, empty channel.

Method Detail

add

public void add(int index,
                ShowItem item)
Adds a new item to the channel.

Parameters:
index - The position at which to add the item.
item - The new item to add.
Throws:
java.lang.IllegalArgumentException - if the item is null, the index is negative or the index is out of bounds.

add

public void add(ShowItem item)
Adds a new item to the end of the channel.

Parameters:
item - The new item to add.

get

public ShowItem get(int index)
Retrieves an item from the channel.

Parameters:
index - The index of the item to retrieve from the channel.
Returns:
the item at the given index in the list.
Throws:
java.lang.IllegalArgumentException - if the index is negative or overflowing.

getElementAt

public java.lang.Object getElementAt(int index)
List model retrieval wrapper for get.

Parameters:
index - The index of the item to retrieve from the channel.
Returns:
the item at the given index in the list.

getSize

public int getSize()
Returns:
the size of the list.