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 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 subclassesvoid
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 mapPlotMap2D.AxisType
getAxisYType()
Returns the Y axis type for this mapdouble
getFactorX()
Returns the factor for the X axisdouble
getFactorY()
Returns the factor for the Y axisjava.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 destroyedInterfaceTreeNode
issueTreeNode()
Issues a newInterfaceTreeNode
for this object.java.awt.Shape
mapDataShapeToGraphic(Shape2D data_shape)
Maps an mgui shape from data points to graphic pointsShape2D
mapDataShapeToPlot(Shape2D data_shape)
Maps an mgui shape from data points to plot pointsjava.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 pointorg.jogamp.vecmath.Point2d
mapGraphicToPlot(java.awt.Point graphic_point)
Maps a graphic point to a plot pointjava.awt.Shape
mapPlotShapeToGraphic(Shape2D plot_shape)
Maps an mgui shape from data points to graphic pointsjava.awt.Point
mapPlotToGraphic(org.jogamp.vecmath.Point2d plot_point)
Maps a plot point to a graphic pointvoid
setName(java.lang.String name)
Sets the name for this object.void
setTreeNode(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: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 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:TreeObject
Issues a newInterfaceTreeNode
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 interfaceTreeObject
- Returns:
-
setTreeNode
Description copied from interface:TreeObject
Sets the children for this node'sInterfaceTreeNode
.- Specified by:
setTreeNode
in interfaceTreeObject
-
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 interfaceTreeObject
- Returns:
-
getName
public java.lang.String getName()Description copied from interface:NamedObject
Gets the name for this object.- Specified by:
getName
in interfaceNamedObject
- Returns:
-
setName
public void setName(java.lang.String name)Description copied from interface:NamedObject
Sets the name for this object.- Specified by:
setName
in interfaceNamedObject
-
destroy
public void destroy()Description copied from interface:InterfaceObject
Destroy this object (prepare it to be removed from memory)- Specified by:
destroy
in interfaceInterfaceObject
-
isDestroyed
public boolean isDestroyed()Description copied from interface:InterfaceObject
Test whether this object has been destroyed- Specified by:
isDestroyed
in interfaceInterfaceObject
- Returns:
-