jview
Class JSkyGrid

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by jview.JNormalizedCanvas
                  extended by jview.JViewportCanvas
                      extended by jview.JFrameCanvas
                          extended by jview.JFitsCanvas
                              extended by jview.JSkyCanvas
                                  extended by jview.JSkyGrid
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, NormalizedCoordinates, NormalizedShapes, UserCoordinates, Zoomable, Initializable, ResourceAware, ResourceComposed, Savable

public class JSkyGrid
extends JSkyCanvas

A class that show a finding chart. JStarCatalogs can be added to the sky chart.

See Also:
Serialized Form

Nested Class Summary
static class JSkyGrid.Display
          Test the functionality.
 
Nested classes/interfaces inherited from class jview.JFitsCanvas
JFitsCanvas.Show
 
Nested classes/interfaces inherited from class jview.JFrameCanvas
JFrameCanvas.Test
 
Nested classes/interfaces inherited from class jview.JViewportCanvas
JViewportCanvas.ViewportKey
 
Nested classes/interfaces inherited from class jview.JNormalizedCanvas
JNormalizedCanvas.ShowImage
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String CONSTELLATION
          Set name of the ra/dec grid.
private static Color DEFCONSTELLATIONCOLOR
          Default grid color.
private static double DEFDEGRIDSTEP
          The key to grid ra steps.
private static Color DEFGRIDCOLOR
          Default grid color.
private static double DEFRAGRIDSTEP
          The key to grid ra steps.
private static boolean DEFSHOWCONSTELLATION
          Default constellation drawing.
private static boolean DEFSHOWGRID
          Default grid drawing.
static String GRID
          Set name of the ra/dec grid.
static String KEY_CONSTELLATIONCOLOR
          The key to constellations color.
static String KEY_DEGRIDSTEP
          The key to grid ra steps.
static String KEY_GRIDCOLOR
          The key to grid color.
static String KEY_RAGRIDSTEP
          The key to grid ra steps.
static String KEY_SHOWCONSTELLATION
          True, if the constellations should be displayed..
static String KEY_SHOWGRID
          True, if the grid should be displayed.
private static String SHOWCONSTELLATION
          The key to grid ra steps.
private static String SHOWGRID
          The key to grid ra steps.
 
Fields inherited from class jview.JSkyCanvas
A0, A5, B0, B5, CENTRAL, F0, F5, G0, G5, K0, K5, KEY_CENTRALCOLOR, KEY_FIXEDSTARSIZE, KEY_MAGLIMIT, KEY_MARKCENTER, KEY_USECATALOGCOLOR, M0, M5, M8, MX, O
 
Fields inherited from class jview.JFitsCanvas
ARRAY, KEY_FORMATWCS, KEY_HIGHMODE, KEY_KEEP, KEY_LOWKEEP, KEY_LOWMODE, KEY_MAXMAGNIFY, KEY_NEVERESTIMATESIZE, KEY_RGBGRAY, KEY_SCALING, KEY_SMARTKEEP, KEY_XTENSION, KEY_XTENSIONFLIP, WCS
 
Fields inherited from class jview.JFrameCanvas
KEY_ABSOLUTEHEIGHT, KEY_ABSOLUTEWIDTH, KEY_DRAWBOX, KEY_RELATIVEHEIGHT, KEY_RELATIVEWIDTH, KEY_TITLECOLOR, KEY_TITLEFONT, KEY_TITLEJUSTIFY, KEY_TITLEOFFSET, KEY_TITLETEXT, KEY_TOPCOLOR, KEY_TOPFONT, KEY_TOPJUSTIFY, KEY_TOPOFFSET, KEY_TOPSEPARATOR, KEY_TOPTEXT, KEY_XFRAME, KEY_XINSETABSOLUTE, KEY_XINSETRELATIVE, KEY_YFRAME, KEY_YINSETABSOLUTE, KEY_YINSETRELATIVE
 
Fields inherited from class jview.JViewportCanvas
MAXVIEW, VIEWPORTIMAGEPROPERTY, VIEWPORTPROPERTY
 
Fields inherited from class jview.JNormalizedCanvas
BACKGROUNDIMAGEPROPERTY, EXPORTACTION, GENERIC, inverse, KEY_BACKGROUND, KEY_CANVASNAME, KEY_CANVASTIP, KEY_CURSORCLASSES, KEY_CURSORPROPS, KEY_DRAWINGSETS, KEY_FOREGROUND, KEY_MAXIMUMHEIGHT, KEY_MAXIMUMWIDTH, KEY_MINIMUMHEIGHT, KEY_MINIMUMWIDTH, KEY_PREFERREDHEIGHT, KEY_PREFERREDWIDTH, KEY_PRINTFONT, KEY_PRINTFONTSCALE, KEY_PRINTSHAPESCALE, KEY_RESTORESHAPES, KEY_XFLIPIMAGE, KEY_YFLIPIMAGE, PRINTACTION, SAVEACTION, transform
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JSkyGrid(ResourceSupplying prop)
          Calls the superconstructor with no arguments.
 
Method Summary
private  void addConstellation(CoordinateTransforming radec)
          Adds the outline of the constellations.
private  void addGrid(CoordinateTransforming radec)
          Adds the grid at the predefined step size.
 void init()
          Adds the grid and constellation drawing info.
 void setComposedProperties(ResourceSupplying prop)
          Sets the composed properties of this component.
 void setUserTransformation(CoordinateTransforming radec)
          Adjusts constellation boundaries and grid lines to the new size.
 Action toggleConstellationDraw()
          Toggles the constellation-draw flag.
 Action toggleGridDraw()
          Toggles the grid-draw flag.
 
Methods inherited from class jview.JSkyCanvas
addCatalog, drawShapes, isEmpty, removeCatalog, setSection, toggleCenterDraw, toggleUseCatalogColor
 
Methods inherited from class jview.JFitsCanvas
clearHistogram, getArrayTransformation, getBinning, getDisplay, getDisplayDivide, getDisplayMap, getFits, getFITSImageBits, getFITSImageData, getFITSImageSize, getFITSImageValue, getFraction, getHdu, getHistogram, getHistogramBounds, getOffset, getPreferredSize, getScaling, getSkyTransformation, getTotalSize, getUserTransformation, getUserTransformation, getXtensionCount, reconstructHdu, revertFromFits, revertImage, scanFits, setFits, setFraction, setHistogramBounds, setScaling, setTotalSize, setUserTransformation, silentlySelectViewport
 
Methods inherited from class jview.JFrameCanvas
calculateActiveCanvas, calculateShapeTransform, getArea, isScreenInNormalized, paintObjects, prepareCanvas, wasReshaped
 
Methods inherited from class jview.JViewportCanvas
addAttachedViewport, addZoom, getViewport, getViewportImage, isMaximalViewport, isNormalizedOnScreen, removeAttachedViewport, resetViewport, selectArea, selectViewport, setViewportImage, transferView
 
Methods inherited from class jview.JNormalizedCanvas
addCrossCursor, addDrawable, addDrawable, addDrawable, addDrawingInfo, addLink, addLink, addPoint, addPoint, addText, addText, allInside, applyDrawingInfo, assignCursorLabel, clearAllDrawable, clearAllText, clearDrawable, clearText, createCanvasCursor, disabledCanvas, drawPoints, drawPointsMap, drawShapesMap, drawText, drawTextMap, firePropertyChange, getActions, getAllCanvasCursors, getAnimationInfo, getBackground, getBackgroundImage, getCanvasCursor, getClosest, getClosest, getClosest, getClosestShape, getComposedProperties, getFromName, getImageOperation, getInside, getInsideShapes, getInverseTransform, getLink, getLinkedTo, getMaximumSize, getMinimumSize, getNormalized, getNormalizedRect, getSaveBuffer, getScreen, getScreenRect, getShapeTransform, isFlipX, isFlipY, paintComponent, paintPointsList, paintShapesList, paintTextList, printComponent, removeDrawable, removeDrawable, removeLink, removeText, removeText, repaintLater, repaintNow, setBackgroundImage, setBounds, setComplete, setCursor, setCursor, setDrawable, setImageOperation, setLink, setPrepare, startAnimation, stopAnimation
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, 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
 
Methods inherited from interface jview.NormalizedCoordinates
getArea, getNormalized, getNormalizedRect, getScreen, getScreenRect, getViewport, isNormalizedOnScreen, isScreenInNormalized
 

Field Detail

GRID

public static final String GRID
Set name of the ra/dec grid.

See Also:
Constant Field Values

CONSTELLATION

public static final String CONSTELLATION
Set name of the ra/dec grid.

See Also:
Constant Field Values

KEY_RAGRIDSTEP

public static final String KEY_RAGRIDSTEP
The key to grid ra steps.

See Also:
Constant Field Values

KEY_DEGRIDSTEP

public static final String KEY_DEGRIDSTEP
The key to grid ra steps.

See Also:
Constant Field Values

KEY_GRIDCOLOR

public static final String KEY_GRIDCOLOR
The key to grid color.

See Also:
Constant Field Values

KEY_CONSTELLATIONCOLOR

public static final String KEY_CONSTELLATIONCOLOR
The key to constellations color.

See Also:
Constant Field Values

KEY_SHOWGRID

public static final String KEY_SHOWGRID
True, if the grid should be displayed.

See Also:
Constant Field Values

KEY_SHOWCONSTELLATION

public static final String KEY_SHOWCONSTELLATION
True, if the constellations should be displayed..

See Also:
Constant Field Values

SHOWGRID

private static final String SHOWGRID
The key to grid ra steps.

See Also:
Constant Field Values

SHOWCONSTELLATION

private static final String SHOWCONSTELLATION
The key to grid ra steps.

See Also:
Constant Field Values

DEFRAGRIDSTEP

private static final double DEFRAGRIDSTEP
The key to grid ra steps.

See Also:
Constant Field Values

DEFDEGRIDSTEP

private static final double DEFDEGRIDSTEP
The key to grid ra steps.

See Also:
Constant Field Values

DEFSHOWGRID

private static final boolean DEFSHOWGRID
Default grid drawing.

See Also:
Constant Field Values

DEFSHOWCONSTELLATION

private static final boolean DEFSHOWCONSTELLATION
Default constellation drawing.

See Also:
Constant Field Values

DEFGRIDCOLOR

private static final Color DEFGRIDCOLOR
Default grid color.


DEFCONSTELLATIONCOLOR

private static final Color DEFCONSTELLATIONCOLOR
Default grid color.

Constructor Detail

JSkyGrid

public JSkyGrid(ResourceSupplying prop)
Calls the superconstructor with no arguments.

Method Detail

setComposedProperties

public void setComposedProperties(ResourceSupplying prop)
Sets the composed properties of this component. Defaults the preferred size, the centerdraw toggle, the field-of-view and the B&W drawing.

Specified by:
setComposedProperties in interface ResourceAware
Overrides:
setComposedProperties in class JSkyCanvas

init

public void init()
Adds the grid and constellation drawing info.

Specified by:
init in interface Initializable
Overrides:
init in class JSkyCanvas

setUserTransformation

public void setUserTransformation(CoordinateTransforming radec)
Adjusts constellation boundaries and grid lines to the new size.

Specified by:
setUserTransformation in interface UserCoordinates
Overrides:
setUserTransformation in class JFitsCanvas

toggleGridDraw

public Action toggleGridDraw()
Toggles the grid-draw flag.


toggleConstellationDraw

public Action toggleConstellationDraw()
Toggles the constellation-draw flag.


addGrid

private void addGrid(CoordinateTransforming radec)
Adds the grid at the predefined step size. Remove the grid by clearing the grid-drawable.


addConstellation

private void addConstellation(CoordinateTransforming radec)
Adds the outline of the constellations. Remove them by clearing the constellation-drawable.