Home /
Development /
Documentation /
2.0.44 /
RecentlyUsedExpressionsListModel
info.bioinfweb.treegraph.gui.dialogs.nodebranchdata
Class RecentlyUsedExpressionsListModel
java.lang.Object
javax.swing.AbstractListModel
info.bioinfweb.treegraph.gui.dialogs.nodebranchdata.RecentlyUsedExpressionsListModel
- All Implemented Interfaces:
- Serializable, ListModel
public class RecentlyUsedExpressionsListModel
- extends AbstractListModel
- implements ListModel
Manages the list of recently used expressions.
- Since:
- 2.0.24
- Author:
- Ben Stöver
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILE_NAME
public static final String FILE_NAME
- See Also:
- Constant Field Values
MAXIMAL_COUNT
public static final int MAXIMAL_COUNT
- See Also:
- Constant Field Values
expressions
private List<String> expressions
RecentlyUsedExpressionsListModel
public RecentlyUsedExpressionsListModel()
getFileName
public String getFileName()
cutToSize
private void cutToSize()
addExpression
public void addExpression(String expression)
- Adds
expression
to the list. If it is already contained, it will be moved to the front.
- Parameters:
expression
-
loadList
public void loadList()
throws IOException
- Loads the list of recently used expressions from the TreeGraph configuration directory if the according
file exists.
- Throws:
IOException
saveList
public void saveList()
throws IOException
- Writes the list of recently used expressions to the TreeGraph configuration directory.
- Throws:
IOException
getElementAt
public String getElementAt(int pos)
- Specified by:
getElementAt
in interface ListModel
getSize
public int getSize()
- Specified by:
getSize
in interface ListModel