stella.jview
Class JSpectrumDisplay

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by jview.JExitFrame
                          extended by jview.JConfirmExitFrame
                              extended by jview.JBorderFrame
                                  extended by jview.JOpenFrame
                                      extended by jview.JClientFrame
                                          extended by stella.jview.JMasterDisplay
                                              extended by stella.jview.JDatabaseDisplay
                                                  extended by stella.jview.JSpectrumDisplay
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, Remote, EventListener, Accessible, RootPaneContainer, WindowConstants, BorderLabels, ClientLabels, Displayable, SpectrumLabels, PickListener, ClientObject, ExitCleaning, Initializable, PropertyAware, PropertyComposed, Refreshing

public class JSpectrumDisplay
extends JDatabaseDisplay
implements SpectrumLabels

Allows the extraction and display of one-dim data from the database. The right row has some pre-defined buttons with spectral ranges.

See Also:
Serialized Form

Nested Class Summary
static class JSpectrumDisplay.Client
          Launches as a listener.
static class JSpectrumDisplay.Save
          Launches a standalone version of spectrum display.
static class JSpectrumDisplay.Standalone
          Launches a standalone version of spectrum display.
 
Nested classes/interfaces inherited from class stella.jview.JMasterDisplay
JMasterDisplay.Show
 
Nested classes/interfaces inherited from class jview.JClientFrame
JClientFrame.ClientListener
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
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 ANIMATIONSTART
          Start animation action.
static String ANIMATIONSTOP
          Stop animation action.
private  JSpectrumCanvas canvas
          The canvas we display the spectrum in.
private static String DEFBINDNAME
          Default bind name.
private static String DEFDATEOBS
          The name of the dateobs field .
private static String DEFEXPTIME
          The name of the dateobs field .
private static String DEFFILEACTIONS
          The action commands used for identfiying file menu actions.
private static String DEFFITSHEAD
          The part of the file name before unique.
private static String DEFFITSTAIL
          The part of the file name after unique.
private static String DEFLOCALDIR
          The name of the local directory.
private static String DEFLOGG
          The name of the logg field.
private static String DEFLOGGERR
          The name of the logg error field.
private static String DEFMETAL
          The name of the metal field.
private static String DEFMETALERR
          The name of the metal error field.
private static String DEFOBJDEC
          The name of the object declination field .
private static String DEFOBJNAME
          The name of the object field .
private static String DEFOBJRA
          The name of the object right ascension field field .
private static String DEFONED
          The default class name that produced our spectral fits.
private static double DEFOVERMAX
          Maximum allowed superimposing offset .
private static double DEFOVERMIN
          Minimum allowed superimposing offset .
private static double DEFOVERSTEP
          Spinner stepwidth.
private static double DEFOVERVALUE
          Default overplotting offset.
private static String DEFREGIONBUTTONS
          The default regios.
private static String DEFREGIONRANGES
          Their angstroms as a double-linked list.
private static String DEFRESOURCEBUNDLES
          The resource bundles for localized labels and text.
private static String DEFSCPCOMMAND
          The scp command to copy to local directory.
private static DateFormat DEFSUBDIRFORMAT
          The name of the local directory.
private static String DEFTEFF
          The name of the Teff field.
private static String DEFTEFFERR
          The name of the Teff error field.
private static String DEFVHELIO
          The name of the rv field.
private static String DEFVHELIOERR
          The name of the rv error field.
private static String DEFVSINI
          The name of the vsini field.
private static String DEFVSINIERR
          The name of the vsini error field.
private  JButton deletelast
          Press this button to delete the most recently added spectrum.
private  JCheckBox errorbar
          Toggles error bars.
static String FITTED
          Name of one-dim spectrum.
static String KEY_DATEOBS
          The name of the object declination field .
static String KEY_EXPTIME
          The name of the object declination field .
static String KEY_FITSHEAD
          The part of the file name before unique.
static String KEY_FITSTAIL
          The part of the file name after unique.
static String KEY_LOCALDIR
          The name of the local directory.
static String KEY_LOGG
          The name of the logg field.
static String KEY_LOGGERR
          The name of the logg error field.
static String KEY_METAL
          The name of the metal field.
static String KEY_METALERR
          The name of the metal error field.
static String KEY_OBJDEC
          The name of the object declination field .
static String KEY_OBJNAME
          The name of the object field .
static String KEY_OBJRA
          The name of the object right ascension field field .
static String KEY_ONED
          The class name of the spectrum producer.
static String KEY_OVERMAX
          Maximum allowed superimposing offset .
static String KEY_OVERMIN
          Minimum allowed superimposing offset .
static String KEY_OVERSTEP
          Spinner stepwidth.
static String KEY_OVERVALUE
          Default overplotting offset.
static String KEY_REGIONBUTTONS
          The names of the wavelength region buttons.
static String KEY_REGIONRANGES
          To each name above, the order number.
static String KEY_SCPCOMMAND
          The scp command to copy to local directory.
static String KEY_SUBDIRFORMAT
          The name of the local directory.
static String KEY_TEFF
          The name of the Teff field.
static String KEY_TEFFERR
          The name of the Teff error field.
static String KEY_VHELIO
          The name of the rv field.
static String KEY_VHELIOERR
          The name of the rv error field.
static String KEY_VSINI
          The name of the vsini field.
static String KEY_VSINIERR
          The name of the vsini error field.
private  JLabel lamlam
          And the wavelength range for that.
private  MySpinner order
          The currently displayed order.
private static String ORDER
          Action command for spinner.
private  JCheckBox overplot
          Toggles overplotting of individual spectra.
private  MySpinner overstep
          The offset between individual overplotted spectra in normalized-y.
private  Map<String,Integer> regions
          Mapping of button names to Echelle order.
private  JCheckBox restframe
          Toggles doppler shift.
static String SPECTRUM
          Name of one-dim spectrum.
private static String STEP
          Action command for spinner.
 
Fields inherited from class stella.jview.JDatabaseDisplay
ISODATE, KEY_DONETABLE, KEY_ENVTABLE, KEY_OBJID, KEY_OBSTABLE, KEY_PERMISSIONTABLE, KEY_PROPOSALTABLE, KEY_REDUCEDTABLE, KEY_TARGETTABLE, KEY_TASKTABLE, KEY_USERNAME, KEY_USERTABLE
 
Fields inherited from class stella.jview.JMasterDisplay
KEY_BINDNAME, KEY_REFRESH, KEY_ROBOTPROPS, KEY_ROBOTSEQUENCE, KEY_SWITCHMONITOR, KEY_TELESCOPECHAR
 
Fields inherited from class jview.JClientFrame
CONNECTACTION, DISCONNECTACTION, KEY_CONNECTONINIT, KEY_ICONCONNECT, KEY_ICONDISCONNECT
 
Fields inherited from class jview.JOpenFrame
EMPTYACTION, EXITACTION, EXPORTACTION, KEY_FILEACTIONS, KEY_FILEHOME, OPENACTION, PRINTACTION, SAVEACTION
 
Fields inherited from class jview.JBorderFrame
DATACLEANSE, KEY_ABOUTURL, KEY_ACTIONCLASS, KEY_AIPLOGO, KEY_BIGGERSTRUT, KEY_DATAANALYSER, KEY_EASTALIGNMENT, KEY_FITTERS, KEY_FITTERTIPS, KEY_HELPSIZE, KEY_LESSERSTRUT, KEY_NOLOGO, KEY_NORTHALIGNMENT, KEY_SOUTHALIGNMENT, KEY_WESTALIGNMENT, MODELFITTER
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface jview.ClientLabels
KEY_CONNECTERROR, KEY_CONNECTTITLE, KEY_DISCONNECTERROR
 
Fields inherited from interface jview.BorderLabels
KEY_ABOUT, KEY_ABOUTACC, KEY_FILEACCS, KEY_FILEITEMS, KEY_FILEMENU, KEY_FILEMNEMONIC, KEY_HELPMENU, KEY_HELPMNEMONIC, KEY_HELPTITLE, KEY_NOHELP, KEY_NOURLACCESS, KEY_TITLE
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JSpectrumDisplay(Map<String,String> prop)
          Constructs a generic peripheral from a property container.
JSpectrumDisplay(PropertyBearing prop)
          Constructs a new quick-view display.
 
Method Summary
 void actionPerformed(ActionEvent ae)
          Grab the action buttons label and link it up with the regions.
private  boolean cacheData(Map<String,Object> db, Date obstime, long dur)
          We cache the entire quick-look spectrum, meaning that we materialize the database array and convert it into a list of vectors, linking wavelength to intensity.
protected  Component getExportRepresentation()
          For saving, we return the spectral component only
 FileFilter getOpenFilter()
          Returns a file filter allowing only fits files.
protected  Component getPrintRepresentation()
          For saving, we return the spectral component only
 Component getRepresentation()
          Returns the data canvas.
protected  Map<String,Method> getRequestedFields()
          The quick display request the scaling fields, the zero lambda and lamda stepwidth as well as the array itself.
protected  List<Object> getRightItems()
          To the right, we display the region buttons.
protected  Component getSaveRepresentation()
          For saving, we return the spectral component only
protected  String getTableName()
          Returns the table name.
 void init()
          On init, we try to convert the region buttons list to a lookup map of button labels to Point2Ds.
private  boolean loadSpectrum(String unique)
          We load the spectrum that has been transferred to the local machine.
protected  boolean openFile(File spec)
          Opens the file, which resides locally on the file system.
private  int[] openFitsFile(File spec, int order, double step)
          Opens the file, which resides locally on the file system.
protected  void printCenter()
          Prints the central component.
protected  boolean processExternally(HistoryAware.Pick pick)
          Tries to find the reduced spectrum in the archive and copies it to the local host.
protected  boolean processLocally(HistoryAware.Pick pick)
          Process the pick in a way that it retrieves the field needed from the database and updates the display.
 void setComposedProperties(PropertyBearing prop)
          Defaults some properties.
 
Methods inherited from class stella.jview.JDatabaseDisplay
getRequestedNames, getResultSetMethod, getUserName, lookUp, queryDatabase, queryDatabase, queryDatabase, querySingle
 
Methods inherited from class stella.jview.JMasterDisplay
connect, disconnect, execute, execute, getIcon, getRefreshInterval, isFixedRate, processPick, refresh, scanDir
 
Methods inherited from class jview.JClientFrame
abolishConnection, createConnect, establishConnection, exit, getBottomItems
 
Methods inherited from class jview.JOpenFrame
createCheckBoxMenuItem, createLocalizedCheckBoxMenuItem, exportCenter, getHelpActions, getMenus, getSaveFilter, populateMenu, saveFile
 
Methods inherited from class jview.JBorderFrame
analyserListenTo, createButton, createCheckBox, createDataAnalysers, createFitters, createHelp, createLabel, createLocalizedButton, createLocalizedCheckBox, createLocalizedHelp, createLocalizedLabel, createStatus, getAboutAction, getActiveFit, getBiggerStrut, getComposedProperties, getDataAnalysers, getFitterButtonGroup, getFitterComboBox, getLeftItems, getLesserStrut, getModelFittings, getStatusField, getTopItems, hasFired, printAlignment, setAlignment, setFired
 
Methods inherited from class jview.JConfirmExitFrame
disposeAndExit
 
Methods inherited from class jview.JExitFrame
setVisible
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, 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 util.PropertyComposed
getComposedProperties
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

SPECTRUM

public static final String SPECTRUM
Name of one-dim spectrum.

See Also:
Constant Field Values

FITTED

public static final String FITTED
Name of one-dim spectrum.

See Also:
Constant Field Values

ANIMATIONSTART

public static final String ANIMATIONSTART
Start animation action.

See Also:
Constant Field Values

ANIMATIONSTOP

public static final String ANIMATIONSTOP
Stop animation action.

See Also:
Constant Field Values

KEY_ONED

public static final String KEY_ONED
The class name of the spectrum producer.

See Also:
Constant Field Values

KEY_FITSHEAD

public static final String KEY_FITSHEAD
The part of the file name before unique.

See Also:
Constant Field Values

KEY_FITSTAIL

public static final String KEY_FITSTAIL
The part of the file name after unique.

See Also:
Constant Field Values

KEY_LOCALDIR

public static final String KEY_LOCALDIR
The name of the local directory.

See Also:
Constant Field Values

KEY_SUBDIRFORMAT

public static final String KEY_SUBDIRFORMAT
The name of the local directory.

See Also:
Constant Field Values

KEY_SCPCOMMAND

public static final String KEY_SCPCOMMAND
The scp command to copy to local directory.

See Also:
Constant Field Values

KEY_OBJNAME

public static final String KEY_OBJNAME
The name of the object field .

See Also:
Constant Field Values

KEY_OBJRA

public static final String KEY_OBJRA
The name of the object right ascension field field .

See Also:
Constant Field Values

KEY_OBJDEC

public static final String KEY_OBJDEC
The name of the object declination field .

See Also:
Constant Field Values

KEY_DATEOBS

public static final String KEY_DATEOBS
The name of the object declination field .

See Also:
Constant Field Values

KEY_EXPTIME

public static final String KEY_EXPTIME
The name of the object declination field .

See Also:
Constant Field Values

KEY_VHELIO

public static final String KEY_VHELIO
The name of the rv field.

See Also:
Constant Field Values

KEY_VHELIOERR

public static final String KEY_VHELIOERR
The name of the rv error field.

See Also:
Constant Field Values

KEY_VSINI

public static final String KEY_VSINI
The name of the vsini field.

See Also:
Constant Field Values

KEY_VSINIERR

public static final String KEY_VSINIERR
The name of the vsini error field.

See Also:
Constant Field Values

KEY_TEFF

public static final String KEY_TEFF
The name of the Teff field.

See Also:
Constant Field Values

KEY_TEFFERR

public static final String KEY_TEFFERR
The name of the Teff error field.

See Also:
Constant Field Values

KEY_LOGG

public static final String KEY_LOGG
The name of the logg field.

See Also:
Constant Field Values

KEY_LOGGERR

public static final String KEY_LOGGERR
The name of the logg error field.

See Also:
Constant Field Values

KEY_METAL

public static final String KEY_METAL
The name of the metal field.

See Also:
Constant Field Values

KEY_METALERR

public static final String KEY_METALERR
The name of the metal error field.

See Also:
Constant Field Values

KEY_REGIONBUTTONS

public static final String KEY_REGIONBUTTONS
The names of the wavelength region buttons.

See Also:
Constant Field Values

KEY_REGIONRANGES

public static final String KEY_REGIONRANGES
To each name above, the order number.

See Also:
Constant Field Values

KEY_OVERVALUE

public static final String KEY_OVERVALUE
Default overplotting offset.

See Also:
Constant Field Values

KEY_OVERMAX

public static final String KEY_OVERMAX
Maximum allowed superimposing offset .

See Also:
Constant Field Values

KEY_OVERMIN

public static final String KEY_OVERMIN
Minimum allowed superimposing offset .

See Also:
Constant Field Values

KEY_OVERSTEP

public static final String KEY_OVERSTEP
Spinner stepwidth.

See Also:
Constant Field Values

ORDER

private static final String ORDER
Action command for spinner.

See Also:
Constant Field Values

STEP

private static final String STEP
Action command for spinner.

See Also:
Constant Field Values

DEFBINDNAME

private static final String DEFBINDNAME
Default bind name.

See Also:
Constant Field Values

DEFONED

private static final String DEFONED
The default class name that produced our spectral fits.

See Also:
Constant Field Values

DEFOBJNAME

private static final String DEFOBJNAME
The name of the object field .

See Also:
Constant Field Values

DEFDATEOBS

private static final String DEFDATEOBS
The name of the dateobs field .

See Also:
Constant Field Values

DEFEXPTIME

private static final String DEFEXPTIME
The name of the dateobs field .

See Also:
Constant Field Values

DEFOBJRA

private static final String DEFOBJRA
The name of the object right ascension field field .

See Also:
Constant Field Values

DEFOBJDEC

private static final String DEFOBJDEC
The name of the object declination field .

See Also:
Constant Field Values

DEFVHELIO

private static final String DEFVHELIO
The name of the rv field.

See Also:
Constant Field Values

DEFVHELIOERR

private static final String DEFVHELIOERR
The name of the rv error field.

See Also:
Constant Field Values

DEFVSINI

private static final String DEFVSINI
The name of the vsini field.

See Also:
Constant Field Values

DEFVSINIERR

private static final String DEFVSINIERR
The name of the vsini error field.

See Also:
Constant Field Values

DEFTEFF

private static final String DEFTEFF
The name of the Teff field.

See Also:
Constant Field Values

DEFTEFFERR

private static final String DEFTEFFERR
The name of the Teff error field.

See Also:
Constant Field Values

DEFLOGG

private static final String DEFLOGG
The name of the logg field.

See Also:
Constant Field Values

DEFLOGGERR

private static final String DEFLOGGERR
The name of the logg error field.

See Also:
Constant Field Values

DEFMETAL

private static final String DEFMETAL
The name of the metal field.

See Also:
Constant Field Values

DEFMETALERR

private static final String DEFMETALERR
The name of the metal error field.

See Also:
Constant Field Values

DEFREGIONBUTTONS

private static final String DEFREGIONBUTTONS
The default regios.

See Also:
Constant Field Values

DEFREGIONRANGES

private static final String DEFREGIONRANGES
Their angstroms as a double-linked list.

See Also:
Constant Field Values

DEFFITSHEAD

private static final String DEFFITSHEAD
The part of the file name before unique.

See Also:
Constant Field Values

DEFFITSTAIL

private static final String DEFFITSTAIL
The part of the file name after unique.

See Also:
Constant Field Values

DEFLOCALDIR

private static final String DEFLOCALDIR
The name of the local directory.

See Also:
Constant Field Values

DEFSUBDIRFORMAT

private static final DateFormat DEFSUBDIRFORMAT
The name of the local directory.


DEFSCPCOMMAND

private static final String DEFSCPCOMMAND
The scp command to copy to local directory.

See Also:
Constant Field Values

DEFFILEACTIONS

private static final String DEFFILEACTIONS
The action commands used for identfiying file menu actions.

See Also:
Constant Field Values

DEFRESOURCEBUNDLES

private static final String DEFRESOURCEBUNDLES
The resource bundles for localized labels and text.

See Also:
Constant Field Values

DEFOVERVALUE

private static final double DEFOVERVALUE
Default overplotting offset.

See Also:
Constant Field Values

DEFOVERMAX

private static final double DEFOVERMAX
Maximum allowed superimposing offset .

See Also:
Constant Field Values

DEFOVERMIN

private static final double DEFOVERMIN
Minimum allowed superimposing offset .

See Also:
Constant Field Values

DEFOVERSTEP

private static final double DEFOVERSTEP
Spinner stepwidth.

See Also:
Constant Field Values

regions

private Map<String,Integer> regions
Mapping of button names to Echelle order.


order

private MySpinner order
The currently displayed order.


lamlam

private JLabel lamlam
And the wavelength range for that.


canvas

private JSpectrumCanvas canvas
The canvas we display the spectrum in.


errorbar

private JCheckBox errorbar
Toggles error bars.


restframe

private JCheckBox restframe
Toggles doppler shift.


overplot

private JCheckBox overplot
Toggles overplotting of individual spectra.


overstep

private MySpinner overstep
The offset between individual overplotted spectra in normalized-y.


deletelast

private JButton deletelast
Press this button to delete the most recently added spectrum.

Constructor Detail

JSpectrumDisplay

public JSpectrumDisplay(PropertyBearing prop)
                 throws RemoteException
Constructs a new quick-view display.

Throws:
RemoteException

JSpectrumDisplay

public JSpectrumDisplay(Map<String,String> prop)
                 throws RemoteException
Constructs a generic peripheral from a property container.

Throws:
RemoteException
Method Detail

setComposedProperties

public void setComposedProperties(PropertyBearing prop)
Defaults some properties.

Specified by:
setComposedProperties in interface PropertyAware
Overrides:
setComposedProperties in class JDatabaseDisplay

init

public void init()
On init, we try to convert the region buttons list to a lookup map of button labels to Point2Ds.

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

actionPerformed

public void actionPerformed(ActionEvent ae)
Grab the action buttons label and link it up with the regions.

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class JClientFrame

getRepresentation

public Component getRepresentation()
Returns the data canvas.

Specified by:
getRepresentation in interface Displayable
Overrides:
getRepresentation in class JBorderFrame

getOpenFilter

public FileFilter getOpenFilter()
Returns a file filter allowing only fits files.

Overrides:
getOpenFilter in class JOpenFrame

getSaveRepresentation

protected Component getSaveRepresentation()
For saving, we return the spectral component only

Overrides:
getSaveRepresentation in class JOpenFrame

getExportRepresentation

protected Component getExportRepresentation()
For saving, we return the spectral component only

Overrides:
getExportRepresentation in class JOpenFrame

getPrintRepresentation

protected Component getPrintRepresentation()
For saving, we return the spectral component only

Overrides:
getPrintRepresentation in class JOpenFrame

printCenter

protected void printCenter()
Prints the central component.

Overrides:
printCenter in class JOpenFrame

getRightItems

protected List<Object> getRightItems()
To the right, we display the region buttons. Additionally, we have a choosable range.

Overrides:
getRightItems in class JBorderFrame

getTableName

protected String getTableName()
Returns the table name.

Specified by:
getTableName in class JDatabaseDisplay

getRequestedFields

protected Map<String,Method> getRequestedFields()
The quick display request the scaling fields, the zero lambda and lamda stepwidth as well as the array itself.

Specified by:
getRequestedFields in class JDatabaseDisplay

processLocally

protected boolean processLocally(HistoryAware.Pick pick)
Process the pick in a way that it retrieves the field needed from the database and updates the display.

Specified by:
processLocally in class JMasterDisplay

processExternally

protected boolean processExternally(HistoryAware.Pick pick)
Tries to find the reduced spectrum in the archive and copies it to the local host.

Overrides:
processExternally in class JDatabaseDisplay

loadSpectrum

private boolean loadSpectrum(String unique)
We load the spectrum that has been transferred to the local machine.


openFile

protected boolean openFile(File spec)
Opens the file, which resides locally on the file system. Either if opened with a file on the command line, or after being notified with a unique pick ID.

Overrides:
openFile in class JMasterDisplay

openFitsFile

private int[] openFitsFile(File spec,
                           int order,
                           double step)
Opens the file, which resides locally on the file system. Returns the highest and lowest order available in that fits.


cacheData

private boolean cacheData(Map<String,Object> db,
                          Date obstime,
                          long dur)
We cache the entire quick-look spectrum, meaning that we materialize the database array and convert it into a list of vectors, linking wavelength to intensity.

Returns:
true, if cache was updated.