courselog.maputils
Class CalibratedMapBrowser

java.lang.Object
  extended by ewe.ui.ControlBase
      extended by ewe.ui.Control
          extended by courselog.AbstractImageDisplay
              extended by courselog.ImageBrowser
                  extended by courselog.maputils.CalibratedMapBrowser
All Implemented Interfaces:
ewe.fx.ImageRefresher, ewe.sys.TimerProc, ewe.ui.CellConstants, ewe.ui.ControlConstants, ewe.ui.EventListener, ewe.ui.UIConstants

public class CalibratedMapBrowser
extends ImageBrowser


Field Summary
 CalibratedMap cmMyMap
          My CalibratedMap
 ewe.fx.Pen currentPen
          Current drawing pen.
static ewe.fx.Pen DUALPEN
          Pen for dual drawing of points.
 boolean isMapModified
          Check if the map was modified.
 MapReferencePointDialog myDlg
          My reference point entry dialog.
static ewe.fx.Pen NORMALPEN
          Pen for normal drawing of points.
static int STATE_DISPLAYDOUBLE
          stateReferenceDisplay value if points are displayed and computed values are displayed too.
static int STATE_DISPLAYSIMPLE
          stateReferenceDisplay value if points only are displayed.
static int STATE_NODISPLAY
          stateReferenceDisplay value if points are not displayed.
 int stateReferenceDisplay
          Status to display reference points or not
 GeoDirection tmpGD
          temporary Direction object.
 ewe.fx.Point tmpPt
          temporary point object.
static int[] tXPt
          X values of polygon drawing a reference point.
static int[] tXPt2
          X values of polygon drawing a reference point computed position.
static int[] tYPt
          Y values of polygon drawing a reference point.
static int[] tYPt2
          Y values of polygon drawing a reference point computed position.
 
Fields inherited from class courselog.ImageBrowser
baseIImage, baseImageData, centerX, centerY, isReticuleOn, pReticule, scaleDisplay, tiReticuleX, tiReticuleY
 
Fields inherited from class courselog.AbstractImageDisplay
akdC, deltaScaleDisplay, dispImage, iEnterPressed, imageDelta, INTDBLPRESSMS, INTLGPRESSMS, iNumberEnterPressed, iOX, iOY, iStampWhenPressed, keEnter, notPenDragged, notPenHeld, poBase, poPress, tickerForEnter
 
Fields inherited from class ewe.ui.Control
_debug, backGround, beforeRemoved, borderColor, borderStyle, borderWidth, children, columns, constraints, DoPaintMethod, dragging, dragResolution, dragTime, exitKeys, fieldTransfer, font, foreGround, haveNativePaint, height, holdDownPause, holdTick, hotKey, image, lastSelected, listeners, maxHeight, maxWidth, menuState, minHeight, minWidth, modifiers, MyClass, name, next, np, parent, penStatus, popupSound, popupSoundClip, preferredHeight, preferredWidth, prev, prompt, promptControl, rows, ss, standardBorder, standardEdge, startDragResolution, tags, tail, text, toolTip, width, x, y
 
Fields inherited from class ewe.ui.ControlBase
clipItems, clipObject, clipOwner, curPoint, currentPenEvent, debugControl, debugFlag, DidHoldDown, doubleBuffer, doubleClickTime, firstPress, globalDrawFlat, globalEditable, globalEnabled, globalPalmStyle, globalSmallControls, GotPenDown, PenIsOn, pressPoint, TAG_LAST_USER_DATA, TAG_USER_DATA, TAKE_FIRST_PRESS, unnamed, useNativeTextInput
 
Fields inherited from interface ewe.ui.UIConstants
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN
 
Fields inherited from interface ewe.ui.CellConstants
BORDER, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, FIXEDSIZE, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST
 
Fields inherited from interface ewe.ui.ControlConstants
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, Disabled, DisablePopupMenu, DisplayOnly, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpKeyEvents, SendUpPenEvents, ShowSIP, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown
 
Fields inherited from interface ewe.fx.ImageRefresher
KEEP_VISIBLE
 
Constructor Summary
CalibratedMapBrowser(PositionTracer pT)
          Creates a new empty instance of CalibratedMapBrowser
 
Method Summary
 void actionOnPenClick(ewe.fx.Point p)
          Pen clickon the displayed image, display a dialog form to register a new reference point.
 void actionOnPenHeld(ewe.fx.Point p)
          Pen held, propose to delete closer reference point.
 void doublePressEnter(ewe.ui.KeyEvent kEv)
          Long press on enter, consider the center is pointed as a reference point if the reticule is displayed.
 void drawRefPointSymbolAt(ewe.fx.Image dest, int x, int y)
          Draw a point position.
 void drawRefPointSymbolAt(ewe.fx.Image dest, int x, int y, boolean rotByPI_4)
          Draw a point position.
 MapReferencePointDialog getMyDlg()
          Get current dialog.
 void reCenter()
          Re-center Calibrated map.
 void registerNewRefPoint(ewe.fx.Point pt)
          Register a new reference point.
 void setCalibratedMapFrom(java.lang.String imageFileName, ewe.fx.Image img)
          Set Calibrated map.
 void tryDeleteReferencepoint(ewe.fx.Point p)
          Try to delete closer reference point to the selected one.
 void updateDisplayedImage()
          Modify the displayed image to draw reference points.
 
Methods inherited from class courselog.ImageBrowser
actionOnLeftAppButton, actionOnRightAppButton, baseToDisplay, displayToBase, doPaint, rescaleImage, resizeTo, setBaseImage, setBaseImage, updateDisplayedImage
 
Methods inherited from class courselog.AbstractImageDisplay
directionButtonReleased, downButtonPressed, leftButtonPressed, longPressEnter, moveImage, onEvent, penDrag, penHeld, penPressed, penReleased, rightButtonPressed, setActionKeyDispatcher, shortPressEnter, ticked, upButtonPressed
 
Methods inherited from class ewe.ui.Control
acceptsData, activate, addListener, addTimer, amOnTopFrame, calculateSizes, calculateTextSize, cancelCut, cancelHoldDown, canEdit, chainDataChange, change, checkClipboardOperations, checkExitKey, checkMenu, checkMenuKey, checkModifiers, checkPenTransparent, clearTag, clipboardToString, clipboardTransfer, closeMenu, contains, contains, createGraphics, dataAccepted, dataBeingRemoved, dataDraggedOff, dataDraggedOver, dataDraggedOver, dataDroppedOn, dataTransferCancelled, deactivate, defaultTo, doAction, doActionKey, doBackground, doBorder, doHotKey, doMenu, dontAcceptDrop, doPaintChildren, doPaintChildren, doPaintChildren, doPaintData, doPaintData, doShowMenu, dragged, exitEntry, fillBackground, formClosing, fromClipboard, fromField, fromField, getAllDescendants, getAllSubControls, getBackground, getChildren, getChildrenBackwards, getClipboardMenu, getClipObject, getControlBuffer, getControlBuffer, getDataRect, getDataToCopy, getDataToDragAndDrop, getDim, getDisplayText, getDragAndDropContext, getFont, getFontMetrics, getFontMetrics, getForeground, getFrame, getFrameOrContainer, getGraphics, getImage, getLastSelected, getLocation, getMaximumSize, getMenu, getMinimumSize, getModifiers, getNext, getNextKeyFocus, getParent, getPasswordCharacter, getPosInFrame, getPosInParent, getPreferredSize, getPrompt, getPromptText, getRect, getRect, getServer, getSize, getSizes, getSubControls, getTag, getText, getToolTip, getWindow, gotFocus, hasModifier, hasPopupFormAttached, hasTag, inheritModifiers, isChildOf, isModal, isOnMe, isSomeonesHotKey, lostFocus, make, makeFrameTopMost, makeHot, menuIsActive, modify, modifyAll, modifyAll, notifyAction, notifyDataChange, notifyDataChange, notNative_doPaintChildren, oldButWorksDoPaintChildren, oldPaintChildren, oldPostEvent, onControlEvent, onKeyEvent, onLabelPenEvent, onPaint, onPenEvent, paintBackground, paintChildren, penClicked, penDoubleClicked, penRightReleased, popupBeep, popupMenuClosed, popupMenuEvent, popupMenuEvent, postEvent, recalculatePreferredSize, redisplay, refresh, removeListener, removeTimer, repaint, repaintDataNow, repaintNow, repaintNow, repaintNow, requestPaint, requestResizeTo, resetRect, restore, scrollAndRepaint, sendToListeners, set, setBorder, setCell, setClipObject, setControl, setCursor, setFixedSize, setFont, setHotKey, setHotKey, setLocation, setMaximumSize, setMenu, setMinimumSize, setPreferredSize, setPromptControl, setRect, setRect, setServer, setTag, setTags, setText, setTextSize, setToolTip, show, shown, standardOnKeyEvent, startDragAndDrop, startDragAndDrop, startDragging, stopDragging, takeData, takeFocus, takeFromClipboard, takePromptControl, testDim, toClipboard, toField, toField, toString, toTextData, transferPenPress, transferPenPress, tryDragAndDrop, tryNext, tryStartMenu, updateData, willAcceptDrop, willShowFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tXPt

public static final int[] tXPt
X values of polygon drawing a reference point.


tYPt

public static final int[] tYPt
Y values of polygon drawing a reference point.


tXPt2

public static final int[] tXPt2
X values of polygon drawing a reference point computed position.


tYPt2

public static final int[] tYPt2
Y values of polygon drawing a reference point computed position.


STATE_NODISPLAY

public static final int STATE_NODISPLAY
stateReferenceDisplay value if points are not displayed.

See Also:
Constant Field Values

STATE_DISPLAYSIMPLE

public static final int STATE_DISPLAYSIMPLE
stateReferenceDisplay value if points only are displayed.

See Also:
Constant Field Values

STATE_DISPLAYDOUBLE

public static final int STATE_DISPLAYDOUBLE
stateReferenceDisplay value if points are displayed and computed values are displayed too.

See Also:
Constant Field Values

isMapModified

public boolean isMapModified
Check if the map was modified.


cmMyMap

public CalibratedMap cmMyMap
My CalibratedMap


stateReferenceDisplay

public int stateReferenceDisplay
Status to display reference points or not


NORMALPEN

public static final ewe.fx.Pen NORMALPEN
Pen for normal drawing of points.


DUALPEN

public static final ewe.fx.Pen DUALPEN
Pen for dual drawing of points.


currentPen

public ewe.fx.Pen currentPen
Current drawing pen.


tmpPt

public ewe.fx.Point tmpPt
temporary point object.


tmpGD

public GeoDirection tmpGD
temporary Direction object.


myDlg

public MapReferencePointDialog myDlg
My reference point entry dialog.

Constructor Detail

CalibratedMapBrowser

public CalibratedMapBrowser(PositionTracer pT)
Creates a new empty instance of CalibratedMapBrowser

Method Detail

getMyDlg

public MapReferencePointDialog getMyDlg()
Get current dialog.


setCalibratedMapFrom

public void setCalibratedMapFrom(java.lang.String imageFileName,
                                 ewe.fx.Image img)
Set Calibrated map.


reCenter

public void reCenter()
Re-center Calibrated map.


tryDeleteReferencepoint

public void tryDeleteReferencepoint(ewe.fx.Point p)
Try to delete closer reference point to the selected one.


drawRefPointSymbolAt

public void drawRefPointSymbolAt(ewe.fx.Image dest,
                                 int x,
                                 int y)
Draw a point position.


drawRefPointSymbolAt

public void drawRefPointSymbolAt(ewe.fx.Image dest,
                                 int x,
                                 int y,
                                 boolean rotByPI_4)
Draw a point position.


registerNewRefPoint

public void registerNewRefPoint(ewe.fx.Point pt)
Register a new reference point.


updateDisplayedImage

public void updateDisplayedImage()
Modify the displayed image to draw reference points.


actionOnPenClick

public void actionOnPenClick(ewe.fx.Point p)
Pen clickon the displayed image, display a dialog form to register a new reference point.

Overrides:
actionOnPenClick in class ImageBrowser

actionOnPenHeld

public void actionOnPenHeld(ewe.fx.Point p)
Pen held, propose to delete closer reference point.

Overrides:
actionOnPenHeld in class ImageBrowser

doublePressEnter

public void doublePressEnter(ewe.ui.KeyEvent kEv)
Long press on enter, consider the center is pointed as a reference point if the reticule is displayed.

Overrides:
doublePressEnter in class AbstractImageDisplay
Parameters:
kEv - Key generating the move.