JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d.j3d
Class MapPick

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

public class MapPick
extends Object
implements Mapping

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


Field Summary
protected  BranchGroup branchGroup
           
protected  Canvas3D canvas3D
           
protected  com.klg.jclass.chart3d.j3d.JCChart3dJava3d chart3d
           
protected  com.klg.jclass.chart3d.Chart3dData data
           
protected  com.klg.jclass.chart3d.Chart3dDataView dataView
           
protected  float tolerance
           
 
Constructor Summary
MapPick()
           
MapPick(com.klg.jclass.chart3d.Chart3dData data)
          Contructor with data.
MapPick(com.klg.jclass.chart3d.Chart3dData data, Canvas3D canvas3D, BranchGroup branchGroup)
          Contructor with data, Canvas3D, and BranchGroup.
 
Method Summary
 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  boolean isWithinCanvas3DLimits(int xPixel, int yPixel)
           
 Point3d map(int xPixel, int yPixel)
          Dummy implementation.
 com.klg.jclass.chart3d.JCData3dIndex pick(int xPixel, int yPixel)
          Dummy implementation.
 void setBranchGroup(BranchGroup branchGroup)
          Sets the BranchGroup object required by PickCanvas.
 void setCanvas3D(Canvas3D canvas3D)
          Sets the Canvas3D object required by PickCanvas.
 void setTolerance(float tolerance)
           
 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

tolerance

protected float tolerance

chart3d

protected com.klg.jclass.chart3d.j3d.JCChart3dJava3d chart3d

canvas3D

protected Canvas3D canvas3D

branchGroup

protected BranchGroup branchGroup

dataView

protected com.klg.jclass.chart3d.Chart3dDataView dataView

data

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

MapPick

public MapPick()

MapPick

public MapPick(com.klg.jclass.chart3d.Chart3dData data)
Contructor with data.


MapPick

public MapPick(com.klg.jclass.chart3d.Chart3dData data,
               Canvas3D canvas3D,
               BranchGroup branchGroup)
Contructor with data, Canvas3D, and BranchGroup.

Method Detail

setCanvas3D

public void setCanvas3D(Canvas3D canvas3D)
Sets the Canvas3D object required by PickCanvas.


isWithinCanvas3DLimits

protected boolean isWithinCanvas3DLimits(int xPixel,
                                         int yPixel)

setBranchGroup

public void setBranchGroup(BranchGroup branchGroup)
Sets the BranchGroup object required by PickCanvas.


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

setTolerance

public void setTolerance(float tolerance)

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