de.lessvoid.nifty.controls
Interface Controller

All Known Implementing Classes:
AbstractController, DefaultController, MenuItemControl

public interface Controller

Controller.

Author:
void

Method Summary
 void bind(Nifty nifty, Screen screen, Element element, Properties parameter, Attributes controlDefinitionAttributes)
          Bind this Controller to a certain element.
 void init(Properties parameter, Attributes controlDefinitionAttributes)
          Init the Controller.
 boolean inputEvent(NiftyInputEvent inputEvent)
          input event.
 void onFocus(boolean getFocus)
          This controller gets the focus.
 void onStartScreen()
          Called when the screen is started.
 

Method Detail

bind

void bind(Nifty nifty,
          Screen screen,
          Element element,
          Properties parameter,
          Attributes controlDefinitionAttributes)
Bind this Controller to a certain element.

Parameters:
nifty - nifty
element - the Element
parameter - parameters from the xml source to init the controller
listener - the ControllerEventListener

init

void init(Properties parameter,
          Attributes controlDefinitionAttributes)
Init the Controller. You can assume that bind() has been called for all other controls on the screen.

Parameters:
parameter -
controlDefinitionAttributes -

onStartScreen

void onStartScreen()
Called when the screen is started.


onFocus

void onFocus(boolean getFocus)
This controller gets the focus.

Parameters:
getFocus - get focus (true) or loose focus (false)

inputEvent

boolean inputEvent(NiftyInputEvent inputEvent)
input event.

Parameters:
inputEvent - the NiftyInputEvent to process
Returns:
true, the event has been handled and false, the event has not been handled


Copyright © 2011. All Rights Reserved.