edu.umd.cs.piccolo.examples
Class BirdsEyeViewExample.BirdsEyeView

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by edu.umd.cs.piccolo.PCanvas
                  extended by edu.umd.cs.piccolo.examples.BirdsEyeViewExample.BirdsEyeView
All Implemented Interfaces:
PComponent, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener
Enclosing class:
BirdsEyeViewExample

public class BirdsEyeViewExample.BirdsEyeView
extends PCanvas
implements PropertyChangeListener

The Birds Eye View Class

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  PNode areaVisiblePNode
          This is the node that shows the viewed area.
(package private)  PropertyChangeListener changeListener
          The change listener to know when to update the birds eye view.
(package private)  int layerCount
           
(package private)  PCanvas viewedCanvas
          This is the canvas that is being viewed
 
Fields inherited from class edu.umd.cs.piccolo.PCanvas
CURRENT_ZCANVAS, INTERACTING_CHANGED_NOTIFICATION, INTERATING_CHANGED_NOTIFICATION, PROPERTY_INTERACTING
 
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
BirdsEyeViewExample.BirdsEyeView()
          Creates a new instance of a BirdsEyeView
 
Method Summary
 void addLayer(PLayer new_layer)
          Add a layer to list of viewed layers
 void connect(PCanvas canvas, PLayer[] viewed_layers)
           
 void disconnect()
          Stop the birds eye view from receiving events from the viewed canvas and remove all layers
 void propertyChange(PropertyChangeEvent event)
          This method will get called when the viewed canvas changes
 void removeLayer(PLayer old_layer)
          Remove the layer from the viewed layers
 void updateFromViewed()
          This method gets the state of the viewed canvas and updates the BirdsEyeViewer This can be called from outside code
 
Methods inherited from class edu.umd.cs.piccolo.PCanvas
addInputEventListener, createDefaultCamera, createTimer, getAnimating, getAnimatingRenderQuality, getCamera, getDefaultRenderQuality, getInputEventListeners, getInteracting, getInteractingRenderQuality, getLayer, getNormalRenderQuality, getPanEventHandler, getRoot, getZoomEventHandler, installInputSources, paintComponent, paintImmediately, popCursor, printAll, pushCursor, removeInputEventListener, removeInputSources, repaint, sendInputEventToInputManager, setAnimatingRenderQuality, setBounds, setCamera, setDefaultRenderQuality, setEnabled, setInteracting, setInteractingRenderQuality, setPanEventHandler, setZoomEventHandler
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, 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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
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, 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

areaVisiblePNode

PNode areaVisiblePNode
This is the node that shows the viewed area.


viewedCanvas

PCanvas viewedCanvas
This is the canvas that is being viewed


changeListener

PropertyChangeListener changeListener
The change listener to know when to update the birds eye view.


layerCount

int layerCount
Constructor Detail

BirdsEyeViewExample.BirdsEyeView

public BirdsEyeViewExample.BirdsEyeView()
Creates a new instance of a BirdsEyeView

Method Detail

connect

public void connect(PCanvas canvas,
                    PLayer[] viewed_layers)

addLayer

public void addLayer(PLayer new_layer)
Add a layer to list of viewed layers


removeLayer

public void removeLayer(PLayer old_layer)
Remove the layer from the viewed layers


disconnect

public void disconnect()
Stop the birds eye view from receiving events from the viewed canvas and remove all layers


propertyChange

public void propertyChange(PropertyChangeEvent event)
This method will get called when the viewed canvas changes

Specified by:
propertyChange in interface PropertyChangeListener

updateFromViewed

public void updateFromViewed()
This method gets the state of the viewed canvas and updates the BirdsEyeViewer This can be called from outside code



Copyright © 1995-2011 Piccolo2D. All Rights Reserved.