de.lessvoid.nifty.controls.nullobjects
Class DropDownNull

java.lang.Object
  extended by de.lessvoid.nifty.controls.nullobjects.DropDownNull
All Implemented Interfaces:
DropDown, NiftyControl

public class DropDownNull
extends Object
implements DropDown


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.lessvoid.nifty.controls.DropDown
DropDown.DropDownViewConverter<T>, DropDown.SimpleDropDownViewConverter<T>
 
Constructor Summary
DropDownNull()
           
 
Method Summary
 void addAllItems(List itemsToAdd)
          Add all items to the DropDown.
 void addItem(Object newItem)
          Add a item to the DropDown.
 void clear()
          Clear all items from this DropDown.
 void disable()
           
 void enable()
           
 Element getElement()
           
 int getHeight()
           
 String getId()
           
 List getItems()
          Get all items of this DropDown.
 int getSelectedIndex()
          Returns the index of the current selected item in the list of all items.
 Object getSelection()
          Get the current selection.
 String getStyle()
           
 int getWidth()
           
 boolean hasFocus()
           
 void insertItem(Object item, int index)
          Insert the given item at the given index.
 boolean isBound()
           
 boolean isEnabled()
           
 int itemCount()
          Retrieve the number of items in the DropDown.
 void layoutCallback()
           
 void removeAllItems(List itemsToRemove)
          Remove all items given in the List from this DropDown.
 void removeItem(Object item)
          Remove the given item from the DropDown.
 void removeItemByIndex(int itemIndex)
          Remove an item from the DropDown by index.
 void selectItem(Object item)
          Select the item in the DropDown.
 void selectItemByIndex(int selectionIndex)
          Select the item with the given index in the DropDown.
 void setEnabled(boolean enabled)
           
 void setFocus()
           
 void setFocusable(boolean focusable)
           
 void setHeight(SizeValue height)
           
 void setId(String id)
           
 void setStyle(String style)
           
 void setViewConverter(DropDown.DropDownViewConverter viewConverter)
          Change the DropDownViewConverter for this DropDown.
 void setWidth(SizeValue width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropDownNull

public DropDownNull()
Method Detail

getElement

public Element getElement()
Specified by:
getElement in interface NiftyControl

getId

public String getId()
Specified by:
getId in interface NiftyControl

setId

public void setId(String id)
Specified by:
setId in interface NiftyControl

getWidth

public int getWidth()
Specified by:
getWidth in interface NiftyControl

setWidth

public void setWidth(SizeValue width)
Specified by:
setWidth in interface NiftyControl

getHeight

public int getHeight()
Specified by:
getHeight in interface NiftyControl

setHeight

public void setHeight(SizeValue height)
Specified by:
setHeight in interface NiftyControl

getStyle

public String getStyle()
Specified by:
getStyle in interface NiftyControl

setStyle

public void setStyle(String style)
Specified by:
setStyle in interface NiftyControl

enable

public void enable()
Specified by:
enable in interface NiftyControl

disable

public void disable()
Specified by:
disable in interface NiftyControl

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface NiftyControl

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface NiftyControl

setViewConverter

public void setViewConverter(DropDown.DropDownViewConverter viewConverter)
Description copied from interface: DropDown
Change the DropDownViewConverter for this DropDown.

Specified by:
setViewConverter in interface DropDown
Parameters:
viewConverter - DropDownViewConverter

addItem

public void addItem(Object newItem)
Description copied from interface: DropDown
Add a item to the DropDown.

Specified by:
addItem in interface DropDown
Parameters:
newItem - the item to add

insertItem

public void insertItem(Object item,
                       int index)
Description copied from interface: DropDown
Insert the given item at the given index.

Specified by:
insertItem in interface DropDown
Parameters:
item - item
index - the index to insert the item.

itemCount

public int itemCount()
Description copied from interface: DropDown
Retrieve the number of items in the DropDown.

Specified by:
itemCount in interface DropDown
Returns:
number of items.

clear

public void clear()
Description copied from interface: DropDown
Clear all items from this DropDown.

Specified by:
clear in interface DropDown

selectItemByIndex

public void selectItemByIndex(int selectionIndex)
Description copied from interface: DropDown
Select the item with the given index in the DropDown.

Specified by:
selectItemByIndex in interface DropDown
Parameters:
selectionIndex - the item index to select in the DropDown

selectItem

public void selectItem(Object item)
Description copied from interface: DropDown
Select the item in the DropDown.

Specified by:
selectItem in interface DropDown
Parameters:
item - the item to select

getSelection

public Object getSelection()
Description copied from interface: DropDown
Get the current selection.

Specified by:
getSelection in interface DropDown
Returns:
the selected item in this DropDown.

getSelectedIndex

public int getSelectedIndex()
Description copied from interface: DropDown
Returns the index of the current selected item in the list of all items.

Specified by:
getSelectedIndex in interface DropDown
Returns:
selected item index

removeItemByIndex

public void removeItemByIndex(int itemIndex)
Description copied from interface: DropDown
Remove an item from the DropDown by index.

Specified by:
removeItemByIndex in interface DropDown
Parameters:
itemIndex - remove the item with the given index from the DropDown

removeItem

public void removeItem(Object item)
Description copied from interface: DropDown
Remove the given item from the DropDown.

Specified by:
removeItem in interface DropDown
Parameters:
item - the item to remove from the DropDown

getItems

public List getItems()
Description copied from interface: DropDown
Get all items of this DropDown.

Specified by:
getItems in interface DropDown
Returns:
list of all items

addAllItems

public void addAllItems(List itemsToAdd)
Description copied from interface: DropDown
Add all items to the DropDown.

Specified by:
addAllItems in interface DropDown
Parameters:
itemsToAdd - all items to add

removeAllItems

public void removeAllItems(List itemsToRemove)
Description copied from interface: DropDown
Remove all items given in the List from this DropDown.

Specified by:
removeAllItems in interface DropDown
Parameters:
itemsToRemove - list of items to remove

setFocus

public void setFocus()
Specified by:
setFocus in interface NiftyControl

setFocusable

public void setFocusable(boolean focusable)
Specified by:
setFocusable in interface NiftyControl

hasFocus

public boolean hasFocus()
Specified by:
hasFocus in interface NiftyControl

layoutCallback

public void layoutCallback()
Specified by:
layoutCallback in interface NiftyControl

isBound

public boolean isBound()
Specified by:
isBound in interface NiftyControl


Copyright © 2011. All Rights Reserved.