com.mxgraph.swing.view

## Class mxInteractiveCanvas

- java.lang.Object
- - com.mxgraph.canvas.mxBasicCanvas
  - - com.mxgraph.canvas.mxGraphics2DCanvas
    - - com.mxgraph.swing.view.mxInteractiveCanvas

- All Implemented Interfaces:
    mxICanvas

      public class mxInteractiveCanvas
      extends mxGraphics2DCanvas

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.awt.image.ImageObserver` | `imageObserver`

    - ### Fields inherited from class com.mxgraph.canvas.mxGraphics2DCanvas

      `g, IMAGE_SCALING, rendererPane, shapes, TEXT_SHAPE_DEFAULT, TEXT_SHAPE_HTML, textShapes`

    - ### Fields inherited from class com.mxgraph.canvas.mxBasicCanvas

      `DEFAULT_IMAGEBASEPATH, drawLabels, imageBasePath, imageCache, PRESERVE_IMAGE_ASPECT, scale, translate`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `mxInteractiveCanvas()`
    `mxInteractiveCanvas(java.awt.image.ImageObserver imageObserver)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `contains(mxGraphComponent graphComponent, java.awt.Rectangle rect, mxCellState state)`
    `protected void` | `drawImageImpl(java.awt.Image image, int x, int y)` Overrides graphics call to use image observer.
    `java.awt.image.ImageObserver` | `getImageObserver()`
    `protected java.awt.Dimension` | `getImageSize(java.awt.Image image)` Returns the size for the given image.
    `boolean` | `hitSwimlaneContent(mxGraphComponent graphComponent, mxCellState swimlane, int x, int y)` Returns true if the given point is inside the content area of the given swimlane.
    `boolean` | `intersects(mxGraphComponent graphComponent, java.awt.Rectangle rect, mxCellState state)`
    `void` | `setImageObserver(java.awt.image.ImageObserver value)`

    - ### Methods inherited from class com.mxgraph.canvas.mxGraphics2DCanvas

      `createFillPaint, createStroke, createTemporaryGraphics, drawCell, drawImage, drawImage, drawLabel, fillShape, fillShape, getGraphics, getRendererPane, getShape, getTextShape, paintPolyline, paintRectangle, putShape, putTextShape, setGraphics`

    - ### Methods inherited from class com.mxgraph.canvas.mxBasicCanvas

      `flushImageCache, getImageBasePath, getImageForStyle, getScale, getTranslate, isDrawLabels, loadImage, setDrawLabels, setImageBasePath, setScale, setTranslate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### imageObserver

          protected java.awt.image.ImageObserver imageObserver

  - ### Constructor Detail

    - #### mxInteractiveCanvas

          public mxInteractiveCanvas()

    - #### mxInteractiveCanvas

          public mxInteractiveCanvas(java.awt.image.ImageObserver imageObserver)

  - ### Method Detail

    - #### setImageObserver

          public void setImageObserver(java.awt.image.ImageObserver value)

    - #### getImageObserver

          public java.awt.image.ImageObserver getImageObserver()

    - #### drawImageImpl

          protected void drawImageImpl(java.awt.Image image,
                           int x,
                           int y)

      Overrides graphics call to use image observer.
      Overrides:
        `drawImageImpl` in class `mxGraphics2DCanvas`

    - #### getImageSize

          protected java.awt.Dimension getImageSize(java.awt.Image image)

      Returns the size for the given image.
      Overrides:
        `getImageSize` in class `mxGraphics2DCanvas`

    - #### contains

          public boolean contains(mxGraphComponent graphComponent,
                         java.awt.Rectangle rect,
                         mxCellState state)

    - #### intersects

          public boolean intersects(mxGraphComponent graphComponent,
                           java.awt.Rectangle rect,
                           mxCellState state)

    - #### hitSwimlaneContent

          public boolean hitSwimlaneContent(mxGraphComponent graphComponent,
                                   mxCellState swimlane,
                                   int x,
                                   int y)

      Returns true if the given point is inside the content area of the given swimlane. (The content area of swimlanes is transparent to events.) This implementation does not check if the given state is a swimlane, it is assumed that the caller has checked this before using this method.

Copyright (c) 2010 Gaudenz Alder. All rights reserved.