artisynth.core.gui.probeEditor
Class InputNumericProbeEditor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by artisynth.core.gui.probeEditor.NumericProbeEditor
                          extended by artisynth.core.gui.probeEditor.InputNumericProbeEditor
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class InputNumericProbeEditor
extends NumericProbeEditor

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
 
Fields inherited from class artisynth.core.gui.probeEditor.NumericProbeEditor
activeColor, completedColor, inactiveColor
 
Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
InputNumericProbeEditor()
           
InputNumericProbeEditor(NumericInputProbe inProbe)
          Constructor for an Input Probe Editor based on an existing probe.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Event handler.
 void addBlankInputProbeProperty()
          Adds a blank input probe property.
 void addInputVariable(java.lang.String name, int dimen)
          called when the user adds a new input variable.
 void addProperty(int index, Property prop)
          Called when a valid property has been selected for the first time.
 void changeExpression(int id, java.lang.String newExpr)
           
 void changeProperty(Property newprop, int idx)
          this occurs when a current property in the list is valid, but a new one is selected to take its place.
 void changeVariableDimension(java.lang.String varname, int dimen)
           
 void checkExpressionConsistency(int id)
           
 void deleteInputVariable(java.lang.String varname)
           
 void deleteProperty(int idx)
           
 void renameInputVariable(java.lang.String oldname, java.lang.String newname)
           
 
Methods inherited from class artisynth.core.gui.probeEditor.NumericProbeEditor
addEquationGUI, addPropertyGUI, changeExpression, dispose, getHoverColor, getProp, getPropDim, GetPropDim, getUniqueVariableName, load, removeChannelGUI, removeChannelGUI, removeEquationGUI, removePropertyGUI, showErrorWindow, updateGUI
 
Methods inherited from class javax.swing.JFrame
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

InputNumericProbeEditor

public InputNumericProbeEditor()

InputNumericProbeEditor

public InputNumericProbeEditor(NumericInputProbe inProbe)
Constructor for an Input Probe Editor based on an existing probe. This method first finds all the attached properties, and adds the corresponding GUI elements for each property.

Parameters:
inProbe -
Method Detail

addBlankInputProbeProperty

public void addBlankInputProbeProperty()
Adds a blank input probe property. -adds a (null) Property and (invalid) Driver to lists -adds the gui components corresponding to the proprty and driver


renameInputVariable

public void renameInputVariable(java.lang.String oldname,
                                java.lang.String newname)

changeVariableDimension

public void changeVariableDimension(java.lang.String varname,
                                    int dimen)

changeExpression

public void changeExpression(int id,
                             java.lang.String newExpr)

checkExpressionConsistency

public void checkExpressionConsistency(int id)

deleteProperty

public void deleteProperty(int idx)

deleteInputVariable

public void deleteInputVariable(java.lang.String varname)

addInputVariable

public void addInputVariable(java.lang.String name,
                             int dimen)
called when the user adds a new input variable. simple create a new variable and place it into the hash table.

Parameters:
name - name of variable
dimen - dimension of variable

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Event handler. Goes through the input probe specific commands first, and if its not specifically for an input probe, send it up to the parent class

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class NumericProbeEditor

addProperty

public void addProperty(int index,
                        Property prop)
Called when a valid property has been selected for the first time. A property is null before this point. so we set the property at the corresponding index in the ArrayList. Then we automatically create an input variable to go along with this property. The GUI elements are added accordingly for the new input vector. The driver at the current index is also created with the input variable name as its expression.

Parameters:
index - index of property (also of driver, since they should be in sync)
prop - the selected property.

changeProperty

public void changeProperty(Property newprop,
                           int idx)
this occurs when a current property in the list is valid, but a new one is selected to take its place. first we check if the same property has been selected. if this is the case, don't need to do anything. otherwise, if a new one is selected, we replace the old one, and invalidate the driver if and ONLY if the size has changed. (otherwise old driver will still be valid).

Parameters:
newprop -
idx -