|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel visad.util.AnimationWidget
public class AnimationWidget
A widget that allows users to control aspects of animation (stop/start, step, animation speed and direction). It is initialized with the state of the AnimationControl for the ScalarMap used in the constructor. Once this widget is constructed, it should be used to control animation instead of using methods in AnimationControl. Once constructed, changes made using AnimationControl methods will not be reflected in this widget.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
AnimationWidget(ScalarMap smap)
construct an AnimationWidget linked to the Control in smap (which must be to Display.Animation) with auto-detecting ms/frame |
|
AnimationWidget(ScalarMap smap,
int st)
construct an AnimationWidget linked to the Control in smap (which must be to Display.Animation) with specified ms/frame |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
ActionListener method used with JTextField and JButtons |
void |
controlChanged(ControlEvent e)
ControlListener method used for programmatically moving JSlider |
void |
controlChanged(ScalarMapControlEvent evt)
ScalarMapListener method used to detect new AnimationControl |
Dimension |
getPreferredSize()
Work-around for Swing bug where pack() doesn't display slider labels; actually, it still won't, but window will be the right size |
void |
mapChanged(ScalarMapEvent e)
ScalarMapListener method used to recompute JSlider bounds |
void |
stateChanged(ChangeEvent e)
ChangeListener method used with JSlider. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AnimationWidget(ScalarMap smap) throws VisADException, RemoteException
smap
- Display.Animation ScalarMap
VisADException
RemoteException
public AnimationWidget(ScalarMap smap, int st) throws VisADException, RemoteException
smap
- Display.Animation ScalarMapst
- animation speed (ms/frame). If value is negative,
the default speed set in the Control is used.
VisADException
RemoteException
Method Detail |
---|
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
public void controlChanged(ControlEvent e)
controlChanged
in interface ControlListener
public void mapChanged(ScalarMapEvent e)
mapChanged
in interface ScalarMapListener
e
- the eventpublic void controlChanged(ScalarMapControlEvent evt)
controlChanged
in interface ScalarMapListener
evt
- the eventpublic Dimension getPreferredSize()
getPreferredSize
in class JComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |