public class DataManager extends LogicManager
Modifier and Type | Field and Description |
---|---|
static String |
AUTO_THUMBS
String for thumbnail auto-generation option.
|
protected DataControls |
dataControls
Datasets control panel.
|
protected static int |
DEFAULT_THUMBNAIL_RESOLUTION
Default resolution for low-resolution thumbnails.
|
protected static String |
SAMPLE_PREFIX
URL prefix for sample datasets.
|
static String |
THUMB_RES
String for thumbnail resolution option.
|
protected Vector<String> |
transformLabels
List of registered data transform type labels.
|
protected Vector<Class<?>> |
transformTypes
List of registered data transform type classes.
|
bio
Constructor and Description |
---|
DataManager(VisBioFrame bio)
Constructs a dataset manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addData(DataTransform data)
Adds a data object to the list.
|
void |
createDataset(String name,
String pattern,
BioTask bioTask)
Creates a dataset, updating the given task object as things progress.
|
void |
doEvent(VisBioEvent evt)
Called to notify the logic manager of a VisBio event.
|
void |
exportData()
Exports the selected data object to disk.
|
void |
exportData(ImageTransform data)
Exports the given data object to disk.
|
boolean |
getAutoThumbGen()
Gets whether low-resolution thumbnails should be automatically generated
from VisBio options.
|
DataControls |
getControls()
Gets associated control panel.
|
DataTransform |
getDataById(int id)
Gets the data transform with the associated ID.
|
Vector<DataTransform> |
getDataList()
Gets a list of data transforms present in the tree.
|
DefaultMutableTreeNode |
getDataRoot()
Gets the root node of the data object tree.
|
String[] |
getRegisteredDataLabels()
Gets list of regitered data transform labels.
|
Class<?>[] |
getRegisteredDataTypes()
Gets list of registered data transform types.
|
DataTransform |
getSelectedData()
Gets the currently selected data object.
|
int |
getTasks()
Gets the number of tasks required to initialize this logic manager.
|
int[] |
getThumbnailResolution()
Gets resolution of low-resolution thumbnails from VisBio options.
|
void |
importData()
Imports a dataset.
|
void |
importData(Component parent)
Imports a dataset, using the given parent component for user dialogs.
|
void |
openSampleData(String name)
Loads the given sample dataset.
|
void |
registerDataType(Class<?> c,
String label)
Registers the given subclass of DataTransform with the data manager, using
the given label as a description.
|
void |
removeData(DataTransform data)
Removes a data object from the list.
|
void |
removeData(DataTransform data,
boolean confirm)
Removes a data object from the list.
|
void |
restoreState(Element el)
Restores the current state from the given DOM element ("VisBio").
|
void |
saveState(Element el)
Writes the current state to the given DOM element ("VisBio").
|
void |
sendDataToImageJ()
Sends the selected data object to an instance of ImageJ.
|
void |
sendDataToImageJ(ImageTransform data)
Sends the given data object to an instance of ImageJ.
|
void |
showControls(DataTransform data)
Shows dialog containing controls for the given data object.
|
getVisBio
protected static final String SAMPLE_PREFIX
protected static final int DEFAULT_THUMBNAIL_RESOLUTION
public static final String AUTO_THUMBS
public static final String THUMB_RES
protected DataControls dataControls
protected Vector<Class<?>> transformTypes
public DataManager(VisBioFrame bio)
public void addData(DataTransform data)
public void removeData(DataTransform data)
public void removeData(DataTransform data, boolean confirm)
public DefaultMutableTreeNode getDataRoot()
public DataTransform getSelectedData()
public void showControls(DataTransform data)
public void registerDataType(Class<?> c, String label)
public Class<?>[] getRegisteredDataTypes()
public String[] getRegisteredDataLabels()
public Vector<DataTransform> getDataList()
public DataTransform getDataById(int id)
public void importData()
public void importData(Component parent)
public void exportData()
public void exportData(ImageTransform data)
public void sendDataToImageJ()
public void sendDataToImageJ(ImageTransform data)
public void openSampleData(String name)
public void createDataset(String name, String pattern, BioTask bioTask)
public boolean getAutoThumbGen()
public int[] getThumbnailResolution()
public DataControls getControls()
public void doEvent(VisBioEvent evt)
doEvent
in class LogicManager
public int getTasks()
getTasks
in class LogicManager
public void saveState(Element el) throws SaveException
saveState
in interface Saveable
saveState
in class LogicManager
SaveException
public void restoreState(Element el) throws SaveException
restoreState
in interface Saveable
restoreState
in class LogicManager
SaveException
Copyright © 2015–2022 SciJava. All rights reserved.