Class ViewJFrameGraph

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

public class ViewJFrameGraph extends JFrame implements ComponentListener, ActionListener, ChangeListener, WindowListener
This is a frame which holds a graph in one panel and a set of user buttons in the other. It uses swing components for all of the graphics and calls ViewJComponentGraph for the graph.
Version:
1.0 Aug 1, 1999
Author:
Neva Cherniavsky (primary), Harman Singh aev* @see ViewJComponentGraph
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • MINIMUM_WIDTH

      private static final int MINIMUM_WIDTH
      Minimum width of the graph panel
      See Also:
    • MINIMUM_HEIGHT

      private static final int MINIMUM_HEIGHT
      Minimum height of the graph panel
      See Also:
    • PANEL_OFFSET

      private static final int PANEL_OFFSET
      Minimum distance between frame and subpanels
      See Also:
    • autoShrinkDomain

      private boolean autoShrinkDomain
    • autoShrinkDomainCheckbox

      private JCheckBox autoShrinkDomainCheckbox
    • autoShrinkRange

      private boolean autoShrinkRange
      DOCUMENT ME!
    • autoShrinkRangeCheckbox

      private JCheckBox autoShrinkRangeCheckbox
      DOCUMENT ME!
    • axisPanel

      private JPanel axisPanel
      DOCUMENT ME!
    • backgroundButton

      private JButton backgroundButton
      DOCUMENT ME!
    • backgroundLabel

      private JLabel backgroundLabel
      DOCUMENT ME!
    • backgroundPanel

      private JPanel backgroundPanel
      DOCUMENT ME!
    • colorChooser

      private ViewJColorChooser colorChooser
      DOCUMENT ME!
    • colorDialog

      private JDialog colorDialog
      DOCUMENT ME!
    • copyMenu

      private JMenu copyMenu
      DOCUMENT ME!
    • defaultDirectory

      private String defaultDirectory
      DOCUMENT ME!
    • deleteMenu

      private JMenu deleteMenu
      DOCUMENT ME!
    • editMenu

      private JMenu editMenu
      DOCUMENT ME!
    • fileMenu

      private JMenu fileMenu
      DOCUMENT ME!
    • fitFunctPanel

      private JPanel fitFunctPanel
      DOCUMENT ME!
    • fitFunctTypePanel

      private JPanel fitFunctTypePanel
      DOCUMENT ME!
    • fitFunctVisibleCheckbox

      private JCheckBox[] fitFunctVisibleCheckbox
      DOCUMENT ME!
    • fitFunctVisiblePanel

      private JPanel fitFunctVisiblePanel
      DOCUMENT ME!
    • fitMode

      private ViewJFrameGraph.FitMode fitMode
      Current mode for fitting functions
    • frameGraphVOI

      private VOI frameGraphVOI
      DOCUMENT ME!
    • functionIndex

      private int functionIndex
      DOCUMENT ME!
    • functLineColorButton

      private JButton[] functLineColorButton
      DOCUMENT ME!
    • functVisibleCheckbox

      private JCheckBox[] functVisibleCheckbox
      the slope changes.
    • graph

      private ViewJComponentGraph graph
      DOCUMENT ME!
    • gridlinesCheckbox

      private JCheckBox gridlinesCheckbox
      DOCUMENT ME!
    • gridPanel

      private JPanel gridPanel
      DOCUMENT ME!
    • itemClose

      private JMenuItem itemClose
      DOCUMENT ME!
    • itemModifyGraph

      private JMenuItem itemModifyGraph
      DOCUMENT ME!
    • itemNormalize

      private JMenuItem itemNormalize
      DOCUMENT ME!
    • itemOpenNewGraph

      private JMenuItem itemOpenNewGraph
    • itemOpenSameGraph

      private JMenuItem itemOpenSameGraph
      DOCUMENT ME!
    • itemPasteFunct

      private JMenuItem itemPasteFunct
      DOCUMENT ME!
    • itemPrintGraph

      private JMenuItem itemPrintGraph
      DOCUMENT ME!
    • itemResetGraph

      private JMenuItem itemResetGraph
      DOCUMENT ME!
    • itemResetDomain

      private JMenuItem itemResetDomain
    • itemResetRange

      private JMenuItem itemResetRange
      DOCUMENT ME!
    • itemSaveGraph

      private JMenuItem itemSaveGraph
      DOCUMENT ME!
    • itemTableOutput

      private JMenuItem itemTableOutput
    • lastUnits

      private String lastUnits
      DOCUMENT ME!
    • legendCheckbox

      private JCheckBox legendCheckbox
      DOCUMENT ME!
    • nameField

      private JTextField[] nameField
      DOCUMENT ME!
    • functionLabel

      private JLabel[] functionLabel
      DOCUMENT ME!
    • legendPanel

      private JPanel legendPanel
      DOCUMENT ME!
    • mainPanel

      private JPanel mainPanel
      DOCUMENT ME!
    • maxDomainField

      private JTextField maxDomainField
    • maxDomainLabel

      private JLabel maxDomainLabel
    • minDomainField

      private JTextField minDomainField
    • minDomainLabel

      private JLabel minDomainLabel
    • maxRangeField

      private JTextField maxRangeField
      DOCUMENT ME!
    • maxRangeLabel

      private JLabel maxRangeLabel
      DOCUMENT ME!
    • minorTickMarksCheckbox

      private JCheckBox minorTickMarksCheckbox
      DOCUMENT ME!
    • minRangeField

      private JTextField minRangeField
      DOCUMENT ME!
    • minRangeLabel

      private JLabel minRangeLabel
      DOCUMENT ME!
    • modifyDialog

      private JDialog modifyDialog
      DOCUMENT ME!
    • modifyGraphPanel

      private JPanel modifyGraphPanel
      DOCUMENT ME!
    • functionPropPanel

      private JPanel functionPropPanel
      DOCUMENT ME!
    • openingMenuBar

      private JMenuBar openingMenuBar
      DOCUMENT ME!
    • linesOnlyButton

      private JRadioButton linesOnlyButton
      DOCUMENT ME!
    • pointsAndLinesButton

      private JRadioButton pointsAndLinesButton
    • pointsOnlyButton

      private JRadioButton pointsOnlyButton
    • pointsAndLinesGroup

      private ButtonGroup pointsAndLinesGroup
    • pointsVisiblePanel

      private JPanel pointsVisiblePanel
      DOCUMENT ME!
    • fitType

      private JComboBox fitType
      Combo box for selecting the fitting function type
    • domainPanel

      private JPanel domainPanel
    • resetDomainButton

      private JButton resetDomainButton
    • logScaleCheckboxX

      private JCheckBox logScaleCheckboxX
    • doLogX

      private boolean doLogX
    • rangePanel

      private JPanel rangePanel
      DOCUMENT ME!
    • resetRangeButton

      private JButton resetRangeButton
      DOCUMENT ME!
    • logScaleCheckboxY

      private JCheckBox logScaleCheckboxY
    • doLogY

      private boolean doLogY
    • showPanel

      private JPanel showPanel
      DOCUMENT ME!
    • tabbedPane

      private JTabbedPane tabbedPane
      DOCUMENT ME!
    • titleField

      private JTextField titleField
      DOCUMENT ME!
    • titleLabel

      private JLabel titleLabel
      DOCUMENT ME!
    • units

      private String units
      DOCUMENT ME!
    • updateRGBIndex

      private int updateRGBIndex
      DOCUMENT ME!
    • vectorCopyFunct

      private Vector<JMenuItem> vectorCopyFunct
      DOCUMENT ME!
    • vectorDeleteFunct

      private Vector<JMenuItem> vectorDeleteFunct
      DOCUMENT ME!
    • viewMenu

      private JMenu viewMenu
      DOCUMENT ME!
    • voi

      private VOI voi
      DOCUMENT ME!
    • xAxisLabel

      private JLabel xAxisLabel
      DOCUMENT ME!
    • xAxisLabelField

      private JTextField xAxisLabelField
      DOCUMENT ME!
    • xGridEvenSpacedButton

      private JRadioButton xGridEvenSpacedButton
    • xGridUserSpacedButton

      private JRadioButton xGridUserSpacedButton
    • xGridButtonGroup

      private ButtonGroup xGridButtonGroup
    • xGridCheckBoxPanel

      private JPanel xGridCheckBoxPanel
    • xGridCheckBoxList

      private JCheckBox[] xGridCheckBoxList
    • xGridScrollPane

      private JScrollPane xGridScrollPane
    • xGridLineField

      private JTextField xGridLineField
      DOCUMENT ME!
    • xGridLineLabel

      private JLabel xGridLineLabel
      DOCUMENT ME!
    • yAxisLabel

      private JLabel yAxisLabel
      DOCUMENT ME!
    • yAxisLabelField

      private JTextField yAxisLabelField
      DOCUMENT ME!
    • yGridEvenSpacedButton

      private JRadioButton yGridEvenSpacedButton
    • yGridUserSpacedButton

      private JRadioButton yGridUserSpacedButton
    • yGridButtonGroup

      private ButtonGroup yGridButtonGroup
    • yGridCheckBoxPanel

      private JPanel yGridCheckBoxPanel
    • yGridCheckBoxList

      private JCheckBox[] yGridCheckBoxList
    • yGridScrollPane

      private JScrollPane yGridScrollPane
    • yGridLineField

      private JTextField yGridLineField
      DOCUMENT ME!
    • yGridLineLabel

      private JLabel yGridLineLabel
      DOCUMENT ME!
    • xyCoords

      private int[][] xyCoords
      this is a list of the x,y coords of the voi's boundary
    • numVariablesLabel

      private JLabel numVariablesLabel
    • numVariablesField

      private JTextField numVariablesField
    • numVariables

      private int numVariables
    • image

      private ModelImage image
    • RGBOffset

      private int RGBOffset
    • entireImage

      private boolean entireImage
    • initialSummaryBins

      private int initialSummaryBins
    • summaryBins

      private int summaryBins
    • initialUserMin

      private double initialUserMin
    • userMin

      private double userMin
    • initialUserMax

      private double initialUserMax
    • userMax

      private double userMax
    • minField

      private JTextField minField
    • maxField

      private JTextField maxField
    • binsField

      private JTextField binsField
    • imageMin

      private double imageMin
    • imageMax

      private double imageMax
    • maxBins

      private int maxBins
    • histogramPanel

      private JPanel histogramPanel
  • Constructor Details

    • ViewJFrameGraph

      public ViewJFrameGraph(String title, boolean openFileGUI)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. No function is loaded by default, but the user can open a new function to be displayed
      Parameters:
      title - DOCUMENT ME!
      openFileGUI - DOCUMENT ME!
    • ViewJFrameGraph

      public ViewJFrameGraph(float[] xInit, float[] yInit, String title, int[][] xyCoords)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
    • ViewJFrameGraph

      public ViewJFrameGraph(float[][] xInit, float[][] yInit, String title)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
    • ViewJFrameGraph

      public ViewJFrameGraph(float[] x, float[] y, String title, VOI v)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Graph is assumed to be made from a VOIPoint. Draws initial default graph of desired function / intensity plot.
      Parameters:
      x - the array of x coordinates to be plotted in the graph
      y - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      v - the VOI the graph is being made for
    • ViewJFrameGraph

      public ViewJFrameGraph(float[][] x, float[][] y, String title, VOI v)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Graph is assumed to be made from a VOIPoint. Draws initial default graph of desired function / intensity plot.
      Parameters:
      x - the array of x coordinates to be plotted in the graph
      y - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      v - the VOI the graph is being made for
    • ViewJFrameGraph

      public ViewJFrameGraph(ModelImage image, int RGBOffset, boolean entireImage, int initialSummaryBins, double initialUserMin, double initialUserMax, float[] xInit, float[] yInit, String title, String labelX, String labelY)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      labelX - x axis label
      labelY - y aixs label
    • ViewJFrameGraph

      public ViewJFrameGraph(float[] xInit, float[] yInit, String title, String labelX, String labelY)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      labelX - x axis label
      labelY - y aixs label
    • ViewJFrameGraph

      public ViewJFrameGraph(float[] xInit, float[] yInit, String title, String labelX, String labelY, boolean visible)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      labelX - x axis label
      labelY - y aixs label
    • ViewJFrameGraph

      public ViewJFrameGraph(float[][] xInit, float[][] yInit, String title, String labelX, String labelY)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      labelX - x axis label
      labelY - y axis label
    • ViewJFrameGraph

      public ViewJFrameGraph(float[] xInit, float[] yInit, String title, VOI v, String units, int[][] xyCoords)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Graph is assumed to be made from a VOIPoint. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      v - the VOI the graph is being made for
      units - the string representing the units of the curve (x-axis)
      xyCoords - actual x,y coords of the boundary go in here if not null
    • ViewJFrameGraph

      public ViewJFrameGraph(float[][] xInit, float[][] yInit, String title, VOI v, String units)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Graph is assumed to be made from a VOIPoint. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      v - the VOI the graph is being made for
      units - the string representing the units of the curve (x-axis)
    • ViewJFrameGraph

      public ViewJFrameGraph(float[] xInit, float[] yInit, String title, String labelX, String labelY, Color color)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      labelX - x axis label
      labelY - y aixs label
      color - DOCUMENT ME!
    • ViewJFrameGraph

      public ViewJFrameGraph(float[][] xInit, float[][] yInit, String title, String labelX, String labelY, Color[] colorArray)
      Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.
      Parameters:
      xInit - the array of x coordinates to be plotted in the graph
      yInit - the array of y coordinates to be plotted in the graph
      title - the title of the frame
      labelX - x axis label
      labelY - y axis label
      colorArray - DOCUMENT ME!
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Takes the action commands and paints if the apply button is pressed, closes if the close button is pressed.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - event that triggers this function
    • fitFunctions

      private void fitFunctions(ViewJFrameGraph.FitMode mode)
    • componentHidden

      public void componentHidden(ComponentEvent event)
      DOCUMENT ME!
      Specified by:
      componentHidden in interface ComponentListener
      Parameters:
      event - DOCUMENT ME!
    • componentMoved

      public void componentMoved(ComponentEvent event)
      DOCUMENT ME!
      Specified by:
      componentMoved in interface ComponentListener
      Parameters:
      event - DOCUMENT ME!
    • componentResized

      public void componentResized(ComponentEvent event)
      Resets the bounds of component graph if the window is resized.
      Specified by:
      componentResized in interface ComponentListener
      Parameters:
      event - event that triggered this function
    • componentShown

      public void componentShown(ComponentEvent event)
      DOCUMENT ME!
      Specified by:
      componentShown in interface ComponentListener
      Parameters:
      event - DOCUMENT ME!
    • deleteFunct

      public void deleteFunct(int index)
      Deletes the indicated function from the graph.
      Parameters:
      index - the index of the function to be deleted
    • focusGained

      public void focusGained(FocusEvent event)
      Unchanged.
      Parameters:
      event - DOCUMENT ME!
    • focusLost

      public void focusLost(FocusEvent event)
      Unchanged.
      Parameters:
      event - DOCUMENT ME!
    • getDefaultDirectory

      public String getDefaultDirectory()
      Accessor that gets the default directory.
      Returns:
      the default directory
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      Unchanged.
      Parameters:
      event - DOCUMENT ME!
    • makeRangeSymmetric

      public void makeRangeSymmetric()
      DOCUMENT ME!
    • openNew

      public boolean openNew() throws IOException
      Opens Excel data (tab-delimited fields) into a new graph. The graphs could also have been saved using MIPAV
      Returns:
      DOCUMENT ME!
      Throws:
      IOException - DOCUMENT ME!
    • openSame

      public boolean openSame() throws IOException
      Opens Excel data (tab-delimited fields) into this graph. The graphs could also have been saved using MIPAV
      Returns:
      DOCUMENT ME!
      Throws:
      IOException - DOCUMENT ME!
    • replaceFunction

      public void replaceFunction(float[] newX, float[] newY)
      Replaces the function used with a line image.
      Parameters:
      newX - a 1-d array of which contains the x-coordinates for the function
      newY - a 1-d array of which contains the y-coordinates for the function
    • replaceFunction

      public void replaceFunction(float[] newX, float[] newY, int[][] newXYCoords, VOI myVoi, int index)
      Replaces the function used with a line image.
      Parameters:
      newX - a 1-d array of which contains the x-coordinates for the function
      newY - a 1-d array of which contains the y-coordinates for the function
      myVoi - the new VOI for this function
      index - DOCUMENT ME!
    • saveNewFunction

      public void saveNewFunction(float[] newX, float[] newY, int index)
      Saves the current function and adds a blank new function.
      Parameters:
      newX - array of which contains the x-coordinates for the new function
      newY - an array of which contains the y-coordinates for the new functions
      index - the index of the point to be updated
    • saveNewFunction

      public void saveNewFunction(float[][] newX, float[][] newY, int ptIndex)
      Replaces the first three functions (used with RGB images).
      Parameters:
      newX - a 2-d array of which contains the x-coordinates for the three functions (RGB)
      newY - a 2-d array of which contains the y-coordinates for the three functions (RGB)
      ptIndex - the index of the point to be updated
    • setDefaultDirectory

      public void setDefaultDirectory(String dir)
      Accessor that sets the default directory.
      Parameters:
      dir - string to set the default directory to
    • setLabels

      public void setLabels(String labelX, String labelY)
      Sets the axis labels.
      Parameters:
      labelX - DOCUMENT ME!
      labelY - DOCUMENT ME!
    • setLabelY

      public void setLabelY(String labelY)
    • setResetEnabled

      public void setResetEnabled(boolean enabled)
      Accessor that enables or disables the reset item.
      Parameters:
      enabled - boolean that enables if true, disables if false
    • setUnitsInLabel

      public void setUnitsInLabel(String units)
      Sets the units in the default axis labels.
      Parameters:
      units - the String representing the units to be displayed
    • setVisible

      public void setVisible(boolean status)
      Makes the dialog visible in center of screen.
      Overrides:
      setVisible in class Window
      Parameters:
      status - - flag to indicating if the dialog should be visible
    • setVisibleNoLocChange

      public void setVisibleNoLocChange(boolean status)
      Makes the dialog visible without setting position.
      Parameters:
      status - - flag to indicating if the dialog should be visible
    • setVOI

      public void setVOI(VOI v)
      Accessor that sets the VOI ViewJFrameGraph was made from.
      Parameters:
      v - DOCUMENT ME!
    • showXYZLegends

      public void showXYZLegends()
      DOCUMENT ME!
    • stateChanged

      public void stateChanged(ChangeEvent e)
      ChangeListener************************************************************************* /** Sets values based on knob along slider
      Specified by:
      stateChanged in interface ChangeListener
      Parameters:
      e - event that triggered this function
    • update

      public void update(Graphics g)
      Calls paint instead of erasing.
      Overrides:
      update in class JFrame
      Parameters:
      g - graphics to paint in
    • update

      public void update(float[] x, float[] y, int j)
      Updates the graph by changing the plot to the desired new function / intensity plot.
      Parameters:
      x - the array of x coordinates to be plotted in the graph
      y - the array of y coordinates to be plotted in the graph
      j - The function index of which point to be updated
    • update

      public void update(float[][] x, float[][] y, int ptIndex)
      Updates the graph by changing the plot to the desired new 3 functions (RGB).
      Parameters:
      x - the 2-d array of x coordinates to be plotted in the graph for each function
      y - the 2-d array of y coordinates to be plotted in the graph for each function
      ptIndex - the index of the point to be updated (will not do anything if trying to update of an index different than updateRGBIndex)
    • updateFittedFunctions

      public void updateFittedFunctions()
      Deprecated.
      If data were changed, this could be useful to refit data without pressing a new button, but this function is not currently utilized. Will be removed in future version of MIPAV unless a use can be found Updates Fitted Functions to accurately estimate the functions in the graph (Function data may have chaned due to realtime updating, and therefore the fitted functions must be updated).
    • windowActivated

      public void windowActivated(WindowEvent event)
      Unchanged.
      Specified by:
      windowActivated in interface WindowListener
      Parameters:
      event - DOCUMENT ME!
    • windowClosed

      public void windowClosed(WindowEvent event)
      Unchanged.
      Specified by:
      windowClosed in interface WindowListener
      Parameters:
      event - DOCUMENT ME!
    • windowClosing

      public void windowClosing(WindowEvent event)
      Disposes of error dialog, then frame. Nullifies pointer to this in VOIPoint, if this graph was made from a VOIPoint.
      Specified by:
      windowClosing in interface WindowListener
      Parameters:
      event - DOCUMENT ME!
    • windowDeactivated

      public void windowDeactivated(WindowEvent event)
      Unchanged.
      Specified by:
      windowDeactivated in interface WindowListener
      Parameters:
      event - DOCUMENT ME!
    • windowDeiconified

      public void windowDeiconified(WindowEvent event)
      Unchanged.
      Specified by:
      windowDeiconified in interface WindowListener
      Parameters:
      event - DOCUMENT ME!
    • windowIconified

      public void windowIconified(WindowEvent event)
      Unchanged.
      Specified by:
      windowIconified in interface WindowListener
      Parameters:
      event - DOCUMENT ME!
    • windowOpened

      public void windowOpened(WindowEvent event)
      Unchanged.
      Specified by:
      windowOpened in interface WindowListener
      Parameters:
      event - DOCUMENT ME!
    • buildFitFunctPanel

      private void buildFitFunctPanel()
      Creates a panel to edit various fitted function features. (Panel is to be used in the tabbed pane of the Modify Graph Dialog box
    • buildFunctionPanel

      private void buildFunctionPanel()
      Creates a panel where various features of the functions can be edited, such as showing the legend, and changing function names. This panel is used by the tabbed pane in Modify Graph Dialog Box.
    • buildMenu

      private void buildMenu()
      Function that builds the menu of various tools to be used in conjunction with the graph. ie: opening / saving files, changing gridlines, title / axis labels, etc.
    • buildModifyGraphPanel

      private void buildModifyGraphPanel()
      Creats a panel where various featuers of the graph can be edited, such as visbility of gridlines and minor tick marks, number of gridlines, background color, range, and labels for the title, x and y axiis.
    • createModifyDialog

      private void createModifyDialog()
      Creates a dialog box in which the user can modify various features of the graph.
    • getMedian

      private float getMedian(float[] toSort)
      DOCUMENT ME!
      Parameters:
      toSort - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • parseString

      private float[] parseString(String s, int len)
      DOCUMENT ME!
      Parameters:
      s - DOCUMENT ME!
      len - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • print

      private void print()
      Prints the current graph being displayed to the printer.
    • save

      public void save() throws IOException
      Saves this graph as Excel data so that Excel can read in the data and graph it as an Excel file. The file can also be saved to be viewed at a later time with MIPAV
      Throws:
      IOException - DOCUMENT ME!
    • save

      public void save(String fileName) throws IOException
      Saves this graph as Excel data so that Excel can read in the data and graph it as an Excel file. The file can also be saved to be viewed at a later time with MIPAV
      Throws:
      IOException - DOCUMENT ME!
    • tableOutput

      private void tableOutput()
    • testMaxParameter

      private boolean testMaxParameter(String str, float maxValue)
      Tests that the entered parameter is above maxValue.
      Parameters:
      str - the value entered by the user
      maxValue - the value that the entered paramater must be more than
      Returns:
      boolean result of test
    • testMinParameter

      private boolean testMinParameter(String str, float minValue)
      Tests that the entered parameter is below minValue.
      Parameters:
      str - the value entered by the user
      minValue - the value that the variable should be less than
      Returns:
      boolean result of test
    • testParameter

      private boolean testParameter(String str, int minValue, int maxValue)
      Tests that the entered parameter is in range.
      Parameters:
      str - the value entered by the user
      minValue - the minimum value this variable may be set to
      maxValue - the maximum value this variable may be set to
      Returns:
      boolean result of test
    • updateModifyDialog

      private void updateModifyDialog()
      Updates fields of the Modify Graph Dialog which may have changed due to things such as adding/deleting functions.
    • getGraph

      public ViewJComponentGraph getGraph()
    • getFrameGraphics

      public Graphics getFrameGraphics()
    • removeComponentListener

      public void removeComponentListener()