All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class GraphicPlotter.MagnifyingPane

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----GraphicPlotter.MagnifyingPane

public final class MagnifyingPane
extends Container
implements AdjustmentListener, KeyListener
A wrapper for a magnifiable component whose size is controlled by MagnifyingScrollbar(s). This object provides a viewport into the magnifiable component. The size of the viewport (this container) is controlled by the layout manager of its parent container. The size of the magnifiable component is the size of the viewport multiplied by the magnification factor (which is controlled by the MagnifiyingScrollbar(s) that act on this MagnifyingPane).

See Also:
MagnifyingScrollbar

Constructor Index

 o MagnifyingPane(MagnifiableComponent, MagnifyingScrollbar, MagnifyingScrollbar)
Construct a MagnifyingPane containing a MagnifiableComponent.
 o MagnifyingPane(MagnifiableContainer, MagnifyingScrollbar, MagnifyingScrollbar)
Construct a MagnifyingPane containing a MagnifiableContainer.

Method Index

 o addNotify()
Override addNotify for implementation reasons.
 o adjustmentValueChanged(AdjustmentEvent)
Implement AdjustmentListener.adjustmentValueChanged to position the viewport relative to the magnifiable component.
 o doLayout()
Override doLayout to set the bounds of the mangifiable component.
 o getMinimumSize()
Override getMinimumSize to return size of the magnifiable component.
 o getPreferredSize()
Override getPreferredSize to return size of the magnifiable component.
 o keyPressed(KeyEvent)
Implement KeyListener.keyPressed to scroll when Page Up, Page Down, and arrow keys are pressed.
 o keyReleased(KeyEvent)
Implement KeyListener.keyReleased to do nothing.
 o keyTyped(KeyEvent)
Implement KeyListener.keyTyped to do nothing.
 o removeNotify()
Override removeNotify for implementation reasons.
 o repaint(long, int, int, int, int)
Override repaint() for implementation reasons.
 o setBounds(int, int, int, int)
Override setBounds() for implementation reasons.
 o setMagnificationCenter(int, int)
Set centering point of magnification in terms of location in the magnified component.
 o update(Graphics)
Override update for implementation reasons.

Constructors

 o MagnifyingPane
 public MagnifyingPane(MagnifiableComponent comp,
                       MagnifyingScrollbar hScrollbar,
                       MagnifyingScrollbar vScrollbar)
Construct a MagnifyingPane containing a MagnifiableComponent.

Parameters:
comp - the MagnifiableComponent
 o MagnifyingPane
 public MagnifyingPane(MagnifiableContainer cont,
                       MagnifyingScrollbar hScrollbar,
                       MagnifyingScrollbar vScrollbar)
Construct a MagnifyingPane containing a MagnifiableContainer.

Parameters:
cont - the MagnifiableContainer

Methods

 o addNotify
 public void addNotify()
Override addNotify for implementation reasons.

Overrides:
addNotify in class Container
 o removeNotify
 public void removeNotify()
Override removeNotify for implementation reasons.

Overrides:
removeNotify in class Container
 o doLayout
 public void doLayout()
Override doLayout to set the bounds of the mangifiable component.

Overrides:
doLayout in class Container
 o getMinimumSize
 public Dimension getMinimumSize()
Override getMinimumSize to return size of the magnifiable component.

Overrides:
getMinimumSize in class Container
 o getPreferredSize
 public Dimension getPreferredSize()
Override getPreferredSize to return size of the magnifiable component.

Overrides:
getPreferredSize in class Container
 o repaint
 public void repaint(long tm,
                     int x,
                     int y,
                     int width,
                     int height)
Override repaint() for implementation reasons.

Overrides:
repaint in class Component
 o setBounds
 public void setBounds(int x,
                       int y,
                       int width,
                       int height)
Override setBounds() for implementation reasons.

Overrides:
setBounds in class Component
 o update
 public void update(Graphics g)
Override update for implementation reasons.

Overrides:
update in class Container
 o adjustmentValueChanged
 public void adjustmentValueChanged(AdjustmentEvent e)
Implement AdjustmentListener.adjustmentValueChanged to position the viewport relative to the magnifiable component.

 o setMagnificationCenter
 public void setMagnificationCenter(int xMag,
                                    int yMag)
Set centering point of magnification in terms of location in the magnified component.

 o keyPressed
 public void keyPressed(KeyEvent e)
Implement KeyListener.keyPressed to scroll when Page Up, Page Down, and arrow keys are pressed.

 o keyReleased
 public void keyReleased(KeyEvent e)
Implement KeyListener.keyReleased to do nothing.

 o keyTyped
 public void keyTyped(KeyEvent e)
Implement KeyListener.keyTyped to do nothing.


All Packages  Class Hierarchy  This Package  Previous  Next  Index