Class FunctionPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible
Direct Known Subclasses:
DataFunctionPanel, FitFunctionPanel, ModelFunctionPanel

public class FunctionPanel extends JPanel implements PropertyChangeListener
This is a JPanel for managing Functions and supporting Parameters. subclassed as DataFunctionPanel, FitFunctionPanel, and ModelFunctionPanel (as AnalyticFunctionPanel, DynamicFunctionPanel, and ParticleDataTrackFunctionPanel FunctionPanel DataFunctionPanel FitFunctionPanel ModelFunctionPanel AnalyticFunctionPanel DynamicFunctionPanel ParticleDataTrackFunctionPanel
Author:
Douglas Brown
See Also:
  • Field Details

  • Constructor Details

    • FunctionPanel

      public FunctionPanel(FunctionEditor editor)
      Constructor FunctionPanel
      Parameters:
      editor -
  • Method Details

    • haveGUI

      protected boolean haveGUI()
    • init

      protected void init()
    • checkGUI

      public void checkGUI()
    • createGUI

      protected void createGUI()
      Creates the GUI.
    • refreshGUI

      protected void refreshGUI()
      Refreshes the GUI.
    • getParamEditor

      public ParamEditor getParamEditor()
      Gets the ParamEditor.
      Returns:
      the param editor
    • getFunctionEditor

      public FunctionEditor getFunctionEditor()
      Gets the function editor.
      Returns:
      the function editor
    • getFunctionTable

      public FunctionEditor.Table getFunctionTable()
      Gets the function table.
      Returns:
      the table
    • getParamTable

      public FunctionEditor.Table getParamTable()
      Gets the parameter table.
      Returns:
      the table
    • getLabel

      public String getLabel()
      Gets an appropriate label for the FunctionTool dropdown.
      Returns:
      a label string
    • getDisplayName

      public String getDisplayName()
      Gets the display name for the FunctionTool dropdown. By default, this returns the name of this panel.
      Returns:
      the display name
    • getPreferredSize

      public Dimension getPreferredSize()
      Override getPreferredSize().
      Overrides:
      getPreferredSize in class JComponent
      Returns:
      the preferred size
    • addForbiddenNames

      protected void addForbiddenNames(String[] names)
      Adds names to the forbidden set.
      Parameters:
      names - the names
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Listens for property changes "edit" and "function"
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      e - the event
    • clearSelection

      protected void clearSelection()
      Clears the selection.
    • setFontLevel

      protected void setFontLevel(int level)
      Sets the font level.
      Parameters:
      level - the level
    • getDescription

      public String getDescription()
      Gets the description for this panel.
      Returns:
      the description
    • setDescription

      public void setDescription(String desc)
      Sets the description for this panel.
      Parameters:
      desc - the description
    • getIcon

      public Icon getIcon()
      Gets the Icon for this panel, if any.
      Returns:
      the icon
    • setIcon

      public void setIcon(Icon icon)
      Sets the Icon for this panel.
      Parameters:
      icon - the icon
    • refreshFunctions

      protected void refreshFunctions()
      Refreshes the functions.
    • setFunctionTool

      public void setFunctionTool(FunctionTool tool)
      Sets the FunctionTool. This method is called by the tool to which this panel is added.
      Parameters:
      tool - the FunctionTool
    • tabToNext

      protected void tabToNext(FunctionEditor editor)
      Tabs to the next editor.
      Parameters:
      editor - the current editor
    • refreshInstructions

      protected final void refreshInstructions(FunctionEditor source, int selectedColumn)
      Refreshes the instructions based on selected cell.
      Parameters:
      source - the function editor (may be null)
      selectedColumn - the selected table column, or -1 if none
    • getCustomInstructions

      protected String getCustomInstructions(FunctionEditor source, int selectedColumn)
      Overridden in ParticleDataTrack
      Parameters:
      source -
      selectedColumn -
      Returns:
    • isEmpty

      protected boolean isEmpty()
    • hasInvalidExpressions

      protected boolean hasInvalidExpressions()
    • hasCircularErrors

      protected boolean hasCircularErrors()
    • dispose

      protected void dispose()
      Disposes of this panel.
    • finalize

      public void finalize()
      Overrides:
      finalize in class Object