juife
v0.1a

net.sf.juife
Interface ComponentListModel

All Superinterfaces:
javax.swing.ListModel
All Known Implementing Classes:
DefaultComponentListModel

public interface ComponentListModel
extends javax.swing.ListModel

This interface defines the data model for ComponentList.


Method Summary
 void add(java.awt.Component c)
          Adds the specified component at the end of the list.
 java.awt.Component get(int index)
          Gets the component at the specified index.
 void insert(java.awt.Component c, int index)
          Inserts the specified component at the specified index.
 boolean remove(java.awt.Component c)
          Removes the specified component.
 java.awt.Component remove(int index)
          Removes the component at the specified position.
 java.awt.Component set(int index, java.awt.Component c)
          Replaces the component at the specified position with the specified component.
 int size()
          Gets the length of the list.
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 

Method Detail

add

void add(java.awt.Component c)
Adds the specified component at the end of the list.

Parameters:
c - The component to be added.

insert

void insert(java.awt.Component c,
            int index)
Inserts the specified component at the specified index.

Parameters:
c - The component to be inserted.
index - The position of the new component.
Throws:
java.lang.ArrayIndexOutOfBoundsException - If the index is invalid.

remove

boolean remove(java.awt.Component c)
Removes the specified component.

Parameters:
c - The component to be removed.
Returns:
true if the list contained the specified component, false otherwise.

remove

java.awt.Component remove(int index)
Removes the component at the specified position.

Parameters:
index - The index of the component to be removed.
Returns:
The removed component.
Throws:
java.lang.ArrayIndexOutOfBoundsException - If the index is out of range.

get

java.awt.Component get(int index)
Gets the component at the specified index.

Parameters:
index - The requested index.
Returns:
The component at the specified index.

set

java.awt.Component set(int index,
                       java.awt.Component c)
Replaces the component at the specified position with the specified component.

Parameters:
index - The index of the component to replace.
c - The component to be stored at the specified position.
Returns:
The previous component at the specified position.

size

int size()
Gets the length of the list.

Returns:
The length of the list.

juife
v0.1a

Copyright © 2005 Grigor Iliev. All rights reserved. SourceForge.net Logo