Class AbstractBlockWorkspace.ConnectionTool

All Implemented Interfaces:
IDesignTool, IDesignTool.ToolbarInitializer
Enclosing class:
AbstractBlockWorkspace

protected class AbstractBlockWorkspace.ConnectionTool extends SelectionTool
This extension of the standard SelectionTool is AnchorPoint aware and is used for creating connections between blocks in addition to selecting and moving blocks around
  • Constructor Details

    • ConnectionTool

      protected ConnectionTool()
  • Method Details

    • newSelectionControl

      public ISelectionControl newSelectionControl()
      Description copied from interface: IDesignTool
      Gives the tool a chance to create a new selection control object to install handles on the selection. Called on the active tool when the selection changes or after a tool is first installed.
      Specified by:
      newSelectionControl in interface IDesignTool
      Overrides:
      newSelectionControl in class SelectionTool
    • onDragStart

      public void onDragStart(Point startPoint, Point lastPoint, Rectangle r, int modifiers)
      Description copied from class: SelectionTool
      Starting a drag gesture. Many different permutations of current state and key_down masks affect what the drag gesture means:

       1. If the mouse is over a non-container, and SHIFT is not down, the under-mouse object will be MOVED.
       2. If the current item selection is movable, and ALT is down, the current selection will be MOVED.
       3. Otherwise a SELECTION DRAG will start. ALT will turn the drag into FENCE SELECTION at any time, otherwise
          it will be a MARQUEE selection.
       
      Specified by:
      onDragStart in interface IDesignTool
      Overrides:
      onDragStart in class SelectionTool
    • onDrag

      public void onDrag(Point startPoint, Point lastPoint, Rectangle r, int modifiers)
      Description copied from class: AbstractDesignTool
      Called while the user is dragging. All coordinates are relative to the interaction panel and are in zoomed space.
      Specified by:
      onDrag in interface IDesignTool
      Overrides:
      onDrag in class SelectionTool
    • onDragEnd

      public void onDragEnd(Point startPoint, Point lastPoint, Rectangle r, int modifiers)
      Description copied from class: AbstractDesignTool
      Called when the user stops dragging. All coordinates are relative to the interaction panel and are in zoomed space.
      Specified by:
      onDragEnd in interface IDesignTool
      Overrides:
      onDragEnd in class SelectionTool
    • onPress

      public void onPress(Point p, int modifiers)
      Description copied from interface: IDesignTool
      Called when the user presses the mouse in the design space.
      Specified by:
      onPress in interface IDesignTool
      Overrides:
      onPress in class AbstractDesignTool
      Parameters:
      p - The point at which they pressed. Relative to the designable container.
      modifiers - A bitmask of modifiers. Comes from InputEvent.getModifiersEx()
    • onMove

      public void onMove(Point move, int modifiers)
      Specified by:
      onMove in interface IDesignTool
      Overrides:
      onMove in class AbstractDesignTool