org.yasl.componentlist
Interface YASLMutableComponentListModel

All Superinterfaces:
YASLComponentListModel
All Known Implementing Classes:
YASLDefaultComponentListModel

public interface YASLMutableComponentListModel
extends YASLComponentListModel

Version:
1.0
Author:
Jeff Chapman

Method Summary
 void addElement(JComponent item)
          Adds a component to the end of the component list.
 void addElementAt(int index, JComponent item)
          Inserts an element into the list at the specified index.
 JComponent removeElementAt(int index)
          Removes the element located at index from the list.
 
Methods inherited from interface org.yasl.componentlist.YASLComponentListModel
addListDataListener, getComponents, getElementAt, getSize, removeListDataListener
 

Method Detail

addElement

public void addElement(JComponent item)
Adds a component to the end of the component list.

Parameters:
item - JComponent

addElementAt

public void addElementAt(int index,
                         JComponent item)
Inserts an element into the list at the specified index.

The element at that position will be moved one position forward.

This method will throw an IndexOutOfBoundsException if the index is larger than the last index in the list, i.e. ComponentListModel.getSize() - 1.

Parameters:
index - int
item - JComponent

removeElementAt

public JComponent removeElementAt(int index)
Removes the element located at index from the list.

This method will throw an IndexOutOfBoundsException if the index is larger than the last index in the list, i.e. ComponentListModel.getSize() - 1.

Parameters:
index - int
Returns:
JComponent