JEphem site
tig API
Build classes

jephem.tools
Class SkyMap

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--jephem.tools.SkyMapBase
                                |
                                +--jephem.tools.SkyMap
All Implemented Interfaces:
javax.accessibility.Accessible, ConstellationConstants, GeneralConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, SpaceConstants

public class SkyMap
extends SkyMapBase

A visual representation of a sky map. This class permits to specify the visual gadgets of a sky map : grid display; constellation display...
The core functionalities of a sky map are implemented in its super class, SkyMapBase.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int GRID_FULL
          Constant to indicate that the whole grid must be displayed.
static int GRID_NONE
          Constant to indicate that no grid must be displayed.
static int GRID_PLANE
          Constant to indicate that only the reference plane must be displayed.
 
Fields inherited from class jephem.tools.SkyMapBase
MINUS, PLUS, X, Y, Z
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface jephem.astro.sky.ConstellationConstants
And, Ant, Aps, Aql, Aqr, Ara, Ari, Aur, Boo, Cae, Cam, Cap, Car, Cas, Cen, Cep, Cet, Cha, Cir, CMa, CMi, Cnc, Col, Com, CrA, CrB, Crt, Cru, Crv, CVn, Cyg, Del, Dor, Dra, Equ, Eri, For, Gem, Gru, Her, Hor, Hya, Hyi, Ind, Lac, Leo, Lep, Lib, LMi, Lup, Lyn, Lyr, Men, Mic, Mon, Mus, NB_CONSTELLATIONS, Nor, Oct, Oph, Ori, Pav, Peg, Per, Phe, Pic, PsA, Pse, Pup, Pyx, Ret, Scl, Sco, Sct, Ser, SerA, SerB, Sex, Sge, Sgr, Tau, Tel, TrA, Tri, Tuc, UMa, UMi, Vel, Vir, Vol, Vul
 
Fields inherited from interface jephem.astro.spacetime.SpaceConstants
CARTESIAN, COORD_V0, COORD_V1, COORD_V2, COORD_X0, COORD_X1, COORD_X2, COORDGROUP_DELTA_BETA_LAMBDA, COORDGROUP_DIST_ALPHA_DELTA, COORDGROUP_RLB, COORDGROUP_XYZ, FRAME_EC_HELIO_GEOMETRIC, FRAME_ECLIPTIC, FRAME_EQUATORIAL, FRAME_GALACTIC, FRAME_HORIZONTAL_TOPOCENTRIC, FRAME_THEORY, LIGHT_VELOCITY, NB_COORDS, SPHERICAL
 
Fields inherited from interface tig.GeneralConstants
BLANK, FS, LS, NO_SPECIF, SPACE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
SkyMap()
          Unique constructor.
 
Method Summary
 void changeDisplayConstellationAbbreviations()
          Inverts the flag indicating if the constellation abbreviations must be displayed on the map.
 void changeDisplayConstellationBoundaries()
          Inverts the flag indicating if the constellation boundaries must be displayed on the map.
 void changeDisplayConstellationLines()
          Inverts the flag indicating if the constellation lines must be displayed on the map.
 void changeGridDisplay(int frame)
          Changes the grid display for the specified frame and repaints.
 int getGridDisplay(int whichFrame)
          Returns the "grid display" of this sky map.
 double getGridInterval(int whichFrame)
          Returns the "grid interval" of this sky map, in degrees.
 void paintComponent(java.awt.Graphics g)
          Paints the sky map on its display area.
 void setDisplayConstellationAbbreviations(boolean displayConstellationAbbreviations)
          Sets the flag indicating if the constellation abbreviations must be displayed on the map.
 void setDisplayConstellationBoundaries(boolean displayConstellationBoundaries)
          Sets the flag indicating if the constellation boundaries must be displayed on the map.
 void setDisplayConstellationLines(boolean displayConstellationLines)
          Sets the flag indicating if the constellation lines must be displayed on the map.
 void setGridDisplay(int whichFrame, int gridDisplay)
          Sets the "grid display" of this sky map.
 void setGridInterval(int whichFrame, double gridInterval)
          Sets the "grid interval" of this sky map, in degrees.
 
Methods inherited from class jephem.tools.SkyMapBase
drawCircle, getEyeMatrix, getZoom, rotateEye, setEyeMatrix, setEyeOrientation, setZoom
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GRID_FULL

public static final int GRID_FULL
Constant to indicate that the whole grid must be displayed.

See Also:
Constant Field Values

GRID_NONE

public static final int GRID_NONE
Constant to indicate that no grid must be displayed.

See Also:
Constant Field Values

GRID_PLANE

public static final int GRID_PLANE
Constant to indicate that only the reference plane must be displayed.

See Also:
Constant Field Values
Constructor Detail

SkyMap

public SkyMap()
Unique constructor. The base frame is set to equatorial frame.

Method Detail

changeDisplayConstellationAbbreviations

public void changeDisplayConstellationAbbreviations()
Inverts the flag indicating if the constellation abbreviations must be displayed on the map.


changeDisplayConstellationBoundaries

public void changeDisplayConstellationBoundaries()
Inverts the flag indicating if the constellation boundaries must be displayed on the map.


changeDisplayConstellationLines

public void changeDisplayConstellationLines()
Inverts the flag indicating if the constellation lines must be displayed on the map.


changeGridDisplay

public void changeGridDisplay(int frame)
Changes the grid display for the specified frame and repaints.


getGridDisplay

public int getGridDisplay(int whichFrame)
Returns the "grid display" of this sky map.

Parameters:
whichFrame - One of the supported frames, using SpaceConstants.FRAME_XXX constants.
Returns:
the grid display, expressed with GRID_XXX constants of this class.

getGridInterval

public double getGridInterval(int whichFrame)
Returns the "grid interval" of this sky map, in degrees.

Parameters:
whichFrame - One of the supported frames, using SpaceConstants.FRAME_XXX constants.

paintComponent

public void paintComponent(java.awt.Graphics g)
Paints the sky map on its display area.

Overrides:
paintComponent in class javax.swing.JComponent

setDisplayConstellationAbbreviations

public void setDisplayConstellationAbbreviations(boolean displayConstellationAbbreviations)
Sets the flag indicating if the constellation abbreviations must be displayed on the map.


setDisplayConstellationBoundaries

public void setDisplayConstellationBoundaries(boolean displayConstellationBoundaries)
Sets the flag indicating if the constellation boundaries must be displayed on the map.


setDisplayConstellationLines

public void setDisplayConstellationLines(boolean displayConstellationLines)
Sets the flag indicating if the constellation lines must be displayed on the map.


setGridDisplay

public void setGridDisplay(int whichFrame,
                           int gridDisplay)
Sets the "grid display" of this sky map.

Parameters:
whichFrame - One of the supported frames, using SpaceConstants.FRAME_XXX constants.
gridDisplay - Expressed with GRID_XXX constants of this class.

setGridInterval

public void setGridInterval(int whichFrame,
                            double gridInterval)
Sets the "grid interval" of this sky map, in degrees.

Parameters:
whichFrame - One of the supported frames, using SpaceConstants.FRAME_XXX constants.

JEphem site
tig API
Build classes