ccd
Class JCameraCanvas

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 ccd.JCameraCanvas
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, NormalizedCoordinates, NormalizedShapes, UserCoordinates, Zoomable, Initializable, ResourceAware, ResourceComposed, Savable

public class JCameraCanvas
extends JFitsCanvas

A fits canvas takes a FITS object and displays the image as the background image of a JViewportCanvas. Calls to JFitsCanvas.setScaling(int) allows different scaling algorithms to be used for the displayed images, as defined in the ScaleUtils class. It uses the jar-package from IVOA fits. It additinoally implements UserCoordinates to convert normalized coordinates into true CCD-pixel values. This cannot be done as a simple on-screen display, as we might have here scaling and windowing.

See Also:
Serialized Form

Nested Class Summary
static class JCameraCanvas.CameraCursor
          A camera cursor does not zoom the underlying component, but prepares for a new exposure with a normally lesser frame (the one selected)
static class JCameraCanvas.Show
          A test class.
 
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
private static String CAMERA
          Camera drawings.
private  Rectangle chipsize
          The chip size for restore in camera mode.
private static DrawingInfo DEFCAMERACOLOR
          Default generic color, if no foreground was set.
private static String DEFCAMERACURSOR
          Camera cursor name for ID.
private static boolean DEFCAMERAMODE
          Default camera modus.
private static String DEFCURSORCLASSES
          Default cursor classes, no special names.
static String KEY_CAMERACOLOR
          If true, selecting a viewport means preparing a new frame.
static String KEY_CAMERAMODE
          If true, selecting a viewport means preparing a new frame.
private  ShapeDraw nextview
          If the user selected a viewport, we wait for the next fits to apply.
private  Rectangle nextwindow
          If binning changes during viewport selection and exposure.
 
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
JCameraCanvas(ResourceSupplying prop)
          Constructs a new fits canvas from the properties.
 
Method Summary
 void clearNextWindow()
          Clears the next window.
 Rectangle getNextWindow()
          Gets the next window on the CCD in pixels.
 void init()
          Initializes the camera canvas by adding the camera drawing info.
 boolean isCameraMode()
          Return true if the canvas is in camera-mode.
 boolean resetViewport()
          Resets the viewport to show the entrie viewport.
 void setCameraMode(boolean mode)
          Sets the canvas into camera or default mode.
protected  void setChipSize(Dimension chip)
          Sets the chip size.
protected  void setChipSize(Rectangle chip)
          Sets the chip size.
 void setComposedProperties(ResourceSupplying prop)
          Defaults the scaling algorithm.
 void setFits(nom.tam.fits.Fits reload, int xorigin, int yorigin, int xbinning, int ybinning)
          Sets the fits image.
 
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, setFraction, setHistogramBounds, setScaling, setTotalSize, setUserTransformation, 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, 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, drawShapes, 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, isEmpty, 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

KEY_CAMERAMODE

public static final String KEY_CAMERAMODE
If true, selecting a viewport means preparing a new frame.

See Also:
Constant Field Values

KEY_CAMERACOLOR

public static final String KEY_CAMERACOLOR
If true, selecting a viewport means preparing a new frame.

See Also:
Constant Field Values

DEFCURSORCLASSES

private static final String DEFCURSORCLASSES
Default cursor classes, no special names.

See Also:
Constant Field Values

DEFCAMERAMODE

private static final boolean DEFCAMERAMODE
Default camera modus.

See Also:
Constant Field Values

DEFCAMERACOLOR

private static final DrawingInfo DEFCAMERACOLOR
Default generic color, if no foreground was set.


CAMERA

private static final String CAMERA
Camera drawings.

See Also:
Constant Field Values

DEFCAMERACURSOR

private static final String DEFCAMERACURSOR
Camera cursor name for ID.

See Also:
Constant Field Values

nextview

private ShapeDraw nextview
If the user selected a viewport, we wait for the next fits to apply.


nextwindow

private Rectangle nextwindow
If binning changes during viewport selection and exposure.


chipsize

private Rectangle chipsize
The chip size for restore in camera mode.

Constructor Detail

JCameraCanvas

public JCameraCanvas(ResourceSupplying prop)
Constructs a new fits canvas from the properties.

Method Detail

setComposedProperties

public void setComposedProperties(ResourceSupplying prop)
Defaults the scaling algorithm.

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

init

public void init()
Initializes the camera canvas by adding the camera drawing info.

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

setChipSize

protected void setChipSize(Dimension chip)
Sets the chip size.


setChipSize

protected void setChipSize(Rectangle chip)
Sets the chip size.


setFits

public void setFits(nom.tam.fits.Fits reload,
                    int xorigin,
                    int yorigin,
                    int xbinning,
                    int ybinning)
Sets the fits image. The background of the canvas is set according to the scaling algortihm of this component. If no total size has been set, we deduce it from the image size and the binning values active, i.e. we proceed as being this fits a CCD-fits from the main window.

Overrides:
setFits in class JFitsCanvas

getNextWindow

public Rectangle getNextWindow()
Gets the next window on the CCD in pixels.


clearNextWindow

public void clearNextWindow()
Clears the next window.


isCameraMode

public boolean isCameraMode()
Return true if the canvas is in camera-mode. Camera mode changes read-out window of next exposure.


setCameraMode

public void setCameraMode(boolean mode)
Sets the canvas into camera or default mode. Camera mode changes read-out window of next exposure.


resetViewport

public boolean resetViewport()
Resets the viewport to show the entrie viewport.

Overrides:
resetViewport in class JViewportCanvas