Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: bbb7ea4d by Tony CHEMIT at 2017-11-06T16:21:32+01:00 clean code + optimize dependencies - - - - - 5 changed files: - client-configuration/pom.xml - client/pom.xml - client/src/main/java/fr/ird/observe/client/ObserveMainUIInitializer.java - client/src/main/java/fr/ird/observe/client/spi/context/ObserveClientImplementationFactory.java - services/src/main/java/fr/ird/observe/services/service/referential/SpeciesService.java Changes: ===================================== client-configuration/pom.xml ===================================== --- a/client-configuration/pom.xml +++ b/client-configuration/pom.xml @@ -59,10 +59,6 @@ </dependency> <dependency> <groupId>fr.ird.observe.toolkit</groupId> - <artifactId>common-service</artifactId> - </dependency> - <dependency> - <groupId>fr.ird.observe.toolkit</groupId> <artifactId>common-client</artifactId> </dependency> ===================================== client/pom.xml ===================================== --- a/client/pom.xml +++ b/client/pom.xml @@ -402,10 +402,6 @@ <dependency> <groupId>io.ultreia.java4all</groupId> - <artifactId>class-mapping</artifactId> - </dependency> - <dependency> - <groupId>io.ultreia.java4all</groupId> <artifactId>java-lang</artifactId> </dependency> @@ -506,10 +502,6 @@ <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - </dependency> <!-- Nuiton --> <dependency> ===================================== client/src/main/java/fr/ird/observe/client/ObserveMainUIInitializer.java ===================================== --- a/client/src/main/java/fr/ird/observe/client/ObserveMainUIInitializer.java +++ b/client/src/main/java/fr/ird/observe/client/ObserveMainUIInitializer.java @@ -200,10 +200,6 @@ public class ObserveMainUIInitializer { ui.getStatus().init(); -// // ajout d'un ecouteur sur la navigation pour toujours mettre la scrollbar -// // tout à droite a chaque selection -// ui.getNavigation().addTreeSelectionListener(this::changeNavigationNode); - // installation layer de blocage en mode busy UIHelper.setLayerUI(ui.getBody(), ui.getBusyBlockLayerUI()); @@ -212,59 +208,6 @@ public class ObserveMainUIInitializer { boolean newvalue = (boolean) evt.getNewValue(); updateBusyState(newvalue); }); - -// ui.getModel().addPropertyChangeListener("focusOnNavigation", evt -> { -// boolean newvalue = (boolean) evt.getNewValue(); -// updateFocusOnNavigation(newvalue); -// }); - -// MouseAdapter mouseAdapter = new MouseAdapter() { -// @Override -// public void mouseEntered(MouseEvent e) { -// if (log.isDebugEnabled()) { -// log.debug("Enter in navigation zone: " + e); -// } -// ui.getModel().setFocusOnNavigation(true); -// } -// }; -// ui.getNavigationView().addMouseListener(mouseAdapter); -// ui.getNavigation().addMouseListener(mouseAdapter); -// ui.getNavigationTreeHeader().addMouseListener(mouseAdapter); -// -// new JSplitPaneInitializer<>().init(null, ui.getModeDb()); -// new JTreeInitializer<>().init(null, ui.getNavigation()); -// -// ui.getNavigationView().setRightDecoration(ui.getNavigationTreeHeader().getToolbar()); -// ui.getNavigationView().addComponentListener(new ComponentAdapter() { -// -// @Override -// public void componentResized(ComponentEvent e) { -// -// JComponent source = (JComponent) e.getSource(); -// -// NavigationTreeHeader actions = ui.getNavigationTreeHeader(); -// -// Dimension preferredLayoutSize = actions.getLayout().preferredLayoutSize(actions); -// -// Dimension showLonglineSize = actions.getShowLongline().getSize(); -// Dimension showSeineSize = actions.getShowSeine().getSize(); -// Dimension showReferential = actions.getShowReferential().getSize(); -// Dimension showEmpty = actions.getShowEmptyProgram().getSize(); -// int minWidth = 18 + (int) Math.max(showLonglineSize.getWidth() + showSeineSize.getWidth(), showReferential.getWidth() + showEmpty.getWidth()); -// source.setMinimumSize(new Dimension(minWidth, (int) source.getSize().getHeight())); -// log.debug("Header resize to minimum: " + source.getMinimumSize()); -// -// int maxWidth = ui.getNavigationView().getWidth() - 10; -// -// int currentWidth = (int) preferredLayoutSize.getWidth(); -// int height = 32; -// if (currentWidth > maxWidth) { -// height += 32; -// } -// actions.setPreferredSize(new Dimension(maxWidth, height)); -// -// } -// }); } protected void init(ObserveActionMap actionMap, AbstractButton editor) { ===================================== client/src/main/java/fr/ird/observe/client/spi/context/ObserveClientImplementationFactory.java ===================================== --- a/client/src/main/java/fr/ird/observe/client/spi/context/ObserveClientImplementationFactory.java +++ b/client/src/main/java/fr/ird/observe/client/spi/context/ObserveClientImplementationFactory.java @@ -1,5 +1,27 @@ package fr.ird.observe.client.spi.context; +/*- + * #%L + * ObServe :: Client + * %% + * Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import fr.ird.observe.client.ObserveMainUI; import fr.ird.observe.client.db.ObserveClientDataSource; import fr.ird.observe.client.db.ObserveClientDataSourcesManager; ===================================== services/src/main/java/fr/ird/observe/services/service/referential/SpeciesService.java ===================================== --- a/services/src/main/java/fr/ird/observe/services/service/referential/SpeciesService.java +++ b/services/src/main/java/fr/ird/observe/services/service/referential/SpeciesService.java @@ -1,5 +1,27 @@ package fr.ird.observe.services.service.referential; +/*- + * #%L + * ObServe :: Services API + * %% + * Copyright (C) 2008 - 2017 IRD, Code Lutin, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.ImmutableSet; import fr.ird.observe.dto.referential.SpeciesDto; import fr.ird.observe.dto.referential.SpeciesGroupDto; View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/bbb7ea4dc2e96f0d0f4babf0b656... --- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/bbb7ea4dc2e96f0d0f4babf0b656... You're receiving this email because of your account on gitlab.com.