|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractListModel
org.pdfsam.guiclient.commons.models.VisualListModel
public class VisualListModel
Model for the JList in the JVisualPdfPageSelectionPanel
| Field Summary | |
|---|---|
protected java.util.Vector<VisualPageListItem> |
data
|
| Fields inherited from class javax.swing.AbstractListModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
VisualListModel()
|
|
| Method Summary | |
|---|---|
void |
addAllElements(java.util.Collection<VisualPageListItem> c)
delegated to the Vector addAll |
void |
addAllElements(int index,
java.util.Collection<VisualPageListItem> c)
Add elements in c at the given index |
void |
addElement(VisualPageListItem inputData)
Add an item to the model and fire to Listeners |
void |
addElementAt(VisualPageListItem inputData,
int index)
Add an item to the model and fire to Listeners |
void |
appendAllElements(java.util.Collection<VisualPageListItem> c)
same as addAllElements. |
void |
clearData()
Removes any data source for the model |
void |
elementChanged(VisualPageListItem inputData)
Look for the inputData and repaint it if found |
void |
elementsChanged()
Repaints all the elements |
java.lang.Object |
getElementAt(int index)
|
VisualPageListItem[] |
getElements()
|
int |
getSize()
|
java.util.List<VisualPageListItem> |
getValidElements()
|
void |
moveDownIndex(int index)
Moves down a item at the given index fire to Listeners |
void |
moveDownIndexes(int[] indexes)
Moves down a set of items at the given indexes |
void |
moveUpIndex(int index)
Moves up a item at the given index fire to Listeners |
void |
moveUpIndexes(int[] indexes)
Moves up a set of items at the given indexes |
void |
prependAllElements(java.util.Collection<VisualPageListItem> c)
Add elements at the beginning |
void |
removeElementAt(int index,
boolean physicalDeletion)
removes the element at the index |
void |
removeElements(int[] rows,
boolean physicalDeletion)
Remove a set of rows from the list data source and fire to Listeners |
void |
removeElements(int fromIndex,
int toIndex,
boolean physicalDeletion)
Remove a set of rows from the list data source and fire to Listeners |
void |
reverseElements(int[] indexes)
Reverse the given elements |
void |
rotateAnticlockwiseElements(int[] indexes)
rotates anti clockwise the given elements |
void |
rotateClockwiseElements(int[] indexes)
rotates the given elements |
void |
setData(java.util.Vector<VisualPageListItem> inputData)
set data source for the model |
void |
setData(VisualPageListItem[] inputData)
set data source for the model |
java.util.Collection<VisualPageListItem> |
subList(int fromIndex,
int toIndex)
delegated to the Vector subList |
java.util.Collection<VisualPageListItem> |
subList(int fromIndex,
int toIndex,
boolean newInstance)
|
void |
undeleteElements(int[] indexes)
Undelete the given elements |
void |
updateElementAt(int index,
VisualPageListItem inputData)
Replace an element of the model and fire to Listeners |
| Methods inherited from class javax.swing.AbstractListModel |
|---|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector<VisualPageListItem> data
| Constructor Detail |
|---|
public VisualListModel()
| Method Detail |
|---|
public java.lang.Object getElementAt(int index)
public int getSize()
public void setData(VisualPageListItem[] inputData)
inputData - array VisualPageListItem[] as data sourcepublic void setData(java.util.Vector<VisualPageListItem> inputData)
inputData - Vector of VisualPageListItempublic void clearData()
public void removeElementAt(int index,
boolean physicalDeletion)
index - physicalDeletion - if true the element is removed, if false it's set as "deleted" (rendered with a red cross)
public void removeElements(int[] rows,
boolean physicalDeletion)
throws java.lang.IndexOutOfBoundsException
Remove a set of rows from the list data source and fire to Listeners
rows - rows number to remove from the data sourcephysicalDeletion - if true the element is removed, if false it's set as "deleted" (rendered with a red cross)
java.lang.Exception - if an exception occurs
java.lang.IndexOutOfBoundsException
public void removeElements(int fromIndex,
int toIndex,
boolean physicalDeletion)
throws java.lang.IndexOutOfBoundsException
Remove a set of rows from the list data source and fire to Listeners
fromIndex - remove from the index (inclusive)toIndex - remove to the index (inclusive)physicalDeletion - if true the element is removed, if false it's set as "deleted" (rendered with a red cross)
java.lang.Exception - if an exception occurs
java.lang.IndexOutOfBoundsException
public void addElementAt(VisualPageListItem inputData,
int index)
index - index to add toinputData - VisualPageListItem to add to the data sourcepublic void addElement(VisualPageListItem inputData)
inputData - VisualPageListItem to add to the data sourcepublic void addAllElements(java.util.Collection<VisualPageListItem> c)
c - Vector.addAll(Collection)public void appendAllElements(java.util.Collection<VisualPageListItem> c)
c - public void prependAllElements(java.util.Collection<VisualPageListItem> c)
c -
public void addAllElements(int index,
java.util.Collection<VisualPageListItem> c)
index - c -
public java.util.Collection<VisualPageListItem> subList(int fromIndex,
int toIndex)
fromIndex - start inclusivetoIndex - end exclusive
Vector.subList(int, int)
public java.util.Collection<VisualPageListItem> subList(int fromIndex,
int toIndex,
boolean newInstance)
fromIndex - start inclusivetoIndex - end exclusivenewInstance - if false delegates to the Vector#subList(int, int) if true return a new Vector
Vector.subList(int, int)public VisualPageListItem[] getElements()
public void updateElementAt(int index,
VisualPageListItem inputData)
index - index to be replacedinputData - new VisualPageListItem to replace the data sourcepublic void elementChanged(VisualPageListItem inputData)
inputData - public void elementsChanged()
public void undeleteElements(int[] indexes)
throws java.lang.IndexOutOfBoundsException
indexes -
java.lang.IndexOutOfBoundsException
public void reverseElements(int[] indexes)
throws java.lang.IndexOutOfBoundsException
indexes -
java.lang.IndexOutOfBoundsException
public void rotateClockwiseElements(int[] indexes)
throws java.lang.IndexOutOfBoundsException
indexes -
java.lang.IndexOutOfBoundsException
public void rotateAnticlockwiseElements(int[] indexes)
throws java.lang.IndexOutOfBoundsException
indexes -
java.lang.IndexOutOfBoundsException
public void moveUpIndex(int index)
throws java.lang.IndexOutOfBoundsException
index - element index to move from the data source
java.lang.IndexOutOfBoundsException
public void moveUpIndexes(int[] indexes)
throws java.lang.IndexOutOfBoundsException
indexes - Indexes to move from the data source
java.lang.IndexOutOfBoundsException
public void moveDownIndex(int index)
throws java.lang.IndexOutOfBoundsException
index - element index to move from the data source
java.lang.IndexOutOfBoundsException
public void moveDownIndexes(int[] indexes)
throws java.lang.IndexOutOfBoundsException
indexes - Indexes to move from the data source
java.lang.IndexOutOfBoundsExceptionpublic java.util.List<VisualPageListItem> getValidElements()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||