Class FunctionGraphsJPanel

All Implemented Interfaces:
MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
TrajectoryGraph

public class FunctionGraphsJPanel extends JPanel implements MouseListener, MouseMotionListener
This is the base class of the plotting package. It is a sub-class of JPanel and displays all graphics
Version:
1.0
Author:
shishlo, tap
See Also:
  • Field Details

    • HORIZONTAL

      public static final int HORIZONTAL
      The static field that defines HORIZONTAL line on a graph panel
      See Also:
    • VERTICAL

      public static final int VERTICAL
      The static field that defines Vertical line on a graph panel
      See Also:
    • LEGEND_POSITION_ARBITRARY

      public static final int LEGEND_POSITION_ARBITRARY
      The constant defining the legend position at the arbitrary place of the graph panel
      See Also:
    • LEGEND_POSITION_TOP_LEFT

      public static final int LEGEND_POSITION_TOP_LEFT
      The constant defining the legend position at the top left corner of the graph panel
      See Also:
    • LEGEND_POSITION_TOP_RIGHT

      public static final int LEGEND_POSITION_TOP_RIGHT
      The constant defining the legend position at the top right corner of the graph panel
      See Also:
    • LEGEND_POSITION_BOTTOM_LEFT

      public static final int LEGEND_POSITION_BOTTOM_LEFT
      The constant defining the legend position at the bottom left corner of the graph panel
      See Also:
    • LEGEND_POSITION_BOTTOM_RIGHT

      public static final int LEGEND_POSITION_BOTTOM_RIGHT
      The constant defining the legend position at the bottom right corner of the graph panel
      See Also:
    • STRING_DEC_FORMAT

      protected static final String STRING_DEC_FORMAT
      See Also:
  • Constructor Details

    • FunctionGraphsJPanel

      public FunctionGraphsJPanel()
      Constructor for the FunctionGraphsJPanel object
  • Method Details

    • addGraphData

      public int addGraphData(BasicGraphData lgd)
      Adds a BasicGraphData instance to the graph panel
      Parameters:
      lgd - The BasicGraphData instance
      Returns:
      The index of this new data set in the internal array of data references
    • removeGraphData

      public void removeGraphData(int index)
      Removes a BasicGraphData instance with a particular index from the graph panel
      Parameters:
      index - The index of this data set in the graph panel
    • removeGraphData

      public void removeGraphData(BasicGraphData gd)
      Removes a BasicGraphData instance from the graph panel
      Parameters:
      gd - The BasicGraphData instance
    • addGraphData

      public void addGraphData(Vector<? extends BasicGraphData> gdV)
      Adds all BasicGraphData instances in the vector to the graph panel. All previous data will remain on the graph panel.
      Parameters:
      gdV - The vector with BasicGraphData instances
    • setGraphData

      public void setGraphData(Vector<? extends BasicGraphData> gdV)
      Sets all BasicGraphData instances in the vector to the graph panel. All previous data will be removed from the graph panel
      Parameters:
      gdV - The vector with BasicGraphData instances
    • removeGraphData

      public void removeGraphData(Vector<? extends BasicGraphData> gdV)
      Removes all BasicGraphData instances in the vector from the graph panel
      Parameters:
      gdV - The vector with BasicGraphData instances
    • removeAllGraphData

      public void removeAllGraphData()
      Removes all BasicGraphData instances from the graph panel
    • getInstanceOfGraphData

      public BasicGraphData getInstanceOfGraphData(int index)
      Returns the reference to BasicGraphData object with a particular index
      Parameters:
      index - The index of BasicGraphData object inside the graph panel
      Returns:
      The reference to BasicGraphData object
    • getAllGraphData

      public Vector<BasicGraphData> getAllGraphData()
      Returns the vector with references to all BasicGraphData objects on this graph panel
      Returns:
      The vector with references to all BasicGraphData objects
    • getNumberOfInstanceOfGraphData

      public int getNumberOfInstanceOfGraphData()
      Returns the number of BasicGraphData objects on this graph panel
      Returns:
      The number of BasicGraphData objects
    • getNumbTotalGraphPoints

      public int getNumbTotalGraphPoints()
      Returns the total number of points in the all BasicGraphData objects
      Returns:
      The total number of points in the all BasicGraphData objects on this panel
    • setColorSurfaceData

      public void setColorSurfaceData(ColorSurfaceData colorSurfaceData)
      Sets ColorSurfaceData object that will be plotted on the graph panel
      Parameters:
      colorSurfaceData - New ColorSurfaceData object
    • getColorSurfaceData

      public ColorSurfaceData getColorSurfaceData()
      Returns the reference to ColorSurfaceData object that is plotted on the graph panel
      Returns:
      The reference to ColorSurfaceData object currently plotted on the graph panel
    • getCurveData

      public CurveData getCurveData(int i)
      Returns the curveData attribute of the FunctionGraphsJPanel object
      Parameters:
      i - Description of the Parameter
      Returns:
      The curveData value
    • getAllCurveData

      public Vector<CurveData> getAllCurveData()
      Returns the allCurveData attribute of the FunctionGraphsJPanel object
      Returns:
      The allCurveData value
    • addCurveData

      public void addCurveData(CurveData curveData)
      Adds a feature to the CurveData attribute of the FunctionGraphsJPanel object
      Parameters:
      curveData - The feature to be added to the CurveData attribute
    • addCurveData

      public void addCurveData(Vector<? extends CurveData> cdV)
      Adds a feature to the CurveData attribute of the FunctionGraphsJPanel object
      Parameters:
      cdV - The feature to be added to the CurveData attribute
    • setCurveData

      public void setCurveData(Vector<? extends CurveData> cdV)
      Sets the curveData attribute of the FunctionGraphsJPanel object
      Parameters:
      cdV - The new curveData value
    • removeCurveData

      public void removeCurveData(int i)
      Description of the Method
      Parameters:
      i - Description of the Parameter
    • removeCurveData

      public void removeCurveData(CurveData curveData)
      Description of the Method
      Parameters:
      curveData - Description of the Parameter
    • removeAllCurveData

      public void removeAllCurveData()
      Description of the Method
    • setGraphsDefaultColor

      public void setGraphsDefaultColor(Color color)
      Sets the graphsDefaultColor attribute of the FunctionGraphsJPanel object
      Parameters:
      color - The new graphsDefaultColor value
    • setGraphLineChoosenColor

      public void setGraphLineChoosenColor(Color color)
      Sets the graphLineChoosenColor attribute of the FunctionGraphsJPanel object
      Parameters:
      color - The new graphLineChoosenColor value
    • getGraphsDefaultColor

      public Color getGraphsDefaultColor()
      Returns the graphsDefaultColor attribute of the FunctionGraphsJPanel object
      Returns:
      The graphsDefaultColor value
    • resetGraphsDefaultColor

      public void resetGraphsDefaultColor()
      Description of the Method
    • removeColorForAllGraphs

      public void removeColorForAllGraphs()
      Description of the Method
    • getGraphColor

      public Color getGraphColor(int index)
      Returns the graphColor attribute of the FunctionGraphsJPanel object
      Parameters:
      index - Description of the Parameter
      Returns:
      The graphColor value
    • setGraphColor

      public boolean setGraphColor(int index, Color color)
      Sets the graphColor attribute of the FunctionGraphsJPanel object
      Parameters:
      index - The new graphColor value
      color - The new graphColor value
      Returns:
      Description of the Return Value
    • xMarkersOn

      public void xMarkersOn(boolean gridXmarkerOnIn)
      Description of the Method
      Parameters:
      gridXmarkerOnIn - Description of the Parameter
    • yMarkersOn

      public void yMarkersOn(boolean gridYmarkerOnIn)
      Description of the Method
      Parameters:
      gridYmarkerOnIn - Description of the Parameter
    • setOffScreenImageDrawing

      public void setOffScreenImageDrawing(boolean offScreenImageOnIn)
      Sets the offScreenImageDrawing attribute of the FunctionGraphsJPanel object
      Parameters:
      offScreenImageOnIn - The new offScreenImageDrawing value
    • setDisplayGraphMode

      public void setDisplayGraphMode()
      Sets the displayGraphMode attribute of the FunctionGraphsJPanel object
    • setChoosingGraphMode

      public void setChoosingGraphMode()
      Sets the choosingGraphMode attribute of the FunctionGraphsJPanel object
    • setChooseModeButtonVisible

      public void setChooseModeButtonVisible(boolean vs)
      Sets the chooseModeButtonVisible attribute of the FunctionGraphsJPanel object
      Parameters:
      vs - The new chooseModeButtonVisible value
    • getGraphChosenIndex

      public Integer getGraphChosenIndex()
      Returns the graphChosenIndex attribute of the FunctionGraphsJPanel object
      Returns:
      The graphChosenIndex value
    • getPointChosenIndex

      public Integer getPointChosenIndex()
      Returns the pointChosenIndex attribute of the FunctionGraphsJPanel object
      Returns:
      The pointChosenIndex value
    • getPointChosenX

      public Double getPointChosenX()
      Returns the pointChosenX attribute of the FunctionGraphsJPanel object
      Returns:
      The pointChosenX value
    • getPointChosenY

      public Double getPointChosenY()
      Returns the pointChosenY attribute of the FunctionGraphsJPanel object
      Returns:
      The pointChosenY value
    • addChooseListener

      public void addChooseListener(ActionListener al)
      Adds a feature to the ChooseListener attribute of the FunctionGraphsJPanel object
      Parameters:
      al - The feature to be added to the ChooseListener attribute
    • getNewGridLimits

      public GridLimits getNewGridLimits()
      Returns the newGridLimits attribute of the FunctionGraphsJPanel object
      Returns:
      The newGridLimits value
    • getCurrentGL

      public GridLimits getCurrentGL()
      Returns the currentGL attribute of the FunctionGraphsJPanel object
      Returns:
      The currentGL value
    • setExternalGL

      public void setExternalGL(GridLimits gL)
      Sets the GridLimits object to the graph panel as an external grid limits
      Parameters:
      gL - The GridLimits object
    • setSmartGL

      public void setSmartGL(boolean smart)
      Sets the boolean value that defines if the smart (slow one) GridLimits object will be used as internal GL manager for the graph panel
      Parameters:
      smart - The boolean value
    • getExternalGL

      public GridLimits getExternalGL()
      Returns the external GridLimits object
      Returns:
      The external GL object
    • getInnerMinX

      public double getInnerMinX()
      Returns the innerMinX attribute of the FunctionGraphsJPanel object
      Returns:
      The innerMinX value
    • getInnerMaxX

      public double getInnerMaxX()
      Returns the innerMaxX attribute of the FunctionGraphsJPanel object
      Returns:
      The innerMaxX value
    • getInnerMinY

      public double getInnerMinY()
      Returns the innerMinY attribute of the FunctionGraphsJPanel object
      Returns:
      The innerMinY value
    • getInnerMaxY

      public double getInnerMaxY()
      Returns the innerMaxY attribute of the FunctionGraphsJPanel object
      Returns:
      The innerMaxY value
    • getCurrentMinX

      public double getCurrentMinX()
      Returns the currentMinX attribute of the FunctionGraphsJPanel object
      Returns:
      The currentMinX value
    • getCurrentMaxX

      public double getCurrentMaxX()
      Returns the currentMaxX attribute of the FunctionGraphsJPanel object
      Returns:
      The currentMaxX value
    • getCurrentMinY

      public double getCurrentMinY()
      Returns the currentMinY attribute of the FunctionGraphsJPanel object
      Returns:
      The currentMinY value
    • getCurrentMaxY

      public double getCurrentMaxY()
      Returns the currentMaxY attribute of the FunctionGraphsJPanel object
      Returns:
      The currentMaxY value
    • clearZoomStack

      public void clearZoomStack()
      Description of the Method
    • setLimitsAndTicksX

      public void setLimitsAndTicksX(double vMin, double step, int nStep, int nMinorTicksIn)
      Sets the limitsAndTicksX attribute of the FunctionGraphsJPanel object
      Parameters:
      vMin - The new limitsAndTicksX value
      step - The new limitsAndTicksX value
      nStep - The new limitsAndTicksX value
      nMinorTicksIn - The new limitsAndTicksX value
    • setLimitsAndTicksY

      public void setLimitsAndTicksY(double vMin, double step, int nStep, int nMinorTicksIn)
      Sets the limitsAndTicksY attribute of the FunctionGraphsJPanel object
      Parameters:
      vMin - The new limitsAndTicksY value
      step - The new limitsAndTicksY value
      nStep - The new limitsAndTicksY value
      nMinorTicksIn - The new limitsAndTicksY value
    • setLimitsAndTicksX

      public void setLimitsAndTicksX(double vMin, double step, int nStep)
      Sets the limitsAndTicksX attribute of the FunctionGraphsJPanel object
      Parameters:
      vMin - The new limitsAndTicksX value
      step - The new limitsAndTicksX value
      nStep - The new limitsAndTicksX value
    • setLimitsAndTicksY

      public void setLimitsAndTicksY(double vMin, double step, int nStep)
      Sets the limitsAndTicksY attribute of the FunctionGraphsJPanel object
      Parameters:
      vMin - The new limitsAndTicksY value
      step - The new limitsAndTicksY value
      nStep - The new limitsAndTicksY value
    • setLimitsAndTicksX

      public void setLimitsAndTicksX(double vMin, double vMax, double step, int nMinorTicksIn)
      Sets the limitsAndTicksX attribute of the FunctionGraphsJPanel object
      Parameters:
      vMin - The new limitsAndTicksX value
      vMax - The new limitsAndTicksX value
      step - The new limitsAndTicksX value
      nMinorTicksIn - The new limitsAndTicksX value
    • setLimitsAndTicksY

      public void setLimitsAndTicksY(double vMin, double vMax, double step, int nMinorTicksIn)
      Sets the limitsAndTicksY attribute of the FunctionGraphsJPanel object
      Parameters:
      vMin - The new limitsAndTicksY value
      vMax - The new limitsAndTicksY value
      step - The new limitsAndTicksY value
      nMinorTicksIn - The new limitsAndTicksY value
    • setLimitsAndTicksX

      public void setLimitsAndTicksX(double vMin, double vMax, double step)
      Sets the limitsAndTicksX attribute of the FunctionGraphsJPanel object
      Parameters:
      vMin - The new limitsAndTicksX value
      vMax - The new limitsAndTicksX value
      step - The new limitsAndTicksX value
    • setLimitsAndTicksY

      public void setLimitsAndTicksY(double vMin, double vMax, double step)
      Sets the limitsAndTicksY attribute of the FunctionGraphsJPanel object
      Parameters:
      vMin - The new limitsAndTicksY value
      vMax - The new limitsAndTicksY value
      step - The new limitsAndTicksY value
    • setGraphBackGroundColor

      public void setGraphBackGroundColor(Color bkgGraphAreaColor)
      Sets the graphBackGroundColor attribute of the FunctionGraphsJPanel object
      Parameters:
      bkgGraphAreaColor - The new graphBackGroundColor value
    • setGridLineColor

      public void setGridLineColor(Color gridLineColor)
      Sets the grid lines color of the FunctionGraphsJPanel. If it is null object the color of grid lines will be darker than the background color.
      Parameters:
      gridLineColor - The new grid lines color
    • setBorderBackGroundColor

      public void setBorderBackGroundColor(Color bkgBorderAreaColor)
      Sets the borderBackGroundColor attribute of the FunctionGraphsJPanel object
      Parameters:
      bkgBorderAreaColor - The new borderBackGroundColor value
    • getGraphBackGroundColor

      public Color getGraphBackGroundColor()
      Returns the graphBackGroundColor attribute of the FunctionGraphsJPanel object
      Returns:
      The graphBackGroundColor value
    • getBorderBackGroundColor

      public Color getBorderBackGroundColor()
      Returns the borderBackGroundColor attribute of the FunctionGraphsJPanel object
      Returns:
      The borderBackGroundColor value
    • setName

      public void setName(String name)
      Sets the name attribute of the FunctionGraphsJPanel object
      Overrides:
      setName in class Component
      Parameters:
      name - The new name value
    • getName

      public String getName()
      Returns the name attribute of the FunctionGraphsJPanel object
      Overrides:
      getName in class Component
      Returns:
      The name value
    • setAxisNames

      public void setAxisNames(String nameX, String nameY)
      Sets the axisNames attribute of the FunctionGraphsJPanel object
      Parameters:
      nameX - The new axisNames value
      nameY - The new axisNames value
    • setAxisNameX

      public void setAxisNameX(String nameX)
      Sets the axisNameX attribute of the FunctionGraphsJPanel object
      Parameters:
      nameX - The new axisNameX value
    • setAxisNameY

      public void setAxisNameY(String nameY)
      Sets the axisNameY attribute of the FunctionGraphsJPanel object
      Parameters:
      nameY - The new axisNameY value
    • setNameFont

      public void setNameFont(Font fn)
      Sets the nameFont attribute of the FunctionGraphsJPanel object
      Parameters:
      fn - The new nameFont value
    • setAxisNameFontX

      public void setAxisNameFontX(Font fnX)
      Sets the axisNameFontX attribute of the FunctionGraphsJPanel object
      Parameters:
      fnX - The new axisNameFontX value
    • setAxisNameFontY

      public void setAxisNameFontY(Font fnY)
      Sets the axisNameFontY attribute of the FunctionGraphsJPanel object
      Parameters:
      fnY - The new axisNameFontY value
    • setNumberFont

      public void setNumberFont(Font fn)
      Sets the numberFont attribute of the FunctionGraphsJPanel object
      Parameters:
      fn - The new numberFont value
    • setNameColor

      public void setNameColor(Color cl)
      Sets the nameColor attribute of the FunctionGraphsJPanel object
      Parameters:
      cl - The new nameColor value
    • setAxisNameColorX

      public void setAxisNameColorX(Color clX)
      Sets the axisNameColorX attribute of the FunctionGraphsJPanel object
      Parameters:
      clX - The new axisNameColorX value
    • setAxisNameColorY

      public void setAxisNameColorY(Color clY)
      Sets the axisNameColorY attribute of the FunctionGraphsJPanel object
      Parameters:
      clY - The new axisNameColorY value
    • setNumberColor

      public void setNumberColor(Color cl)
      Sets the numberColor attribute of the FunctionGraphsJPanel object
      Parameters:
      cl - The new numberColor value
    • setNumberFormatX

      public void setNumberFormatX(NumberFormat df)
      Sets the numberFormatX attribute of the FunctionGraphsJPanel object
      Parameters:
      df - The new numberFormatX value
    • setNumberFormatY

      public void setNumberFormatY(NumberFormat df)
      Sets the numberFormatY attribute of the FunctionGraphsJPanel object
      Parameters:
      df - The new numberFormatY value
    • setMakrsScaleX

      public void setMakrsScaleX(double numbMarkScaleXin)
      Sets the makrsScaleX attribute of the FunctionGraphsJPanel object
      Parameters:
      numbMarkScaleXin - The new makrsScaleX value
    • setMakrsScaleY

      public void setMakrsScaleY(double numbMarkScaleYin)
      Sets the makrsScaleY attribute of the FunctionGraphsJPanel object
      Parameters:
      numbMarkScaleYin - The new makrsScaleY value
    • getClickedPointObject

      public FunctionGraphsJPanel.ClickedPoint getClickedPointObject()
      Returns the clickedPointObject attribute of the FunctionGraphsJPanel object
      Returns:
      The clickedPointObject value
    • getNumberOfVerticalLines

      public int getNumberOfVerticalLines()
      Returns the numberOfVerticalLines attribute of the FunctionGraphsJPanel object
      Returns:
      The numberOfVerticalLines value
    • getNumberOfHorizontalLines

      public int getNumberOfHorizontalLines()
      Returns the numberOfHorizontalLines attribute of the FunctionGraphsJPanel object
      Returns:
      The numberOfHorizontalLines value
    • addVerticalLine

      public int addVerticalLine(double x)
      Adds a feature to the VerticalLine attribute of the FunctionGraphsJPanel object
      Parameters:
      x - The feature to be added to the VerticalLine attribute
      Returns:
      Description of the Return Value
    • addHorizontalLine

      public int addHorizontalLine(double y)
      Adds a feature to the HorizontalLine attribute of the FunctionGraphsJPanel object
      Parameters:
      y - The feature to be added to the HorizontalLine attribute
      Returns:
      Description of the Return Value
    • addVerticalLine

      public int addVerticalLine(double x, Color cl)
      Adds a feature to the VerticalLine attribute of the FunctionGraphsJPanel object
      Parameters:
      x - The feature to be added to the VerticalLine attribute
      cl - The feature to be added to the VerticalLine attribute
      Returns:
      Description of the Return Value
    • addHorizontalLine

      public int addHorizontalLine(double y, Color cl)
      Adds a feature to the HorizontalLine attribute of the FunctionGraphsJPanel object
      Parameters:
      y - The feature to be added to the HorizontalLine attribute
      cl - The feature to be added to the HorizontalLine attribute
      Returns:
      Description of the Return Value
    • setVerticalLineValue

      public void setVerticalLineValue(double x, int index)
      Sets the verticalLineValue attribute of the FunctionGraphsJPanel object
      Parameters:
      x - The new verticalLineValue value
      index - The new verticalLineValue value
    • setHorizontalLineValue

      public void setHorizontalLineValue(double y, int index)
      Sets the horizontalLineValue attribute of the FunctionGraphsJPanel object
      Parameters:
      y - The new horizontalLineValue value
      index - The new horizontalLineValue value
    • setVerticalLineColor

      public void setVerticalLineColor(Color cl, int index)
      Sets the verticalLineColor attribute of the FunctionGraphsJPanel object
      Parameters:
      cl - The new verticalLineColor value
      index - The new verticalLineColor value
    • setHorizontalLineColor

      public void setHorizontalLineColor(Color cl, int index)
      Sets the horizontalLineColor attribute of the FunctionGraphsJPanel object
      Parameters:
      cl - The new horizontalLineColor value
      index - The new horizontalLineColor value
    • getVerticalValue

      public double getVerticalValue(int index)
      Returns the verticalValue attribute of the FunctionGraphsJPanel object
      Parameters:
      index - Description of the Parameter
      Returns:
      The verticalValue value
    • getHorizontalValue

      public double getHorizontalValue(int index)
      Returns the horizontalValue attribute of the FunctionGraphsJPanel object
      Parameters:
      index - Description of the Parameter
      Returns:
      The horizontalValue value
    • removeVerticalValue

      public void removeVerticalValue(int index)
      Description of the Method
      Parameters:
      index - Description of the Parameter
    • removeHorizontalValue

      public void removeHorizontalValue(int index)
      Description of the Method
      Parameters:
      index - Description of the Parameter
    • removeVerticalValues

      public void removeVerticalValues()
      Description of the Method
    • removeHorizontalValues

      public void removeHorizontalValues()
      Description of the Method
    • setDraggingHorLinesGraphMode

      public void setDraggingHorLinesGraphMode(boolean dragLinesModeYes)
      Sets the draggingHorLinesGraphMode attribute of the FunctionGraphsJPanel object
      Parameters:
      dragLinesModeYes - The new draggingHorLinesGraphMode value
    • setDraggingVerLinesGraphMode

      public void setDraggingVerLinesGraphMode(boolean dragLinesModeYes)
      Sets the draggingVerLinesGraphMode attribute of the FunctionGraphsJPanel object
      Parameters:
      dragLinesModeYes - The new draggingVerLinesGraphMode value
    • setHorLinesButtonVisible

      public void setHorLinesButtonVisible(boolean vs)
      Sets the horLinesButtonVisible attribute of the FunctionGraphsJPanel object
      Parameters:
      vs - The new horLinesButtonVisible value
    • setVerLinesButtonVisible

      public void setVerLinesButtonVisible(boolean vs)
      Sets the verLinesButtonVisible attribute of the FunctionGraphsJPanel object
      Parameters:
      vs - The new verLinesButtonVisible value
    • addDraggedHorLinesListener

      public void addDraggedHorLinesListener(ActionListener draggedHorLinesListenerIn)
      Adds a feature to the DraggedHorLinesListener attribute of the FunctionGraphsJPanel object
      Parameters:
      draggedHorLinesListenerIn - The feature to be added to the DraggedHorLinesListener attribute
    • addDraggedVerLinesListener

      public void addDraggedVerLinesListener(ActionListener draggedVerLinesListenerIn)
      Adds a feature to the DraggedVerLinesListener attribute of the FunctionGraphsJPanel object
      Parameters:
      draggedVerLinesListenerIn - The feature to be added to the DraggedVerLinesListener attribute
    • setDraggedHorLinesMotionListen

      public void setDraggedHorLinesMotionListen(boolean draggedHorLinesMotionListenYesIn)
      Sets the draggedHorLinesMotionListen attribute of the FunctionGraphsJPanel object
      Parameters:
      draggedHorLinesMotionListenYesIn - The new draggedHorLinesMotionListen value
    • setDraggedVerLinesMotionListen

      public void setDraggedVerLinesMotionListen(boolean draggedVerLinesMotionListenYesIn)
      Sets the draggedVerLinesMotionListen attribute of the FunctionGraphsJPanel object
      Parameters:
      draggedVerLinesMotionListenYesIn - The new draggedVerLinesMotionListen value
    • getDraggedLineIndex

      public int getDraggedLineIndex()
      Returns the draggedLineIndex attribute of the FunctionGraphsJPanel object
      Returns:
      The draggedLineIndex value
    • setGridLinesVisibleX

      public void setGridLinesVisibleX(boolean vsbl)
      Sets the gridLinesVisibleX attribute of the FunctionGraphsJPanel object
      Parameters:
      vsbl - The new gridLinesVisibleX value
    • getGridLinesVisibleX

      public boolean getGridLinesVisibleX()
      Returns the gridLinesVisibleX attribute of the FunctionGraphsJPanel object
      Returns:
      The gridLinesVisibleX value
    • setGridLinesVisibleY

      public void setGridLinesVisibleY(boolean vsbl)
      Sets the gridLinesVisibleY attribute of the FunctionGraphsJPanel object
      Parameters:
      vsbl - The new gridLinesVisibleY value
    • getGridLinesVisibleY

      public boolean getGridLinesVisibleY()
      Returns the gridLinesVisibleY attribute of the FunctionGraphsJPanel object
      Returns:
      The gridLinesVisibleY value
    • addHorLimitsListener

      public void addHorLimitsListener(ActionListener al)
      Adds a feature to the HorLimitsListener attribute of the FunctionGraphsJPanel object
      Parameters:
      al - The feature to be added to the HorLimitsListener attribute
    • addVerLimitsListener

      public void addVerLimitsListener(ActionListener al)
      Adds a feature to the VerLimitsListener attribute of the FunctionGraphsJPanel object
      Parameters:
      al - The feature to be added to the VerLimitsListener attribute
    • removeHorLimitsListener

      public void removeHorLimitsListener(ActionListener al)
      Description of the Method
      Parameters:
      al - Description of the Parameter
    • removeVerLimitsListener

      public void removeVerLimitsListener(ActionListener al)
      Description of the Method
      Parameters:
      al - Description of the Parameter
    • getHorLimitsListeners

      public Vector<ActionListener> getHorLimitsListeners()
      Returns the horLimitsListeners attribute of the FunctionGraphsJPanel object
      Returns:
      The horLimitsListeners value
    • getVerLimitsListeners

      public Vector<ActionListener> getVerLimitsListeners()
      Returns the verLimitsListeners attribute of the FunctionGraphsJPanel object
      Returns:
      The verLimitsListeners value
    • setLegendVisible

      public void setLegendVisible(boolean vs)
      Sets the legendVisible attribute of the FunctionGraphsJPanel object
      Parameters:
      vs - The new legendVisible value
    • isLegendVisible

      public boolean isLegendVisible()
      Returns the legendVisible attribute of the FunctionGraphsJPanel object
      Returns:
      The legendVisible value
    • setLegendButtonVisible

      public void setLegendButtonVisible(boolean vs)
      Sets the legendButtonVisible attribute of the FunctionGraphsJPanel object
      Parameters:
      vs - The new legendButtonVisible value
    • setLegendKeyString

      public void setLegendKeyString(String legendKeyString)
      Sets the legendKeyString attribute of the FunctionGraphsJPanel object
      Parameters:
      legendKeyString - The new legendKeyString value
    • getLegendKeyString

      public String getLegendKeyString()
      Returns the legendKeyString attribute of the FunctionGraphsJPanel object
      Returns:
      The legendKeyString value
    • setLegendPosition

      public void setLegendPosition(int legendPosition)
      Sets the legendPosition attribute of the FunctionGraphsJPanel object
      Parameters:
      legendPosition - The new legendPosition value
    • setLegendFont

      public void setLegendFont(Font fnt)
      Sets the legendFont attribute of the FunctionGraphsJPanel object
      Parameters:
      fnt - The new legendFont value
    • setLegendColor

      public void setLegendColor(Color cl)
      Sets the legendColor attribute of the FunctionGraphsJPanel object
      Parameters:
      cl - The new legendColor value
    • setLegendBackground

      public void setLegendBackground(Color cl)
      Sets the legendBackground attribute of the FunctionGraphsJPanel object
      Parameters:
      cl - The new legendBackground value
    • paintComponent

      protected void paintComponent(Graphics g)
      Description of the Method
      Overrides:
      paintComponent in class JComponent
      Parameters:
      g - Description of the Parameter
    • refreshGraphJPanel

      public void refreshGraphJPanel()
      Update data and the graph panel
    • getScreenX

      public int getScreenX(double x)
      Returns the screenX attribute of the FunctionGraphsJPanel object
      Parameters:
      x - Description of the Parameter
      Returns:
      The screenX value
    • getScreenY

      public int getScreenY(double y)
      Returns the screenY attribute of the FunctionGraphsJPanel object
      Parameters:
      y - Description of the Parameter
      Returns:
      The screenY value
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Description of the Method
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      e - Description of the Parameter
    • mousePressed

      public void mousePressed(MouseEvent e)
      Description of the Method
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      e - Description of the Parameter
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Description of the Method
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      e - Description of the Parameter
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Description of the Method
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      e - Description of the Parameter
    • mouseExited

      public void mouseExited(MouseEvent e)
      Description of the Method
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      e - Description of the Parameter
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Description of the Method
      Specified by:
      mouseDragged in interface MouseMotionListener
      Parameters:
      e - Description of the Parameter
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      Description of the Method
      Specified by:
      mouseMoved in interface MouseMotionListener
      Parameters:
      e - Description of the Parameter