Class OpenTCSDrawingViewModeling

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.jhotdraw.draw.DefaultDrawingView
org.opentcs.thirdparty.jhotdraw.components.drawing.AbstractOpenTCSDrawingView
org.opentcs.thirdparty.jhotdraw.components.drawing.OpenTCSDrawingViewModeling
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, org.jhotdraw.draw.DrawingView, org.jhotdraw.gui.EditableComponent, org.opentcs.guing.components.drawing.OpenTCSDrawingView, org.opentcs.guing.components.EditableComponent, org.opentcs.util.event.EventHandler

public class OpenTCSDrawingViewModeling
extends org.opentcs.thirdparty.jhotdraw.components.drawing.AbstractOpenTCSDrawingView
A DrawingView implementation for the openTCS plant overview.
See Also:
Serialized Form
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.opentcs.thirdparty.jhotdraw.components.drawing.AbstractOpenTCSDrawingView

    org.opentcs.thirdparty.jhotdraw.components.drawing.AbstractOpenTCSDrawingView.AbstractExtendedEventHandler

    Nested classes/interfaces inherited from class org.jhotdraw.draw.DefaultDrawingView

    org.jhotdraw.draw.DefaultDrawingView.EventHandler

    Nested classes/interfaces inherited from class javax.swing.JComponent

    javax.swing.JComponent.AccessibleJComponent

    Nested classes/interfaces inherited from class java.awt.Container

    java.awt.Container.AccessibleAWTContainer

    Nested classes/interfaces inherited from class java.awt.Component

    java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
  • Field Summary

    Fields inherited from class org.opentcs.thirdparty.jhotdraw.components.drawing.AbstractOpenTCSDrawingView

    FOCUS_GAINED

    Fields inherited from class org.jhotdraw.draw.DefaultDrawingView

    backgroundTile, DRAWING_DOUBLE_BUFFERED_PROPERTY

    Fields inherited from class javax.swing.JComponent

    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

    accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

    Fields inherited from interface org.jhotdraw.draw.DrawingView

    ACTIVE_HANDLE_PROPERTY, CONSTRAINER_PROPERTY, CONSTRAINER_VISIBLE_PROPERTY, CURSOR_PROPERTY, DRAWING_PROPERTY, ENABLED_PROPERTY, HANDLE_DETAIL_LEVEL_PROPERTY, INVISIBLE_CONSTRAINER_PROPERTY, SCALE_FACTOR_PROPERTY, VISIBLE_CONSTRAINER_PROPERTY

    Fields inherited from interface org.jhotdraw.gui.EditableComponent

    SELECTION_EMPTY_PROPERTY

    Fields inherited from interface java.awt.image.ImageObserver

    ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
  • Constructor Summary

    Constructors 
    Constructor Description
    OpenTCSDrawingViewModeling​(org.opentcs.guing.application.ApplicationState appState, org.opentcs.guing.persistence.ModelManager modelManager, FigureCloner figureCloner, ActiveLayerProvider activeLayerProvider, BlockChangeHandler blockChangeHandler)
    Creates new instance.
  • Method Summary

    Modifier and Type Method Description
    void blockAdded​(org.opentcs.guing.model.elements.BlockModel block)
    Message of the application that a block area was created.
    void copySelectedItems()  
    protected org.jhotdraw.draw.DefaultDrawingView.EventHandler createEventHandler()  
    void cutSelectedItems()  
    void delete()  
    void delete​(java.util.Set<org.opentcs.guing.model.ModelComponent> components)  
    void displayDriveOrders​(org.opentcs.guing.model.elements.VehicleModel vehicle, boolean visible)  
    protected void drawTool​(java.awt.Graphics2D g2d)  
    void duplicate()  
    void followVehicle​(org.opentcs.guing.model.elements.VehicleModel model)  
    void pasteBufferedItems()  
    void setBlocks​(org.opentcs.guing.model.ModelComponent blocks)  
    void stopFollowVehicle()  

    Methods inherited from class org.opentcs.thirdparty.jhotdraw.components.drawing.AbstractOpenTCSDrawingView

    addBackgroundBitmap, addBackgroundBitmap, addNotify, addToSelection, addToSelection, clearSelection, computeBounds, containsPointOnScreen, drawConstrainer, drawDrawing, drawingOptionsChanged, getBackgroundBitmaps, getEditor, getModelManager, highlightFocus, isLabelsVisible, loopProofRepaintDrawingArea, onEvent, processKeyEvent, propertyChange, removeFromSelection, removeNotify, scrollTo, selectAll, setDrawing, setLabelsVisible, setScaleFactor, updateBlock, zoomViewToWindow

    Methods inherited from class org.jhotdraw.draw.DefaultDrawingView

    addFigureSelectionListener, drawBackground, drawCanvas, drawDrawingNonvolatileBuffered, drawDrawingVolatileBuffered, drawHandles, drawingToView, drawingToView, findFigure, findFigures, findFiguresWithin, findHandle, fireSelectionChanged, fireViewTransformChanged, getActiveHandle, getBackgroundPaint, getCanvasViewBounds, getCompatibleHandles, getComponent, getConstrainer, getDrawing, getDrawingArea, getDrawingToViewTransform, getEmptyDrawingMessage, getHandleDetailLevel, getInvisibleConstrainer, getPreferredSize, getScaleFactor, getSelectedFigures, getSelectionCount, getToolTipText, getVisibleConstrainer, invalidate, invalidateDimension, isConstrainerVisible, isDrawingDoubleBuffered, isFigureSelected, isSelectionEmpty, paint, paintComponent, printComponent, removeFigureSelectionListener, removeNotify, repaintDrawingArea, repaintHandles, setActiveHandle, setBounds, setConstrainerVisible, setDrawingDoubleBuffered, setEmptyDrawingMessage, setEnabled, setHandleDetailLevel, setInvisibleConstrainer, setViewRenderingHints, setVisibleConstrainer, toggleSelection, viewToDrawing, viewToDrawing

    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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, 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, getAccessibleContext, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, 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

    Methods inherited from interface org.jhotdraw.draw.DrawingView

    addFigureSelectionListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, drawingToView, drawingToView, findFigure, findFigures, findFiguresWithin, findHandle, getActiveHandle, getCompatibleHandles, getComponent, getConstrainer, getDrawing, getDrawingToViewTransform, getHandleDetailLevel, getInvisibleConstrainer, getScaleFactor, getSelectedFigures, getSelectionCount, getVisibleConstrainer, isConstrainerVisible, isEnabled, isFigureSelected, removeFigureSelectionListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaintHandles, requestFocus, setActiveHandle, setConstrainerVisible, setCursor, setEnabled, setHandleDetailLevel, setInvisibleConstrainer, setVisibleConstrainer, toggleSelection, viewToDrawing, viewToDrawing

    Methods inherited from interface org.jhotdraw.gui.EditableComponent

    addPropertyChangeListener, isSelectionEmpty, removePropertyChangeListener
  • Constructor Details

    • OpenTCSDrawingViewModeling

      @Inject public OpenTCSDrawingViewModeling​(org.opentcs.guing.application.ApplicationState appState, org.opentcs.guing.persistence.ModelManager modelManager, FigureCloner figureCloner, ActiveLayerProvider activeLayerProvider, BlockChangeHandler blockChangeHandler)
      Creates new instance.
      Parameters:
      appState - Stores the application's current state.
      modelManager - Provides the current system model.
      figureCloner - A helper for cloning figures.
      activeLayerProvider - The active layer provider.
      blockChangeHandler - The handler for block changes.
  • Method Details

    • cutSelectedItems

      public void cutSelectedItems()
    • copySelectedItems

      public void copySelectedItems()
    • pasteBufferedItems

      public void pasteBufferedItems()
    • delete

      public void delete()
      Specified by:
      delete in interface org.jhotdraw.gui.EditableComponent
      Overrides:
      delete in class org.jhotdraw.draw.DefaultDrawingView
    • duplicate

      public void duplicate()
      Specified by:
      duplicate in interface org.jhotdraw.gui.EditableComponent
      Overrides:
      duplicate in class org.jhotdraw.draw.DefaultDrawingView
    • displayDriveOrders

      public void displayDriveOrders​(org.opentcs.guing.model.elements.VehicleModel vehicle, boolean visible)
    • followVehicle

      public void followVehicle​(@Nonnull org.opentcs.guing.model.elements.VehicleModel model)
    • stopFollowVehicle

      public void stopFollowVehicle()
    • drawTool

      protected void drawTool​(java.awt.Graphics2D g2d)
      Overrides:
      drawTool in class org.jhotdraw.draw.DefaultDrawingView
    • createEventHandler

      protected org.jhotdraw.draw.DefaultDrawingView.EventHandler createEventHandler()
      Overrides:
      createEventHandler in class org.jhotdraw.draw.DefaultDrawingView
    • delete

      public void delete​(java.util.Set<org.opentcs.guing.model.ModelComponent> components)
    • setBlocks

      public void setBlocks​(org.opentcs.guing.model.ModelComponent blocks)
    • blockAdded

      public void blockAdded​(org.opentcs.guing.model.elements.BlockModel block)
      Message of the application that a block area was created.
      Parameters:
      block - The newly created block.