|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--com.vistech.imageviewer.ImageCanvas
|
+--com.vistech.imageviewer.ImageCanvas2D
|
+--com.vistech.imageviewer.CompositeCanvas2D
A canvas class for drawing graphics over images.
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected java.awt.Shape |
currentShape
|
protected int |
imageHeight
|
protected int |
imageWidth
|
protected int |
offsetX
|
protected int |
offsetY
|
protected int |
viewerHt
|
protected int |
viewerWid
|
| Fields inherited from class com.vistech.imageviewer.ImageCanvas2D |
atx, dispModeAtx, flipAtx, interpolationType, magCenterX, magCenterY, magFactor, magOn, panOffset, rotateOn, rotationAngle, rotationCenterX, rotationCenterY, shearFactor, shearOn, shearX, shearY, zoomOffset |
| Fields inherited from class com.vistech.imageviewer.ImageCanvas |
bufferedImage, clipShape, dispGc, displayImage, displayMode, flipMode, height, imageType, invertOn, offScrGc, offScrImage, originalImageType, paintFlag, PRINT_SIZE_ACTUAL, PRINT_SIZE_PAGE, printLoc, printMode, printSize, width |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface com.vistech.imageviewer.ImageDisplay |
TYPE_AWT_IMAGE, TYPE_BUFFERED_IMAGE |
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
CompositeCanvas2D()
|
|
CompositeCanvas2D(java.awt.image.BufferedImage img,
int wid,
int ht)
|
|
| Method Summary | |
void |
drawShape(java.awt.Shape s)
Draws a shape on the canvas. |
void |
eraseShapes()
Erases shapes drawn on the canvas. |
void |
fillShape(java.awt.Shape s)
Fills the specified shape. |
java.awt.geom.AffineTransform |
getAllAtx()
Gets the current transformation that includes the transformation computed for setting the display and flip modes. |
java.awt.image.BufferedImage |
getDisplayedImage()
Returns the image displayed on the canvas. |
java.awt.Graphics2D |
getDisplayedImageGC()
Use this method to check out the graphics context. |
java.awt.geom.AffineTransform |
getDispModeAtx()
Gets the transformation computed for setting the display and flip modes. |
boolean |
paintImage(java.awt.image.BufferedImage img)
Paints the image with the current display and flip modes. |
void |
reset()
Resets the canvas |
| Methods inherited from class com.vistech.imageviewer.ImageCanvas2D |
applyTransform, applyTransform, createFlipTransform, doDisplayModeAndFlip, getInterpolationType, getMagFactor, getMagOn, getPanOffset, getRotationAngle, getShearFactor, getShearFactorX, getShearFactorY, getTransform, init, main, resetManipulation, setInterpolationType, setMagFactor, setMagOn, setPanOffset, setRotationAngle, setShearFactor, setTransform |
| Methods inherited from class com.vistech.imageviewer.ImageCanvas |
addImageSentListener, clearImageCanvas, convertToAWTImage, convertToBufferedImage, createDisplayImage, doFlip, doFlip, draw, drawingDim, fireImageSentEvents, getAWTImage, getBufferedImage, getDisplayMode, getFlipMode, getImageSize, getImageType, getInvert, getOffScreenImage, getPreferredSize, getPrintLocation, getPrintSize, imageUpdate, invert, paintComponent, paintImage, print, printImage, redraw, removeImageSentListener, setAWTImage, setBufferedImage, setClip, setDisplayImage, setDisplayMode, setFlipMode, setImageType, setInvert, setOffScreenImage, setOffScrGc, setPrintLocation, setPrintSize |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.vistech.imageviewer.DrawingCanvas |
addMouseListener, addMouseMotionListener, getTransform, removeMouseListener, removeMouseMotionListener, repaint, setTransform |
| Methods inherited from interface com.vistech.imageviewer.ImageDisplay |
addMouseListener, addMouseMotionListener, addPropertyChangeListener, addVetoableChangeListener, draw, getAWTImage, getBufferedImage, getDisplayMode, getFlipMode, getImageSize, getImageType, getInvert, getOffScreenImage, paintImage, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removeVetoableChangeListener, setAWTImage, setBufferedImage, setClip, setCursor, setDisplayImage, setDisplayMode, setFlipMode, setImageType, setInvert, setOffScreenImage |
| Field Detail |
protected int imageWidth
protected int imageHeight
protected int viewerWid
protected int viewerHt
protected int offsetX
protected int offsetY
protected java.awt.Shape currentShape
| Constructor Detail |
public CompositeCanvas2D()
public CompositeCanvas2D(java.awt.image.BufferedImage img,
int wid,
int ht)
img - the image over which the graphics are to be drawn.wid - the width of the canvas.ht - the height of the canvas.| Method Detail |
public boolean paintImage(java.awt.image.BufferedImage img)
img - the image to be painted on the canvas.public java.awt.geom.AffineTransform getAllAtx()
public java.awt.geom.AffineTransform getDispModeAtx()
public void drawShape(java.awt.Shape s)
s - the Shape to be drawn on the canvas.public void fillShape(java.awt.Shape s)
s - the Shape to be filled.public void eraseShapes()
eraseShapes in interface DrawingCanvaspublic java.awt.Graphics2D getDisplayedImageGC()
DrawingCanvasgetDisplayedImageGC in interface DrawingCanvasgetDisplayedImageGC in class ImageCanvascom.vistech.imageviewer.DrawingCanvaspublic java.awt.image.BufferedImage getDisplayedImage()
ImageDisplaygetDisplayedImage in class ImageCanvascom.vistech.imageviewer.ImageDisplaypublic void reset()
DrawingCanvasreset in interface DrawingCanvasreset in class ImageCanvas2D
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||