de.lessvoid.nifty.screen
Class MouseOverHandler

java.lang.Object
  extended by de.lessvoid.nifty.screen.MouseOverHandler

public class MouseOverHandler
extends Object

The MouseOverHandler manages mouse over elements.

Author:
void

Constructor Summary
MouseOverHandler()
           
 
Method Summary
 void addMouseElement(Element element)
           
 void addMouseOverElement(Element element)
          Add Element.
 void canTheoreticallyHandleMouse(Element element)
           
 String getInfoString()
          Get current state as a String supposed for debug output.
 boolean hitsElement()
          The result of this method will directly be used as the processed flag for a mouse event.
 void processMouseEvent(NiftyMouseInputEvent mouseEvent, long eventTime)
           
 void processMouseOverEvent(Element rootElement, NiftyMouseInputEvent mouseEvent, long eventTime)
           
 void reset()
          Reset mouse over elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MouseOverHandler

public MouseOverHandler()
Method Detail

reset

public void reset()
Reset mouse over elements.


addMouseOverElement

public void addMouseOverElement(Element element)
Add Element.

Parameters:
element - Element

addMouseElement

public void addMouseElement(Element element)

getInfoString

public String getInfoString()
Get current state as a String supposed for debug output.

Returns:
info

processMouseOverEvent

public void processMouseOverEvent(Element rootElement,
                                  NiftyMouseInputEvent mouseEvent,
                                  long eventTime)

processMouseEvent

public void processMouseEvent(NiftyMouseInputEvent mouseEvent,
                              long eventTime)

hitsElement

public boolean hitsElement()
The result of this method will directly be used as the processed flag for a mouse event. So we return true when there is: a) at least a single mouse over element available (so in that case we've found an element below the mouse cursor we can actually interact with) b) there was at least a single element that is temporarily disabled because of an onStartScreen/onEndScreen/ interactionBlocked but would otherwise be able to interact with.

Returns:
true if there is a single element able to process mouse events or false if nothing is there

canTheoreticallyHandleMouse

public void canTheoreticallyHandleMouse(Element element)


Copyright © 2012. All Rights Reserved.