nl.tudelft.simulation.dsol.gui.animation2D
Class AnimationPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by nl.tudelft.simulation.dsol.gui.animation2D.GridPanel
                      extended by nl.tudelft.simulation.dsol.gui.animation2D.AnimationPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, NamespaceChangeListener, NamingListener, EventListenerInterface
Direct Known Subclasses:
Editor2DPanel

public class AnimationPanel
extends GridPanel
implements EventListenerInterface, NamespaceChangeListener

The AnimationPanel
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:23:34 $
Author:
Peter Jacobs
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
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
 
Fields inherited from class nl.tudelft.simulation.dsol.gui.animation2D.GridPanel
DOWN, extent, formatter, GRIDCOLOR, gridSize, homeExtent, IN, lastDimension, LEFT, OUT, RIGHT, UP
 
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
AnimationPanel(Rectangle2D extent, Dimension size, DSOLApplicationInterface application)
          constructs a new AnimationPanel
 
Method Summary
 Point4i getDragLine()
           
 SortedSet getElements()
           
 boolean isDragLineEnabled()
           
 boolean isShowGrid()
           
 void namingExceptionThrown(NamingExceptionEvent namingEvent)
           
 void notify(EventInterface event)
           
 void objectAdded(NamingEvent namingEvent)
           
 void objectRemoved(NamingEvent namingEvent)
           
 void objectRenamed(NamingEvent namingEvent)
           
 void paintComponent(Graphics g)
           
 void setDragLineEnabled(boolean dragLineEnabled)
           
 void showGrid(boolean bool)
          show the grid?
 
Methods inherited from class nl.tudelft.simulation.dsol.gui.animation2D.GridPanel
drawGrid, getExtent, home, pan, setShowGrid, zoom
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, 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, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, 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, 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, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnimationPanel

public AnimationPanel(Rectangle2D extent,
                      Dimension size,
                      DSOLApplicationInterface application)
constructs a new AnimationPanel

Parameters:
extent - the extent of the panel
size - the size of the panel.
application - the application
Method Detail

paintComponent

public void paintComponent(Graphics g)
Overrides:
paintComponent in class GridPanel
See Also:
#paintComponent(java.awt.Graphics)

notify

public void notify(EventInterface event)
            throws RemoteException
Specified by:
notify in interface EventListenerInterface
Throws:
RemoteException
See Also:
#notify(nl.tudelft.simulation.event.EventInterface)

objectAdded

public void objectAdded(NamingEvent namingEvent)
Specified by:
objectAdded in interface NamespaceChangeListener
See Also:
#objectAdded(javax.naming.event.NamingEvent)

objectRemoved

public void objectRemoved(NamingEvent namingEvent)
Specified by:
objectRemoved in interface NamespaceChangeListener
See Also:
#objectRemoved(javax.naming.event.NamingEvent)

objectRenamed

public void objectRenamed(NamingEvent namingEvent)
Specified by:
objectRenamed in interface NamespaceChangeListener
See Also:
#objectRenamed(javax.naming.event.NamingEvent)

namingExceptionThrown

public void namingExceptionThrown(NamingExceptionEvent namingEvent)
Specified by:
namingExceptionThrown in interface NamingListener
See Also:
#namingExceptionThrown(javax.naming.event.NamingExceptionEvent)

getElements

public SortedSet getElements()
Returns:
Returns the elements.

isShowGrid

public boolean isShowGrid()
Overrides:
isShowGrid in class GridPanel
Returns:
Returns the showGrid.
See Also:
GridPanel.isShowGrid()

showGrid

public void showGrid(boolean bool)
Description copied from class: GridPanel
show the grid?

Overrides:
showGrid in class GridPanel
Parameters:
bool - true/false
See Also:
GridPanel.showGrid(boolean)

getDragLine

public Point4i getDragLine()
Returns:
returns the dragLine.

isDragLineEnabled

public boolean isDragLineEnabled()
Returns:
returns the dragLineEnabled.

setDragLineEnabled

public void setDragLineEnabled(boolean dragLineEnabled)
Parameters:
dragLineEnabled - the dragLineEnabled to set.


Copyright © 2002-2010 Delft University of Technology, the Netherlands. All Rights Reserved.