|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Canvas jfig.canvas.FigBasicCanvas jfig.canvas.TopLeftRulerCanvas
object canvas with rulers on the top and left sides.
FigCanvas
,
Serialized FormNested Class Summary |
Nested classes inherited from class jfig.canvas.FigBasicCanvas |
FigBasicCanvas.Options2D |
Nested classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class jfig.canvas.FigBasicCanvas |
backgroundColor, BASE_ANCHOR_X, BASE_ANCHOR_Y, canvasListener, cur_height, cur_width, cur_x, cur_y, debug, defaultColor, defaultCursor, enableRulerDragging, enableTimingInfo, gridColor, gridGR, gridMode, gridVisible, hasRulers, helper, mouse_drag_x, mouse_drag_y, n_grid, n_redraws, n_trials_to_create_offscreenImage, n_updates, objectEnumerator, objectGR, offscreenGR, offscreenImage, old_x, old_y, pdbg, printer, ptmp, redrawMode, rubberband, RULER_XL_OFFSET, RULER_XR_OFFSET, RULER_YB_OFFSET, RULER_YT_OFFSET, rulerFont, t_delay, t_grid, t_grid_mean, t_redraw, t_redraw_mean, theObserver, tmp_sc, tmp_wc, trafo, waitCursor, zoomListenerVector |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface jfig.canvas.FigCanvas |
FullRedraw, MouseMotionRedraw, NoChanges, ObjectRedraw, panDOWN, panHOME, panLEFT, panRIGHT, panUP, SyncRedraw, SystemRedraw, TmpObjectRedraw, TmpTextRedraw |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
TopLeftRulerCanvas()
TopLeftRulerCanvas |
Method Summary | |
void |
drawGrid(java.awt.Graphics gridGR)
Actually draw the grid, assuming that the offscreenBuffers are already created and of the right size. |
void |
drawRulers(java.awt.Graphics g)
drawRulers: draw the scale rulers on top and the right side of the canvas. |
void |
drawSlidersOnce(java.awt.Graphics g,
int x,
int y)
drawSlidersOnce: internal helper function to draw the sliders/cross-hatch at position (x,y). |
static void |
main(java.lang.String[] argv)
main(): simple self test of FigBasicCanvas inside a Frame. |
void |
mousePressed(java.awt.event.MouseEvent evt)
Handle mouseDown events: snap to the currently active grid, then call the parent mouseDown action function. |
void |
mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased() is used to detect mouseDrag() events. |
void |
setRulerOffsets()
calculate the offsets required when using rulers on this canvas. |
Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jfig.canvas.FigCanvas |
getCursor, getSize, setCursor |
Constructor Detail |
public TopLeftRulerCanvas()
The default viewer canvas doesn't use neither a grid nor snapping.
Method Detail |
public void setRulerOffsets()
FigCanvas
setRulerOffsets
in interface FigCanvas
setRulerOffsets
in class FigBasicCanvas
public void drawGrid(java.awt.Graphics gridGR)
drawGrid
in class FigBasicCanvas
gridGR
- the Graphics for drawing.public void drawRulers(java.awt.Graphics g)
drawRulers
in class FigBasicCanvas
public void drawSlidersOnce(java.awt.Graphics g, int x, int y)
drawSlidersOnce
in class FigBasicCanvas
public void mousePressed(java.awt.event.MouseEvent evt)
FigBasicCanvas
mousePressed
in interface FigCanvas
mousePressed
in class FigBasicCanvas
public void mouseReleased(java.awt.event.MouseEvent evt)
FigBasicCanvas
If both the current and the previous mouse_drag_(x,y) position lie in the rulers and differ by more than 5 pixels (to suppress small 'jitter'), we calculate the corresponding viewport panning.
In the future, we should probably provide some kind of visual feedback about the current drag amout by using mouseDrag() to update the rulers correspondingly.
mouseReleased
in interface FigCanvas
mouseReleased
in class FigBasicCanvas
public static void main(java.lang.String[] argv)
FigBasicCanvas
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |