MVT API

mvt.tools
Class InputPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--mvt.tools.InputPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
ContourInput, GradientFieldInput, ImplicitPlotterInput, ODE1DInput, ODE2DInput, ODE3DInput, ODEvf1DInput, ODEvf2DInput, ODEvf3DInput, OptionsPanel, ParametricInput, Plot2DInput, Plot3DInput, VectorField2DInput, VectorField3DInput

public abstract class InputPanel
extends javax.swing.JPanel

Input Panel takes the function and bounds on the variables. This class is designed to generalize all of the input panels of each tool.

Since:
JDK1.2
Author:
Peter Staab
, for the Mathematical Visualization Project for the Department of Applied Mathematics, University of Colorado at Boulder , Note: added to the MVP in April, 2001 during major revision
See Also:
Serialized Form

Nested Class Summary
 class InputPanel.ClearButtonListener
          The Clear Button listener that works the same for any plot panel or type of graphical tool.
 class InputPanel.InitButtonListener
           
 class InputPanel.ODETypeListener
           
 class InputPanel.PlotButtonListener
          The Plot Button listener that works the same for any plot panel or type of graphical tool.
 class InputPanel.StepSizeTypeListener
           
 class InputPanel.VariableListener
           
 class InputPanel.ViewNumberListener
           
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.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.Container
 
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
InputPanel()
          This should stay the same most of the time, just add the components and install their listeners.
 
Method Summary
abstract  void addComponents()
          This method adds and lays out all the components in the InputPanel.
abstract  void addListeners()
          This method installs any listeners that the components need.
 javax.swing.JButton createClearButton()
           
 TextBoxPanel createDepVariableBox(java.lang.String var)
           
 TextBoxPanel createDerivativeBox(java.lang.String top, java.lang.String bot, java.lang.String init)
           
 TextBoxPanel createFunctionBox(java.lang.String var, java.lang.String init)
           
 TextBoxPanel createFunctionBox(java.lang.String var, java.lang.String init, java.lang.String fname)
           
 TextBoxPanel createICBox(java.lang.String var, java.lang.String init)
           
 TextBoxPanel createIndVariableBox(java.lang.String var)
           
 TextBoxPanel createIntegerBox(java.lang.String label, java.lang.String init)
           
 TextBoxPanel createMaxDomainBox(java.lang.String init)
           
 TextBoxPanel createMinDomainBox(java.lang.String var, java.lang.String init)
           
 javax.swing.JComboBox createODEType()
           
 javax.swing.JCheckBox createOverlayButton()
           
 javax.swing.JButton createPlotButton()
           
 javax.swing.JComboBox createPlotType()
           
 TextBoxPanel createStepSizeBox()
           
 javax.swing.JComboBox createStepSizeType()
           
 javax.swing.JComboBox createVectorFieldType()
           
 javax.swing.JButton createViewNumbersButton()
           
abstract  java.util.Map getInput()
          Generic way to get any type of information from subclasses of InputPanel
 VariableSet getStatedVariables()
          This function retrieves the variables from the variable name boxes in this panel.
 void setParent(GraphicsPanel parent)
          need to save the parent to inform the GraphicsPanel about changes in variable names, or button events
 void setVariables(VariableSet vars)
          This function will update the labels in the tool of the new variables.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputPanel

public InputPanel()
This should stay the same most of the time, just add the components and install their listeners. If you want to alter this behavior, we recommend overriding addComponents() or addListeners(); but leave this constructor as is.

Method Detail

setParent

public void setParent(GraphicsPanel parent)
need to save the parent to inform the GraphicsPanel about changes in variable names, or button events


getInput

public abstract java.util.Map getInput()
                                throws SyntaxException
Generic way to get any type of information from subclasses of InputPanel

SyntaxException

addComponents

public abstract void addComponents()
This method adds and lays out all the components in the InputPanel.


addListeners

public abstract void addListeners()
This method installs any listeners that the components need.


getStatedVariables

public VariableSet getStatedVariables()
This function retrieves the variables from the variable name boxes in this panel. If there aren't any variable name boxes in this panel (by default), this will return null. Otherwise, it will return a list of the variables found in the variable boxes.


setVariables

public void setVariables(VariableSet vars)
This function will update the labels in the tool of the new variables. By default, nothing will happen (this is the case of a panel has labels/components that are indep. of the tool's Variables).


createFunctionBox

public TextBoxPanel createFunctionBox(java.lang.String var,
                                      java.lang.String init)

createFunctionBox

public TextBoxPanel createFunctionBox(java.lang.String var,
                                      java.lang.String init,
                                      java.lang.String fname)

createDerivativeBox

public TextBoxPanel createDerivativeBox(java.lang.String top,
                                        java.lang.String bot,
                                        java.lang.String init)

createIndVariableBox

public TextBoxPanel createIndVariableBox(java.lang.String var)

createDepVariableBox

public TextBoxPanel createDepVariableBox(java.lang.String var)

createMinDomainBox

public TextBoxPanel createMinDomainBox(java.lang.String var,
                                       java.lang.String init)

createMaxDomainBox

public TextBoxPanel createMaxDomainBox(java.lang.String init)

createIntegerBox

public TextBoxPanel createIntegerBox(java.lang.String label,
                                     java.lang.String init)

createPlotButton

public javax.swing.JButton createPlotButton()

createClearButton

public javax.swing.JButton createClearButton()

createOverlayButton

public javax.swing.JCheckBox createOverlayButton()

createVectorFieldType

public javax.swing.JComboBox createVectorFieldType()

createStepSizeType

public javax.swing.JComboBox createStepSizeType()

createStepSizeBox

public TextBoxPanel createStepSizeBox()

createODEType

public javax.swing.JComboBox createODEType()

createPlotType

public javax.swing.JComboBox createPlotType()

createViewNumbersButton

public javax.swing.JButton createViewNumbersButton()

createICBox

public TextBoxPanel createICBox(java.lang.String var,
                                java.lang.String init)

MVT API

mvt.icons