public abstract class DataTransform extends Object implements Dynamic, Saveable
Modifier and Type | Field and Description |
---|---|
protected String[] |
dims
A list of what each dimension in the multidimensional structure means.
|
protected Font |
font
Font used for this transform's text mappings.
|
protected String[][] |
labels
Label for each value at each dimensional axis.
|
protected int[] |
lengths
Length of each dimension in the multidimensional structure.
|
protected Vector |
listeners
List of transform listeners.
|
static char |
MU |
protected String |
name
Name of this transform.
|
protected static int |
nextId
Next free transform id number.
|
protected DataTransform |
parent
Parent transform from which this transform obtains its data.
|
protected ThumbnailHandler |
thumbs
Handles logic for creating thumbnails from transform data.
|
protected int |
transformId
ID number for this data transform.
|
Constructor and Description |
---|
DataTransform()
Constructs an uninitialized data transform.
|
DataTransform(DataTransform parent,
String name)
Creates a data transform with the given transform as its parent.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransformListener(TransformListener l)
Adds the given listener to the list of listeners.
|
boolean |
canDisplay2D()
Gets whether this data object can be displayed in 2D.
|
boolean |
canDisplay3D()
Gets whether this data object can be displayed in 3D.
|
void |
discard()
Called when this object is being discarded in favor of another object with
a matching state.
|
void |
displayChanged(DisplayEvent e)
Whenever a display to which this transform is linked changes, the
DisplayEvent is passed to this method so that the transform can adjust
itself (i.e., is interactive).
|
abstract String |
getCacheId(int[] pos,
boolean global)
Gets a string id uniquely describing this data transform at the given
dimensional position, for the purposes of thumbnail caching.
|
JComponent |
getControls()
Gets associated GUI controls for this transform.
|
abstract Data |
getData(TransformLink link,
int[] pos,
int dim,
DataCache cache)
Retrieves the data corresponding to the given dimensional position, for the
given display dimensionality.
|
String[] |
getDimTypes()
Gets string descriptors for each dimensional axis type.
|
Font |
getFont()
Gets the font used for this transform's text mappings.
|
String |
getHTMLDescription()
Gets a description of this transform, with HTML markup.
|
String[][] |
getLabels()
Gets label for each dimensional position.
|
int[] |
getLengths()
Gets length of each dimensional axis.
|
String |
getName()
Gets the name of this transform.
|
DataTransform |
getParent()
Gets the parent of this transform.
|
abstract ScalarMap[] |
getSuggestedMaps()
Retrieves a set of mappings for displaying this transform effectively.
|
ThumbnailHandler |
getThumbHandler()
Gets thumbnail handler for thumbnail-related operations.
|
int |
getTransformId()
Gets the data transform ID.
|
static String |
getUnitDescription(String dimType,
int len)
Gets the unit description for a dimensional type.
|
void |
initState(Dynamic dyn)
Modifies this object's state to match that of the given object.
|
boolean |
isCompatible(Dynamic dyn)
Tests whether the given dynamic object can be used as an argument to
initState, for initializing this dynamic object.
|
abstract boolean |
isImmediate()
Gets whether this transform should be drawn immediately, or "burned in" at
full resolution after the usual delay by a separate thread.
|
abstract boolean |
isValidDimension(int dim)
Gets whether this transform provides data of the given dimensionality.
|
protected void |
makeLabels()
Creates labels based on data transform parameters.
|
boolean |
matches(Dynamic dyn)
Tests whether two dynamic objects are equivalent.
|
void |
notifyListeners(TransformEvent e)
Notifies transform listeners of a parameter change.
|
void |
removeTransformListener(TransformListener l)
Removes the given listener from the list of listeners.
|
void |
restoreState(Element el)
Restores the current state from the given DOM element (a child of
"DataTransforms").
|
void |
saveState(Element el)
Writes the current state to the given DOM element (a child of
"DataTransforms").
|
void |
setFont(Font font)
Sets the font used for this transform's text mappings.
|
String |
toString()
Gets a string representation of this transform.
|
public static final char MU
protected static int nextId
protected DataTransform parent
protected String name
protected int transformId
protected int[] lengths
protected String[] dims
protected String[][] labels
protected ThumbnailHandler thumbs
protected Font font
protected Vector listeners
public DataTransform()
public DataTransform(DataTransform parent, String name)
public abstract Data getData(TransformLink link, int[] pos, int dim, DataCache cache)
public abstract boolean isValidDimension(int dim)
public abstract ScalarMap[] getSuggestedMaps()
public abstract String getCacheId(int[] pos, boolean global)
public abstract boolean isImmediate()
OverlayTransform
for one such example).public DataTransform getParent()
public String getName()
public int getTransformId()
public int[] getLengths()
public String[] getDimTypes()
public boolean canDisplay2D()
public boolean canDisplay3D()
public ThumbnailHandler getThumbHandler()
public JComponent getControls()
public String getHTMLDescription()
public String[][] getLabels()
public void setFont(Font font)
public Font getFont()
public void displayChanged(DisplayEvent e)
public void addTransformListener(TransformListener l)
public void removeTransformListener(TransformListener l)
public void notifyListeners(TransformEvent e)
protected void makeLabels()
public String toString()
public boolean matches(Dynamic dyn)
public boolean isCompatible(Dynamic dyn)
isCompatible
in interface Dynamic
public void initState(Dynamic dyn)
public void discard()
public void saveState(Element el) throws SaveException
saveState
in interface Saveable
SaveException
public void restoreState(Element el) throws SaveException
restoreState
in interface Saveable
SaveException
Copyright © 2015–2022 SciJava. All rights reserved.