|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectewe.ui.ControlBase
ewe.ui.Control
courselog.AbstractImageDisplay
public abstract class AbstractImageDisplay
Class providing basic image display features. Allows to move, zoom.
Field Summary | |
---|---|
protected ActionKeysDispatcher |
akdC
Dispatcher of action keys. |
protected double |
deltaScaleDisplay
Modification of Scaling of display image. |
protected ewe.fx.Image |
dispImage
Display image. |
protected int |
iEnterPressed
Time Stamp of enter pressed. |
protected int |
imageDelta
Origin displacement when directionkey is touched. |
static int |
INTDBLPRESSMS
Interval between double press on enter. in milliseconds (==400) |
static int |
INTLGPRESSMS
Interval for long press on enter or pen in milliseconds (==500). |
protected int |
iNumberEnterPressed
Number of enter pressed. |
protected int |
iOX
Display image X offset when dragged. |
protected int |
iOY
Display image Y offset when dragged. |
protected int |
iStampWhenPressed
Time stamp of pen press. |
protected ewe.ui.KeyEvent |
keEnter
KeyEvent of first press on ENTER. |
protected boolean |
notPenDragged
Flag to check if penDrag event took place. |
protected boolean |
notPenHeld
Flag to check if penHeld event took place. |
protected ewe.fx.Point |
poBase
Point in baseImage for pen actions. |
protected ewe.fx.Point |
poPress
Point of first press on Pen. |
protected int |
tickerForEnter
Ticker id when Enter key is pressed. |
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 | |
---|---|
AbstractImageDisplay()
|
Method Summary | |
---|---|
abstract void |
actionOnPenClick(ewe.fx.Point p)
|
abstract void |
actionOnPenHeld(ewe.fx.Point p)
|
void |
directionButtonReleased(ewe.ui.KeyEvent kEv)
(up,down,left,right) was released. |
void |
doPaint(ewe.fx.Graphics g,
ewe.fx.Rect r)
Paint this control. |
void |
doublePressEnter(ewe.ui.KeyEvent kEv)
Double press on enter, does nothing. |
void |
downButtonPressed(ewe.ui.KeyEvent kEv)
Down button pressed, moves down the origin of the picture. |
void |
leftButtonPressed(ewe.ui.KeyEvent kEv)
Left button pressed, moves left the origin of the picture. |
void |
longPressEnter(ewe.ui.KeyEvent kEv)
Long press on enter, zoom out of the picture. |
void |
moveImage(int dx,
int dy)
Move picture quickly on the display. |
void |
onEvent(ewe.ui.Event ev)
Handle properly key end pen events. |
void |
penDrag(ewe.ui.PenEvent pEv)
Pen is dragged on the image. |
void |
penHeld(ewe.fx.Point p)
When pen is pressed on the image, the image moves with it. |
void |
penPressed(ewe.fx.Point p)
When pen is pressed on the image, the image moves with it. |
void |
penReleased(ewe.fx.Point p)
When pen is released, either it is the end of a click (short or long), either it is the end of a drag. |
abstract void |
rescaleImage(double byFactor)
Rescale the displayed image by a given factor. |
void |
rightButtonPressed(ewe.ui.KeyEvent kEv)
Right button pressed, moves right the origin of the picture. |
void |
setActionKeyDispatcher(ActionKeysDispatcher akdC)
This display can handle action keys if this method is called. |
void |
shortPressEnter(ewe.ui.KeyEvent kEv)
Short press on enter, does a zoom in of the picture. |
void |
ticked(int id,
int elapsed)
Get the tick for the double press on enter, otherwise, pass to super. |
void |
upButtonPressed(ewe.ui.KeyEvent kEv)
Up button pressed, moves up the origin of the picture. |
abstract void |
updateDisplayedImage(ewe.fx.Rect r,
int opt)
|
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, resizeTo, 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 |
---|
public static final int INTLGPRESSMS
public static final int INTDBLPRESSMS
protected ewe.fx.Image dispImage
protected double deltaScaleDisplay
protected int imageDelta
protected int iOX
protected int iOY
protected int iEnterPressed
protected int iNumberEnterPressed
protected int tickerForEnter
protected ewe.ui.KeyEvent keEnter
protected ActionKeysDispatcher akdC
protected ewe.fx.Point poPress
protected int iStampWhenPressed
protected boolean notPenHeld
protected boolean notPenDragged
protected ewe.fx.Point poBase
Constructor Detail |
---|
public AbstractImageDisplay()
Method Detail |
---|
public void moveImage(int dx, int dy)
dx
- move in x direction.dy
- move in y direction.public void penDrag(ewe.ui.PenEvent pEv)
pEv
- Gives the pen position.public void setActionKeyDispatcher(ActionKeysDispatcher akdC)
akdC
- Dispatcher to use. If null, no action.public void upButtonPressed(ewe.ui.KeyEvent kEv)
kEv
- Key generating the move.public void downButtonPressed(ewe.ui.KeyEvent kEv)
kEv
- Key generating the move.public void leftButtonPressed(ewe.ui.KeyEvent kEv)
kEv
- Key generating the move.public void rightButtonPressed(ewe.ui.KeyEvent kEv)
kEv
- Key generating the move.public void directionButtonReleased(ewe.ui.KeyEvent kEv)
kEv
- Key generating the move.updateDisplayedImage(Rect,int)
public void longPressEnter(ewe.ui.KeyEvent kEv)
kEv
- Key generating the move.public void shortPressEnter(ewe.ui.KeyEvent kEv)
kEv
- Key generating the move.public void doublePressEnter(ewe.ui.KeyEvent kEv)
kEv
- Key generating the move.public void onEvent(ewe.ui.Event ev)
onEvent
in interface ewe.ui.EventListener
onEvent
in class ewe.ui.Control
ev
- Event.public void doPaint(ewe.fx.Graphics g, ewe.fx.Rect r)
doPaint
in class ewe.ui.Control
g
- Graphic context.r
- rectangle to repaint.public void ticked(int id, int elapsed)
ticked
in interface ewe.sys.TimerProc
ticked
in class ewe.ui.Control
id
- the event of the tick.elapsed
- milliseconds elapsed.public void penReleased(ewe.fx.Point p)
penReleased
in class ewe.ui.Control
public void penHeld(ewe.fx.Point p)
penHeld
in class ewe.ui.Control
public void penPressed(ewe.fx.Point p)
penPressed
in class ewe.ui.Control
p
- point where it was pressed.public abstract void actionOnPenHeld(ewe.fx.Point p)
public abstract void actionOnPenClick(ewe.fx.Point p)
public abstract void updateDisplayedImage(ewe.fx.Rect r, int opt)
public abstract void rescaleImage(double byFactor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |