Class GraphMouseListener

java.lang.Object
jsimgraph.controller.GraphMouseListener
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener, MouseInputListener

public class GraphMouseListener extends Object implements MouseInputListener
Author:
Federico Granata Date: 6-giu-2003 Time: 14.17.30
  • Field Details

    • currentState

      protected jsimgraph.controller.UIState currentState
    • connect

      protected jsimgraph.controller.UIState connect
    • bezierconnect

      protected jsimgraph.controller.UIState bezierconnect
    • delete

      protected jsimgraph.controller.UIState delete
    • insert

      protected jsimgraph.controller.UIState insert
    • paste

      protected jsimgraph.controller.UIState paste
    • select

      protected jsimgraph.controller.UIState select
    • bezierSelect

      protected jsimgraph.controller.UIState bezierSelect
    • nothing

      protected jsimgraph.controller.UIState nothing
    • focus

      protected org.jgraph.graph.CellView focus
      The focused cell under the mousepointer.
    • cell

      protected org.jgraph.graph.CellView cell
      The cell under the mousepointer.
    • handler

      protected Object handler
      The object that handles mouse operations.
    • handle

      protected org.jgraph.graph.CellHandle handle
      Handle that we are going to use.
    • marquee

      protected org.jgraph.graph.BasicMarqueeHandler marquee
      Marquee that we are going to use.
    • previousCursor

      protected transient Cursor previousCursor
  • Constructor Details

    • GraphMouseListener

      public GraphMouseListener(Mediator mediator)
  • Method Details

    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Invoked when the mouse button has been clicked (pressed and released) on a component.
      Specified by:
      mouseClicked in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent e)
      Invoked when a mouse button has been pressed on a component.
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Invoked when a mouse button has been released on a component.
      Specified by:
      mouseReleased in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Invoked when the mouse enters a component.
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent e)
      Invoked when the mouse exits a component.
      Specified by:
      mouseExited in interface MouseListener
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Invoked when a mouse button is pressed on a component and then dragged. MOUSE_DRAGGED events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

      Due to platform-dependent Drag&Drop implementations, MOUSE_DRAGGED events may not be delivered during a native Drag&Drop operation.

      Specified by:
      mouseDragged in interface MouseMotionListener
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
      Specified by:
      mouseMoved in interface MouseMotionListener
    • setConnectState

      public void setConnectState()
    • setBezierConnectState

      public void setBezierConnectState()
    • setDeleteState

      public void setDeleteState()
    • setDefaultState

      public void setDefaultState()
    • setInsertState

      public void setInsertState(String className)
    • setPasteState

      public void setPasteState()
    • setSelectState

      public void setSelectState()
    • setBezierEdgeModificationState

      public void setBezierEdgeModificationState(JmtEdge edge)
    • postProcessSelection

      protected void postProcessSelection(MouseEvent e, Object cell, boolean wasSelected)
      Invoked after a cell has been selected in the mouseReleased method. This can be used to do something interesting if the cell was already selected, in which case this implementation selects the parent. Override if you want different behaviour, such as start editing.
    • isDescendant

      protected boolean isDescendant(org.jgraph.graph.CellView parentView, org.jgraph.graph.CellView childView)
    • setHandle

      public void setHandle(org.jgraph.graph.CellHandle handle)
    • getHandle

      public org.jgraph.graph.CellHandle getHandle()
    • getFocus

      public org.jgraph.graph.CellView getFocus()
    • getHandler

      public Object getHandler()
    • getMarquee

      public org.jgraph.graph.BasicMarqueeHandler getMarquee()
    • getPreviousCursor

      public Cursor getPreviousCursor()
    • getCell

      public org.jgraph.graph.CellView getCell()
    • setHandler

      public void setHandler(Object handler)
    • setFocus

      public void setFocus(org.jgraph.graph.CellView focus)
    • setCell

      public void setCell(org.jgraph.graph.CellView cell)
    • handleEditTrigger

      protected void handleEditTrigger(Object cell)
    • getCurrentState

      public jsimgraph.controller.UIState getCurrentState()
    • setPreviousCursor

      public void setPreviousCursor(Cursor cursor)
    • cellDeleted

      public void cellDeleted()
      Modify graphMouseListener when a cell has been deleted