Package adams.gui.tools
Class FavoritesManagementPanel.FavoritesListModel
- java.lang.Object
-
- javax.swing.AbstractListModel<E>
-
- javax.swing.DefaultListModel
-
- adams.gui.tools.FavoritesManagementPanel.AbstractFavoritesListModel
-
- adams.gui.tools.FavoritesManagementPanel.FavoritesListModel
-
- All Implemented Interfaces:
Serializable
,ListModel
- Enclosing class:
- FavoritesManagementPanel
public static class FavoritesManagementPanel.FavoritesListModel extends FavoritesManagementPanel.AbstractFavoritesListModel
A list model for displaying the favorites of a specific superclass.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Class
m_Superclass
the superclass to display.-
Fields inherited from class adams.gui.tools.FavoritesManagementPanel.AbstractFavoritesListModel
m_Favorites
-
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description FavoritesListModel()
Initializes the model with no favorites.FavoritesListModel(Favorites fav)
Initializes the model.FavoritesListModel(Favorites fav, Class cls)
Initializes the model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName(int index)
Returns the name of the favorite at the specified location.Class
getSuperclass()
Returns the currently set superclass.void
setSuperclass(Class value)
Sets the superclass to use.void
setSuperclass(String value)
Sets the superclass to use.void
update()
Updates the list.-
Methods inherited from class adams.gui.tools.FavoritesManagementPanel.AbstractFavoritesListModel
getFavorites, setFavorites
-
Methods inherited from class javax.swing.DefaultListModel
add, addAll, addAll, addElement, capacity, clear, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAllElements, removeElement, removeElementAt, removeRange, set, setElementAt, setSize, size, toArray, toString, trimToSize
-
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
-
-
-
Field Detail
-
m_Superclass
protected Class m_Superclass
the superclass to display.
-
-
Constructor Detail
-
FavoritesListModel
public FavoritesListModel()
Initializes the model with no favorites.
-
FavoritesListModel
public FavoritesListModel(Favorites fav)
Initializes the model.- Parameters:
fav
- the favorites to use
-
-
Method Detail
-
setSuperclass
public void setSuperclass(String value)
Sets the superclass to use.- Parameters:
value
- the superclass
-
setSuperclass
public void setSuperclass(Class value)
Sets the superclass to use.- Parameters:
value
- the superclass
-
getSuperclass
public Class getSuperclass()
Returns the currently set superclass.- Returns:
- the superclass, can be null
-
update
public void update()
Updates the list.- Specified by:
update
in classFavoritesManagementPanel.AbstractFavoritesListModel
-
getName
public String getName(int index)
Returns the name of the favorite at the specified location.- Parameters:
index
- the list index of the favorite- Returns:
- the name
-
-