Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vistech.jai.render
Class JAIImageCanvas

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Container
                  |
                  +--javax.swing.JComponent
                        |
                        +--com.vistech.jai.render.JAIImageCanvas

All Implemented Interfaces:
  java.awt.image.ImageObserver, java.awt.MenuContainer, ScrollController, java.io.Serializable

Direct Known Subclasses:
  RenderedImageCanvas

public class JAIImageCanvas
extends javax.swing.JComponent
implements ScrollController

A component class for drawing rendered images. This class implements the ScrollController interface, so images displayed in this component can be scrolled.

Version:
  1.0 18 Apr 2000
Author:
  Lawrence Rodrigues
See Also:
  Serialized Form

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.geom.AffineTransform` | `atx`
`protected int` | `height`
`protected javax.media.jai.PlanarImage` | `image`
`protected boolean` | `imageDrawn`
`static int` | `MAX_HEIGHT`
`static int` | `MAX_WIDTH`
`protected java.awt.Point` | `panOffset`
`protected int` | `panX`
`protected int` | `panY`
`protected java.awt.Point` | `scrollAnchor`
`protected boolean` | `scrollOn`
`protected java.awt.Point` | `vpPos`
`protected int` | `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 java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`JAIImageCanvas()`
`JAIImageCanvas(javax.media.jai.PlanarImage img)`

Method Summary
`javax.media.jai.PlanarImage` | `getDisplayImage()`
`javax.media.jai.PlanarImage` | `getImage()`
`java.awt.Point` | `getPanOffset()` Returns the panOffset property.
`boolean` | `getScrollOn()`
`java.awt.geom.AffineTransform` | `getTransform()`
`java.awt.Point` | `getViewportPosition()`
`boolean` | `isImageDrawn()`
`void` | `paintComponent(java.awt.Graphics gc)`
`void` | `pan(double x, double y)`
`void` | `reset()`
`void` | `scroll(int x, int y)` Scrolls the image.
`void` | `setImage(javax.media.jai.PlanarImage img)`
`void` | `setPanOffset(java.awt.Point panOffset)` Gets the panOffset property.
`void` | `setScrollOn(boolean onOff)`
`void` | `setTransform(java.awt.geom.AffineTransform at)`
`void` | `setViewportPosition(java.awt.Point vpPos)`
`void` | `startScroll(int x, int y)` Starts the scroll and sets the anchor point.
`void` | `stopScroll()` Stops scroll.

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, getPreferredSize, 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, imageUpdate, 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`

Field Detail

### MAX_WIDTH

    public static final int MAX_WIDTH

### MAX_HEIGHT

    public static final int MAX_HEIGHT

### width

    protected int width

### height

    protected int height

### image

    protected transient javax.media.jai.PlanarImage image

### atx

    protected java.awt.geom.AffineTransform atx

### imageDrawn

    protected boolean imageDrawn

### panX

    protected int panX

### panY

    protected int panY

### scrollAnchor

    protected java.awt.Point scrollAnchor

### scrollOn

    protected boolean scrollOn

### vpPos

    protected java.awt.Point vpPos

### panOffset

    protected java.awt.Point panOffset

Constructor Detail

### JAIImageCanvas

    public JAIImageCanvas()

### JAIImageCanvas

    public JAIImageCanvas(javax.media.jai.PlanarImage img)

Method Detail

### setImage

    public void setImage(javax.media.jai.PlanarImage img)

### getImage

    public javax.media.jai.PlanarImage getImage()

### getDisplayImage

    public javax.media.jai.PlanarImage getDisplayImage()

### isImageDrawn

    public boolean isImageDrawn()

### setPanOffset

    public void setPanOffset(java.awt.Point panOffset)

  Description copied from interface: `ScrollController`
  Gets the panOffset property.
  Specified by:
    `setPanOffset` in interface `ScrollController`
  Following copied from interface: `com.vistech.imageviewer.ScrollController`
  Parameters:
    `panOffset` - the offset by which the currently displayed image is moved from the previous position.

### getPanOffset

    public java.awt.Point getPanOffset()

  Description copied from interface: `ScrollController`
  Returns the panOffset property.
  Specified by:
    `getPanOffset` in interface `ScrollController`
  Following copied from interface: `com.vistech.imageviewer.ScrollController`
  Returns:
    the panOffset.

### setScrollOn

    public void setScrollOn(boolean onOff)

### getScrollOn

    public boolean getScrollOn()

### startScroll

    public void startScroll(int x,
                            int y)

  Description copied from interface: `ScrollController`
  Starts the scroll and sets the anchor point.
  Specified by:
    `startScroll` in interface `ScrollController`
  Following copied from interface: `com.vistech.imageviewer.ScrollController`
  Parameters:
    `x` - the x coordinate of the scroll anchor.
    `y` - the y coordinate of the scroll anchor.

### scroll

    public void scroll(int x,
                       int y)

  Description copied from interface: `ScrollController`
  Scrolls the image.
  Specified by:
    `scroll` in interface `ScrollController`
  Following copied from interface: `com.vistech.imageviewer.ScrollController`
  Parameters:
    `x` - the x coordinate of the current position.
    `y` - the y coordinate of the current position.

### stopScroll

    public void stopScroll()

  Description copied from interface: `ScrollController`
  Stops scroll.
  Specified by:
    `stopScroll` in interface `ScrollController`

### pan

    public void pan(double x,
                    double y)

### getViewportPosition

    public java.awt.Point getViewportPosition()

### setViewportPosition

    public void setViewportPosition(java.awt.Point vpPos)

### setTransform

    public void setTransform(java.awt.geom.AffineTransform at)

### getTransform

    public java.awt.geom.AffineTransform getTransform()

### reset

    public void reset()

### paintComponent

    public void paintComponent(java.awt.Graphics gc)

  Overrides:
    `paintComponent` in class `javax.swing.JComponent`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD