mWaba.gui.graphics
Class MosaicPanel

java.lang.Object
  |
  +--waba.ui.Control
        |
        +--waba.ui.Container
              |
              +--mWaba.gui.mControl
                    |
                    +--mWaba.gui.mCanvas
                          |
                          +--mWaba.gui.graphics.Mosaic
                                |
                                +--mWaba.gui.graphics.MosaicPanel
Direct Known Subclasses:
InteractivePanel

public class MosaicPanel
extends Mosaic


Field Summary
 boolean autoScrolling
           
protected  boolean canRest
           
protected  ImageDragContext dragged
           
 int dragRate
          Use this to set the number of milliseconds in between drag messages.
protected  boolean inPanel
           
protected  boolean isActive
           
protected  boolean isDragging
           
protected  boolean isOn
           
protected  boolean isScrolling
           
protected  Point lastPoint
           
 int minDragRate
          Use this to set the number of milliseconds in between drag messages.
protected  boolean needDrag
           
protected  AniImage onImage
           
protected  AniImage pressedImage
           
protected  int restCount
           
protected  AniImage restedImage
           
protected  boolean resting
           
 int scrollStep
           
protected  int xScroll
           
protected  int yScroll
           
 
Fields inherited from class mWaba.gui.graphics.Mosaic
backgroundImage, firstSnap, images, pauseSnapShots, quickDragging
 
Fields inherited from class mWaba.gui.mCanvas
hasBorder, origin, raised, recessed, scrollServer, virtualSize
 
Fields inherited from class mWaba.gui.mControl
_debug, AlwaysEnabled, AlwaysRecalculateSize, backGround, borderWidth, CapturesPen, columns, debugGui, defaultAddMeCellConstraints, defaultAddMeControlConstraints, DidHoldDown, Disabled, doubleBuffer, doubleClickTime, dragging, dragResolution, DrawFlat, emptySize, firstPress, fixedPreferredSize, fixedSize, ForceResize, foreGround, globalDrawFlat, globalEditable, globalEnabled, globalSmallControls, GotPenDown, GotPreferredSize, holdDownPause, holdTick, ImageChanged, Invisible, KeepImage, kids, listeners, modifiers, myFont, myFrame, NoFocus, NotAnEditor, NotEditable, PenTransparent, preferredSize, PreferredSizeOnly, pressPoint, prompt, SendUpKeyEvents, SendUpPenEvents, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, text, Transparent, WantDrag, WantHoldDown
 
Fields inherited from class waba.ui.Container
children, numChildren, tail
 
Fields inherited from class waba.ui.Control
height, next, parent, width, x, y
 
Constructor Summary
MosaicPanel()
           
 
Method Summary
 void activate()
          Allows mouse interaction with images on the
protected  void db(java.lang.String what)
           
 void deactivate()
          This deactivates detecting mouse interaction with the images on the panel.
 void dragged(DragContext mdc)
           
protected  ImageDragContext dragging(AniImage which)
          This should be called by mousePressed() or mouseDragged() to indicate to the panel that an image is being dragged.
protected  void dragging(ImageDragContext dc)
          This should be called by mousePressed() or mouseDragged() to indicate to the panel that an image is being dragged.
 boolean imageBeginDragged(AniImage which, Point pos)
          Indicates the mouse is attempting to drag an image.
 boolean imageDragged(ImageDragContext drag, Point pos)
          Indicates the mouse is dragging an image.
 boolean imageMovedOff(AniImage which)
          Indicates the mouse is no longer over an image.
 boolean imageMovedOn(AniImage which)
          Indicates the mouse is over an image without the mouse being down (yet).
 boolean imageNotDragged(ImageDragContext drag, Point pos)
          Indicates the mouse has released dragging an image.
 boolean imageNotRestingOn(AniImage which)
          Indicates the mouse is no longer resting on an image.
 boolean imagePressed(AniImage which, Point pos)
          Indicates the mouse is pressed on an image.
 boolean imageReleased(AniImage which, Point pos)
          Indicates the mouse is released from an image.
 boolean imageRestingOn(AniImage which)
          Indicates the mouse is resting on an image (after half second delay).
 boolean mouseEntered(waba.ui.PenEvent ev, Point pos)
          Indicates the mouse has entered the panel.
 boolean mouseExited(waba.ui.PenEvent ev, Point pos)
          Indicates the mouse has left the panel.
 boolean mouseMoved(waba.ui.PenEvent ev, Point pos)
          Indicates the mouse has left the panel.
 void penPressed(Point ev)
           
 void penReleased(Point ev)
           
 void setDragRate(int howLong)
           
 void setPressedImage(AniImage which)
           
 
Methods inherited from class mWaba.gui.graphics.Mosaic
addImage, addToSnapShot, confirmImage, doPaint, dropImage, paintMosaicBackground, refresh, refresh, refresh, refresh, removeFromSnapShot, removeImage, setMovingImage, takeSnapShot
 
Methods inherited from class mWaba.gui.mCanvas
checkScrolls, doBorder, doScroll, fixOrigin, getActual, getBuffer, getCurrent, getMySize, getPercent, getVisible, getVisibleArea, onScroll, onSetOrigin, reduceClip, scroll, scroll, setOrigin, setServer, updateScrollServer
 
Methods inherited from class mWaba.gui.mControl
add, addListener, addToFront, amFlat, amOnTopFrame, amSmall, calculatePreferredSize, callBack, checkHasModifier, checkPenTransparent, consume, contains, doBackground, doPaintChildren, doPaintData, editable, enabled, fixSizeAt, getBackground, getChildren, getChildren, getControlBuffer, getControlBuffer, getDim, getFont, getFontMetrics, getForeground, getFrame, getFrameOrContainer, getGraphics, getNext, getPosInFrame, getPreferredSize, getSurface, gotFocus, handedPenEvent, handOffPenEvent, handOffPenEvent, hasModifier, inheritModifiers, isOnMe, lostFocus, make, makeFrameTopMost, modify, modifyAll, modifyAll, notifyAction, onControlEvent, onEvent, onKeyEvent, onLabelPenEvent, onPaint, onPenEvent, paintBackground, paintChildren, penClicked, penDoubleClicked, penHeld, postEvent, recalculateSize, redisplay, remove, removeListener, repaint, repaintDataNow, repaintNow, repaintNow, requestCallBack, requestResizeTo, resetRect, resizeTo, restore, sendToListeners, set, setNext, setParent, setRect, show, shown, startDragging, stopDragging, ticked, visible
 
Methods inherited from class waba.ui.Container
findChild
 
Methods inherited from class waba.ui.Control
addTimer, contains, createGraphics, getFontMetrics, getMainWindow, getParent, getRect, removeTimer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isActive

protected boolean isActive

pressedImage

protected AniImage pressedImage

restedImage

protected AniImage restedImage

onImage

protected AniImage onImage

dragged

protected ImageDragContext dragged

isDragging

protected boolean isDragging

isScrolling

protected boolean isScrolling

needDrag

protected boolean needDrag

canRest

protected boolean canRest

resting

protected boolean resting

inPanel

protected boolean inPanel

isOn

protected boolean isOn

restCount

protected int restCount

xScroll

protected int xScroll

yScroll

protected int yScroll

scrollStep

public int scrollStep

autoScrolling

public boolean autoScrolling

minDragRate

public int minDragRate
Use this to set the number of milliseconds in between drag messages.

dragRate

public int dragRate
Use this to set the number of milliseconds in between drag messages.

lastPoint

protected Point lastPoint
Constructor Detail

MosaicPanel

public MosaicPanel()
Method Detail

setPressedImage

public void setPressedImage(AniImage which)

dragging

protected final void dragging(ImageDragContext dc)
This should be called by mousePressed() or mouseDragged() to indicate to the panel that an image is being dragged.

dragging

protected final ImageDragContext dragging(AniImage which)
This should be called by mousePressed() or mouseDragged() to indicate to the panel that an image is being dragged.

setDragRate

public void setDragRate(int howLong)

deactivate

public final void deactivate()
This deactivates detecting mouse interaction with the images on the panel. It still allows mouseEntered(), mouseExited() etc. If the mouse is on any image it will call mouseMovedOff() etc.

activate

public final void activate()
Allows mouse interaction with images on the

db

protected void db(java.lang.String what)

penPressed

public final void penPressed(Point ev)
Overrides:
penPressed in class mControl

dragged

public final void dragged(DragContext mdc)
Overrides:
dragged in class mControl

penReleased

public final void penReleased(Point ev)
Overrides:
penReleased in class mControl

mouseEntered

public boolean mouseEntered(waba.ui.PenEvent ev,
                            Point pos)
Indicates the mouse has entered the panel.

mouseExited

public boolean mouseExited(waba.ui.PenEvent ev,
                           Point pos)
Indicates the mouse has left the panel.

mouseMoved

public boolean mouseMoved(waba.ui.PenEvent ev,
                          Point pos)
Indicates the mouse has left the panel.

imagePressed

public boolean imagePressed(AniImage which,
                            Point pos)
Indicates the mouse is pressed on an image.

imageReleased

public boolean imageReleased(AniImage which,
                             Point pos)
Indicates the mouse is released from an image.

imageBeginDragged

public boolean imageBeginDragged(AniImage which,
                                 Point pos)
Indicates the mouse is attempting to drag an image. If you wish to drag the image return true. You can call the dragging() method to change the default ImageDragContext.

imageDragged

public boolean imageDragged(ImageDragContext drag,
                            Point pos)
Indicates the mouse is dragging an image. Will only be called if imageBeingDragged returned true.

imageNotDragged

public boolean imageNotDragged(ImageDragContext drag,
                               Point pos)
Indicates the mouse has released dragging an image.

imageMovedOn

public boolean imageMovedOn(AniImage which)
Indicates the mouse is over an image without the mouse being down (yet).

imageMovedOff

public boolean imageMovedOff(AniImage which)
Indicates the mouse is no longer over an image.

imageRestingOn

public boolean imageRestingOn(AniImage which)
Indicates the mouse is resting on an image (after half second delay).

imageNotRestingOn

public boolean imageNotRestingOn(AniImage which)
Indicates the mouse is no longer resting on an image.