Author: tchemit Date: 2013-09-27 09:34:43 +0200 (Fri, 27 Sep 2013) New Revision: 2724 Url: http://nuiton.org/projects/jaxx/repository/revisions/2724 Log: fixes #2857: [BeanDoubleList] Be able to show or hide the selected list popup Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.css trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.jaxx trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleListHandler.java Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.css =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.css 2013-09-24 15:41:41 UTC (rev 2723) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.css 2013-09-27 07:34:43 UTC (rev 2724) @@ -42,6 +42,7 @@ #selectedList { model:{model.getSelectedModel()}; + componentPopupMenu:{handler.getSelectedListPopup(isShowSelectPopupEnabled())}; } #removeButton { Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.jaxx =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.jaxx 2013-09-24 15:41:41 UTC (rev 2723) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.jaxx 2013-09-27 07:34:43 UTC (rev 2724) @@ -40,8 +40,11 @@ <!-- show reset property --> <Boolean id='showReset' javaBean='true'/> + + <!-- show showSelectPopupEnabled property --> + <Boolean id='showSelectPopupEnabled' javaBean='true'/> - <!-- show reset property --> + <!-- show highlightFilterText property --> <Boolean id='highlightFilterText' javaBean='false'/> <!-- bean type --> @@ -137,8 +140,7 @@ <JList id='selectedList' onFocusGained='handler.selectFirstRowIfNoSelection(event)' onMouseClicked='handler.onSelectedListClicked(event)' - onKeyPressed='handler.onKeyPressedOnSelectedList(event)' - componentPopupMenu='{selectedListPopup}'/> + onKeyPressed='handler.onKeyPressedOnSelectedList(event)'/> </JScrollPane> </cell> </row> Modified: trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleListHandler.java =================================================================== --- trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleListHandler.java 2013-09-24 15:41:41 UTC (rev 2723) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleListHandler.java 2013-09-27 07:34:43 UTC (rev 2724) @@ -96,6 +96,16 @@ } }; + public JPopupMenu getSelectedListPopup(boolean showIt) { + JPopupMenu result; + if (showIt) { + result = ui.getSelectedListPopup(); + } else { + result = null; + } + return result; + } + /** * Initializes the handler of the UI * @@ -215,6 +225,9 @@ indexes.setSelectedButton(ui.getIndex()); sortData(); + + // force to reload the showSelectPopup binding + ui.processDataBinding(BeanDoubleList.BINDING_SELECTED_LIST_COMPONENT_POPUP_MENU); } public void setUniverse(List<O> selection) {