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

## ru.biosoft.graphics.editor
Class ViewPane

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      ru.biosoft.graphics.editor.ViewPane

All Implemented Interfaces:
  javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable

Direct Known Subclasses:
  ViewEditorPane

public class ViewPane
extends javax.swing.JPanel
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

Panel for visualisation of `View`s. This `Component` can be used in Dialogs or Frames. It is also provides following functionality: 1) zoom support 2) mouse event dispatching 3) selection (through {$link SelectionManager}).

See Also:
  Serialized Form

Nested Class Summary
`protected class` | `ViewPane.MPanel`

Nested classes inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected java.awt.geom.AffineTransform` | `at` Transformer for scaling of visual representation of all views
`protected CompositeView` | `cView` Storage for views
`protected ViewPane.MPanel` | `mPanel` Panel on which all views are painted
`protected SelectionManager` | `selectionManager`
`protected java.util.Vector` | `viewPaneListeners` listeners storage

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
`ViewPane()`

Method Summary
`void` | `addMouseListener(java.awt.event.MouseListener mouseListener)`
`void` | `addMouseMotionListener(java.awt.event.MouseMotionListener mouseListener)`
`void` | `addViewPaneListener(ViewPaneListener viewPaneListener)`
`javax.swing.JComponent` | `getContent()`
`double` | `getScaleX()`
`double` | `getScaleY()`
`SelectionManager` | `getSelectionManager()`
`CompositeView` | `getView()`
`View[]` | `getView(java.lang.Object model)` ?
`static void` | `makeOffset(View view, java.awt.Point offset)`
`void` | `mouseClicked(java.awt.event.MouseEvent e)`
`void` | `mouseDragged(java.awt.event.MouseEvent e)`
`void` | `mouseEntered(java.awt.event.MouseEvent e)`
`void` | `mouseExited(java.awt.event.MouseEvent e)`
`void` | `mouseMoved(java.awt.event.MouseEvent e)`
`void` | `mousePressed(java.awt.event.MouseEvent e)`
`void` | `mouseReleased(java.awt.event.MouseEvent e)`
`protected ViewPaneEvent` | `prepareEvent(java.awt.event.MouseEvent e)`
`void` | `removeMouseListener(java.awt.event.MouseListener mouseListener)`
`void` | `removeMouseMotionListener(java.awt.event.MouseMotionListener mouseListener)`
`void` | `removeViewPaneListener(ViewPaneListener viewPaneListener)`
`void` | `repaint()`
`void` | `resetScrollBars()`
`void` | `scale(double sx, double sy)`
`void` | `setBackground(java.awt.Color color)`
`void` | `setSelectionManager(SelectionManager selectionManager)`
`void` | `setSizeAllign(boolean x, boolean y)`
`void` | `setToScale(double sx, double sy)`
`void` | `setView(CompositeView value)` Set up the view
`void` | `setView(CompositeView value, java.awt.Point offset)`
`void` | `updateScrollBars()`

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseWheelListener, 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

### mPanel

    protected ViewPane.MPanel mPanel

  Panel on which all views are painted

### at

    protected java.awt.geom.AffineTransform at

  Transformer for scaling of visual representation of all views

### cView

    protected CompositeView cView

  Storage for views

### selectionManager

    protected SelectionManager selectionManager

### viewPaneListeners

    protected java.util.Vector viewPaneListeners

  listeners storage

Constructor Detail

### ViewPane

    public ViewPane()

Method Detail

### getView

    public CompositeView getView()

### setView

    public void setView(CompositeView value)

  Set up the view

### setView

    public void setView(CompositeView value,
                        java.awt.Point offset)

### makeOffset

    public static void makeOffset(View view,
                                  java.awt.Point offset)

### getSelectionManager

    public SelectionManager getSelectionManager()

### setSelectionManager

    public void setSelectionManager(SelectionManager selectionManager)

### addViewPaneListener

    public void addViewPaneListener(ViewPaneListener viewPaneListener)

### removeViewPaneListener

    public void removeViewPaneListener(ViewPaneListener viewPaneListener)

### addMouseListener

    public void addMouseListener(java.awt.event.MouseListener mouseListener)

### removeMouseListener

    public void removeMouseListener(java.awt.event.MouseListener mouseListener)

### addMouseMotionListener

    public void addMouseMotionListener(java.awt.event.MouseMotionListener mouseListener)

### removeMouseMotionListener

    public void removeMouseMotionListener(java.awt.event.MouseMotionListener mouseListener)

### setSizeAllign

    public void setSizeAllign(boolean x,
                              boolean y)

### repaint

    public void repaint()

### scale

    public void scale(double sx,
                      double sy)

### setToScale

    public void setToScale(double sx,
                           double sy)

### getScaleX

    public double getScaleX()

### getScaleY

    public double getScaleY()

### updateScrollBars

    public void updateScrollBars()

### getView

    public View[] getView(java.lang.Object model)

  ? take into account that many views can have the same model ???

### prepareEvent

    protected ViewPaneEvent prepareEvent(java.awt.event.MouseEvent e)

### mouseClicked

    public void mouseClicked(java.awt.event.MouseEvent e)

  Specified by:
    `mouseClicked` in interface `java.awt.event.MouseListener`

### mousePressed

    public void mousePressed(java.awt.event.MouseEvent e)

  Specified by:
    `mousePressed` in interface `java.awt.event.MouseListener`

### mouseReleased

    public void mouseReleased(java.awt.event.MouseEvent e)

  Specified by:
    `mouseReleased` in interface `java.awt.event.MouseListener`

### mouseEntered

    public void mouseEntered(java.awt.event.MouseEvent e)

  Specified by:
    `mouseEntered` in interface `java.awt.event.MouseListener`

### mouseExited

    public void mouseExited(java.awt.event.MouseEvent e)

  Specified by:
    `mouseExited` in interface `java.awt.event.MouseListener`

### mouseDragged

    public void mouseDragged(java.awt.event.MouseEvent e)

  Specified by:
    `mouseDragged` in interface `java.awt.event.MouseMotionListener`
  Pendung:
    - check

### mouseMoved

    public void mouseMoved(java.awt.event.MouseEvent e)

  Specified by:
    `mouseMoved` in interface `java.awt.event.MouseMotionListener`
  Pendung:
    - check

### getContent

    public javax.swing.JComponent getContent()

### resetScrollBars

    public void resetScrollBars()

### setBackground

    public void setBackground(java.awt.Color color)

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

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.