|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
uk.ac.essex.common.gui.panel.ImagePane
uk.ac.essex.ia.imageview.pane.IVImagePane
public class IVImagePane
A pane to contian an RenderedImagei for display. This class generates a pne to contain a RenderedImage for display. The RenderedImage is wrapped as a WindowOpImage. So when the image moves in this pane, the tiles cached in this WindowOpImage will be re-used. This strategy will make the display much faster.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
MOUSECLICK_NONE
The mouse click policies. |
static int |
MOUSECLICK_RECENTER
|
static int |
MOUSECLICK_REGISTER
|
static int |
MOUSEDRAG_MOVE
|
static int |
MOUSEDRAG_NONE
The mouse drag policies. |
static int |
MOUSEDRAG_SCALE
|
| Fields inherited from class uk.ac.essex.common.gui.panel.ImagePane |
|---|
compound, compound1, displayCenter, imageName, isFocused, origin, referenceX, referenceY, resizePolicy, shiftX, shiftY, source |
| 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 uk.ac.essex.ia.imageview.ImageViewerConstants |
|---|
allViewsCommand, annotationCommand, currentViewCommand, defaultLevel, defaultWindow, histogramCommand, largestLevel, largestWindow, levelCommand, measurementCommand, nozoom, paramSync, RESOURCE_BASE_NAME, rotationCommand, setLayoutCommand, smallestLevel, smallestWindow, speedCommand, startCommand, statisticsCommand, stopCommand, windowCommand, zoomCommand |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
IVImagePane(java.awt.image.RenderedImage image,
ResizePolicy policy,
java.lang.String imageName)
constructor with given image and policy |
|
IVImagePane(java.awt.image.RenderedImage image,
java.lang.String imageName)
constructor with given image |
|
IVImagePane(java.lang.String imageName)
default constructor |
|
| Method Summary | |
|---|---|
int |
getMouseClickPolicy()
get the current mouse click policy. |
int |
getMouseDragPolicy()
get the current mouse drag policy. |
boolean |
isFocusTranversable()
Set focus transversable. |
void |
keyPressed(java.awt.event.KeyEvent e)
process key pressed event. |
void |
keyReleased(java.awt.event.KeyEvent e)
process key-released event. |
void |
keyTyped(java.awt.event.KeyEvent e)
process key-typed event. |
void |
mouseClicked(java.awt.event.MouseEvent e)
process the mouse click event. |
void |
mouseDragged(java.awt.event.MouseEvent e)
process mouse drag event. |
void |
mouseEntered(java.awt.event.MouseEvent e)
process mouse entered event. |
void |
mouseExited(java.awt.event.MouseEvent e)
process mouse-exited event. |
void |
mouseMoved(java.awt.event.MouseEvent e)
process mouse move event. |
void |
mousePressed(java.awt.event.MouseEvent e)
process the mouse pressed event. |
void |
mouseReleased(java.awt.event.MouseEvent e)
process the mouse released event. |
void |
paintComponent(java.awt.Graphics g)
paint routine |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
process the property change event when annotation,..., histogram status is changed. |
void |
set(java.awt.image.RenderedImage im)
set the image for display. |
void |
setAnnotation(boolean b)
set the annotation flag. |
void |
setHistogram(boolean b)
set the histogram flag. |
void |
setMeasurement(boolean b)
set the measurement flag. |
void |
setMouseClickPolicy(int i)
set the mouse click policy. |
void |
setMouseDragPolicy(int i)
set the mouse drag policy. |
void |
setStatistics(boolean b)
set the statistics flag. |
void |
update(java.util.Observable o,
java.lang.Object rectangle)
update if observe that the image is changed. |
| Methods inherited from class uk.ac.essex.common.gui.panel.ImagePane |
|---|
getImage, getReference, isFocused, set, set, setDisplayCenter, setFocused, setReference, setResizePolicy |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MOUSEDRAG_NONE
public static final int MOUSEDRAG_SCALE
public static final int MOUSEDRAG_MOVE
public static final int MOUSECLICK_NONE
public static final int MOUSECLICK_RECENTER
public static final int MOUSECLICK_REGISTER
| Constructor Detail |
|---|
public IVImagePane(java.lang.String imageName)
public IVImagePane(java.awt.image.RenderedImage image,
java.lang.String imageName)
image - the RenderedImage for display in this pane.
public IVImagePane(java.awt.image.RenderedImage image,
ResizePolicy policy,
java.lang.String imageName)
image - the RenderedImage for display in this pane.policy - the policy to move the image when this pane is resized.| Method Detail |
|---|
public void set(java.awt.image.RenderedImage im)
set in class ImagePaneim - The new image for display.public int getMouseDragPolicy()
public void setMouseDragPolicy(int i)
public int getMouseClickPolicy()
public void setMouseClickPolicy(int i)
public void setAnnotation(boolean b)
public void setMeasurement(boolean b)
public void setStatistics(boolean b)
public void setHistogram(boolean b)
public void paintComponent(java.awt.Graphics g)
paintComponent in class ImagePanepublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic boolean isFocusTranversable()
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListener
public void update(java.util.Observable o,
java.lang.Object rectangle)
update in interface java.util.Observerpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||