stella.jview
Class JTargetHistory

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.JBoxedCanvas
                              extended by stella.jview.JTargetHistory
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, NormalizedCoordinates, NormalizedShapes, UserCoordinates, Zoomable, Initializable, ResourceAware, ResourceComposed, Savable

public class JTargetHistory
extends JBoxedCanvas
implements Zoomable

This class reads HistoryAware targets and scans their history for picks. It displays the time on the x-axis and the taret name on the y-axis. Successful picks are plotted as filled rectangles, while aborted executions (i.e. non-successful picks) are shown as crosses.

This class supports command-line arguments instead of a properties file.

See Also:
PropertyParser, Serialized Form

Nested Class Summary
private static class JTargetHistory.TargetNameFormat
          A special number formatter that translates the index of the target in y-direction to a target name.
private static class JTargetHistory.XShape
          An x-glyph like shape that can be shifted and sized.
 
Nested classes/interfaces inherited from class jview.JBoxedCanvas
JBoxedCanvas.Datum, JBoxedCanvas.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 ABORT
          The drawing info identifier for abort draws.
private static int ABSOULTEHEIGHT
          An absolute size-shrink to hold the dates at bottom.
private static Color BACKGROUND
          The default background.
private static boolean DEFABORT
          Show aborted (i.e.
private static Color DEFABORTCOLOR
          The default unknown user color.
private static Font DEFFONT
          The default font to use.
private static double DEFINCLINATION
          The inclination angle at which the merit or S/N should be shown.
private static int DEFMAXTARGETS
          The maximum number of targets per side.
private static DecimalFormat DEFMERITFORMAT
          Show pick merit if available.
private static double DEFMINWIDTH
          The minimum pixel width of successful bars.
private static double DEFMOUSEOFF
          If pick is further than this, reset.
private static int DEFNAMEEXTRA
          The extra inset for name labels.
private static int DEFPREFERREDWIDTH
          The default preferred width
private static boolean DEFSHOWCOORDINATE
          The default cursor position marking.
private static boolean DEFSHOWDELTAX
          The default delta x drawing.
private static boolean DEFSHOWDELTAY
          The default delta x drawing.
private static boolean DEFSHOWMERIT
          Show pick merit if available.
private static boolean DEFSHOWVALUE
          Show S/N if given.
private static boolean DEFSORTDATE
          Sort according to first observation.
private static boolean DEFSUCCESS
          Show successful targets.
private static Color DEFUNKNOWNCOLOR
          The default unknown user color.
private static DecimalFormat DEFVALUEFORMAT
          Default database value format.
private static boolean DRAWBOX
          We want a box.
private static Color FOREGROUND
          The default forground.
static String KEY_ABORT
          Show aborted targets.
static String KEY_ABORTCOLOR
          The color to use for aborted targets.
static String KEY_FONT
          The font to use for target names.
static String KEY_INCLINATION
          The inclination angle for merit and S/N
static String KEY_MAXTARGETS
          The key to the maximum targets per side.
static String KEY_MERITFORMAT
          Show merit (first number extracted from comment).
static String KEY_MINWIDTH
          The key to the minimum pixel width for successful bars.
static String KEY_MOUSEOFF
          If user clicks on blank canvas, we should supply an empty pick.
static String KEY_NAMEEXTRA
          The x-extra space for target name labels..
static String KEY_SHOWMERIT
          Show merit (first number extracted from comment).
static String KEY_SHOWVALUE
          True, if an obs-database value should be shown.
static String KEY_SORTDATE
          Sort targets for first observation or alphabeticallly.
static String KEY_SUCCESS
          Show successful targets.
static String KEY_UNKNOWNCOLOR
          The color to use for unknown users.
static String KEY_VALUEFORMAT
          Format on how to show the value.
static String KEY_VALUENAME
          Name of the value that should be shown.
private static int LABELAT
          We want labels only at the bottom.
private static double LABELYSTEP
          The big ticks=grid should be at each target.
private  Map meritlist
          All merits.
private static String MERITTOGGLE
          The label at the unzoom item.
private static double RELATIVEHEIGHT
          No need for bottom relative size.
private static double RELATIVEWIDTH
          No need for bottom relative size.
private  Map snlist
          All S/N.
private static String SNTOGGLE
          The label at the unzoom item.
private  Map targetcolor
          A mapping of target names to target colors.
private static int TICKAT
          We want ticks on top and bottom.
private static boolean TICKYGRID
          We want a horizontal grid.
private static String UNKNOWN
          The drawing info identifier for unknown users.
private static double XINSETRELATIVE
          The inset to the left.
private static double YINSETRELATIVE
          A relative inset in y.
 
Fields inherited from class jview.JBoxedCanvas
AUTODATE, BOTTOM, KEY_GRIDCOLOR, KEY_IGNOREFORMAT, KEY_LABELAT, KEY_LABELCOLOR, KEY_LABELXANGLE, KEY_LABELXAUTO, KEY_LABELXEND, KEY_LABELXEXTRA, KEY_LABELXFORMAT, KEY_LABELXINSIDE, KEY_LABELXSTART, KEY_LABELXSTEP, KEY_LABELYANGLE, KEY_LABELYAUTO, KEY_LABELYEND, KEY_LABELYEXTRA, KEY_LABELYFORMAT, KEY_LABELYINSIDE, KEY_LABELYSTART, KEY_LABELYSTEP, KEY_MAXLABELS, KEY_MAXTICKS, KEY_TICKAT, KEY_TICKCOLOR, KEY_TICKSTRETCH, KEY_TICKXAUTO, KEY_TICKXEND, KEY_TICKXGRID, KEY_TICKXINSIDE, KEY_TICKXSIZE, KEY_TICKXSTART, KEY_TICKXSTEP, KEY_TICKYAUTO, KEY_TICKYEND, KEY_TICKYGRID, KEY_TICKYINSIDE, KEY_TICKYSIZE, KEY_TICKYSTART, KEY_TICKYSTEP, KEY_XISDATE, KEY_XLOGARITHMIC, KEY_YISDATE, KEY_YLOGARITHMIC, LEFT, RIGHT, TOP
 
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
ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JTargetHistory(ResourceSupplying info)
          Constructs a new jtarget history parameter.
 
Method Summary
 boolean applyHistory(Map name2pick, Map pick2value)
          Applies a mapping of target names to HistoryAware.Picks of that target.
 boolean applyValue(String parameter, Format how)
          Changes the database value and format that should be displayed.
 HistoryAware.Pick getPick(Point mouse)
          Returns the pick event related to a mouse click on the canvas.
 void init()
          Adds the cursor.
 void paintComponent(Graphics g)
          The toggleable S/N and merits need extra treatment.
protected  void prepareCanvas(Graphics g)
          We prepare the canvas for plotting the data.
 void setComposedProperties(ResourceSupplying info)
          Add my defaults to the properties.
 void setTargetAndUserList(Map<String,String> targets, Map<String,? extends Paint> colors)
          The list of all targets is set from the outside.
 
Methods inherited from class jview.JBoxedCanvas
getBestDateFormat, getDefaultFormatX, getDefaultFormatY, getUserTransformation, getUserTransformation, printComponent, setUserTransformation, setUserTransformation, silentlySelectViewport, xIsDate, yIsDate
 
Methods inherited from class jview.JFrameCanvas
calculateActiveCanvas, calculateShapeTransform, getArea, isScreenInNormalized, paintObjects, 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, 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, getPreferredSize, getSaveBuffer, getScreen, getScreenRect, getShapeTransform, isEmpty, isFlipX, isFlipY, paintPointsList, paintShapesList, paintTextList, 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.Zoomable
selectArea, selectViewport
 
Methods inherited from interface jview.NormalizedCoordinates
getArea, getNormalized, getNormalizedRect, getScreen, getScreenRect, getViewport, isNormalizedOnScreen, isScreenInNormalized
 

Field Detail

KEY_SORTDATE

public static final String KEY_SORTDATE
Sort targets for first observation or alphabeticallly.

See Also:
Constant Field Values

KEY_SUCCESS

public static final String KEY_SUCCESS
Show successful targets.

See Also:
Constant Field Values

KEY_ABORT

public static final String KEY_ABORT
Show aborted targets.

See Also:
Constant Field Values

KEY_INCLINATION

public static final String KEY_INCLINATION
The inclination angle for merit and S/N

See Also:
Constant Field Values

KEY_SHOWVALUE

public static final String KEY_SHOWVALUE
True, if an obs-database value should be shown.

See Also:
Constant Field Values

KEY_VALUENAME

public static final String KEY_VALUENAME
Name of the value that should be shown.

See Also:
Constant Field Values

KEY_VALUEFORMAT

public static final String KEY_VALUEFORMAT
Format on how to show the value.

See Also:
Constant Field Values

KEY_SHOWMERIT

public static final String KEY_SHOWMERIT
Show merit (first number extracted from comment).

See Also:
Constant Field Values

KEY_MERITFORMAT

public static final String KEY_MERITFORMAT
Show merit (first number extracted from comment).

See Also:
Constant Field Values

KEY_MAXTARGETS

public static final String KEY_MAXTARGETS
The key to the maximum targets per side.

See Also:
Constant Field Values

KEY_MINWIDTH

public static final String KEY_MINWIDTH
The key to the minimum pixel width for successful bars.

See Also:
Constant Field Values

KEY_FONT

public static final String KEY_FONT
The font to use for target names.

See Also:
Constant Field Values

KEY_NAMEEXTRA

public static final String KEY_NAMEEXTRA
The x-extra space for target name labels..

See Also:
Constant Field Values

KEY_UNKNOWNCOLOR

public static final String KEY_UNKNOWNCOLOR
The color to use for unknown users.

See Also:
Constant Field Values

KEY_ABORTCOLOR

public static final String KEY_ABORTCOLOR
The color to use for aborted targets.

See Also:
Constant Field Values

KEY_MOUSEOFF

public static final String KEY_MOUSEOFF
If user clicks on blank canvas, we should supply an empty pick.

See Also:
Constant Field Values

DEFSORTDATE

private static final boolean DEFSORTDATE
Sort according to first observation.

See Also:
Constant Field Values

DEFSUCCESS

private static final boolean DEFSUCCESS
Show successful targets.

See Also:
Constant Field Values

DEFABORT

private static final boolean DEFABORT
Show aborted (i.e. non-successful) targets.

See Also:
Constant Field Values

DEFINCLINATION

private static final double DEFINCLINATION
The inclination angle at which the merit or S/N should be shown.

See Also:
Constant Field Values

DEFSHOWVALUE

private static final boolean DEFSHOWVALUE
Show S/N if given.

See Also:
Constant Field Values

DEFSHOWMERIT

private static final boolean DEFSHOWMERIT
Show pick merit if available.

See Also:
Constant Field Values

DEFMAXTARGETS

private static final int DEFMAXTARGETS
The maximum number of targets per side.

See Also:
Constant Field Values

DEFPREFERREDWIDTH

private static final int DEFPREFERREDWIDTH
The default preferred width

See Also:
Constant Field Values

DEFMINWIDTH

private static final double DEFMINWIDTH
The minimum pixel width of successful bars.

See Also:
Constant Field Values

DEFNAMEEXTRA

private static final int DEFNAMEEXTRA
The extra inset for name labels.

See Also:
Constant Field Values

DEFUNKNOWNCOLOR

private static final Color DEFUNKNOWNCOLOR
The default unknown user color.


DEFABORTCOLOR

private static final Color DEFABORTCOLOR
The default unknown user color.


DEFFONT

private static final Font DEFFONT
The default font to use.


DEFVALUEFORMAT

private static final DecimalFormat DEFVALUEFORMAT
Default database value format.


DEFMERITFORMAT

private static final DecimalFormat DEFMERITFORMAT
Show pick merit if available.


DRAWBOX

private static final boolean DRAWBOX
We want a box.

See Also:
Constant Field Values

XINSETRELATIVE

private static final double XINSETRELATIVE
The inset to the left. Must be big enough to hold target names.

See Also:
Constant Field Values

YINSETRELATIVE

private static final double YINSETRELATIVE
A relative inset in y.

See Also:
Constant Field Values

ABSOULTEHEIGHT

private static final int ABSOULTEHEIGHT
An absolute size-shrink to hold the dates at bottom.

See Also:
Constant Field Values

RELATIVEWIDTH

private static final double RELATIVEWIDTH
No need for bottom relative size.

See Also:
Constant Field Values

RELATIVEHEIGHT

private static final double RELATIVEHEIGHT
No need for bottom relative size.

See Also:
Constant Field Values

FOREGROUND

private static final Color FOREGROUND
The default forground.


BACKGROUND

private static final Color BACKGROUND
The default background.


TICKAT

private static final int TICKAT
We want ticks on top and bottom.

See Also:
Constant Field Values

LABELAT

private static final int LABELAT
We want labels only at the bottom.

See Also:
Constant Field Values

LABELYSTEP

private static final double LABELYSTEP
The big ticks=grid should be at each target.

See Also:
Constant Field Values

TICKYGRID

private static final boolean TICKYGRID
We want a horizontal grid.

See Also:
Constant Field Values

DEFMOUSEOFF

private static final double DEFMOUSEOFF
If pick is further than this, reset.

See Also:
Constant Field Values

DEFSHOWCOORDINATE

private static final boolean DEFSHOWCOORDINATE
The default cursor position marking.

See Also:
Constant Field Values

DEFSHOWDELTAX

private static final boolean DEFSHOWDELTAX
The default delta x drawing.

See Also:
Constant Field Values

DEFSHOWDELTAY

private static final boolean DEFSHOWDELTAY
The default delta x drawing.

See Also:
Constant Field Values

MERITTOGGLE

private static final String MERITTOGGLE
The label at the unzoom item.

See Also:
Constant Field Values

SNTOGGLE

private static final String SNTOGGLE
The label at the unzoom item.

See Also:
Constant Field Values

UNKNOWN

private static final String UNKNOWN
The drawing info identifier for unknown users.

See Also:
Constant Field Values

ABORT

private static final String ABORT
The drawing info identifier for abort draws.

See Also:
Constant Field Values

targetcolor

private Map targetcolor
A mapping of target names to target colors.


snlist

private Map snlist
All S/N.


meritlist

private Map meritlist
All merits.

Constructor Detail

JTargetHistory

public JTargetHistory(ResourceSupplying info)
Constructs a new jtarget history parameter. The targets are scanned in the init() section, where a list of plottable shapes is constructed.

Method Detail

setComposedProperties

public void setComposedProperties(ResourceSupplying info)
Add my defaults to the properties.

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

setTargetAndUserList

public void setTargetAndUserList(Map<String,String> targets,
                                 Map<String,? extends Paint> colors)
The list of all targets is set from the outside. This list is only used for linking target names to drawing infos. This look-up table is constructed here.

Parameters:
targets - A mapping of target names to user names.
colors - A mapping of user names to preferred colors.

init

public void init()
Adds the cursor.

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

applyValue

public boolean applyValue(String parameter,
                          Format how)
Changes the database value and format that should be displayed. The display can only be updated, if applyHistory(java.util.Map, java.util.Map) is called after this method.

Returns:
True, if applyHistory(java.util.Map, java.util.Map) should be called.

applyHistory

public boolean applyHistory(Map name2pick,
                            Map pick2value)
Applies a mapping of target names to HistoryAware.Picks of that target. The plot is sized to display all targets.


prepareCanvas

protected void prepareCanvas(Graphics g)
We prepare the canvas for plotting the data. Now we know that the component is showing, thus we can query the font rendering context and see, how much extra space we must provide on the left and right edge. Additionally, we plot the target names.

Overrides:
prepareCanvas in class JBoxedCanvas

getPick

public HistoryAware.Pick getPick(Point mouse)
Returns the pick event related to a mouse click on the canvas.


paintComponent

public void paintComponent(Graphics g)
The toggleable S/N and merits need extra treatment.

Overrides:
paintComponent in class JNormalizedCanvas