|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPamView.GeneralProjector
public abstract class GeneralProjector
GeneralProjector is an abstract class used to draw any type of information contained within a PamDataBlock on a display (e.g. Map, spectrogram, etc).
The display must set the parameter types and the units (these lists can be added to as necessary)
Drawing is all done via calls that the display makes to PanelOverlayDraw.DrawDataUnit(...)
The DataBlocks using the projector will need to check parameter types and units when parsed a projector to check that they can provide these parameters.
The owning display will need to create concrete instances of GeneralProjector which implement getCoord3d. It is also possible that they will need to create other functions which are called by the display to set scaling parameters, scale offsets or other information Required by the projector that may change with time. If a display requires many types of similar projectors (e.g. different map projections) then it will be necessary to create a special interface to manage these functions and to implement that interface in all concrete classes used by that display.
Coordinate3d,
PanelOverlayDraw| Nested Class Summary | |
|---|---|
(package private) class |
GeneralProjector.MouseHoverAdapter
|
static class |
GeneralProjector.ParameterType
|
static class |
GeneralProjector.ParameterUnits
|
| Field Summary | |
|---|---|
private java.util.List<java.lang.Integer> |
dataUnitSide
|
private java.util.List<Coordinate3d> |
hoverCoordinates
|
private java.util.List<PamDataUnit> |
hoverDataUnits
|
private PamDataUnit |
hoveredDataUnit
|
(package private) boolean |
isHoverClearing
Flag to check that the clear function is being called, if not, then it will not be possible to add hover data to the list. |
private int |
minHoverDistance
|
(package private) GeneralProjector.MouseHoverAdapter |
mouseHoverAdapter
|
static int |
NPARAMETERS
|
private GeneralProjector.ParameterType[] |
parmeterType
|
private GeneralProjector.ParameterUnits[] |
parmeterUnits
|
(package private) javax.swing.JComponent |
toolTipComponent
|
| Constructor Summary | |
|---|---|
GeneralProjector()
|
|
| Method Summary | |
|---|---|
boolean |
addHoverData(Coordinate3d coordinate3d,
PamDataUnit pamDataUnit)
|
boolean |
addHoverData(Coordinate3d coordinate3d,
PamDataUnit pamDataUnit,
int iSide)
|
void |
clearHoverList()
Any display that is using click hovering should call this at the start of their paintComponent(Graphics g) function. |
int |
findClosestDataUnitIndex(Coordinate3d coordinate3d)
|
int |
findClosestDataUnitIndex(Coordinate3d cTest,
int minDistance)
|
abstract Coordinate3d |
getCoord3d(double d1,
double d2,
double d3)
Function ultimately used by a PamDataBlock to convert it's own data, in whatever form that is in into screen coordinates. |
PamDataUnit |
getHoveredDataUnit()
|
GeneralProjector.MouseHoverAdapter |
getMouseHoverAdapter(javax.swing.JComponent component)
|
GeneralProjector.ParameterType |
getParmeterType(int iDim)
Returns the prameter type for a specific data type required by Coordinate3d |
GeneralProjector.ParameterUnits |
getParmeterUnits(int iDim)
Returns the prameter unit for a specific data type required by Coordinate3d |
void |
setParmeterType(int iDim,
GeneralProjector.ParameterType parmeterType)
Sets the parameter type for a specific data type required by Coordinate3d |
void |
setParmeterUnits(int iDim,
GeneralProjector.ParameterUnits parmeterUnits)
Sets the parameter unit for a specific data type required by Coordinate3d |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NPARAMETERS
private GeneralProjector.ParameterType[] parmeterType
private GeneralProjector.ParameterUnits[] parmeterUnits
boolean isHoverClearing
private int minHoverDistance
private java.util.List<Coordinate3d> hoverCoordinates
private java.util.List<PamDataUnit> hoverDataUnits
private java.util.List<java.lang.Integer> dataUnitSide
private PamDataUnit hoveredDataUnit
GeneralProjector.MouseHoverAdapter mouseHoverAdapter
javax.swing.JComponent toolTipComponent
| Constructor Detail |
|---|
public GeneralProjector()
| Method Detail |
|---|
public abstract Coordinate3d getCoord3d(double d1,
double d2,
double d3)
d1 - d2 and d3 are data representing whatever is appropriate for
the concrete instance of the projector (e.g. Latitude,
Longitude, depth, Time Frequency, etc)
public GeneralProjector.ParameterType getParmeterType(int iDim)
iDim - Dimension number (0 - 2)
public void setParmeterType(int iDim,
GeneralProjector.ParameterType parmeterType)
iDim - dimension number (0 - 2)parmeterType - Parameter Type (see enum ParmaeterType)public GeneralProjector.ParameterUnits getParmeterUnits(int iDim)
iDim - Dimension number (0 - 2)
public void setParmeterUnits(int iDim,
GeneralProjector.ParameterUnits parmeterUnits)
iDim - Dimension number (0 - 2)parmeterUnits - enum ParameterUnitpublic GeneralProjector.MouseHoverAdapter getMouseHoverAdapter(javax.swing.JComponent component)
public PamDataUnit getHoveredDataUnit()
public void clearHoverList()
PanelOverlayDraw
public boolean addHoverData(Coordinate3d coordinate3d,
PamDataUnit pamDataUnit)
public boolean addHoverData(Coordinate3d coordinate3d,
PamDataUnit pamDataUnit,
int iSide)
public int findClosestDataUnitIndex(Coordinate3d coordinate3d)
public int findClosestDataUnitIndex(Coordinate3d cTest,
int minDistance)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||