visad
Class Control
- java.lang.Object
-
- visad.Control
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- AnimationSetControl, AVControlJ2D, AVControlJ3D, BaseColorControl, ContourControl, FlowControl, GraphicsModeControl, ProjectionControl, RangeControl, RendererControl, ShapeControl, TextControl, ToggleControl
public abstract class Control extends java.lang.Object implements java.lang.Cloneable, java.io.SerializableControl is the abstract VisAD superclass for controls for DisplayRealTypes.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Control(DisplayImpl d)construct a Control for the given DisplayImpl
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidaddControlListener(ControlListener listener)add a ControlListenervoidanimation_string(RealType real, Set set, double value, int current)build String representation of current animation step and pass it to DisplayRenderer.setAnimationString() called by java3d.AnimationControlJ3D and java2d.AnimationControlJ2DvoidchangeControl(boolean tick)invoked every time values of this Control changebooleancheckTicks(DataRenderer r, DataDisplayLink link)check if this Control changed and requires re-Transformjava.lang.Objectclone()booleanequals(java.lang.Object o)Indicates whether or not this instance equals an ObjectDisplayImplgetDisplay()DisplayRenderergetDisplayRenderer()intgetInstanceNumber()abstract java.lang.StringgetSaveString()longincTick()increment long counter NewTick: NewTick > OldTick indicates that there is event in this Control that the DisplayImpl must process; this method is invoked every time Control changesvoidnullControl()end this control (called by ScalarMap.nullDisplay())booleanpeekTicks(DataRenderer r, DataDisplayLink link)peek at future value of checkTicks()voidremoveControlListener(ControlListener listener)remove a ControlListenervoidresetTicks()reset tickFlag and propagate to sub-Controlsabstract voidsetSaveString(java.lang.String save)reconstruct this Control using the specified save stringvoidsetTicks()set tickFlag if NewTick > OldTick, and reset OldTick = NewTick also invoke subSetTicks() to propagate to any sub-ControlsbooleansubCheckTicks(DataRenderer r, DataDisplayLink link)run checkTicks on any sub-Controls this default for no sub-ControlsbooleansubPeekTicks(DataRenderer r, DataDisplayLink link)run peekTicks on any sub-Controls this default for no sub-ControlsvoidsubResetTicks()run resetTicks on any sub-Controls this default for no sub-ControlsvoidsubSetTicks()run setTicks on any sub-Controls; this default for no sub-Controlsabstract voidsyncControl(Control rmt)copy the state of a remote control to this controljava.lang.StringtoString()
-
-
-
Constructor Detail
-
Control
public Control(DisplayImpl d)
construct a Control for the given DisplayImpl- Parameters:
d- - DisplayImpl this Control is associated with
-
-
Method Detail
-
getDisplayRenderer
public DisplayRenderer getDisplayRenderer()
- Returns:
- DisplayRenderer assciated with this Control
-
changeControl
public void changeControl(boolean tick) throws VisADException, java.rmi.RemoteExceptioninvoked every time values of this Control change- Parameters:
tick- true to notify the Display for possible re-transform- Throws:
VisADExceptionjava.rmi.RemoteException
-
addControlListener
public void addControlListener(ControlListener listener)
add a ControlListener- Parameters:
listener- ControlListener to add
-
removeControlListener
public void removeControlListener(ControlListener listener)
remove a ControlListener- Parameters:
listener- ControlListener to remove
-
nullControl
public void nullControl()
end this control (called by ScalarMap.nullDisplay())
-
incTick
public long incTick()
increment long counter NewTick: NewTick > OldTick indicates that there is event in this Control that the DisplayImpl must process; this method is invoked every time Control changes- Returns:
- incremented value of NewTick counter
-
setTicks
public void setTicks()
set tickFlag if NewTick > OldTick, and reset OldTick = NewTick also invoke subSetTicks() to propagate to any sub-Controls
-
peekTicks
public boolean peekTicks(DataRenderer r, DataDisplayLink link)
peek at future value of checkTicks()- Parameters:
r- DataRenderer to check if changes to this Control require re-transformlink- DataDisplayLink involved in decision whether changes to this Control require re-transform- Returns:
- true if checkTicks() will return true after next setTicks()
-
checkTicks
public boolean checkTicks(DataRenderer r, DataDisplayLink link)
check if this Control changed and requires re-Transform- Parameters:
r- DataRenderer to check if changes to this Control require re-transformlink- DataDisplayLink involved in decision whether changes to this Control require re-transform- Returns:
- true if Control changed and requires re-Transform
-
resetTicks
public void resetTicks()
reset tickFlag and propagate to sub-Controls
-
subSetTicks
public void subSetTicks()
run setTicks on any sub-Controls; this default for no sub-Controls
-
subCheckTicks
public boolean subCheckTicks(DataRenderer r, DataDisplayLink link)
run checkTicks on any sub-Controls this default for no sub-Controls- Parameters:
r- DataRenderer to check if changes to this Control require re-transformlink- DataDisplayLink involved in decision whether changes to this Control require re-transform- Returns:
- 'logical or' of values from checkTicks on sub-Controls
-
subPeekTicks
public boolean subPeekTicks(DataRenderer r, DataDisplayLink link)
run peekTicks on any sub-Controls this default for no sub-Controls- Parameters:
r- DataRenderer to check if changes to this Control require re-transformlink- DataDisplayLink involved in decision whether changes to this Control require re-transform- Returns:
- 'logical or' of values from peekTicks on sub-Controls
-
subResetTicks
public void subResetTicks()
run resetTicks on any sub-Controls this default for no sub-Controls
-
animation_string
public void animation_string(RealType real, Set set, double value, int current) throws VisADException
build String representation of current animation step and pass it to DisplayRenderer.setAnimationString() called by java3d.AnimationControlJ3D and java2d.AnimationControlJ2D- Parameters:
real- - RealType mapped to Display.Animationset- - Set from AnimationSetControlvalue- - real value associated with current animation stepcurrent- - index of current animation step- Throws:
VisADException- a VisAD error occurred
-
getInstanceNumber
public int getInstanceNumber()
- Returns:
- 'instance number' (index + 1 ?) of this Control in display.ControlVector
-
getDisplay
public DisplayImpl getDisplay()
- Returns:
- DisplayImpl associated with this Control
-
getSaveString
public abstract java.lang.String getSaveString()
- Returns:
- String representation of this Control
-
setSaveString
public abstract void setSaveString(java.lang.String save) throws VisADException, java.rmi.RemoteExceptionreconstruct this Control using the specified save string- Parameters:
save- - String representation for reconstruction- Throws:
VisADException- if a VisAD error occursjava.rmi.RemoteException- if an RMI error occurs
-
syncControl
public abstract void syncControl(Control rmt) throws VisADException
copy the state of a remote control to this control- Parameters:
rmt- remote Control whose state is copied- Throws:
VisADException- if a VisAD error occurs
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object- Returns:
- a copy of this Control
-
equals
public boolean equals(java.lang.Object o)
Indicates whether or not this instance equals an Object- Overrides:
equalsin classjava.lang.Object- Parameters:
o- an Object- Returns:
- true if and only if this instance is equal to o
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- a simple String representation of this Control
-
-
DMelt 3.0 © DataMelt by jWork.ORG