Author: tchemit Date: 2013-09-30 17:57:56 +0200 (Mon, 30 Sep 2013) New Revision: 2728 Url: http://nuiton.org/projects/jaxx/repository/revisions/2728 Log: fixes #2859: Updates nuiton-decorator to 3.0-alpha-2 fixes #2863: [BeanDoublieList] Can add a second decorator form selected list 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/BeanDoubleListHandler.java trunk/pom.xml 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-30 15:38:09 UTC (rev 2727) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleList.jaxx 2013-09-30 15:57:56 UTC (rev 2728) @@ -147,7 +147,11 @@ </row> <script><![CDATA[ - + +public void init(JXPathDecorator<O> decorator, JXPathDecorator<O> decorator2, List<O> universe, List<O> selected) { + handler.init(decorator, decorator2, universe, selected); + } + public void init(JXPathDecorator<O> decorator, List<O> universe, List<O> selected) { handler.init(decorator, universe, selected); } 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-30 15:38:09 UTC (rev 2727) +++ trunk/jaxx-widgets/src/main/java/jaxx/runtime/swing/editor/bean/BeanDoubleListHandler.java 2013-09-30 15:57:56 UTC (rev 2728) @@ -114,6 +114,17 @@ * @param selected the list of selected items */ public void init(JXPathDecorator<O> decorator, List<O> universe, List<O> selected) { + init(decorator, decorator, universe, selected); + } + /** + * Initializes the handler of the UI + * + * @param decorator the decorator to use to display the data nicely + * @param decorator2 the selected decorator to use to display the selected data nicely (if none, then reuse the first one) + * @param universe the list of all the available items + * @param selected the list of selected items + */ + public void init(JXPathDecorator<O> decorator,JXPathDecorator<O> decorator2, List<O> universe, List<O> selected) { this.decorator = BeanUIUtil.createDecorator(decorator); // make sure useMultiSelect is set before filling universe and select lists @@ -128,8 +139,14 @@ final FilteredDecoratorListCellRenderer universeListCellRenderer = new FilteredDecoratorListCellRenderer(this.decorator); universeList.setCellRenderer(universeListCellRenderer); - selectedList.setCellRenderer(new DecoratorListCellRenderer(this.decorator)); + if (decorator2 != null) { + decorator2 = BeanUIUtil.createDecorator(decorator2); + } else { + decorator2 = this.decorator; + } + selectedList.setCellRenderer(new DecoratorListCellRenderer(decorator2)); + // When universe list selection model changed, update the add button enabled property universeList.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2013-09-30 15:38:09 UTC (rev 2727) +++ trunk/pom.xml 2013-09-30 15:57:56 UTC (rev 2728) @@ -116,7 +116,7 @@ <nuitonUtilsVersion>2.7.1</nuitonUtilsVersion> <nuitonValidatorVersion>3.0-alpha-1</nuitonValidatorVersion> <nuitonConfigVersion>3.0-alpha-1</nuitonConfigVersion> - <nuitonDecoratorVersion>3.0-SNAPSHOT</nuitonDecoratorVersion> + <nuitonDecoratorVersion>3.0-alpha-2</nuitonDecoratorVersion> <nuitonI18nVersion>2.5.1</nuitonI18nVersion> <eugeneVersion>2.6.3</eugeneVersion> <jxLayerVersion>3.0.4</jxLayerVersion>