|
|||||||||
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 | +--com.vistech.jai.render.RenderedImageCanvas
A component class for drawing large rendered images. This class has several properties to represent different attributes of a rendered image. These properties include tile width, tile height, current transformation and color model. When a new image is set, it is reformatted using the "format" operator with the current tile width and height settings. This class implements the ScrollController interface, so images displayed in this component can be scrolled. To scroll a large image, only the tiles that are visible are computed. These tiles are converted into a BufferedImage object, which are then drawn over the components graphics context.
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.image.ColorModel |
colorModel
|
protected javax.media.jai.PlanarImage |
displayImage
|
protected int |
imageHeight
|
protected int |
imageWidth
|
protected int |
maxTileCordX
|
protected int |
maxTileCordY
|
protected int |
maxTileIndexX
|
protected int |
maxTileIndexY
|
protected int |
minTileCordX
|
protected int |
minTileCordY
|
protected int |
minTileIndexX
|
protected int |
minTileIndexY
|
protected javax.media.jai.PlanarImage |
origImage
|
protected java.awt.image.SampleModel |
sampleModel
|
protected javax.media.jai.TileCache |
tc
|
protected int |
tileGridXOffset
|
protected int |
tileGridYOffset
|
protected int |
tileHeight
|
protected int |
tileWidth
|
protected int |
viewerHeight
|
protected int |
viewerWidth
|
Fields inherited from class com.vistech.jai.render.JAIImageCanvas |
atx, height, image, imageDrawn, MAX_HEIGHT, MAX_WIDTH, panOffset, panX, panY, scrollAnchor, scrollOn, vpPos, 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 | |
RenderedImageCanvas()
|
|
RenderedImageCanvas(javax.media.jai.PlanarImage img)
The RenderedImageCanvas constructor. |
Method Summary | |
protected void |
fireTilePropertyChange()
Fires property change events for the following properties: maxTileIndexX, maxTileIndexY,tileWidth,tileHeight, and transform. |
javax.media.jai.PlanarImage |
getDisplayImage()
Returns the displayed image. |
int |
getImageHeight()
Returns the height of the current image. |
int |
getImageWidth()
Returns the width of the current image. |
int |
getMaxTileIndexX()
Returns the maxTileIndexX property of the current image. |
int |
getMaxTileIndexY()
Returns the maxTileIndexY property of the current image. |
int |
getTileHeight()
Returns the tile height of the formatted image. |
protected void |
getTileInfo(javax.media.jai.PlanarImage img)
Computes tile information of the specified image. |
int |
getTileWidth()
Returns the tile width of the formatted image. |
protected javax.media.jai.RenderedOp |
makeTiledImage(javax.media.jai.PlanarImage img)
|
void |
paintComponent(java.awt.Graphics gc)
Paints the tiles that are visible. |
void |
setImage(javax.media.jai.PlanarImage img)
Sets the image. |
void |
setTileHeight(int th)
Sets the tile height of the formatted image. |
void |
setTileWidth(int tw)
Sets the tile width of the formatted image. |
Methods inherited from class com.vistech.jai.render.JAIImageCanvas |
getImage, getPanOffset, getScrollOn, getTransform, getViewportPosition, isImageDrawn, pan, reset, scroll, setPanOffset, setScrollOn, setTransform, setViewportPosition, startScroll, stopScroll |
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 |
protected int viewerWidth
protected int viewerHeight
protected transient javax.media.jai.PlanarImage displayImage
protected transient javax.media.jai.PlanarImage origImage
protected int tileWidth
protected int tileHeight
protected transient java.awt.image.SampleModel sampleModel
protected java.awt.image.ColorModel colorModel
protected int maxTileIndexX
protected int maxTileIndexY
protected int maxTileCordX
protected int maxTileCordY
protected int minTileIndexX
protected int minTileIndexY
protected int minTileCordX
protected int minTileCordY
protected int tileGridXOffset
protected int tileGridYOffset
protected int imageWidth
protected int imageHeight
protected javax.media.jai.TileCache tc
Constructor Detail |
public RenderedImageCanvas()
public RenderedImageCanvas(javax.media.jai.PlanarImage img)
img
- the planar image.Method Detail |
public void setImage(javax.media.jai.PlanarImage img)
setImage
in class JAIImageCanvas
img
- the planar image.public javax.media.jai.PlanarImage getDisplayImage()
getDisplayImage
in class JAIImageCanvas
protected javax.media.jai.RenderedOp makeTiledImage(javax.media.jai.PlanarImage img)
protected void getTileInfo(javax.media.jai.PlanarImage img)
img
- the planar image.public void setTileWidth(int tw)
int
- the tile width.public void setTileHeight(int th)
int
- the tile height.public int getTileWidth()
public int getTileHeight()
public int getMaxTileIndexX()
public int getMaxTileIndexY()
public int getImageWidth()
public int getImageHeight()
protected void fireTilePropertyChange()
public void paintComponent(java.awt.Graphics gc)
paintComponent
in class JAIImageCanvas
gc
- the graphics context.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |