Class DefaultListModelForJLabelAsCell
java.lang.Object
javax.swing.AbstractListModel
javax.swing.DefaultListModel
org.gvsig.gui.beans.filterPanel.filterQueryPanel.jLabelAsCell.DefaultListModelForJLabelAsCell
- All Implemented Interfaces:
Serializable,ListModel
This class reimplements the "contains()" method of "DefaultListModel" for
- Author:
- Pablo Piqueras Bartolomé (p_queras@hotmail.com)
- See Also:
-
Field Summary
Fields inherited from class javax.swing.AbstractListModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeElementThatHasTextToJLabelLoadedValue(String patternText) Replaces first element which has the text 'patternText' to a JLabelValueLoaded new one element with the same textvoidclear()booleancontainsJLabelText(String patternText) Method that returns true if there is a inner JLabel that has as inner text the same text as 'patternText'intgetIndexOfJLabelText(String patternText) Returns the position of first JLabel that has as text the same text as 'patternText', or -1 if no JLabel has that textvoidinsertElementAt(Object obj, int index) remove(int index) voidbooleanremoveElement(Object obj) voidremoveElementAt(int index) voidremoveRange(int fromIndex, int toIndex) voidSets all elements to 'JLabelValueNotLoaded'voidsetElementAt(Object obj, int index) Methods inherited from class javax.swing.DefaultListModel
add, addAll, addAll, addElement, capacity, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, isEmpty, lastElement, lastIndexOf, lastIndexOf, setSize, size, toArray, toString, trimToSizeMethods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Constructor Details
-
DefaultListModelForJLabelAsCell
public DefaultListModelForJLabelAsCell()Default constructor without parameters
-
-
Method Details
-
containsJLabelText
Method that returns true if there is a inner JLabel that has as inner text the same text as 'patternText'- Parameters:
patternText-- Returns:
- A boolean value
-
getIndexOfJLabelText
Returns the position of first JLabel that has as text the same text as 'patternText', or -1 if no JLabel has that text- Parameters:
patternText- An String- Returns:
- An integer value
-
changeElementThatHasTextToJLabelLoadedValue
Replaces first element which has the text 'patternText' to a JLabelValueLoaded new one element with the same text- Parameters:
patternText- Text of the component
-
setAllElementsToNotLoaded
public void setAllElementsToNotLoaded()Sets all elements to 'JLabelValueNotLoaded' -
clear
public void clear()- Overrides:
clearin classDefaultListModel
-
insertElementAt
- Overrides:
insertElementAtin classDefaultListModel
-
remove
- Overrides:
removein classDefaultListModel
-
removeAllElements
public void removeAllElements()- Overrides:
removeAllElementsin classDefaultListModel
-
removeElement
- Overrides:
removeElementin classDefaultListModel
-
removeElementAt
public void removeElementAt(int index) - Overrides:
removeElementAtin classDefaultListModel
-
removeRange
public void removeRange(int fromIndex, int toIndex) - Overrides:
removeRangein classDefaultListModel
-
set
- Overrides:
setin classDefaultListModel
-
setElementAt
- Overrides:
setElementAtin classDefaultListModel
-