LC - a TreeLogCategory-derived classpublic abstract class TreeLoggerParameters<LC extends LogCategory> extends java.lang.Object implements Memorizable, IOUserInterfaceableObject, java.io.Serializable, REpiceaShowableUIWithParent, PostXmlUnmarshalling, REpiceaGUIPermissionProvider
| Modifier and Type | Class and Description |
|---|---|
protected static class |
TreeLoggerParameters.TreeLoggerParametersFileFilter |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ANY_SPECIES |
protected TreeLogger<?,?> |
treeLogger |
protected static TreeLoggerParameters.TreeLoggerParametersFileFilter |
TreeLoggerFileFilter |
| Modifier | Constructor and Description |
|---|---|
protected |
TreeLoggerParameters(java.lang.Class<? extends TreeLogger<?,?>> treeLoggerClass)
General constructor all the TreeLoggerParameters-derived classes.
|
| Modifier and Type | Method and Description |
|---|---|
TreeLogger<TreeLoggerParameters<?>,?> |
createTreeLoggerInstance()
This method returns a TreeLogger instance adapted to these parameters.
|
boolean |
equals(java.lang.Object obj) |
protected void |
fireEvent()
Deprecated.
|
protected java.lang.Object |
getDefaultSpecies()
This method can be override in order to specify a default species.
|
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.
|
REpiceaGUIPermission |
getGUIPermission()
This method returns the Permission instance associated with the object.
|
java.util.Map<java.lang.Object,java.util.List<LC>> |
getLogCategories()
This method returns a Map instance with the species names as key and the
corresponding List of LogCategory-derived instances as values.
|
LC |
getLogCategory(java.lang.String speciesName,
java.lang.String name)
This method returns a specific LogCategory object among the selected
tree log categories contained in this class.
|
java.util.List<LC> |
getLogCategoryList()
This method returns a list of all the LogCategory instances.
|
java.util.List<java.lang.String> |
getLogCategoryNames()
This method returns the list of the log category names.
|
MemorizerPackage |
getMemorizerPackage()
This method creates a MemorizerPackage instance that can be sent in turn to the TemporaryMemorizer instance for serialization.
|
java.util.List<LC> |
getSpeciesLogCategories(java.lang.Object species)
This method returns the List of LogCategory-derived object for a
particular species.
|
TreeLoggerDescription |
getTreeLoggerDescription()
This method returns a TreeLoggerDescription based on the TreeLogger class of this
instance.
|
abstract TreeLoggerParametersDialog<?> |
getUI(java.awt.Container parent)
This method returns the GUI interface of the class that implements this interface.
|
protected abstract void |
initializeDefaultLogCategories()
This method serves to create a default list of selected tree log
categories.
|
abstract boolean |
isCorrect()
This method checks if the parameters are correct for the treelogger.
|
boolean |
isParameterDialogCanceled()
This method returns false if the parameter initialization has been
aborted in GUI mode.
|
void |
load() |
void |
load(java.lang.String filename)
This method makes it possible to load information from a file.
|
static TreeLoggerParameters<?> |
loadFromFile(java.lang.String filename)
This method creates a TreeLoggerParameters instance from a previously saved .xml file
|
void |
postUnmarshallingAction()
This method is called after the unmashalling.
|
protected void |
save()
This method saves the parameters in the current filename.
|
void |
save(java.lang.String filename)
This method saves the records in a file denominated by the filename parameter.
|
void |
setFilename(java.lang.String filename) |
void |
setParameterDialogCanceled(boolean b)
This method makes it possible to specify whether or not the parameter
initialization in GUI mode has been aborted.
|
void |
setReadWritePermissionGranted(REpiceaGUIPermission permission)
This method sets the GUI rights for changing the tree logger parameters.
|
void |
showUI(java.awt.Window parent)
This method shows the GUI interface of the class that implements this interface.
|
java.lang.String |
toString() |
void |
unpackMemorizerPackage(MemorizerPackage mp)
This method unpacks the MemorizerPackage instance retrieved by the TemporaryMemorizer class.
|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisVisibleprotected static final TreeLoggerParameters.TreeLoggerParametersFileFilter TreeLoggerFileFilter
public static final java.lang.String ANY_SPECIES
protected transient TreeLogger<?,?> treeLogger
protected TreeLoggerParameters(java.lang.Class<? extends TreeLogger<?,?>> treeLoggerClass)
protected abstract void initializeDefaultLogCategories()
protected java.lang.Object getDefaultSpecies()
public LC getLogCategory(java.lang.String speciesName, java.lang.String name)
speciesName - a String that represents the species namename - the name of the tree log categorypublic abstract boolean isCorrect()
public javax.swing.filechooser.FileFilter getFileFilter()
IOUserInterfaceableObjectgetFileFilter in interface IOUserInterfaceableObjectpublic java.util.List<java.lang.String> getLogCategoryNames()
public java.util.List<LC> getSpeciesLogCategories(java.lang.Object species)
species - an Object that represents the species namepublic java.util.Map<java.lang.Object,java.util.List<LC>> getLogCategories()
public java.util.List<LC> getLogCategoryList()
public boolean isParameterDialogCanceled()
public void setParameterDialogCanceled(boolean b)
public MemorizerPackage getMemorizerPackage()
MemorizablegetMemorizerPackage in interface Memorizablepublic void unpackMemorizerPackage(MemorizerPackage mp)
MemorizableunpackMemorizerPackage in interface Memorizablemp - a MemorizerPackage instance@Deprecated protected void fireEvent()
protected void save()
throws java.io.IOException
java.io.IOExceptionpublic void save(java.lang.String filename)
throws java.io.IOException
Saveablepublic void load()
throws java.io.IOException,
java.lang.instrument.IllegalClassFormatException
java.io.IOExceptionjava.lang.instrument.IllegalClassFormatExceptionpublic void load(java.lang.String filename)
throws java.io.IOException
Loadablepublic abstract TreeLoggerParametersDialog<?> getUI(java.awt.Container parent)
REpiceaUIObjectWithParentgetUI in interface REpiceaUIObjectWithParentparent - a parent Container instance (can be null)public void showUI(java.awt.Window parent)
REpiceaShowableUIWithParentshowUI in interface REpiceaShowableUIWithParentparent - the parent Window instance (can be null)public java.lang.String getFilename()
IOUserInterfaceableObjectgetFilename in interface IOUserInterfaceableObjectpublic void setFilename(java.lang.String filename)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic TreeLogger<TreeLoggerParameters<?>,?> createTreeLoggerInstance()
public TreeLoggerDescription getTreeLoggerDescription()
public static TreeLoggerParameters<?> loadFromFile(java.lang.String filename) throws java.io.IOException
filename - the path of the xml filejava.io.IOExceptionpublic void postUnmarshallingAction()
PostXmlUnmarshallingpostUnmarshallingAction in interface PostXmlUnmarshallingpublic REpiceaGUIPermission getGUIPermission()
REpiceaGUIPermissionProvidergetGUIPermission in interface REpiceaGUIPermissionProviderpublic void setReadWritePermissionGranted(REpiceaGUIPermission permission)
permission - a REpiceaGUIPermission instancepublic java.lang.String toString()
toString in class java.lang.Object