Class ToolSelect

java.lang.Object
com.kheops.jmap.client.tools.Tool
com.kheops.jmap.client.tools.ToolSelect

public class ToolSelect extends Tool
This tool is used to punctually select elements displayed in the View object on which this tool was used. When it is used, the first element found at the user click location, contained in a visible and selectable Layer object is selected (usually redrawn with a different style). The layers are searched from the higher position to the lower position. The selected object is added to the layer's selection collection.
See Also:
  • Field Details

    • hourglassCursor

      protected Cursor hourglassCursor
  • Constructor Details

    • ToolSelect

      public ToolSelect()
      Creates a new ToolSelect tool that will NOT display the size of the box in a KLabelPanel and will select elements from all layers
  • Method Details

    • onToolReleased

      public void onToolReleased(MouseEvent e)
      Usually called by the View object on which the tool was used when the user releases the mouse button. It cycle through the layers from top to bottom and adds to selection this element. The method also checks if the CTRL key was pressed, if it is the case, previously selected items remain in selection otherwise they are cleared from selection.
      Overrides:
      onToolReleased in class Tool
      Parameters:
      e - the corresponding mouse event.
    • getLayers

      protected Layer[] getLayers()