E
- an Enumpublic class REpiceaMatchSelector<E extends java.lang.Enum<E>> extends java.lang.Object implements REpiceaShowableUIWithParent, javax.swing.event.TableModelListener, IOUserInterfaceableObject, Memorizable
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object[] |
columnNames |
protected java.lang.String |
filename |
protected REpiceaMatchSelectorDialog |
guiInterface |
protected java.util.Map<java.lang.Object,java.lang.Enum<E>> |
matchMap |
protected java.util.List<java.lang.Enum<E>> |
potentialMatches |
Constructor and Description |
---|
REpiceaMatchSelector(java.lang.Object[] toBeMatched,
java.lang.Enum<E>[] potentialMatchArray,
java.lang.Enum<E> defaultMatch,
java.lang.Object[] columnNames)
Official constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
addMatches(java.lang.Enum<E>[] enumValues)
This method adds a potential treatment to the list of available treatments
|
javax.swing.filechooser.FileFilter |
getFileFilter()
This method returns the appropriate FileFilter instance for this class.
|
java.lang.String |
getFilename()
This method returns the filename of the parameters.
|
java.lang.Enum<E> |
getMatch(java.lang.Object obj)
This method returns the match corresponding to the parameter.
|
MemorizerPackage |
getMemorizerPackage()
This method creates a MemorizerPackage instance that can be sent in turn to the TemporaryMemorizer instance for serialization.
|
protected java.util.List<java.lang.Enum<E>> |
getPotentialMatches() |
REpiceaMatchSelectorDialog |
getUI(java.awt.Container parent)
This method returns the GUI interface of the class that implements this interface.
|
boolean |
isVisible()
This method returns true if the GUI is visible.
|
void |
load(java.lang.String filename)
This method makes it possible to load information from a file.
|
static void |
main(java.lang.String[] args) |
void |
save(java.lang.String filename)
This method saves the records in a file denominated by the filename parameter.
|
protected void |
setFilename(java.lang.String filename) |
void |
showUI(java.awt.Window parent)
This method shows the GUI interface of the class that implements this interface.
|
void |
tableChanged(javax.swing.event.TableModelEvent e) |
void |
unpackMemorizerPackage(MemorizerPackage wasMemorized)
This method unpacks the MemorizerPackage instance retrieved by the TemporaryMemorizer class.
|
protected final java.util.Map<java.lang.Object,java.lang.Enum<E extends java.lang.Enum<E>>> matchMap
protected final java.util.List<java.lang.Enum<E extends java.lang.Enum<E>>> potentialMatches
protected java.lang.String filename
protected transient REpiceaMatchSelectorDialog guiInterface
protected final java.lang.Object[] columnNames
public REpiceaMatchSelector(java.lang.Object[] toBeMatched, java.lang.Enum<E>[] potentialMatchArray, java.lang.Enum<E> defaultMatch, java.lang.Object[] columnNames)
toBeMatched
- an array of strings to be matchedpotentialMatchArray
- an array of enum variablesdefaultMatch
- an enum variable that acts as a default matchcolumnNames
- an array of object (Strings or Enum) for column titlesprotected void addMatches(java.lang.Enum<E>[] enumValues)
enumValues
- an array of enum variableprotected java.util.List<java.lang.Enum<E>> getPotentialMatches()
public REpiceaMatchSelectorDialog getUI(java.awt.Container parent)
REpiceaUIObjectWithParent
getUI
in interface REpiceaUIObjectWithParent
parent
- a parent Container instance (can be null)public boolean isVisible()
REpiceaUIObjectWithParent
isVisible
in interface REpiceaUIObjectWithParent
public void showUI(java.awt.Window parent)
REpiceaShowableUIWithParent
showUI
in interface REpiceaShowableUIWithParent
parent
- the parent Window instance (can be null)public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged
in interface javax.swing.event.TableModelListener
public void save(java.lang.String filename) throws java.io.IOException
Saveable
protected void setFilename(java.lang.String filename)
public void load(java.lang.String filename) throws java.io.IOException
Loadable
public javax.swing.filechooser.FileFilter getFileFilter()
IOUserInterfaceableObject
getFileFilter
in interface IOUserInterfaceableObject
public java.lang.String getFilename()
IOUserInterfaceableObject
getFilename
in interface IOUserInterfaceableObject
public MemorizerPackage getMemorizerPackage()
Memorizable
getMemorizerPackage
in interface Memorizable
public void unpackMemorizerPackage(MemorizerPackage wasMemorized)
Memorizable
unpackMemorizerPackage
in interface Memorizable
wasMemorized
- a MemorizerPackage instancepublic java.lang.Enum<E> getMatch(java.lang.Object obj)
obj
- public static void main(java.lang.String[] args)