Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 3b8b5d1a by Tony CHEMIT at 2017-07-26T13:07:47+02:00 lors de l'ouverture d'une base, l'écran de la liste des marées n'est pas bien décorée (See #797) + reformat code - - - - - 3 changed files: - application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/content/CloseOpenUIAction.java - application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIManager.java - application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java Changes: ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/content/CloseOpenUIAction.java ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/content/CloseOpenUIAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/content/CloseOpenUIAction.java @@ -63,7 +63,7 @@ public class CloseOpenUIAction extends AbstractContentUIAction { public void actionPerformed(ContentUI<?, ?> ui) { if (ui instanceof ContentOpenableUI) { ((ContentOpenableUI<?, ?>) ui).closeData(); - getMainUI().getSplitpane2().setDividerLocation(getMainUI().getSplitpane2().getMinimumDividerLocation() +25); + getMainUI().getSplitpane2().setDividerLocation(getMainUI().getSplitpane2().getMinimumDividerLocation() + 25); return; } ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIManager.java ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIManager.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIManager.java @@ -125,7 +125,7 @@ public class ContentUIManager { getLayout().show(getLayoutContent(), constraints); - getMainUI().getSplitpane2().setDividerLocation(getMainUI().getSplitpane2().getMinimumDividerLocation()+25); + getMainUI().getSplitpane2().setDividerLocation(getMainUI().getSplitpane2().getMinimumDividerLocation() + 25); } } ===================================== application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java ===================================== --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/list/ContentListUIHandler.java @@ -98,7 +98,7 @@ public abstract class ContentListUIHandler<E extends IdDto, C extends DataDto, U model.addPropertyChangeListener(ContentListUIModel.PROPERTY_DATA, e -> updateList((List) e.getNewValue())); } - protected void updateList(List<DataReference<C>> data) { + private void updateList(List<DataReference<C>> data) { BeanListHeader<DataReference<C>> list = ui.getListHeader(); if (CollectionUtils.isNotEmpty(data)) { if (log.isDebugEnabled()) { @@ -182,7 +182,7 @@ public abstract class ContentListUIHandler<E extends IdDto, C extends DataDto, U getUi().getListPane().setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); } else { -getUi().getListPane().setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); + getUi().getListPane().setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); } }); @@ -262,7 +262,7 @@ getUi().getListPane().setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SC private final transient NavigationTree treeHelper; - private final ThreadLocal<NavigationTreeNodeSupport> containerNode = new ThreadLocal<>(); + private NavigationTreeNodeSupport containerNode; EntityListCellRenderer(ListCellRenderer<?> delegate, NavigationTree treeHelper) { this.delegate = delegate; @@ -270,7 +270,7 @@ getUi().getListPane().setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SC } public void init() { - containerNode.set(treeHelper.getSelectedNode()); + containerNode =treeHelper.getSelectedNode(); } @Override @@ -283,14 +283,14 @@ getUi().getListPane().setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SC // obtain the text from the delegate renderer JLabel comp = (JLabel) delegate.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); - if (value == null || !(value instanceof AbstractReference) || containerNode.get() == null) { + if (value == null || !(value instanceof AbstractReference) || containerNode == null) { // rien de plus a faire return comp; } // recuperation du noeud correspondant dans l'arbre - NavigationTreeNodeSupport node = treeHelper.getChild(containerNode.get(), ((AbstractReference) value).getId()); + NavigationTreeNodeSupport node = treeHelper.getChild(containerNode , ((AbstractReference) value).getId()); if (node == null) { View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/3b8b5d1a4b5830712a0ecf303838... --- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/3b8b5d1a4b5830712a0ecf303838... You're receiving this email because of your account on gitlab.com.