java.lang.Object
com.mxgraph.swing.handler.mxRubberband
de.uni_trier.wi2.procake.gui.objecteditor.nestworkfloweditor.editor.EditorRubberband
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener

public class EditorRubberband extends com.mxgraph.swing.handler.mxRubberband
Custom mxRubberband to prevent rubberband-selection with right-mouse-click-dragging
Author:
osobaa
  • Field Summary

    Fields inherited from class com.mxgraph.swing.handler.mxRubberband

    borderColor, bounds, enabled, fillColor, first, graphComponent
  • Constructor Summary

    Constructors
    Constructor
    Description
    EditorRubberband(com.mxgraph.swing.mxGraphComponent graphComponent)
    Constructs a new rubberband selection for the given mxGraphComponent.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Invokes standard mxRubberband behavior on left-click
    void
    Enable mxRubberband selection only on left-click
    void
    Disables mxRubberband selection when mouse is released

    Methods inherited from class com.mxgraph.swing.handler.mxRubberband

    getBorderColor, getFillColor, isEnabled, isRubberbandTrigger, mouseClicked, mouseEntered, mouseExited, mouseMoved, paintRubberband, reset, select, setBorderColor, setEnabled, setFillColor, start

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EditorRubberband

      public EditorRubberband(com.mxgraph.swing.mxGraphComponent graphComponent)
      Constructs a new rubberband selection for the given mxGraphComponent. This Rubberband prevents rubberband selection on right mouse click in only activating it, when left mouse button is used
      Parameters:
      graphComponent - Component that contains the ative standard mxRubberband.
  • Method Details

    • mousePressed

      public void mousePressed(MouseEvent e)
      Enable mxRubberband selection only on left-click
      Specified by:
      mousePressed in interface MouseListener
      Overrides:
      mousePressed in class com.mxgraph.swing.handler.mxRubberband
      Parameters:
      e - Standard MouseEvent
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Invokes standard mxRubberband behavior on left-click
      Specified by:
      mouseDragged in interface MouseMotionListener
      Overrides:
      mouseDragged in class com.mxgraph.swing.handler.mxRubberband
      Parameters:
      e - Standard MouseEvent
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Disables mxRubberband selection when mouse is released
      Specified by:
      mouseReleased in interface MouseListener
      Overrides:
      mouseReleased in class com.mxgraph.swing.handler.mxRubberband
      Parameters:
      e - Standard MouseEvent