public class TransformLink extends Object implements DisplayListener, Dynamic, Runnable, Saveable, TransformListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
alive
Whether this link is still active.
|
protected boolean |
burnNow
Whether a full-resolution burn-in should occur immediately.
|
protected Thread |
burnThread
Separate thread for managing full-resolution burn-in.
|
protected long |
burnTime
Next clock time a full-resolution burn-in should occur.
|
protected int[] |
cachedPos
Last cached dimensional position of the link.
|
protected boolean |
clearWhenDone
Whether a TRANSFORM_DONE event should clear the status message.
|
protected ColorHandler |
colorHandler
Associated handler for managing this link's color settings.
|
protected VisADException[] |
cursor
Range values for current cursor location, to be displayed in bottom left
corner.
|
protected TransformHandler |
handler
Associated transform handler.
|
protected DataReferenceImpl |
ref
Data reference linking data to the display.
|
protected DataRenderer |
rend
Data renderer for toggling data's visibility and other parameters.
|
protected VisADException |
status
Status message, to be displayed in bottom left corner.
|
protected DataTransform |
trans
Data transform linked to the display.
|
protected boolean |
visible
Whether data transform is visible onscreen.
|
Constructor and Description |
---|
TransformLink(TransformHandler h)
Constructs an uninitialized transform link.
|
TransformLink(TransformHandler h,
DataTransform t)
Creates a link between the given data transform and the specified transform
handler's display.
|
Modifier and Type | Method and Description |
---|---|
protected void |
computeCursor()
Computes range values at the current cursor location.
|
protected void |
computeData(boolean thumbs)
Computes the reference data at the current position, utilizing thumbnails
as appropriate.
|
void |
destroy()
Frees resources being consumed by this transform link.
|
void |
discard()
Called when this object is being discarded in favor of another object with
a matching state.
|
void |
displayChanged(DisplayEvent e)
Handles VisAD display events.
|
protected void |
doTransform()
Updates displayed data based on current dimensional position.
|
protected void |
doTransform(long delay)
Updates displayed data based on current dimensional position.
|
protected void |
doTransform(long delay,
boolean now)
Updates displayed data based on current dimensional position.
|
ColorHandler |
getColorHandler()
Gets the link's color handler.
|
TransformHandler |
getHandler()
Gets the link's transform handler.
|
protected Data |
getImageData(int[] pos)
Gets the transform's data at the given dimensional position.
|
DataReferenceImpl |
getReference()
Gets the link's reference.
|
DataRenderer |
getRenderer()
Gets the link's renderer.
|
DataTransform |
getTransform()
Gets the link's data transform.
|
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.
|
boolean |
isVisible()
Gets visibility of the transform.
|
void |
link()
Links this transform into the display.
|
boolean |
matches(Dynamic dyn)
Tests whether two dynamic objects are equivalent.
|
void |
restoreState(Element el)
Restores the current state from the given DOM element ("TransformLink").
|
void |
run()
Executes full-resolution burn-in operations.
|
void |
saveState(Element el)
Writes the current state to the given DOM element ("LinkedData").
|
protected void |
setData(Data d)
Assigns the given data object to the data reference.
|
protected void |
setData(Data d,
boolean autoSwitch)
Assigns the given data object to the data reference, switching to the
proper types if the flag is set.
|
protected void |
setData(Data d,
DataReference dataRef)
Assigns the given data object to the given data reference.
|
protected void |
setData(Data d,
DataReference dataRef,
boolean autoSwitch)
Assigns the given data object to the given data reference, switching to the
proper types if the flag is set.
|
void |
setMessage(String msg)
Sets status messages displayed in display's bottom left-hand corner.
|
void |
setVisible(boolean vis)
Toggles visibility of the transform.
|
void |
transformChanged(TransformEvent e)
Called when a data transform's parameters are updated.
|
void |
unlink()
Unlinks this transform from the display.
|
protected TransformHandler handler
protected DataTransform trans
protected ColorHandler colorHandler
protected DataReferenceImpl ref
protected DataRenderer rend
protected Thread burnThread
protected boolean burnNow
protected long burnTime
protected boolean alive
protected VisADException status
protected VisADException[] cursor
protected boolean clearWhenDone
protected int[] cachedPos
protected boolean visible
public TransformLink(TransformHandler h)
public TransformLink(TransformHandler h, DataTransform t)
public TransformHandler getHandler()
public DataTransform getTransform()
public ColorHandler getColorHandler()
public DataReferenceImpl getReference()
public DataRenderer getRenderer()
public void link()
public void unlink()
public void destroy()
public void setVisible(boolean vis)
public boolean isVisible()
public void setMessage(String msg)
public void displayChanged(DisplayEvent e)
displayChanged
in interface DisplayListener
public boolean matches(Dynamic dyn)
public boolean isCompatible(Dynamic dyn)
isCompatible
in interface Dynamic
public void initState(Dynamic dyn)
public void discard()
public void run()
public void saveState(Element el) throws SaveException
saveState
in interface Saveable
SaveException
public void restoreState(Element el) throws SaveException
restoreState
in interface Saveable
SaveException
public void transformChanged(TransformEvent e)
transformChanged
in interface TransformListener
protected void doTransform()
protected void doTransform(long delay)
protected void doTransform(long delay, boolean now)
protected void computeData(boolean thumbs)
protected Data getImageData(int[] pos)
protected void setData(Data d)
protected void setData(Data d, boolean autoSwitch)
protected void setData(Data d, DataReference dataRef)
protected void setData(Data d, DataReference dataRef, boolean autoSwitch)
protected void computeCursor()
Copyright © 2015–2022 SciJava. All rights reserved.