yu.ac.bg.etf.javaqx.qswing.list
Class DefaultListModel

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.qswing.list.AbstractListModel
      extended byyu.ac.bg.etf.javaqx.qswing.list.DefaultListModel
All Implemented Interfaces:
ListModel

public class DefaultListModel
extends AbstractListModel

Default List Model.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.list.AbstractListModel
listenerList
 
Constructor Summary
DefaultListModel()
          Constructs new DefaultListModel object.
 
Method Summary
 void add(int index, java.lang.Object element)
          Inserts the specified element into the list.
 void add(java.lang.Object element)
          Adds the specified element to the list.
 void clear()
          Removes all elements.
 boolean contains(java.lang.Object elem)
          Returns true if the model contains the specified element.
 java.lang.Object getElementAt(int index)
          Returns the element at the specified index.
 int getSize()
          Returns the size of the list.
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.list.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, removeListDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultListModel

public DefaultListModel()
Constructs new DefaultListModel object.

Method Detail

add

public void add(java.lang.Object element)
Adds the specified element to the list.

Parameters:
element - the element

add

public void add(int index,
                java.lang.Object element)
Inserts the specified element into the list.

Parameters:
index - the element position
element - the element

clear

public void clear()
Removes all elements.


contains

public boolean contains(java.lang.Object elem)
Returns true if the model contains the specified element.

Parameters:
elem - the element to search for.
Returns:
true if the model contains the specified element

getSize

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

Returns:
the size of the list

getElementAt

public java.lang.Object getElementAt(int index)
Returns the element at the specified index.

Parameters:
index - the element index
Returns:
the element at the specified index


Copyright © 2007 ETF and contributors. All Rights Reserved.