|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object comirva.Workspace
public class Workspace
This class implements a workspace environment containing data matrices and meta-data instances and the respective lists.
Field Summary | |
---|---|
protected Vector<DefaultListModel> |
additionalListMatrices
|
protected Vector<Vector> |
additionalMatrixList
|
protected Vector<String> |
additionalMatrixNames
|
protected DefaultListModel |
listMatrices
|
protected DefaultListModel |
listMetaData
|
protected DefaultListModel |
listVisu
|
protected Vector |
matrixList
|
protected Vector |
metaDataList
|
protected Vector<VisuListItem> |
visuList
|
Constructor Summary | |
---|---|
Workspace()
Creates a new empty instance of the Workspace. |
Method Summary | |
---|---|
void |
addMatrix(DataMatrix dm,
String name)
Adds a data matrix to the Workspace instance. |
void |
addMetaData(Vector meta,
String name)
Adds a meta-data Vector to the Workspace instance. |
void |
addVisu(VisuListItem visu,
String name)
Adds a visualisation to the Workspace instance |
int |
countVisuTypes(String className)
counts the amount of visus of class given by its class name. |
Vector<VisuListItem> |
getVisuListItems(String className)
creates a vector containing only the visualizations of the type given by the class name. |
Vector<String> |
getVisuListNames(String className)
creates a vector containing the names |
String[] |
getVisuListNamesArray(String className)
This method returns a string array containing the names of visualisation of the type given by the class name. |
String[] |
getVisuListNamesArray(String className,
int count)
This method returns a string array containing the names of visualisation of the type given by the class name. |
void |
printVisuTypes()
print the stored visualisation types to standard system output |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DefaultListModel listMatrices
protected Vector matrixList
protected Vector<DefaultListModel> additionalListMatrices
protected Vector<Vector> additionalMatrixList
protected Vector<String> additionalMatrixNames
protected DefaultListModel listVisu
protected Vector<VisuListItem> visuList
protected DefaultListModel listMetaData
protected Vector metaDataList
Constructor Detail |
---|
public Workspace()
Method Detail |
---|
public void addMetaData(Vector meta, String name)
meta
- a Vector containing the meta-data as Stringsname
- a String containing a name for the meta-data which is shown in CoMIRVA's UIpublic void addMatrix(DataMatrix dm, String name)
dm
- a DataMatrix representing the data matrix to be insertedname
- a String containing a name for the data matrix which is shown in CoMIRVA's UIpublic void addVisu(VisuListItem visu, String name)
visu
- a Visualisation object representing the visualisationname
- a String containing a name for the Visualisation which is shown in CoMIRVA's UIpublic void printVisuTypes()
public int countVisuTypes(String className)
equals()
method) to the name that is returned by
the getClass().getName()
method of the visualisation object
added to the visualisation list.
className
- The name of the class that should be counted
public Vector<VisuListItem> getVisuListItems(String className)
equals()
method) to the
name that is returned by the getClass().getName()
method
of the visualization object.
className
- The name of the class
public Vector<String> getVisuListNames(String className)
className
-
public String[] getVisuListNamesArray(String className)
equals() method) to the name returned by the
getClass().getName()
method of the visualisation object.
This method calls the countVisuTypes(String)
method in order to
determined the required size of the String array that will be returned.
If you have done such a count before in your count (e.g. for existence
testing or if you want to bring up an input dialog only if there are
more than one possibilities) you may consider using
getVisuListNamesArray(String, int)
instead.
- Parameters:
className
- The name of the class
- Returns:
- an array containing the names of the given type
public String[] getVisuListNamesArray(String className, int count)
equals()
method) to the name returned by the
getClass().getName()
method of the visualisation object.
This method may be used if you already know how many visualisations are
present in the list (by calling the countVisuTypes(String)
method,
e.g. for checking if there is any visualisation of that type in the list
or checking if there are more than one for showing an input dialog etc.).
In this case you pass the amount as second parameter to save the call to
the countVisuTypes(String)
method.
WARNING: There is no check on the count parameter. This may cause an
Exception (mainly an IndexOutOfBoundException
) if the value is
not correct
className
- The name of the classcount
- The amount of visualisations of that type in the list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |