NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


healpix.plot3d.canvas3d
Class MapCanvas

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by javax.media.j3d.Canvas3D
              extended by healpix.plot3d.canvas3d.MapCanvas
All Implemented Interfaces:
RotateAble, ImageObserver, MenuContainer, Serializable, Accessible

public class MapCanvas
extends Canvas3D
implements RotateAble

Create Canvas 3D with tooltip behaviour and Color bar min/max displayed. Tooltip behaviour added to actually get info from a data sphere face. Transparency feature is present to give more interaction to the scene. Extends the code originally from G. Giardino. That itself claims to be a "Rehash" of Hipparcos Sky3d. Added features like tooltip and transparency function.

Version:
$Id: MapCanvas.java,v 1.1.2.4 2010/02/22 14:55:50 healpix Exp $
Author:
ejoliet
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
 
Field Summary
 HealpixMap theMap
          The map.
 
Fields inherited from class javax.media.j3d.Canvas3D
FIELD_ALL, FIELD_LEFT, FIELD_RIGHT
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MapCanvas()
          Creates a new MapCanvas object.
MapCanvas(boolean tooltip, float transp)
           
 
Method Summary
 BranchGroup createSceneGraph()
          Creates the scene graph.
 ColorBar getColorBar()
          Gets the ColorBar
 RotationInterpolator getRotationInterpolator()
          Getter.
 float getTransparency()
          Gets tranparency value
 boolean isToolTipEnabled()
          Gets the state of tootlip behaviour
 void setAll()
          Set the scene
 void setAll(int imap)
          Set the scene with the ith data map from HealpixMap loaded
 void setColname(String tmp)
          Set the map called from its name tmp
 void setColorBar(ColorBar cb)
          Set the color bar to be displayed
 void setFace(int f)
          Set the face to be displayed
 void setMap(HealpixMap map)
          Set the displayed HealpixMap
 void setMap(HealpixMap map, int ithmap)
          Set the displayed HealpixMap
 void setNside(int nside)
          Set the resolution number of the HealpixMap displayed
 void setToolTip(boolean isTrue)
          Set the tooltip beaviour state
 void setTransparency(float val)
          Set the transparency factor, representing the percent of tranparency. 0 is totally opaque -no tranparency-. 1 is totally transparent
 void setupScene()
          Set the scene if not before
 void setViewAll(boolean b)
          Specify whether to make all scene visible.
 void setViewAxis(boolean b)
          Specify whether to make axis visible.
 void setViewEquator(boolean b)
          Specify whether to make equator visible.
 void setViewGrid(boolean b)
          Specify whether to make grid visible.
 void setViewNest(boolean b)
          Specify whether to make face visible
 void showScene()
          Actually shows the scene with the sphere
 void updateFaces()
          Update faces.
 
Methods inherited from class javax.media.j3d.Canvas3D
addNotify, getBounds, getBounds, getCenterEyeInImagePlate, getDoubleBufferAvailable, getDoubleBufferEnable, getGraphics2D, getGraphicsContext3D, getHeight, getImagePlateToVworld, getInverseVworldProjection, getLeftEyeInImagePlate, getLeftManualEyeInImagePlate, getLocation, getLocation, getLocationOnScreen, getMonoscopicViewPolicy, getOffScreenBuffer, getOffScreenLocation, getOffScreenLocation, getPhysicalHeight, getPhysicalWidth, getPixelLocationFromImagePlate, getPixelLocationInImagePlate, getPixelLocationInImagePlate, getRightEyeInImagePlate, getRightManualEyeInImagePlate, getSceneAntialiasingAvailable, getScreen3D, getSize, getSize, getStereoAvailable, getStereoEnable, getView, getVworldProjection, getVworldToImagePlate, getWidth, getX, getY, isOffScreen, isRendererRunning, paint, postRender, postSwap, preRender, queryProperties, removeNotify, renderField, renderOffScreenBuffer, setDoubleBufferEnable, setLeftManualEyeInImagePlate, setMonoscopicViewPolicy, setOffScreenBuffer, setOffScreenLocation, setOffScreenLocation, setRightManualEyeInImagePlate, setStereoEnable, startRenderer, stopRenderer, swap, waitForOffScreenRendering
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

theMap

public HealpixMap theMap
The map.

Constructor Detail

MapCanvas

public MapCanvas()
Creates a new MapCanvas object.


MapCanvas

public MapCanvas(boolean tooltip,
                 float transp)
Parameters:
tooltip -
transp -
Method Detail

getRotationInterpolator

public RotationInterpolator getRotationInterpolator()
Description copied from interface: RotateAble
Getter.

Specified by:
getRotationInterpolator in interface RotateAble
Returns:
the interpolator object.

createSceneGraph

public BranchGroup createSceneGraph()
Creates the scene graph.

Returns:
the branch group

setupScene

public void setupScene()
Set the scene if not before


showScene

public void showScene()
Actually shows the scene with the sphere


setNside

public void setNside(int nside)
Set the resolution number of the HealpixMap displayed

Parameters:
nside - resolution number

setMap

public void setMap(HealpixMap map,
                   int ithmap)
Set the displayed HealpixMap

Parameters:
map - HealpixMap

setMap

public void setMap(HealpixMap map)
Set the displayed HealpixMap

Parameters:
map - HealpixMap

setColorBar

public void setColorBar(ColorBar cb)
Set the color bar to be displayed

Parameters:
cb - the ColorBar object

getColorBar

public ColorBar getColorBar()
Gets the ColorBar

Returns:
ColorBar

setViewAxis

public void setViewAxis(boolean b)
Specify whether to make axis visible.

Parameters:
b - axis is displayed if true

setViewGrid

public void setViewGrid(boolean b)
Specify whether to make grid visible.

Parameters:
b - whether visible.

setViewEquator

public void setViewEquator(boolean b)
Specify whether to make equator visible.

Parameters:
b - equator is shown if true

setViewAll

public void setViewAll(boolean b)
Specify whether to make all scene visible.

Parameters:
b - scene is shown if true

setViewNest

public void setViewNest(boolean b)
Specify whether to make face visible

Parameters:
b - face displayed only if true

setFace

public void setFace(int f)
Set the face to be displayed

Parameters:
f - face number

setAll

public void setAll(int imap)
Set the scene with the ith data map from HealpixMap loaded

Parameters:
imap - ith map in HealpixMap loaded

setAll

public void setAll()
Set the scene


setToolTip

public void setToolTip(boolean isTrue)
Set the tooltip beaviour state

Parameters:
isTrue - tooltip will be shown if true

isToolTipEnabled

public boolean isToolTipEnabled()
Gets the state of tootlip behaviour

Returns:
true if tooltip has been enabled

setColname

public void setColname(String tmp)
Set the map called from its name tmp

Parameters:
tmp - map name

setTransparency

public void setTransparency(float val)
Set the transparency factor, representing the percent of tranparency. 0 is totally opaque -no tranparency-. 1 is totally transparent

Parameters:
val - percent value of transparency (0.->1.)

getTransparency

public float getTransparency()
Gets tranparency value

Returns:
tranparency (%) value

updateFaces

public void updateFaces()
Update faces.


"Built from revision exported"

Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650