Class PlotMap2D

java.lang.Object
mgui.interfaces.plots.mgui.PlotMap2D
All Implemented Interfaces:
InterfaceObject, NamedObject, TreeObject, CleanableObject

public class PlotMap2D
extends java.lang.Object
implements InterfaceObject
Specifies a mapping from data units to plot units and to graphic units.

Note on units:

  • Data units: values from the original data to be plotted
  • Plot units: values transformed according to the plot layout (e.g., linear, log, exponential, etc.)
  • Graphic units: plot units mapped to graphic units (screen units within the plottable graphics region)
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  PlotMap2D.AxisType  
  • Field Summary

    Fields
    Modifier and Type Field Description
    AttributeList attributes  
    protected Map2D graphic_map  
  • Constructor Summary

    Constructors
    Constructor Description
    PlotMap2D()  
  • Method Summary

    Modifier and Type Method Description
    protected void _init()
    Initiate this plot object; to be called from subclasses
    void clean()
    Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.
    void destroy()
    Destroy this object (prepare it to be removed from memory)
    PlotMap2D.AxisType getAxisXType()
    Returns the X axis type for this map
    PlotMap2D.AxisType getAxisYType()
    Returns the Y axis type for this map
    double getFactorX()
    Returns the factor for the X axis
    double getFactorY()
    Returns the factor for the Y axis
    java.lang.String getName()
    Gets the name for this object.
    java.lang.String getTreeLabel()
    Returns the label text to appear in a tree node.
    boolean isDestroyed()
    Test whether this object has been destroyed
    InterfaceTreeNode issueTreeNode()
    Issues a new InterfaceTreeNode for this object.
    java.awt.Shape mapDataShapeToGraphic​(Shape2D data_shape)
    Maps an mgui shape from data points to graphic points
    Shape2D mapDataShapeToPlot​(Shape2D data_shape)
    Maps an mgui shape from data points to plot points
    java.awt.Point mapDataToGraphic​(org.jogamp.vecmath.Point2d data_point)
    Maps a data point to a graphic point.
    org.jogamp.vecmath.Point2d mapDataToPlot​(org.jogamp.vecmath.Point2d data_point)
    Maps a data point to a plot point.
    org.jogamp.vecmath.Point2d mapGraphicToData​(java.awt.Point graphic_point)
    Maps a graphic point to a data point
    org.jogamp.vecmath.Point2d mapGraphicToPlot​(java.awt.Point graphic_point)
    Maps a graphic point to a plot point
    java.awt.Shape mapPlotShapeToGraphic​(Shape2D plot_shape)
    Maps an mgui shape from data points to graphic points
    java.awt.Point mapPlotToGraphic​(org.jogamp.vecmath.Point2d plot_point)
    Maps a plot point to a graphic point
    void setName​(java.lang.String name)
    Sets the name for this object.
    void setTreeNode​(InterfaceTreeNode node)
    Sets the children for this node's InterfaceTreeNode.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • PlotMap2D

      public PlotMap2D()
  • Method Details

    • _init

      protected void _init()
      Initiate this plot object; to be called from subclasses
    • clean

      public void clean()
      Description copied from interface: CleanableObject
      Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.
      Specified by:
      clean in interface CleanableObject
    • getFactorX

      public double getFactorX()
      Returns the factor for the X axis
      Returns:
    • getFactorY

      public double getFactorY()
      Returns the factor for the Y axis
      Returns:
    • getAxisXType

      public PlotMap2D.AxisType getAxisXType()
      Returns the X axis type for this map
      Returns:
    • getAxisYType

      public PlotMap2D.AxisType getAxisYType()
      Returns the Y axis type for this map
      Returns:
    • mapDataToPlot

      public org.jogamp.vecmath.Point2d mapDataToPlot​(org.jogamp.vecmath.Point2d data_point)
      Maps a data point to a plot point.
      Parameters:
      data_point -
      Returns:
    • mapDataToGraphic

      public java.awt.Point mapDataToGraphic​(org.jogamp.vecmath.Point2d data_point)
      Maps a data point to a graphic point.
      Parameters:
      data_point -
      Returns:
    • mapPlotToGraphic

      public java.awt.Point mapPlotToGraphic​(org.jogamp.vecmath.Point2d plot_point)
      Maps a plot point to a graphic point
      Parameters:
      plot_point -
      Returns:
    • mapGraphicToPlot

      public org.jogamp.vecmath.Point2d mapGraphicToPlot​(java.awt.Point graphic_point)
      Maps a graphic point to a plot point
      Parameters:
      plot_point -
      Returns:
    • mapGraphicToData

      public org.jogamp.vecmath.Point2d mapGraphicToData​(java.awt.Point graphic_point)
      Maps a graphic point to a data point
      Parameters:
      plot_point -
      Returns:
    • mapDataShapeToPlot

      public Shape2D mapDataShapeToPlot​(Shape2D data_shape)
      Maps an mgui shape from data points to plot points
      Parameters:
      data_shape -
      Returns:
    • mapDataShapeToGraphic

      public java.awt.Shape mapDataShapeToGraphic​(Shape2D data_shape)
      Maps an mgui shape from data points to graphic points
      Parameters:
      data_shape -
      Returns:
    • mapPlotShapeToGraphic

      public java.awt.Shape mapPlotShapeToGraphic​(Shape2D plot_shape)
      Maps an mgui shape from data points to graphic points
      Parameters:
      data_shape -
      Returns:
    • issueTreeNode

      public InterfaceTreeNode issueTreeNode()
      Description copied from interface: TreeObject
      Issues a new InterfaceTreeNode for this object. The object is responsible for maintaining, updating, and destroying the tree nodes it issues, or notifying containers -- i.e., parent trees -- of changes which require the tree nodes to be modified or destroyed.
      Specified by:
      issueTreeNode in interface TreeObject
      Returns:
    • setTreeNode

      public void setTreeNode​(InterfaceTreeNode node)
      Description copied from interface: TreeObject
      Sets the children for this node's InterfaceTreeNode.
      Specified by:
      setTreeNode in interface TreeObject
    • getTreeLabel

      public java.lang.String getTreeLabel()
      Description copied from interface: TreeObject
      Returns the label text to appear in a tree node.
      Specified by:
      getTreeLabel in interface TreeObject
      Returns:
    • getName

      public java.lang.String getName()
      Description copied from interface: NamedObject
      Gets the name for this object.
      Specified by:
      getName in interface NamedObject
      Returns:
    • setName

      public void setName​(java.lang.String name)
      Description copied from interface: NamedObject
      Sets the name for this object.
      Specified by:
      setName in interface NamedObject
    • destroy

      public void destroy()
      Description copied from interface: InterfaceObject
      Destroy this object (prepare it to be removed from memory)
      Specified by:
      destroy in interface InterfaceObject
    • isDestroyed

      public boolean isDestroyed()
      Description copied from interface: InterfaceObject
      Test whether this object has been destroyed
      Specified by:
      isDestroyed in interface InterfaceObject
      Returns: