public class DropDownNull extends Object implements DropDown
DropDown.DropDownViewConverter<T>, DropDown.SimpleDropDownViewConverter<T>
Constructor and Description |
---|
DropDownNull() |
Modifier and Type | Method and Description |
---|---|
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) |
public Element getElement()
getElement
in interface NiftyControl
public String getId()
getId
in interface NiftyControl
public void setId(String id)
setId
in interface NiftyControl
public int getWidth()
getWidth
in interface NiftyControl
public void setWidth(SizeValue width)
setWidth
in interface NiftyControl
public int getHeight()
getHeight
in interface NiftyControl
public void setHeight(SizeValue height)
setHeight
in interface NiftyControl
public String getStyle()
getStyle
in interface NiftyControl
public void setStyle(String style)
setStyle
in interface NiftyControl
public void enable()
enable
in interface NiftyControl
public void disable()
disable
in interface NiftyControl
public void setEnabled(boolean enabled)
setEnabled
in interface NiftyControl
public boolean isEnabled()
isEnabled
in interface NiftyControl
public void setViewConverter(DropDown.DropDownViewConverter viewConverter)
DropDown
setViewConverter
in interface DropDown
viewConverter
- DropDownViewConverterpublic void addItem(Object newItem)
DropDown
public void insertItem(Object item, int index)
DropDown
insertItem
in interface DropDown
item
- itemindex
- the index to insert the item.public int itemCount()
DropDown
public void clear()
DropDown
public void selectItemByIndex(int selectionIndex)
DropDown
selectItemByIndex
in interface DropDown
selectionIndex
- the item index to select in the DropDownpublic void selectItem(Object item)
DropDown
selectItem
in interface DropDown
item
- the item to selectpublic Object getSelection()
DropDown
getSelection
in interface DropDown
public int getSelectedIndex()
DropDown
getSelectedIndex
in interface DropDown
public void removeItemByIndex(int itemIndex)
DropDown
removeItemByIndex
in interface DropDown
itemIndex
- remove the item with the given index from the DropDownpublic void removeItem(Object item)
DropDown
removeItem
in interface DropDown
item
- the item to remove from the DropDownpublic List getItems()
DropDown
public void addAllItems(List itemsToAdd)
DropDown
addAllItems
in interface DropDown
itemsToAdd
- all items to addpublic void removeAllItems(List itemsToRemove)
DropDown
removeAllItems
in interface DropDown
itemsToRemove
- list of items to removepublic void setFocus()
setFocus
in interface NiftyControl
public void setFocusable(boolean focusable)
setFocusable
in interface NiftyControl
public boolean hasFocus()
hasFocus
in interface NiftyControl
public void layoutCallback()
layoutCallback
in interface NiftyControl
public boolean isBound()
isBound
in interface NiftyControl
Copyright © 2013. All Rights Reserved.