mWaba.gui
Class mCanvas

java.lang.Object
  |
  +--waba.ui.Control
        |
        +--waba.ui.Container
              |
              +--mWaba.gui.mControl
                    |
                    +--mWaba.gui.mCanvas
Direct Known Subclasses:
ImageControl, Mosaic, mPanel, ScrollableHolder

public class mCanvas
extends mControl
implements ScrollClient


Field Summary
 boolean hasBorder
           
 Point origin
           
 boolean raised
           
 boolean recessed
           
 ScrollServer scrollServer
           
 waba.fx.Rect 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
mCanvas()
           
 
Method Summary
 void checkScrolls()
           
 void doBorder(waba.fx.Graphics g)
           
 void doPaint(waba.fx.Graphics g, waba.fx.Rect area)
           
 void doScroll(int which, int action, int value)
           
 void fixOrigin()
           
 int getActual(int which)
           
 waba.fx.Image getBuffer()
           
 int getCurrent(int which)
           
 waba.fx.Rect getMySize()
           
protected  int getPercent(int size, int percent, int minimum)
           
 int getVisible(int which, int forSize)
           
 waba.fx.Rect getVisibleArea()
           
 void onScroll(int movedX, int movedY)
           
 void onSetOrigin()
           
 void reduceClip(waba.fx.Graphics g, waba.fx.Rect r)
           
 boolean scroll(int dx, int dy)
          Scroll the panel.
 boolean scroll(int dx, int dy, Point moved)
          Scroll the panel and save in moved, the amount of distance moved in x and y.
 boolean setOrigin(int nx, int ny, Point moved)
           
 void setServer(ScrollServer server)
           
 void updateScrollServer(int which)
           
 
Methods inherited from class mWaba.gui.mControl
add, addListener, addToFront, amFlat, amOnTopFrame, amSmall, calculatePreferredSize, callBack, checkHasModifier, checkPenTransparent, consume, contains, doBackground, doPaintChildren, doPaintData, dragged, 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, penPressed, penReleased, 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

hasBorder

public boolean hasBorder

virtualSize

public waba.fx.Rect virtualSize

raised

public boolean raised

recessed

public boolean recessed

scrollServer

public ScrollServer scrollServer

origin

public Point origin
Constructor Detail

mCanvas

public mCanvas()
Method Detail

getMySize

public waba.fx.Rect getMySize()

getBuffer

public waba.fx.Image getBuffer()

reduceClip

public void reduceClip(waba.fx.Graphics g,
                       waba.fx.Rect r)
Overrides:
reduceClip in class mControl

getVisibleArea

public waba.fx.Rect getVisibleArea()

fixOrigin

public void fixOrigin()

onScroll

public void onScroll(int movedX,
                     int movedY)

onSetOrigin

public void onSetOrigin()

setOrigin

public boolean setOrigin(int nx,
                         int ny,
                         Point moved)

getVisible

public int getVisible(int which,
                      int forSize)
Specified by:
getVisible in interface ScrollClient

getActual

public int getActual(int which)
Specified by:
getActual in interface ScrollClient

getCurrent

public int getCurrent(int which)
Specified by:
getCurrent in interface ScrollClient

checkScrolls

public void checkScrolls()

updateScrollServer

public void updateScrollServer(int which)

scroll

public boolean scroll(int dx,
                      int dy,
                      Point moved)
Scroll the panel and save in moved, the amount of distance moved in x and y.

scroll

public boolean scroll(int dx,
                      int dy)
Scroll the panel.

getPercent

protected int getPercent(int size,
                         int percent,
                         int minimum)

setServer

public void setServer(ScrollServer server)
Specified by:
setServer in interface ScrollClient

doScroll

public void doScroll(int which,
                     int action,
                     int value)
Specified by:
doScroll in interface ScrollClient

doBorder

public void doBorder(waba.fx.Graphics g)
Overrides:
doBorder in class mControl

doPaint

public void doPaint(waba.fx.Graphics g,
                    waba.fx.Rect area)
Overrides:
doPaint in class mControl