Class SpellCastingGroundContainerMouseState

java.lang.Object
games.stendhal.client.gui.MouseHandler
games.stendhal.client.gui.spellcasting.GroundContainerMouseState
games.stendhal.client.gui.spellcasting.SpellCastingGroundContainerMouseState
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener

public class SpellCastingGroundContainerMouseState extends GroundContainerMouseState
State of the GroundContainer that is switched to, when a spell is selected.
Author:
madmetzger
  • Constructor Details

    • SpellCastingGroundContainerMouseState

      public SpellCastingGroundContainerMouseState(GroundContainer ground)
      Create a new SpellCastingGroundContainerMouseState acting on a given GroundContainer
      Parameters:
      ground - the GroundContainer
  • Method Details

    • switchState

      public void switchState()
      Specified by:
      switchState in class GroundContainerMouseState
    • onMouseClick

      protected boolean onMouseClick(Point point)
      Description copied from class: MouseHandler
      Called on left mouse single click.
      Specified by:
      onMouseClick in class MouseHandler
      Parameters:
      point - location
      Returns:
      true if the click was handled
    • onMouseDoubleClick

      protected boolean onMouseDoubleClick(Point point)
      Description copied from class: MouseHandler
      Called on left double click.
      Specified by:
      onMouseDoubleClick in class MouseHandler
      Parameters:
      point - location
      Returns:
      true if the click was handled
    • onMouseRightClick

      protected void onMouseRightClick(Point point)
      Description copied from class: MouseHandler
      Called on right mouse single click.
      Specified by:
      onMouseRightClick in class MouseHandler
      Parameters:
      point - location
    • onDragStart

      protected void onDragStart(Point point)
      Description copied from class: MouseHandler
      Called when mouse dragging starts.
      Specified by:
      onDragStart in class MouseHandler
      Parameters:
      point - location
    • setSpell

      public void setSpell(RPObject spell)
      Sets the previously selected spell, which will be casted on click on an entity
      Parameters:
      spell - the selected spell
    • getCursor

      public StendhalCursor getCursor(Point point)
      Description copied from class: GroundContainerMouseState
      Get cursor for a point.
      Specified by:
      getCursor in class GroundContainerMouseState
      Returns:
      cursor