de.lessvoid.nifty.examples.defaultcontrols.listbox
Class ListBoxDialogController
java.lang.Object
de.lessvoid.nifty.examples.defaultcontrols.listbox.ListBoxDialogController
- All Implemented Interfaces:
- Controller
public class ListBoxDialogController
- extends Object
- implements Controller
The ListBoxDialog to show off the new ListBox and a couple of more new Nifty 1.3 things.
- Author:
- void
Method Summary |
void |
bind(Nifty nifty,
Screen screen,
Element element,
Properties parameter,
Attributes controlDefinitionAttributes)
|
void |
init(Properties parameter,
Attributes controlDefinitionAttributes)
|
boolean |
inputEvent(NiftyInputEvent inputEvent)
|
void |
onAddTextFieldInputEvent(String id,
NiftyInputEvent event)
|
void |
onAllCheckBoxChanged(String id,
CheckBoxStateChangedEvent event)
This is an example how we could use a regular expression to select the elements we're interested in. |
void |
onAppendButtonClicked(String id,
ButtonClickedEvent event)
|
void |
onAppendTextFieldChanged(String id,
TextFieldChangedEvent event)
|
void |
onFocus(boolean getFocus)
|
void |
onListBoxSelectionChanged(String id,
ListBoxSelectionChangedEvent<JustAnExampleModelClass> changed)
This event handler is directly listening to ListBoxSelectionChangedEvent of a single Control
(the one with the Nifty id "listBox"). |
void |
onRemoveSelectionButtonClicked(String id,
ButtonClickedEvent event)
|
void |
onStartScreen()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListBoxDialogController
public ListBoxDialogController()
bind
public void bind(Nifty nifty,
Screen screen,
Element element,
Properties parameter,
Attributes controlDefinitionAttributes)
- Specified by:
bind
in interface Controller
init
public void init(Properties parameter,
Attributes controlDefinitionAttributes)
- Specified by:
init
in interface Controller
onStartScreen
public void onStartScreen()
- Specified by:
onStartScreen
in interface Controller
onFocus
public void onFocus(boolean getFocus)
- Specified by:
onFocus
in interface Controller
inputEvent
public boolean inputEvent(NiftyInputEvent inputEvent)
- Specified by:
inputEvent
in interface Controller
onAllCheckBoxChanged
public void onAllCheckBoxChanged(String id,
CheckBoxStateChangedEvent event)
- This is an example how we could use a regular expression to select the elements we're interested in.
In this example all of our CheckBox Nifty Ids end with "CheckBox" and - in this example - all Checkboxes
influence the SelectionMode of the ListBox. All CheckBoxes really do the same here so we can take
this shortcut of handling all CheckBoxes equal.
And we can demonstrate the @NiftyEventSubscriber annotation in pattern mode :)
onListBoxSelectionChanged
public void onListBoxSelectionChanged(String id,
ListBoxSelectionChangedEvent<JustAnExampleModelClass> changed)
- This event handler is directly listening to ListBoxSelectionChangedEvent of a single Control
(the one with the Nifty id "listBox").
onAppendTextFieldChanged
public void onAppendTextFieldChanged(String id,
TextFieldChangedEvent event)
onAddTextFieldInputEvent
public void onAddTextFieldInputEvent(String id,
NiftyInputEvent event)
onAppendButtonClicked
public void onAppendButtonClicked(String id,
ButtonClickedEvent event)
onRemoveSelectionButtonClicked
public void onRemoveSelectionButtonClicked(String id,
ButtonClickedEvent event)
Copyright © 2012. All Rights Reserved.