Interface ILayerMouseListener

  • All Known Subinterfaces:
    ILayerDrawer
    All Known Implementing Classes:
    LayerDblGridDrawer, LayerIntGridDrawer, LayerMouseListener, LayerMultiObjectGridDrawer, LayerObjectGridDrawer

    public interface ILayerMouseListener
    An interface used by LayerDrawer to manage the mouse events.

    Title: JAS

    Description: Java Agent-based Simulation library

    Copyright (C) 2002 Michele Sonnessa

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
    Author:
    Michele Sonnessa

    • Method Detail

      • performDblClickActionAt

        boolean performDblClickActionAt​(int atX,
                                        int atY)
        Notify a double click event on a specific cell.
        Parameters:
        atX - The x coordinate of the clicked cell.
        atY - The y coordinate of the clicked cell.
        Returns:
        True if the layer intercepted the event. False if the notify has been ignored.
      • performRightClickActionAt

        boolean performRightClickActionAt​(int atX,
                                          int atY)
        Notify a right button click event on a specific cell.
        Parameters:
        atX - The x coordinate of the clicked cell.
        atY - The y coordinate of the clicked cell.
        Returns:
        True if the layer intercepted the event. False if the notify has been ignored.
      • performMouseMovedFromTo

        boolean performMouseMovedFromTo​(int fromX,
                                        int fromY,
                                        int toX,
                                        int toY)
        Notify a mouse dragging action.
        Parameters:
        fromX - The x coordinate of the starting cell.
        fromY - The y coordinate of the starting cell.
        toX - The x coordinate of the target cell.
        toY - The y coordinate of the target cell.
        Returns:
        True if the layer intercepted the event. False if the notify has been ignored.