|
|||||||||
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.jai.render.JAIImageCanvas
A component class for drawing rendered images. This class implements the ScrollController interface, so images displayed in this component can be scrolled.
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 |
public static final int MAX_WIDTH
public static final int MAX_HEIGHT
protected int width
protected int height
protected transient javax.media.jai.PlanarImage image
protected java.awt.geom.AffineTransform atx
protected boolean imageDrawn
protected int panX
protected int panY
protected java.awt.Point scrollAnchor
protected boolean scrollOn
protected java.awt.Point vpPos
protected java.awt.Point panOffset
Constructor Detail |
public JAIImageCanvas()
public JAIImageCanvas(javax.media.jai.PlanarImage img)
Method Detail |
public void setImage(javax.media.jai.PlanarImage img)
public javax.media.jai.PlanarImage getImage()
public javax.media.jai.PlanarImage getDisplayImage()
public boolean isImageDrawn()
public void setPanOffset(java.awt.Point panOffset)
ScrollController
setPanOffset
in interface ScrollController
com.vistech.imageviewer.ScrollController
panOffset
- the offset by which the currently displayed image is moved
from the previous position.public java.awt.Point getPanOffset()
ScrollController
getPanOffset
in interface ScrollController
com.vistech.imageviewer.ScrollController
public void setScrollOn(boolean onOff)
public boolean getScrollOn()
public void startScroll(int x, int y)
ScrollController
startScroll
in interface ScrollController
com.vistech.imageviewer.ScrollController
x
- the x coordinate of the scroll anchor.y
- the y coordinate of the scroll anchor.public void scroll(int x, int y)
ScrollController
scroll
in interface ScrollController
com.vistech.imageviewer.ScrollController
x
- the x coordinate of the current position.y
- the y coordinate of the current position.public void stopScroll()
ScrollController
stopScroll
in interface ScrollController
public void pan(double x, double y)
public java.awt.Point getViewportPosition()
public void setViewportPosition(java.awt.Point vpPos)
public void setTransform(java.awt.geom.AffineTransform at)
public java.awt.geom.AffineTransform getTransform()
public void reset()
public void paintComponent(java.awt.Graphics gc)
paintComponent
in class javax.swing.JComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |