|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.visad.display.AnimationWidget
public class AnimationWidget
A widget to control animation in a VisAD display. Allows user to set loop position at first frame, step backward one step, step forward one step, set loop position at last frame, toggle looping on and off, and invoke an AnimationPropertiesDialogWidget. Uses several image icons in "auxdata.jar, making a kind of GUI wrapper for a set of ucar.visad.Animation "displayables"; uses methods of ucar.visad.display Animation which invoke VisAD Animation class methods.
| Field Summary | |
|---|---|
static boolean |
bigIcon
Do we show the big icon |
static String |
CMD_BACKWARD
property for setting the widget to the loop in reverse |
static String |
CMD_BEGINNING
property for setting the widget to the first frame |
static String |
CMD_END
property for setting the widget to the last frame |
static String |
CMD_FORWARD
property for setting the widget to the loop forward |
static String |
CMD_INDEX
Flag for changing the INDEX |
static String |
CMD_PROPS
property for properties |
static String |
CMD_STARTSTOP
property for setting the widget to the start or stop |
static String |
SHARE_INDEX
The property for sharing the animation index |
static String |
SHARE_VALUE
The property for sharing the animation value |
| Constructor Summary | |
|---|---|
AnimationWidget()
Default Constructor |
|
AnimationWidget(AnimationInfo info)
Contruct an AnimationWidget using the info supplied. |
|
AnimationWidget(JFrame parentf)
Construct an AnimationWidget using the parent supplied. |
|
AnimationWidget(JFrame parentf,
Animation anim)
Construct an AnimationWidget using the parent, the Animation |
|
AnimationWidget(JFrame parentf,
Animation anim,
AnimationInfo info)
Contruct a new AnimationWidget. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Public by implementing ActionListener. |
void |
actionPerformed(String cmd)
Handle the action |
void |
addAnimation(Animation anim)
Deprecated. use setAnimation(); |
protected void |
applyProperties(AnimationInfo info,
boolean andShare)
Apply the info from the dialog |
protected void |
boxPanelChanged(AnimationBoxPanel boxPanel)
Called when the box panel has changed through a user drag or click |
void |
destroy()
Method called when destroying this object. |
AnimationInfo |
getAnimationInfo()
Get the AnimationInfo associated with this widget. |
AnimationSetInfo |
getAnimationSetInfo()
Holds the synthetic animation set info |
boolean |
getBoxPanelVisible()
Get the BoxPanelVisible property. |
JComponent |
getContents()
Get the Java Component which is the set of controls. |
JComponent |
getContents(boolean floatToolBar)
get the Java Component which is the set of controls. |
protected DisplayMaster |
getDisplayMaster()
Get the display master that the animation is in |
Component |
getIndicatorComponent()
Get the component used to display the time step value. |
DateTime |
getTimeAtIndex(int index)
Get the time at the given index. |
DateTime[] |
getTimes()
Get the array of times |
void |
gotoBeginning()
Go to the beginning of the animation sequence. |
protected void |
gotoEnd()
Go to the end of the animation sequence. |
protected void |
gotoIndex(int index)
Set the current frame to the index supplied. |
protected void |
handleSharedTime(Real time)
We got the tiem from another animation widget. |
boolean |
isRunning()
Are we running |
static void |
main(String[] args)
Main method for testing |
void |
receiveShareData(Sharable from,
Object dataId,
Object[] data)
Method called when sharing is turned on. |
void |
resetProperties()
Force the existing animation properties, held in the animation widget's "animationInfo" member data, into this widget's set of Animation objects. |
void |
setAnimation(Animation newAnimation)
Sets the ucar.visad.display.Animation
controlled by this widget. |
void |
setBaseTimes(Set times)
Set the times that should be used. |
void |
setBoxPanelVisible(boolean value)
Set the BoxPanelVisible property. |
void |
setProperties(AnimationInfo transfer)
From the "animationInfo" set of animation properties, set all these values into all the Animation objects held as memeber data. |
void |
setRunning(boolean state)
Set the animation state and change the start/stop widget |
void |
setTimeFromUser(Real time)
THis allows external code to set the time. |
protected void |
shareIndex()
Share the index of the animation step. |
protected void |
shareValue()
Share the value of the animation step. |
protected void |
shareValue(Real time)
Share the time value |
protected void |
showPropertiesDialog()
Make and show an AnimationPropertiesDialog; if that returns animationInfo ok, set the new animationInfo data into the the Animations. |
protected void |
stepBackward()
Take one step backward in the animation sequence. |
void |
stepForward()
Take one step forward in the animation sequence. |
void |
stepsOkChanged(boolean[] stepsOk)
The user has clicked on the box. |
void |
updateIndicator(Set timeSet)
Update the indicator with the list of times |
| Methods inherited from class ucar.unidata.collab.SharableImpl |
|---|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean bigIcon
public static final String CMD_INDEX
public static final String CMD_BEGINNING
public static final String CMD_BACKWARD
public static final String CMD_STARTSTOP
public static final String CMD_FORWARD
public static final String CMD_END
public static final String CMD_PROPS
public static final String SHARE_VALUE
public static final String SHARE_INDEX
| Constructor Detail |
|---|
public AnimationWidget()
public AnimationWidget(AnimationInfo info)
info - default state to use.public AnimationWidget(JFrame parentf)
parentf - the parent JFrame
public AnimationWidget(JFrame parentf,
Animation anim)
parentf - the parent JFrameanim - a ucar.visad.display.Animation object to manage
public AnimationWidget(JFrame parentf,
Animation anim,
AnimationInfo info)
parentf - the parent JFrameanim - a ucar.visad.display.Animation object to manageinfo - Default values for the AnimationInfo| Method Detail |
|---|
public void setBaseTimes(Set times)
throws VisADException,
RemoteException
times - List of times
RemoteException - On badness
VisADException - On badnesspublic JComponent getContents()
public JComponent getContents(boolean floatToolBar)
floatToolBar - true if the toolbar should be floatable
public Component getIndicatorComponent()
protected void applyProperties(AnimationInfo info,
boolean andShare)
info - The infoandShare - Share the state with other widgetsprotected void showPropertiesDialog()
protected void boxPanelChanged(AnimationBoxPanel boxPanel)
boxPanel - The changed box panelpublic void resetProperties()
public void setProperties(AnimationInfo transfer)
transfer - AnimationInfo to get properties fromprotected DisplayMaster getDisplayMaster()
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenere - ActionEvent to checkpublic void actionPerformed(String cmd)
cmd - The actionprotected void handleSharedTime(Real time)
time - The time.public void setTimeFromUser(Real time)
time - The time
public void receiveShareData(Sharable from,
Object dataId,
Object[] data)
receiveShareData in interface SharablereceiveShareData in class SharableImplfrom - source of shareable informationdataId - ID for the datadata - the shareable datapublic void setRunning(boolean state)
state - true to start animatingpublic boolean isRunning()
public AnimationInfo getAnimationInfo()
AnimationInfo associated with this widget.
public AnimationSetInfo getAnimationSetInfo()
protected void shareIndex()
protected void shareValue()
protected void shareValue(Real time)
time - The value to sharepublic void stepForward()
protected void stepBackward()
protected void gotoIndex(int index)
index - index into the animation setpublic void gotoBeginning()
public DateTime[] getTimes()
protected void gotoEnd()
public void stepsOkChanged(boolean[] stepsOk)
stepsOk - What time steps are okpublic void setAnimation(Animation newAnimation)
ucar.visad.display.Animation
controlled by this widget. Removes
any other ucar.visad.display.Animation
from the control of this widget.
newAnimation - ucar.visad.display.Animation to controlpublic void destroy()
public void addAnimation(Animation anim)
ucar.visad.display.Animation
to be controlled by this widget.
anim - ucar.visad.display.Animation to control (must not be null)
NullPointerException - if anim is nullpublic void updateIndicator(Set timeSet)
timeSet - set of timespublic DateTime getTimeAtIndex(int index)
index - Index
public void setBoxPanelVisible(boolean value)
value - The new value for BoxPanelVisiblepublic boolean getBoxPanelVisible()
public static void main(String[] args)
args - arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||