de.lessvoid.nifty.controls
Class DefaultController

java.lang.Object
  extended by de.lessvoid.nifty.controls.DefaultController
All Implemented Interfaces:
Controller

public class DefaultController
extends Object
implements Controller


Constructor Summary
DefaultController()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultController

public DefaultController()
Method Detail

bind

public void bind(Nifty nifty,
                 Screen screen,
                 Element element,
                 Properties parameter,
                 Attributes controlDefinitionAttributes)
Description copied from interface: Controller
Bind this Controller to a certain element.

Specified by:
bind in interface Controller
Parameters:
nifty - nifty
element - the Element
parameter - parameters from the xml source to init the controller

init

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

Specified by:
init in interface Controller

onStartScreen

public void onStartScreen()
Description copied from interface: Controller
Called when the screen is started.

Specified by:
onStartScreen in interface Controller

inputEvent

public boolean inputEvent(NiftyInputEvent inputEvent)
Description copied from interface: Controller
input event.

Specified by:
inputEvent in interface Controller
Parameters:
inputEvent - the NiftyInputEvent to process
Returns:
true, the event has been handled and false, the event has not been handled

onFocus

public void onFocus(boolean getFocus)
Description copied from interface: Controller
This controller gets the focus.

Specified by:
onFocus in interface Controller
Parameters:
getFocus - get focus (true) or loose focus (false)


Copyright © 2011. All Rights Reserved.