Package org.gvsig.gui.beans.controls.dnd
Class JDnDListModel
java.lang.Object
javax.swing.AbstractListModel
org.gvsig.gui.beans.controls.dnd.JDnDListModel
- All Implemented Interfaces:
Serializable,ListModel
List model to use in junction the JDnDList. Contains some useful tools.
- Author:
- jaume dominguez faus - jaume.dominguez@iver.es
- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractListModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddElement(int j, Object element) Adds a new element at the position indicated by pos of the list.booleanaddElement(Object element) Adds a new element at the position indicated by pos of the list.voidclear()Removes any item currently contained by this list.voidRemoves every elements contained in the collection from this list.voiddelIndices(int[] indices) Removes the items of the list mentioned by the index array passed as argument.getElementAt(int index) Returns an ArrayList containing the elements of this list.intgetSize()booleaninsertElement(int index, Object element) Inserts a new element into the list at the position mentioned in the index param.voidinsertItems(int index, Collection objects) Inserts a collection of items before the specified indexvoiditemsMoved(int newIndex, int[] indicies) Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Constructor Details
-
JDnDListModel
public JDnDListModel()
-
-
Method Details
-
insertItems
Inserts a collection of items before the specified index -
insertElement
Inserts a new element into the list at the position mentioned in the index param.- Parameters:
index-item-
-
addElement
Adds a new element at the position indicated by pos of the list.- Parameters:
j-pos-
-
addElement
Adds a new element at the position indicated by pos of the list.- Parameters:
j-pos-
-
delElements
Removes every elements contained in the collection from this list. -
delIndices
public void delIndices(int[] indices) Removes the items of the list mentioned by the index array passed as argument.- Parameters:
indices-
-
itemsMoved
public void itemsMoved(int newIndex, int[] indicies) -
getSize
public int getSize() -
getElementAt
-
clear
public void clear()Removes any item currently contained by this list. -
getElements
Returns an ArrayList containing the elements of this list.
-