|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an interface to define the basic operations required to draw FIG objects.
Field Summary | |
static int |
FullRedraw
|
static int |
MouseMotionRedraw
|
static int |
NoChanges
|
static int |
ObjectRedraw
|
static int |
panDOWN
|
static int |
panHOME
|
static int |
panLEFT
|
static int |
panRIGHT
|
static int |
panUP
|
static int |
SyncRedraw
|
static int |
SystemRedraw
|
static int |
TmpObjectRedraw
|
static int |
TmpTextRedraw
|
Method Summary | |
void |
addCanvasListener(FigCanvasListener listener)
|
void |
addZoomListener(ZoomListener zl)
|
void |
blitOffscreenBuffer(java.awt.Graphics g)
|
void |
blitOffscreenBufferClipped(java.awt.Graphics g)
|
void |
changeRubberbandMode(int new_mode)
|
void |
changeRubberbandMode(int mode,
FigTrafo2D t,
java.lang.Object b)
|
void |
changeRubberbandMode(int new_mode,
GeometryManager gm)
|
void |
clippedDrawTmpObject(java.awt.Graphics g)
|
void |
doFullRedraw()
doFullRedraw(): redraw everything... |
void |
doFullRedraw(long millis)
|
void |
doMotionRedraw()
|
void |
doObjectRedraw()
|
void |
doPanning(int direction,
boolean shift)
|
void |
doSimpleRedraw()
|
void |
doSyncRedraw()
method stub for synchronous repaints: FigCanvas itself just provides a doSimpleRedraw(). |
void |
doSystemRedraw()
|
void |
doTextRedraw()
|
void |
doToggleRubberbandDebug()
|
void |
doZoom11()
restore to zoom-factor 1 and origin (0,0) |
void |
doZoomFit()
doZoomFit(): calculate the bounding box of all objects from our FigDrawableEnumerator, then set the zoom and panning so that all objects are visible. |
void |
doZoomFull()
restore to zoom factor 1 |
void |
doZoomIn()
zoom in by a factor of two. |
void |
doZoomOut()
|
void |
doZoomRegion(int wx,
int wy,
int wx2,
int wy2)
doZoomRegion(): zoom into the world coordinate region given by corners (wx,wy) and (wx2, wy2). |
void |
drawAllObjects(java.awt.Graphics g)
drawAllObjects(): This traverses the parent's object list and draws all objects found and visible. |
void |
drawObject(java.awt.Graphics g,
FigObject object)
|
void |
drawSlidersAndCursor(java.awt.Graphics g,
boolean erase)
|
void |
drawTmpObjects(java.awt.Graphics g)
|
void |
eraseObject(java.awt.Graphics g,
FigObject object)
|
void |
flush()
call flush() on any offscreen buffers this canvas might have used. |
java.awt.Color |
getBackground()
|
java.awt.Component |
getComponent()
return the AWT/Swing component that actually implements the canvas |
java.awt.Cursor |
getCursor()
|
boolean |
getDebug()
|
java.awt.Color |
getGridColor()
|
java.awt.Point |
getMousePosition()
|
FigDrawableEnumerator |
getObjectEnumerator()
|
java.awt.Graphics |
getOffscreenGraphics()
return a reference to the offscreen Graphics when double-buffering |
java.awt.Dimension |
getSize()
|
FigTrafo2D |
getTrafo()
return the current coordinate transformation used for this canvas. |
java.awt.Point |
getViewportWCmax()
return the world coordinates of the right-bottom corner of this canvas (depending on it's size and the zoom-factor). |
FigBbox |
getVisibleRegionBoundingBox()
|
boolean |
gotFocus()
|
void |
handleRedraw(java.awt.Graphics g)
|
void |
mouseClicked(java.awt.event.MouseEvent evt)
|
void |
mouseDragged(java.awt.event.MouseEvent evt)
|
void |
mouseEntered(java.awt.event.MouseEvent evt)
|
void |
mouseExited(java.awt.event.MouseEvent evt)
|
void |
mouseMoved(java.awt.event.MouseEvent evt)
|
void |
mousePressed(java.awt.event.MouseEvent evt)
|
void |
mouseReleased(java.awt.event.MouseEvent evt)
|
void |
msg(java.lang.String msg)
print msgs to console window or stdout |
void |
notifyZoomListeners()
|
void |
paint(FigDrawable obj)
a method that allows animated objects to update their current state. |
void |
paint(FigDrawable obj,
int millis)
repaint an (animated) object within millis milliseconds. |
void |
paint(java.awt.Graphics g)
|
void |
printTimingStats()
|
void |
removeZoomListener(ZoomListener zl)
|
void |
repaint(int millis)
request a standard repaint after (at most) millis milliseconds. |
void |
requestAntiAliasing(boolean b)
|
void |
requestRenderQuality(boolean b)
|
void |
setBackground(java.awt.Color c)
|
void |
setConsole(ConsoleMessage printer)
set the msg console |
void |
setCursor(java.awt.Cursor c)
|
void |
setDebug(boolean debug)
|
void |
setDefaultCursor(java.awt.Cursor c)
|
void |
setEnableRulerDragging(boolean b)
|
void |
setGrid(int gridMode)
set a new grid spacing. |
void |
setGridColor(java.awt.Color c)
|
void |
setObjectEnumerator(FigDrawableEnumerator enumerator)
specify the object that will provide this canvas with the Enumeration of drawable objects. |
void |
setRubberbandAspect(double d)
|
void |
setRubberbandBasePoint(int sx,
int sy)
|
void |
setRubberbandBasePoint(java.awt.Point sp)
|
void |
setRubberbandBasePoint2(int sx,
int sy)
|
void |
setRubberbandBasePoint2(java.awt.Point P)
|
void |
setRubberbandShowLineLengths(boolean b)
|
void |
setRulerOffsets()
calculate the offsets required when using rulers on this canvas. |
void |
setStatusMessage(StatusMessage helper)
|
void |
setTrafo(FigTrafo2D trafo)
set the coordinate transformation for this canvas. |
void |
showRulers(boolean b)
|
void |
statusMessage(java.lang.String msg)
show or print status msgs |
void |
synchronousRepaint()
request a synchronous repaint of all pending animation repaints. |
void |
update(java.awt.Graphics g)
|
Field Detail |
public static final int NoChanges
public static final int MouseMotionRedraw
public static final int SyncRedraw
public static final int TmpTextRedraw
public static final int TmpObjectRedraw
public static final int SystemRedraw
public static final int ObjectRedraw
public static final int FullRedraw
public static final int panHOME
public static final int panLEFT
public static final int panRIGHT
public static final int panUP
public static final int panDOWN
Method Detail |
public void setRulerOffsets()
public void setDebug(boolean debug)
public boolean getDebug()
public FigTrafo2D getTrafo()
public void setTrafo(FigTrafo2D trafo)
public java.awt.Component getComponent()
public java.awt.Graphics getOffscreenGraphics()
public void flush()
public void setDefaultCursor(java.awt.Cursor c)
public void setCursor(java.awt.Cursor c)
public java.awt.Cursor getCursor()
public java.awt.Dimension getSize()
public void addCanvasListener(FigCanvasListener listener)
public void setObjectEnumerator(FigDrawableEnumerator enumerator)
public FigDrawableEnumerator getObjectEnumerator()
public void statusMessage(java.lang.String msg)
public void setStatusMessage(StatusMessage helper)
public void msg(java.lang.String msg)
public void setConsole(ConsoleMessage printer)
public void setBackground(java.awt.Color c)
public java.awt.Color getBackground()
public void setGridColor(java.awt.Color c)
public java.awt.Color getGridColor()
public java.awt.Point getMousePosition()
public void showRulers(boolean b)
public void mousePressed(java.awt.event.MouseEvent evt)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent evt)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent evt)
mouseExited
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent evt)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged
in interface java.awt.event.MouseMotionListener
public boolean gotFocus()
public void doPanning(int direction, boolean shift)
public void paint(java.awt.Graphics g)
public void paint(FigDrawable obj)
paint
in interface ObjectPainter
public void paint(FigDrawable obj, int millis)
paint
in interface ObjectPainter
public void repaint(int millis)
repaint
in interface ObjectPainter
public void synchronousRepaint()
synchronousRepaint
in interface SyncPainter
public void update(java.awt.Graphics g)
public void handleRedraw(java.awt.Graphics g)
public void drawTmpObjects(java.awt.Graphics g)
public void clippedDrawTmpObject(java.awt.Graphics g)
public void blitOffscreenBuffer(java.awt.Graphics g)
public void blitOffscreenBufferClipped(java.awt.Graphics g)
public void printTimingStats()
public void doFullRedraw()
doFullRedraw
in interface FullRedraw
public void doFullRedraw(long millis)
doFullRedraw
in interface FullRedraw
public void doSimpleRedraw()
public void doTextRedraw()
public void doObjectRedraw()
public void doMotionRedraw()
public void doSystemRedraw()
public void doSyncRedraw()
This method should be overridden by subclasses as necessary.
public void drawSlidersAndCursor(java.awt.Graphics g, boolean erase)
public void eraseObject(java.awt.Graphics g, FigObject object)
public void drawObject(java.awt.Graphics g, FigObject object)
public java.awt.Point getViewportWCmax()
public FigBbox getVisibleRegionBoundingBox()
public void drawAllObjects(java.awt.Graphics g)
g
- the graphics-context to draw into (e.g. the FigCanvas
screen or the offscreenImage buffer).public void setGrid(int gridMode)
This function implies a full redraw, in order to generate the new grid.
public void doZoomOut()
public void doZoomIn()
public void doZoomFull()
public void doZoom11()
public void doZoomRegion(int wx, int wy, int wx2, int wy2)
public void doZoomFit()
public void addZoomListener(ZoomListener zl)
public void removeZoomListener(ZoomListener zl)
public void notifyZoomListeners()
public void changeRubberbandMode(int new_mode)
public void changeRubberbandMode(int new_mode, GeometryManager gm)
public void changeRubberbandMode(int mode, FigTrafo2D t, java.lang.Object b)
public void setRubberbandBasePoint(java.awt.Point sp)
public void setRubberbandBasePoint(int sx, int sy)
public void setRubberbandBasePoint2(java.awt.Point P)
public void setRubberbandBasePoint2(int sx, int sy)
public void setRubberbandAspect(double d)
public void doToggleRubberbandDebug()
public void setRubberbandShowLineLengths(boolean b)
public void requestRenderQuality(boolean b)
public void requestAntiAliasing(boolean b)
public void setEnableRulerDragging(boolean b)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |