Package mgui.interfaces.plots.mgui
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 classPlotMap2D.AxisType -
Field Summary
Fields Modifier and Type Field Description AttributeListattributesprotected Map2Dgraphic_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 subclassesvoidclean()Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.voiddestroy()Destroy this object (prepare it to be removed from memory)PlotMap2D.AxisTypegetAxisXType()Returns the X axis type for this mapPlotMap2D.AxisTypegetAxisYType()Returns the Y axis type for this mapdoublegetFactorX()Returns the factor for the X axisdoublegetFactorY()Returns the factor for the Y axisjava.lang.StringgetName()Gets the name for this object.java.lang.StringgetTreeLabel()Returns the label text to appear in a tree node.booleanisDestroyed()Test whether this object has been destroyedInterfaceTreeNodeissueTreeNode()Issues a newInterfaceTreeNodefor this object.java.awt.ShapemapDataShapeToGraphic(Shape2D data_shape)Maps an mgui shape from data points to graphic pointsShape2DmapDataShapeToPlot(Shape2D data_shape)Maps an mgui shape from data points to plot pointsjava.awt.PointmapDataToGraphic(org.jogamp.vecmath.Point2d data_point)Maps a data point to a graphic point.org.jogamp.vecmath.Point2dmapDataToPlot(org.jogamp.vecmath.Point2d data_point)Maps a data point to a plot point.org.jogamp.vecmath.Point2dmapGraphicToData(java.awt.Point graphic_point)Maps a graphic point to a data pointorg.jogamp.vecmath.Point2dmapGraphicToPlot(java.awt.Point graphic_point)Maps a graphic point to a plot pointjava.awt.ShapemapPlotShapeToGraphic(Shape2D plot_shape)Maps an mgui shape from data points to graphic pointsjava.awt.PointmapPlotToGraphic(org.jogamp.vecmath.Point2d plot_point)Maps a plot point to a graphic pointvoidsetName(java.lang.String name)Sets the name for this object.voidsetTreeNode(InterfaceTreeNode node)Sets the children for this node'sInterfaceTreeNode.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
attributes
-
graphic_map
-
-
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:CleanableObjectInstructs this object to search its members for any object which has been destroyed, and release the pointer to it.- Specified by:
cleanin interfaceCleanableObject
-
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
Returns the X axis type for this map- Returns:
-
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
Maps an mgui shape from data points to plot points- Parameters:
data_shape-- Returns:
-
mapDataShapeToGraphic
Maps an mgui shape from data points to graphic points- Parameters:
data_shape-- Returns:
-
mapPlotShapeToGraphic
Maps an mgui shape from data points to graphic points- Parameters:
data_shape-- Returns:
-
issueTreeNode
Description copied from interface:TreeObjectIssues a newInterfaceTreeNodefor 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:
issueTreeNodein interfaceTreeObject- Returns:
-
setTreeNode
Description copied from interface:TreeObjectSets the children for this node'sInterfaceTreeNode.- Specified by:
setTreeNodein interfaceTreeObject
-
getTreeLabel
public java.lang.String getTreeLabel()Description copied from interface:TreeObjectReturns the label text to appear in a tree node.- Specified by:
getTreeLabelin interfaceTreeObject- Returns:
-
getName
public java.lang.String getName()Description copied from interface:NamedObjectGets the name for this object.- Specified by:
getNamein interfaceNamedObject- Returns:
-
setName
public void setName(java.lang.String name)Description copied from interface:NamedObjectSets the name for this object.- Specified by:
setNamein interfaceNamedObject
-
destroy
public void destroy()Description copied from interface:InterfaceObjectDestroy this object (prepare it to be removed from memory)- Specified by:
destroyin interfaceInterfaceObject
-
isDestroyed
public boolean isDestroyed()Description copied from interface:InterfaceObjectTest whether this object has been destroyed- Specified by:
isDestroyedin interfaceInterfaceObject- Returns:
-