Package org.nuiton.jaxx.widgets.select
Class FilterableDoubleListHandler<O>
- java.lang.Object
-
- org.nuiton.jaxx.widgets.select.FilterableDoubleListHandler<O>
-
- All Implemented Interfaces:
UIHandler<FilterableDoubleList<O>>
public class FilterableDoubleListHandler<O> extends Object implements UIHandler<FilterableDoubleList<O>>
Created on 11/28/14.- Since:
- 2.18
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Constructor Summary
Constructors Constructor Description FilterableDoubleListHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(Predicate<O> filter)voidaddToSelected(List<O> items)voidafterInit(FilterableDoubleList<O> ui)voidbeforeInit(FilterableDoubleList<O> ui)voidclearFilters()org.nuiton.decorator.MultiJXPathDecorator<O>getDecorator()JPopupMenugetSelectedListPopup(boolean showIt)voidinit(org.nuiton.decorator.JXPathDecorator<O> decorator, List<O> universe, List<O> selected)Initializes the handler of the UIvoidinit(org.nuiton.decorator.JXPathDecorator<O> decorator, org.nuiton.decorator.JXPathDecorator<O> decorator2, List<O> universe, List<O> selected)Initializes the handler of the UIvoidonKeyPressedOnSelectedList(KeyEvent e)voidonKeyPressedOnUniverseList(KeyEvent e)voidonSelectedListClicked(MouseEvent event)When selected list was double clicked, move selected items to universe list.voidonUniverseListClicked(MouseEvent event)When universe list was double clicked, move selected items to selected list.voidrefreshFilteredElements()voidremoveFilter(Predicate<O> filter)voidselectFirstRowIfNoSelection(FocusEvent e)protected voidsetHighlightFilterText(Boolean newValue)protected voidsetIndex(Integer oldValue, Integer newValue)Modifie l'index du décorateurprotected voidsetSelected(Collection<O> selected)protected voidsetSortOrder(Boolean oldValue, Boolean newValue)Modifie l'index du décorateurvoidsortData()protected voidsortSelectedList()voidtogglePopup()Toggle the popup visible state.protected voidupdateUI(int index, boolean reversesort)
-
-
-
Method Detail
-
beforeInit
public void beforeInit(FilterableDoubleList<O> ui)
- Specified by:
beforeInitin interfaceUIHandler<O>
-
afterInit
public void afterInit(FilterableDoubleList<O> ui)
-
clearFilters
public void clearFilters()
-
refreshFilteredElements
public void refreshFilteredElements()
-
onUniverseListClicked
public void onUniverseListClicked(MouseEvent event)
When universe list was double clicked, move selected items to selected list.- Parameters:
event- mouse event
-
onSelectedListClicked
public void onSelectedListClicked(MouseEvent event)
When selected list was double clicked, move selected items to universe list.- Parameters:
event- mouse event
-
onKeyPressedOnUniverseList
public void onKeyPressedOnUniverseList(KeyEvent e)
-
onKeyPressedOnSelectedList
public void onKeyPressedOnSelectedList(KeyEvent e)
-
selectFirstRowIfNoSelection
public void selectFirstRowIfNoSelection(FocusEvent e)
-
getSelectedListPopup
public JPopupMenu getSelectedListPopup(boolean showIt)
-
togglePopup
public void togglePopup()
Toggle the popup visible state.
-
init
public void init(org.nuiton.decorator.JXPathDecorator<O> decorator, List<O> universe, List<O> selected)
Initializes the handler of the UI- Parameters:
decorator- the decorator to use to display the data nicelyuniverse- the list of all the available itemsselected- the list of selected items
-
init
public void init(org.nuiton.decorator.JXPathDecorator<O> decorator, org.nuiton.decorator.JXPathDecorator<O> decorator2, List<O> universe, List<O> selected)
Initializes the handler of the UI- Parameters:
decorator- the decorator to use to display the data nicelydecorator2- the selected decorator to use to display the selected data nicely (if none, then reuse the first one)universe- the list of all the available itemsselected- the list of selected items
-
setSelected
protected void setSelected(Collection<O> selected)
-
sortData
public void sortData()
-
setIndex
protected void setIndex(Integer oldValue, Integer newValue)
Modifie l'index du décorateur- Parameters:
oldValue- l'ancienne valeurnewValue- la nouvelle valeur
-
setSortOrder
protected void setSortOrder(Boolean oldValue, Boolean newValue)
Modifie l'index du décorateur- Parameters:
oldValue- l'ancienne valeurnewValue- la nouvelle valeur
-
setHighlightFilterText
protected void setHighlightFilterText(Boolean newValue)
-
updateUI
protected void updateUI(int index, boolean reversesort)
-
sortSelectedList
protected void sortSelectedList()
-
getDecorator
public org.nuiton.decorator.MultiJXPathDecorator<O> getDecorator()
-
-