JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d.j2d
Class MapPick

java.lang.Object
  |
  +--com.klg.jclass.chart3d.j2d.MapPick
All Implemented Interfaces:
Mapping, Serializable
Direct Known Subclasses:
MapPickGrid, MapPickPoint

public class MapPick
extends Object
implements Mapping, Serializable

A class that implements the Mapping interface. This computes the map and pick functions for the j2d version of Chart3d.

See Also:
Serialized Form

Field Summary
protected  com.klg.jclass.chart3d.Chart3dData data
           
 
Constructor Summary
MapPick()
          Default constructor, required by Java Beans.
MapPick(com.klg.jclass.chart3d.Chart3dData data)
          Default constructor, required by Java Beans.
 
Method Summary
protected  double calcDist(int x1, int y1, int x2, int y2)
          Find the euclidean distance (squared) between the two passed in points.
 com.klg.jclass.chart3d.Mapping createMapping(com.klg.jclass.chart3d.Chart3dData data)
          Create a new mapping, depending on the type of input data
 com.klg.jclass.chart3d.Chart3dData getData()
          Return the internal data object whose type determines the type of MapPick object required.
protected  com.klg.jclass.chart3d.ScreenPoint[][] getScreenPoints()
          Return the data's screen points.
protected  Rectangle interpolateXY(int xPixel, int yPixel, double xMin, double yMin, double xMax, double yMax, Point3d mapPoint)
          Find the corresponding (x, y) coordinate in data space to (xPixel, yPixel) via interpolation.
 Point3d map(int xPixel, int yPixel)
          Dummy implementation.
 com.klg.jclass.chart3d.JCData3dIndex pick(int xPixel, int yPixel)
          Dummy implementation.
 Point unmap(Point3d point)
          Performs an unmap operation by transforming the given data point to the position on the screen where it would be drawn.
 Point unpick(com.klg.jclass.chart3d.JCData3dIndex index)
          Dummy implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected com.klg.jclass.chart3d.Chart3dData data
Constructor Detail

MapPick

public MapPick()
Default constructor, required by Java Beans.


MapPick

public MapPick(com.klg.jclass.chart3d.Chart3dData data)
Default constructor, required by Java Beans.

Method Detail

calcDist

protected double calcDist(int x1,
                          int y1,
                          int x2,
                          int y2)
Find the euclidean distance (squared) between the two passed in points.


interpolateXY

protected Rectangle interpolateXY(int xPixel,
                                  int yPixel,
                                  double xMin,
                                  double yMin,
                                  double xMax,
                                  double yMax,
                                  Point3d mapPoint)
Find the corresponding (x, y) coordinate in data space to (xPixel, yPixel) via interpolation.


getScreenPoints

protected com.klg.jclass.chart3d.ScreenPoint[][] getScreenPoints()
Return the data's screen points. Compute them if they are not already there.


map

public Point3d map(int xPixel,
                   int yPixel)
Dummy implementation. Meant to be overridden in MapPickGrid or MapPickPoint.

Specified by:
map in interface Mapping
Parameters:
xPixel - x value in screen pixels
yPixel - y value in screen pixels
Returns:
The data point that maps to the given screen point

unmap

public Point unmap(Point3d point)
Performs an unmap operation by transforming the given data point to the position on the screen where it would be drawn.

Specified by:
unmap in interface Mapping
Parameters:
point - The data point to be unmapped.
Returns:
The screen point to which the data point maps

pick

public com.klg.jclass.chart3d.JCData3dIndex pick(int xPixel,
                                                 int yPixel)
Dummy implementation. Meant to be overridden in MapPickGrid or MapPickPoint.

Specified by:
pick in interface Mapping
Parameters:
xPixel - x value in screen pixels
yPixel - y value in screen pixels

unpick

public Point unpick(com.klg.jclass.chart3d.JCData3dIndex index)
Dummy implementation. Meant to be overridden in MapPickGrid or MapPickPoint.

Specified by:
unpick in interface Mapping
Parameters:
index - The data index of the point whose screen point is required.

getData

public com.klg.jclass.chart3d.Chart3dData getData()
Return the internal data object whose type determines the type of MapPick object required.

Specified by:
getData in interface Mapping

createMapping

public com.klg.jclass.chart3d.Mapping createMapping(com.klg.jclass.chart3d.Chart3dData data)
Create a new mapping, depending on the type of input data

Specified by:
createMapping in interface Mapping
Parameters:
data - The data on which to base the creation
Returns:
The new mapping instance

Copyright © 2004 Quest Software Inc..
All rights reserved.