edu.stanford.smi.protegex.owl.ui.resourceselection
Class ResourceFilterListModel
java.lang.Object
javax.swing.AbstractListModel
edu.stanford.smi.protegex.owl.ui.resourceselection.ResourceFilterListModel
- All Implemented Interfaces:
- Serializable, ComboBoxModel, ListModel
public class ResourceFilterListModel
- extends AbstractListModel
- implements ComboBoxModel
A ListModel for JComboBoxes and JLists that allows to select a frame by typing its
prefix characters. The ListModel will contain exactly those frames that match the
current prefix.
- Author:
- Holger Knublauch
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceFilterListModel
public ResourceFilterListModel(Collection frames)
addChar
public void addChar(char ch)
backspace
public void backspace()
findFirstMatchingFrame
protected int findFirstMatchingFrame()
- Finds the first Frame that matches the suffix
- Returns:
- the index of the first frame
getElementAt
public Object getElementAt(int index)
- Specified by:
getElementAt
in interface ListModel
getPrefixLength
public int getPrefixLength()
getSelectedItem
public Object getSelectedItem()
- Specified by:
getSelectedItem
in interface ComboBoxModel
getSize
public int getSize()
- Specified by:
getSize
in interface ListModel
setSelectedItem
public void setSelectedItem(Object anItem)
- Specified by:
setSelectedItem
in interface ComboBoxModel
Submit a bug report or feature request
Copyright (c) 1998-2007 Stanford University.