Class FormulaDialog

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class FormulaDialog extends JFrame implements ActionListener
This provides a formula editing dialog so the user can edit the end-user formulas.

End user formulas are described with a DerivedDataDescriptor (DDD) class. The FormulaDialog either creates a new DDD or is instantied with an existing one. The dialog uses the JythonManager to add and notify changes to the DDD. The JythonManager is responsible for updating any guis, writing out the formulas to disk, etc.

Author:
Jeff McWhirter
See Also:
  • Field Details

    • ICON_UPUP

      public static ImageIcon ICON_UPUP
      Icon used to show/hide the advanced gui
    • ICON_DOWNDOWN

      public static ImageIcon ICON_DOWNDOWN
      Icon used to show/hide the advanced gui
    • CMD_CHANGE

      public static final String CMD_CHANGE
      Action command for changing formula
      See Also:
    • CMD_ADD

      public static final String CMD_ADD
      Action command for adding a formula
      See Also:
    • HELP_FORMULAS

      public static final String HELP_FORMULAS
      Help path
      See Also:
    • PREF_ADVANCEDOPEN

      public static final String PREF_ADVANCEDOPEN
      Preference for having the advanced panel open
      See Also:
    • PREF_WINDOWSIZE

      public static final String PREF_WINDOWSIZE
      Preference of the window size
      See Also:
  • Constructor Details

    • FormulaDialog

      public FormulaDialog(IntegratedDataViewer idv, Component src)
      Create the dialog.
      Parameters:
      idv - Reference to the IDV
      src - The component (e.g., JButton) we popup nearby
    • FormulaDialog

      public FormulaDialog(IntegratedDataViewer idv, DerivedDataDescriptor ddd, Component src, List categories)
      Create the dialog.
      Parameters:
      idv - Reference to the IDV
      ddd - Represents the formula we are editing (or null if we are adding a new formula)
      src - The component (e.g., JButton) we popup nearby
      categories - List of display categories
    • FormulaDialog

      public FormulaDialog(IntegratedDataViewer idv, DerivedDataDescriptor ddd, Component src, List categories, boolean newFormula)
      Instantiates a new formula dialog.
      Parameters:
      idv - the idv
      ddd - the ddd
      src - the src
      categories - the categories
      newFormula - the new formula
  • Method Details

    • insertText

      public void insertText(String t)
      Insert text into the formula field
      Parameters:
      t - text
    • popupCatComp

      public void popupCatComp()
      Popup the output categories dialog
    • evaluate

      public void evaluate()
      Evaluate the formula
    • evaluateInThread

      public void evaluateInThread()
      evalue the formula
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Handle the ADD, CHANGE, CANCEL and HELP commands
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - The event