nl.tudelft.simulation.dsol.gui.editor2D
Class Editor2DPanel

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
                          extended by nl.tudelft.simulation.dsol.gui.editor2D.Editor2DPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, NamespaceChangeListener, NamingListener, EventListenerInterface

public class Editor2DPanel
extends AnimationPanel

Editor2DPanel.java
(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:33 $
Author:
Roy Chin
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
static int EDIT_MODE_MOVE
          Edit mode is 'move'
static int EDIT_MODE_ROTATE
          Edit mode is 'rotate'
static int LOCALAXISSIZE
          Line size of the representation of the local axis system
static int MODE_DELETE
          Delete Object Mode
static int MODE_EDIT
          Edit Object Mode
static int MODE_IDLE
          Idle Mode
static int MODE_NEW
          New Object mMode
static int MODE_SELECT
          Selection Mode
static int PLACEHOLDERSIZE
          Placeholder size
 
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
Editor2DPanel(Rectangle2D extent, Dimension size, DSOLApplicationInterface application)
          Constructor
 
Method Summary
 EditMenu getEditMenu()
           
 EditableRenderable2DInterface getSelectedEditableRenderable()
           
 int getSelectedEditMode()
           
 int getSelectedMode()
           
 CartesianPoint getSelectedPoint()
           
 Class getSelectedRenderableClass()
           
 void objectAdded(NamingEvent namingEvent)
           
 void paintComponent(Graphics g)
           
 void setSelectedEditableRenderable(EditableRenderable2DInterface selectedEditableRenderable)
           
 void setSelectedEditMode(int selectedEditMode)
           
 void setSelectedMode(int mode)
           
 void setSelectedPoint(CartesianPoint selectedPoint)
           
 void setSelectedRenderableClass(Class selectedRenderableClass)
           
 
Methods inherited from class nl.tudelft.simulation.dsol.gui.animation2D.AnimationPanel
getDragLine, getElements, isDragLineEnabled, isShowGrid, namingExceptionThrown, notify, objectRemoved, objectRenamed, setDragLineEnabled, showGrid
 
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
 

Field Detail

MODE_IDLE

public static final int MODE_IDLE
Idle Mode

See Also:
Constant Field Values

MODE_SELECT

public static final int MODE_SELECT
Selection Mode

See Also:
Constant Field Values

MODE_NEW

public static final int MODE_NEW
New Object mMode

See Also:
Constant Field Values

MODE_EDIT

public static final int MODE_EDIT
Edit Object Mode

See Also:
Constant Field Values

MODE_DELETE

public static final int MODE_DELETE
Delete Object Mode

See Also:
Constant Field Values

EDIT_MODE_MOVE

public static final int EDIT_MODE_MOVE
Edit mode is 'move'

See Also:
Constant Field Values

EDIT_MODE_ROTATE

public static final int EDIT_MODE_ROTATE
Edit mode is 'rotate'

See Also:
Constant Field Values

PLACEHOLDERSIZE

public static final int PLACEHOLDERSIZE
Placeholder size

See Also:
Constant Field Values

LOCALAXISSIZE

public static final int LOCALAXISSIZE
Line size of the representation of the local axis system

See Also:
Constant Field Values
Constructor Detail

Editor2DPanel

public Editor2DPanel(Rectangle2D extent,
                     Dimension size,
                     DSOLApplicationInterface application)
Constructor

Parameters:
extent - Extend
size - Size
application - DSOL Application
Method Detail

objectAdded

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

paintComponent

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

getEditMenu

public EditMenu getEditMenu()
Returns:
returns the editMenu.

getSelectedMode

public int getSelectedMode()
Returns:
returns the selectedMode.

setSelectedMode

public void setSelectedMode(int mode)
Parameters:
mode - the selectedMode to set.

getSelectedEditableRenderable

public EditableRenderable2DInterface getSelectedEditableRenderable()
Returns:
returns the selected editable renderable.

setSelectedEditableRenderable

public void setSelectedEditableRenderable(EditableRenderable2DInterface selectedEditableRenderable)
Parameters:
selectedEditableRenderable - The selected editable renderable to set.

getSelectedRenderableClass

public Class getSelectedRenderableClass()
Returns:
returns the selectedRenderableClass.

setSelectedRenderableClass

public void setSelectedRenderableClass(Class selectedRenderableClass)
Parameters:
selectedRenderableClass - The selectedRenderableClass to set.

getSelectedEditMode

public int getSelectedEditMode()
Returns:
returns the selectedEditMode.

setSelectedEditMode

public void setSelectedEditMode(int selectedEditMode)
Parameters:
selectedEditMode - The selectedEditMode to set.

getSelectedPoint

public CartesianPoint getSelectedPoint()
Returns:
returns the selectedPoint.

setSelectedPoint

public void setSelectedPoint(CartesianPoint selectedPoint)
Parameters:
selectedPoint - The selectedPoint to set.


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