Package javascript.swing.MnR
Class AbstractComboBoxModelAndRenderer<T extends java.lang.Comparable<T>>
- java.lang.Object
-
- javascript.swing.MnR.AbstractComboBoxModelAndRenderer<T>
-
- Type Parameters:
T- The type
- Direct Known Subclasses:
AbstractKeyValueComboBoxModelAndRenderer,DefaultComboBoxModelAndRenderer,DefaultKeyValueComboBoxModelAndRenderer
public abstract class AbstractComboBoxModelAndRenderer<T extends java.lang.Comparable<T>> extends java.lang.ObjectThe abstract object to model and render a combobox- Author:
- gianpiero.diblasi
-
-
Constructor Summary
Constructors Constructor Description AbstractComboBoxModelAndRenderer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddElement(T element)Adds an element to this modelTgetSelectedElement()Returns the selected elementprotected abstract def.dom.Noderender(T element, boolean inlist)Renders an elementvoidsetComboBox(JSComboBox<T> combobox)Sets the combobox managed by this modelvoidsetSelectedElement(T element)Sets the selected element
-
-
-
Method Detail
-
setComboBox
public void setComboBox(JSComboBox<T> combobox)
Sets the combobox managed by this model- Parameters:
combobox- The combobox
-
getSelectedElement
public T getSelectedElement()
Returns the selected element- Returns:
- The selected element
-
setSelectedElement
public void setSelectedElement(T element)
Sets the selected element- Parameters:
element- The selected element
-
addElement
public void addElement(T element)
Adds an element to this model- Parameters:
element- The element
-
render
protected abstract def.dom.Node render(T element, boolean inlist)
Renders an element- Parameters:
element- The elementinlist- true if the rendered element is added to the list, false otherwise (the rendered element is used to show the selected value)- Returns:
- The renderer element
-
-