|
|||||||
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 | +--java.awt.Window | +--java.awt.Dialog | +--ach.NavDialog
NavFrame.java
Copyright (C) 2001 Helge Hackbarth, All Rights Reserved
Navigation dialog showing the complete image and a rectangle indicating
the current viewable area. This rectangle can be dragged with the mouse.
The new location of the viewable rectangle is handed over to the calling
component through the Scrollable interface (see class ach.Scrollable).
THE AUTHOR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY
OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT. THE AUTHOR SHALL NOT BE LIABLE FOR ANY
DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
Inner classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
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 | |
NavDialog(java.awt.Frame parent,
Scrollable sc,
EMemImageSource imgSrc,
java.awt.Dimension innerDim)
Constructor for navigation frame |
Method Summary | |
static java.awt.Dimension |
calcFitInDim(java.awt.Dimension innerDim,
java.awt.Dimension sourceDim)
Calculate Dimension of a rectangle proportionally scaled to fit in the bounding rectangle (innerDim) |
void |
mouseClicked(java.awt.event.MouseEvent e)
event handler for mouse events |
void |
mouseDragged(java.awt.event.MouseEvent e)
event handler for mouse motion events |
void |
mouseEntered(java.awt.event.MouseEvent e)
event handler for mouse events |
void |
mouseExited(java.awt.event.MouseEvent e)
event handler for mouse events |
void |
mouseMoved(java.awt.event.MouseEvent e)
event handler for mouse motion events |
void |
mousePressed(java.awt.event.MouseEvent e)
event handler for mouse events |
void |
mouseReleased(java.awt.event.MouseEvent e)
event handler for mouse events |
void |
paint(java.awt.Graphics g)
Overrides component's paint method |
void |
setViewRect(java.awt.Rectangle r)
Set rectangle of viewable area |
void |
update(java.awt.Graphics g)
Overrides component's update method to suppress clearing of the screen |
void |
windowActivated(java.awt.event.WindowEvent event)
event handler for window events |
void |
windowClosed(java.awt.event.WindowEvent event)
event handler for window events |
void |
windowClosing(java.awt.event.WindowEvent e)
event handler for window events |
void |
windowDeactivated(java.awt.event.WindowEvent event)
event handler for window events |
void |
windowDeiconified(java.awt.event.WindowEvent event)
event handler for window events |
void |
windowIconified(java.awt.event.WindowEvent event)
event handler for window events |
void |
windowOpened(java.awt.event.WindowEvent event)
event handler for window events |
Methods inherited from class java.awt.Dialog |
addNotify, dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, paramString, setModal, setResizable, setTitle, show |
Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public NavDialog(java.awt.Frame parent, Scrollable sc, EMemImageSource imgSrc, java.awt.Dimension innerDim)
parent
- frame that acts as opener for this dialogsc
- scrollable component to be positioned according to navigation of the viewable rectangleimgSrc
- the EMemImageSource representing the imageinnerDim
- Dimension to be set for the usable area of the navigation frameMethod Detail |
public static java.awt.Dimension calcFitInDim(java.awt.Dimension innerDim, java.awt.Dimension sourceDim)
innerDim
- Dimension describing the bounding rectanglesourceDim
- Dimension of the image to be scaled into bounding rectanglepublic void setViewRect(java.awt.Rectangle r)
r
- rectangle of viewable area (with coordinates of source image)public void paint(java.awt.Graphics g)
paint
in class java.awt.Container
public void update(java.awt.Graphics g)
update
in class java.awt.Container
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void windowActivated(java.awt.event.WindowEvent event)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent event)
windowClosed
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent event)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent event)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent event)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent event)
windowOpened
in interface java.awt.event.WindowListener
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |