Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## vis.beans.plotter
Class Viewport

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Container
                  |
                  +--javax.swing.JComponent
                        |
                        +--vis.beans.plotter.Viewport

All Implemented Interfaces:
  java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextServiceRevokedListener, java.beans.beancontext.BeanContextServicesListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

Direct Known Subclasses:
  PieChart, PlotViewport

public abstract class Viewport
extends javax.swing.JComponent
implements java.io.Serializable, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextServicesListener

The Viewport class provides the basic functionality to draw on a viewport.

Version:
  1.2 13 Nov 1999
Author:
  Larry Rodrigues
See Also:
  Serialized Form

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.Graphics2D` | `destGc`
`protected java.awt.image.BufferedImage` | `destImage`
`protected int` | `height`
`protected java.awt.Graphics2D` | `offScrGc`
`protected java.awt.image.BufferedImage` | `offScrImage`
`protected java.awt.Image` | `pixImage`
`protected java.beans.beancontext.BeanContext` | `plBeanContext`
`protected int` | `width`
`protected double` | `xMagFac`
`protected double` | `xScaleFac`
`protected double` | `yMagFac`
`protected double` | `yScaleFac`

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
`Viewport()`
`Viewport(int wid, int ht)` Viewport Constructor.

Method Summary
`void` | `addPropertyChangeListener(java.lang.String name, java.beans.PropertyChangeListener p)`
`void` | `addVetoableChangeListener(java.lang.String name, java.beans.VetoableChangeListener p)`
`void` | `createOffScrImage()` Creates an OffScreen image.
`abstract void` | `draw()` All sub classes have to implement this method.
`java.beans.beancontext.BeanContext` | `getBeanContext()`
`void` | `imagePaint(java.awt.Image img, java.awt.Point st, java.awt.Dimension d)` Paints an image within a given rectangle which can be placed anywhere in the viewport It is the responsibilty of the caller to check whether the image is loaded.
`java.lang.Object` | `invokePrinterService()`
`java.lang.Object` | `invokeSaveImageService()`
`void` | `paintComponent(java.awt.Graphics paintGc)` Called by the system whenever the visibility status of the viewport changes.
`void` | `removePropertyChangeListener(java.lang.String name, java.beans.PropertyChangeListener p)`
`void` | `removeVetoableChangeListener(java.lang.String name, java.beans.VetoableChangeListener p)`
`void` | `serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent sae)`
`void` | `serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent bcsre)`
`void` | `setBeanContext(java.beans.beancontext.BeanContext bc)`
`void` | `setOffScrGc()` Sets off screen graphics context.
`void` | `setWidHt(int wd, int hgt)` Sets width and height.

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, 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, 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

### width

    protected int width

### height

    protected int height

### xScaleFac

    protected double xScaleFac

### yScaleFac

    protected double yScaleFac

### xMagFac

    protected double xMagFac

### yMagFac

    protected double yMagFac

### offScrImage

    protected transient java.awt.image.BufferedImage offScrImage

### destImage

    protected transient java.awt.image.BufferedImage destImage

### offScrGc

    protected transient java.awt.Graphics2D offScrGc

### destGc

    protected transient java.awt.Graphics2D destGc

### pixImage

    protected transient java.awt.Image pixImage

### plBeanContext

    protected java.beans.beancontext.BeanContext plBeanContext

Constructor Detail

### Viewport

    public Viewport(int wid,
                    int ht)

  Viewport Constructor.
  Parameters:
    `wd` - the width of the viewport.
    `ht` - the height of the viewport.

### Viewport

    public Viewport()

Method Detail

### setWidHt

    public void setWidHt(int wd,
                         int hgt)

  Sets width and height.
  Parameters:
    `wd` - the width of the viewport.
    `ht` - the height of the viewport.

### createOffScrImage

    public void createOffScrImage()

  Creates an OffScreen image.

### setOffScrGc

    public void setOffScrGc()

  Sets off screen graphics context.

### imagePaint

    public void imagePaint(java.awt.Image img,
                           java.awt.Point st,
                           java.awt.Dimension d)

  Paints an image within a given rectangle which can be placed anywhere in the viewport It is the responsibilty of the caller to check whether the image is loaded.
  Parameters:
    `img` - the image to be painted
    `st` - the point on the image corresponding to upper left hand corner(ULHC) of the rectangle
    `d` - the dimension of the rectangle in which the image is drawn

### paintComponent

    public void paintComponent(java.awt.Graphics paintGc)

  Called by the system whenever the visibility status of the viewport changes.
  Overrides:
    `paintComponent` in class `javax.swing.JComponent`

### draw

    public abstract void draw()

  All sub classes have to implement this method.

### serviceRevoked

    public void serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent bcsre)

  Specified by:
    `serviceRevoked` in interface `java.beans.beancontext.BeanContextServiceRevokedListener`

### serviceAvailable

    public void serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent sae)

  Specified by:
    `serviceAvailable` in interface `java.beans.beancontext.BeanContextServicesListener`

### setBeanContext

    public void setBeanContext(java.beans.beancontext.BeanContext bc)
                        throws java.beans.PropertyVetoException

  Specified by:
    `setBeanContext` in interface `java.beans.beancontext.BeanContextChild`

### getBeanContext

    public java.beans.beancontext.BeanContext getBeanContext()

  Specified by:
    `getBeanContext` in interface `java.beans.beancontext.BeanContextChild`

### invokeSaveImageService

    public java.lang.Object invokeSaveImageService()

### invokePrinterService

    public java.lang.Object invokePrinterService()

### addPropertyChangeListener

    public void addPropertyChangeListener(java.lang.String name,
                                          java.beans.PropertyChangeListener p)

  Specified by:
    `addPropertyChangeListener` in interface `java.beans.beancontext.BeanContextChild`
  Overrides:
    `addPropertyChangeListener` in class `javax.swing.JComponent`

### removePropertyChangeListener

    public void removePropertyChangeListener(java.lang.String name,
                                             java.beans.PropertyChangeListener p)

  Specified by:
    `removePropertyChangeListener` in interface `java.beans.beancontext.BeanContextChild`
  Overrides:
    `removePropertyChangeListener` in class `javax.swing.JComponent`

### addVetoableChangeListener

    public void addVetoableChangeListener(java.lang.String name,
                                          java.beans.VetoableChangeListener p)

  Specified by:
    `addVetoableChangeListener` in interface `java.beans.beancontext.BeanContextChild`

### removeVetoableChangeListener

    public void removeVetoableChangeListener(java.lang.String name,
                                             java.beans.VetoableChangeListener p)

  Specified by:
    `removeVetoableChangeListener` in interface `java.beans.beancontext.BeanContextChild`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD