Package org.nuiton.jaxx.widgets.select
Class FilterableDoubleListHandler<O extends Serializable>
java.lang.Object
org.nuiton.jaxx.widgets.select.FilterableDoubleListHandler<O>
- All Implemented Interfaces:
UIHandler<FilterableDoubleList<O>>
public class FilterableDoubleListHandler<O extends Serializable> extends Object implements UIHandler<FilterableDoubleList<O>>
Created on 11/28/14.
- Since:
- 2.18
- Author:
- Tony Chemit - chemit@codelutin.com
-
Constructor Summary
Constructors Constructor Description FilterableDoubleListHandler() -
Method Summary
Modifier and Type Method Description voidaddFilter(com.google.common.base.Predicate<O> filter)voidafterInit(FilterableDoubleList<O> ui)voidbeforeInit(FilterableDoubleList<O> ui)voidclearFilters()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 UIvoidmoveDownSelected(O item)Move down a selected item.voidmoveUpSelected(O item)Move up a selected item.voidonKeyPressedOnSelectedList(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(com.google.common.base.Predicate<O> filter)voidselect()When add button was hit, move selected items (from universe list) to selected list.voidselectFirstRowIfNoSelection(FocusEvent event)protected voidsetHighlightFilterText(Boolean newValue)protected voidsetIndex(Integer oldValue, Integer newValue)Modifie l'index du décorateurprotected voidsetSortOrder(Boolean oldValue, Boolean newValue)Modifie l'index du décorateurvoidtogglePopup()Toggle the popup visible state.voidunselect()When remove button was hit, move selected items (from selected list) to universe list.protected voidupdateUI(int index, boolean reversesort)
-
Constructor Details
-
FilterableDoubleListHandler
public FilterableDoubleListHandler()
-
-
Method Details
-
beforeInit
- Specified by:
beforeInitin interfaceUIHandler<O extends Serializable>
-
afterInit
- Specified by:
afterInitin interfaceUIHandler<O extends Serializable>
-
addFilter
-
removeFilter
-
clearFilters
public void clearFilters() -
refreshFilteredElements
public void refreshFilteredElements() -
onUniverseListClicked
When universe list was double clicked, move selected items to selected list.- Parameters:
event- mouse event
-
onSelectedListClicked
When selected list was double clicked, move selected items to universe list.- Parameters:
event- mouse event
-
select
public void select()When add button was hit, move selected items (from universe list) to selected list. -
unselect
public void unselect()When remove button was hit, move selected items (from selected list) to universe list. -
onKeyPressedOnUniverseList
-
onKeyPressedOnSelectedList
-
selectFirstRowIfNoSelection
-
moveUpSelected
Move up a selected item.- Parameters:
item- the selected item- Since:
- 2.5.26
-
moveDownSelected
Move down a selected item.- Parameters:
item- the selected item- Since:
- 2.5.26
-
getSelectedListPopup
-
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
-
setIndex
Modifie l'index du décorateur- Parameters:
oldValue- l'ancienne valeurnewValue- la nouvelle valeur
-
setSortOrder
Modifie l'index du décorateur- Parameters:
oldValue- l'ancienne valeurnewValue- la nouvelle valeur
-
setHighlightFilterText
-
updateUI
protected void updateUI(int index, boolean reversesort)
-