Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
777cba00
by Tony Chemit at 2023-11-22T10:36:58+01:00
-
10adf5d7
by Tony Chemit at 2023-11-22T10:37:48+01:00
-
1fc0533e
by Tony Chemit at 2023-11-22T10:40:30+01:00
-
5cd87f5f
by Tony Chemit at 2023-11-22T10:41:07+01:00
-
dc72c092
by Tony Chemit at 2023-11-22T10:41:48+01:00
-
0fa755fe
by Tony Chemit at 2023-11-22T12:45:05+01:00
-
6a0e6978
by Tony Chemit at 2023-11-22T12:45:50+01:00
-
29e47618
by Tony Chemit at 2023-11-22T12:46:41+01:00
-
41742eaf
by Tony Chemit at 2023-11-22T12:56:55+01:00
-
a36cd49b
by Tony Chemit at 2023-11-22T14:01:21+01:00
-
ea70e2f2
by Tony Chemit at 2023-11-22T14:01:22+01:00
-
c5c1314f
by Tony Chemit at 2023-11-22T14:15:59+01:00
-
f261cfc6
by Tony Chemit at 2023-11-22T14:15:59+01:00
-
cfe7a3f5
by Tony Chemit at 2023-11-22T14:16:06+01:00
29 changed files:
- client/configuration/src/main/config/Client.ini
- client/configuration/src/main/i18n/getters/config.getter
- client/configuration/src/main/java/fr/ird/observe/client/configuration/SeineBycatchObservedSystemConfigConverter.java
- client/core/src/main/java/fr/ird/observe/client/datasource/h2/server/H2ServerBodyContent.java
- client/core/src/main/java/fr/ird/observe/client/datasource/presets/RemotePresetsBodyContent.java
- client/core/src/main/java/fr/ird/observe/client/main/body/ClientConfigBodyContent.java
- client/core/src/main/java/fr/ird/observe/client/main/body/ClientConfigUI.java
- client/core/src/main/java/fr/ird/observe/client/main/body/NoBodyContent.java
- client/datasource/actions/src/main/java/fr/ird/observe/client/datasource/actions/AdminUIBodyContent.java
- client/datasource/editor/api/src/main/i18n/getters/java.getter
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/DataSourceEditorBodyContent.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/ObserveKeyStrokesEditorApi.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/map/ObserveMapPane.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/map/ObserveMapPaneLegendItem.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/map/TripMapContentBuilderSupport.java
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/map/TripMapUI.jaxx
- client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/map/TripMapUI.jcss
- + client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/data/map/actions/AddPointCount.java
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/common/TripMapContentBuilder.java
- client/datasource/editor/ps/src/main/resources/map/ps-style.xml
- client/runner/src/main/i18n/translations/client-runner_en_GB.properties
- client/runner/src/main/i18n/translations/client-runner_es_ES.properties
- client/runner/src/main/i18n/translations/client-runner_fr_FR.properties
- core/api/dto/src/main/i18n/getters/java-enumeration.getter
- core/api/dto/src/main/java/fr/ird/observe/dto/data/TripMapPointType.java
- core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripMapBuilder.java
- core/services/i18n/src/main/i18n/translations/services_en_GB.properties
- core/services/i18n/src/main/i18n/translations/services_es_ES.properties
- core/services/i18n/src/main/i18n/translations/services_fr_FR.properties
Changes:
| ... | ... | @@ -846,6 +846,12 @@ key = ui.map.ps.style.logbook.point.color |
| 846 | 846 | type = color
|
| 847 | 847 | defaultValue = java.awt.Color[r=255,g=0,b=0]
|
| 848 | 848 | |
| 849 | +[option mapPsStyleLogbookWithSamplingPointColor]
|
|
| 850 | +description = observe.config.map.ps.style.logbook.withSampling.point.color
|
|
| 851 | +key = ui.map.ps.style.logbook.withSampling.point.color
|
|
| 852 | +type = color
|
|
| 853 | +defaultValue = java.awt.Color[r=255,g=255,b=0]
|
|
| 854 | + |
|
| 849 | 855 | [option mapPsStyleLogbookTextColor]
|
| 850 | 856 | description = observe.config.map.ps.style.logbook.text.color
|
| 851 | 857 | key = ui.map.ps.style.logbook.text.color
|
| ... | ... | @@ -86,6 +86,7 @@ observe.config.map.ps.style.logbook.point.color |
| 86 | 86 | observe.config.map.ps.style.logbook.text.color
|
| 87 | 87 | observe.config.map.ps.style.logbook.text.size
|
| 88 | 88 | observe.config.map.ps.style.logbook.transmitting.buoy.lost.point.color
|
| 89 | +observe.config.map.ps.style.logbook.withSampling.point.color
|
|
| 89 | 90 | observe.config.map.ps.style.observations.line.color
|
| 90 | 91 | observe.config.map.ps.style.observations.point.color
|
| 91 | 92 | observe.config.map.ps.style.observations.text.color
|
| ... | ... | @@ -36,6 +36,7 @@ import org.nuiton.converter.NuitonConverter; |
| 36 | 36 | *
|
| 37 | 37 | * @author Tony Chemit - dev@tchemit.fr
|
| 38 | 38 | */
|
| 39 | +@SuppressWarnings("rawtypes")
|
|
| 39 | 40 | @AutoService(NuitonConverter.class)
|
| 40 | 41 | public class SeineBycatchObservedSystemConfigConverter implements NuitonConverter<SeineBycatchObservedSystemConfig> {
|
| 41 | 42 |
| ... | ... | @@ -38,6 +38,7 @@ import static io.ultreia.java4all.i18n.I18n.t; |
| 38 | 38 | * @author Tony Chemit - dev@tchemit.fr
|
| 39 | 39 | * @since ?
|
| 40 | 40 | */
|
| 41 | +@SuppressWarnings("rawtypes")
|
|
| 41 | 42 | @AutoService(MainUIBodyContent.class)
|
| 42 | 43 | public class H2ServerBodyContent extends MainUIBodyContent<H2ServerUI> implements WithClientUIContextApi {
|
| 43 | 44 |
| ... | ... | @@ -29,6 +29,7 @@ import fr.ird.observe.client.main.body.MainUIBodyContent; |
| 29 | 29 | * @author Tony Chemit - dev@tchemit.fr
|
| 30 | 30 | * @since 8
|
| 31 | 31 | */
|
| 32 | +@SuppressWarnings("rawtypes")
|
|
| 32 | 33 | @AutoService(MainUIBodyContent.class)
|
| 33 | 34 | public class RemotePresetsBodyContent extends MainUIBodyContent<RemotePresetsUI> {
|
| 34 | 35 |
| ... | ... | @@ -33,6 +33,7 @@ import java.util.function.Supplier; |
| 33 | 33 | * @author Tony Chemit - dev@tchemit.fr
|
| 34 | 34 | * @since 8
|
| 35 | 35 | */
|
| 36 | +@SuppressWarnings("rawtypes")
|
|
| 36 | 37 | @AutoService(MainUIBodyContent.class)
|
| 37 | 38 | public class ClientConfigBodyContent extends MainUIBodyContent<ClientConfigUI> implements WithClientUIContextApi {
|
| 38 | 39 |
| ... | ... | @@ -334,6 +334,7 @@ public class ClientConfigUI extends JXTitledPanel implements WithClientUIContext |
| 334 | 334 | helper.addOption(ClientConfigOption.MAP_PS_STYLE_LOGBOOK_TEXT_SIZE);
|
| 335 | 335 | helper.addOption(ClientConfigOption.MAP_PS_STYLE_LOGBOOK_LINE_COLOR);
|
| 336 | 336 | helper.addOption(ClientConfigOption.MAP_PS_STYLE_LOGBOOK_POINT_COLOR);
|
| 337 | + helper.addOption(ClientConfigOption.MAP_PS_STYLE_LOGBOOK_WITH_SAMPLING_POINT_COLOR);
|
|
| 337 | 338 | helper.addOption(ClientConfigOption.MAP_PS_STYLE_LOGBOOK_TRANSMITTING_BUOY_LOST_POINT_COLOR);
|
| 338 | 339 | helper.addOption(ClientConfigOption.MAP_LL_STYLE_FILE);
|
| 339 | 340 | helper.addOption(ClientConfigOption.MAP_LL_STYLE_OBSERVATIONS_LINE_TRIP_COLOR);
|
| ... | ... | @@ -28,6 +28,7 @@ import com.google.auto.service.AutoService; |
| 28 | 28 | * @author Tony Chemit - dev@tchemit.fr
|
| 29 | 29 | * @since 8
|
| 30 | 30 | */
|
| 31 | +@SuppressWarnings("rawtypes")
|
|
| 31 | 32 | @AutoService(MainUIBodyContent.class)
|
| 32 | 33 | public class NoBodyContent extends MainUIBodyContent<NoBodyContentComponent> {
|
| 33 | 34 |
| ... | ... | @@ -55,6 +55,7 @@ import java.util.function.Supplier; |
| 55 | 55 | * @author Tony Chemit - dev@tchemit.fr
|
| 56 | 56 | * @since 8
|
| 57 | 57 | */
|
| 58 | +@SuppressWarnings("rawtypes")
|
|
| 58 | 59 | @AutoService(MainUIBodyContent.class)
|
| 59 | 60 | public class AdminUIBodyContent extends MainUIBodyContent<AdminUI> implements WithClientUIContextApi {
|
| 60 | 61 |
| ... | ... | @@ -214,6 +214,7 @@ observe.ui.datasource.editor.content.map.action.zoomMoins |
| 214 | 214 | observe.ui.datasource.editor.content.map.action.zoomMoins.tip
|
| 215 | 215 | observe.ui.datasource.editor.content.map.action.zoomPlus
|
| 216 | 216 | observe.ui.datasource.editor.content.map.action.zoomPlus.tip
|
| 217 | +observe.ui.datasource.editor.content.map.addPointCount
|
|
| 217 | 218 | observe.ui.datasource.editor.content.map.east
|
| 218 | 219 | observe.ui.datasource.editor.content.map.export.chooseFile.ok
|
| 219 | 220 | observe.ui.datasource.editor.content.map.export.chooseFile.png
|
| ... | ... | @@ -221,7 +222,10 @@ observe.ui.datasource.editor.content.map.export.chooseFile.title |
| 221 | 222 | observe.ui.datasource.editor.content.map.export.success
|
| 222 | 223 | observe.ui.datasource.editor.content.map.legend
|
| 223 | 224 | observe.ui.datasource.editor.content.map.legend.not.valid.count
|
| 225 | +observe.ui.datasource.editor.content.map.legend.not.valid.counts
|
|
| 224 | 226 | observe.ui.datasource.editor.content.map.legend.tip
|
| 227 | +observe.ui.datasource.editor.content.map.legend.valid.count
|
|
| 228 | +observe.ui.datasource.editor.content.map.legend.valid.counts
|
|
| 225 | 229 | observe.ui.datasource.editor.content.map.legendBottom
|
| 226 | 230 | observe.ui.datasource.editor.content.map.legendBottom.tip
|
| 227 | 231 | observe.ui.datasource.editor.content.map.legendTop
|
| ... | ... | @@ -73,6 +73,7 @@ import static io.ultreia.java4all.i18n.I18n.t; |
| 73 | 73 | * @author Tony Chemit - dev@tchemit.fr
|
| 74 | 74 | * @since 8
|
| 75 | 75 | */
|
| 76 | +@SuppressWarnings("rawtypes")
|
|
| 76 | 77 | @AutoService(MainUIBodyContent.class)
|
| 77 | 78 | public class DataSourceEditorBodyContent extends MainUIBodyContent<DataSourceEditor> implements WithClientUIContextApi {
|
| 78 | 79 |
| ... | ... | @@ -37,7 +37,7 @@ public class ObserveKeyStrokesEditorApi extends ObserveKeyStrokesSupport { |
| 37 | 37 | //FIXME Let's design a nice new API to register KeyStroke (a new annotation, processed to generate KeyStroke resources)
|
| 38 | 38 | // Navigation
|
| 39 | 39 | |
| 40 | - public static final KeyStroke KEY_STROKE_MAP_CONFIGURE = KeyStroke.getKeyStroke("alt pressed F2");
|
|
| 40 | + public static final KeyStroke KEY_STROKE_MAP_CONFIGURE = KeyStroke.getKeyStroke("ctrl pressed F2");
|
|
| 41 | 41 | public static final KeyStroke KEY_STROKE_NAVIGATION_CONFIGURE = KeyStroke.getKeyStroke("pressed F12");
|
| 42 | 42 | |
| 43 | 43 | public static final KeyStroke KEY_STROKE_STORAGE_MENU_LEFT = KeyStroke.getKeyStroke("pressed F1");
|
| ... | ... | @@ -51,6 +51,7 @@ public class ObserveKeyStrokesEditorApi extends ObserveKeyStrokesSupport { |
| 51 | 51 | |
| 52 | 52 | public static final KeyStroke KEY_STROKE_SHOW_OBS = KeyStroke.getKeyStroke("ctrl pressed O");
|
| 53 | 53 | public static final KeyStroke KEY_STROKE_SHOW_OBSERVATIONS_TRIP_SEGMENT = KeyStroke.getKeyStroke("shift ctrl pressed O");
|
| 54 | + public static final KeyStroke KEY_STROKE_SHOW_POINT_COUNT = KeyStroke.getKeyStroke("ctrl pressed P");
|
|
| 54 | 55 | public static final KeyStroke KEY_STROKE_SHOW_LOGBOOK = KeyStroke.getKeyStroke("ctrl pressed L");
|
| 55 | 56 | public static final KeyStroke KEY_STROKE_SHOW_LOGBOOK_TRIP_SEGMENT = KeyStroke.getKeyStroke("shift ctrl pressed L");
|
| 56 | 57 | public static final KeyStroke KEY_STROKE_LEGEND_TOGGLE = KeyStroke.getKeyStroke("pressed F11");
|
| ... | ... | @@ -53,7 +53,7 @@ import static io.ultreia.java4all.i18n.I18n.t; |
| 53 | 53 | * @author Tony Chemit - dev@tchemit.fr
|
| 54 | 54 | */
|
| 55 | 55 | public class ObserveMapPane extends JMapPane {
|
| 56 | - |
|
| 56 | + public static final String PROPERTY_ADD_POINT_COUNT = "addPointCount";
|
|
| 57 | 57 | protected static final int MARGIN = 10;
|
| 58 | 58 | protected static final int SCALE_HEIGHT = 15;
|
| 59 | 59 | protected static final int SCALE_WIDTH_MAX = 200;
|
| ... | ... | @@ -73,6 +73,7 @@ public class ObserveMapPane extends JMapPane { |
| 73 | 73 | private long scaleInMiles;
|
| 74 | 74 | private boolean showLegend = true;
|
| 75 | 75 | private LegendPosition legendPosition = LegendPosition.BOTTOM;
|
| 76 | + private boolean addPointCount = true;
|
|
| 76 | 77 | |
| 77 | 78 | public enum LegendPosition {
|
| 78 | 79 | TOP, BOTTOM
|
| ... | ... | @@ -132,6 +133,18 @@ public class ObserveMapPane extends JMapPane { |
| 132 | 133 | public boolean isLegendPositionBottom() {
|
| 133 | 134 | return getLegendPosition()==LegendPosition.BOTTOM;
|
| 134 | 135 | }
|
| 136 | + |
|
| 137 | + |
|
| 138 | + public boolean isAddPointCount() {
|
|
| 139 | + return addPointCount;
|
|
| 140 | + }
|
|
| 141 | + |
|
| 142 | + public void setAddPointCount(boolean addPointCount) {
|
|
| 143 | + boolean oldValue = isAddPointCount();
|
|
| 144 | + this.addPointCount = addPointCount;
|
|
| 145 | + firePropertyChange(PROPERTY_ADD_POINT_COUNT, oldValue, addPointCount);
|
|
| 146 | + }
|
|
| 147 | + |
|
| 135 | 148 | protected void updateScale() {
|
| 136 | 149 | ReferencedEnvelope displayArea = getDisplayArea();
|
| 137 | 150 | double dpi = 2.54 / 100; // pour avoir l'echélle en metre/pixel
|
| ... | ... | @@ -270,7 +283,7 @@ public class ObserveMapPane extends JMapPane { |
| 270 | 283 | int maxLabelWidth = 0;
|
| 271 | 284 | |
| 272 | 285 | for (ObserveMapPaneLegendItem item : legendItems) {
|
| 273 | - Rectangle2D labelArea = fm.getStringBounds(item.getLabel(), graphics);
|
|
| 286 | + Rectangle2D labelArea = fm.getStringBounds(item.getLabel(addPointCount), graphics);
|
|
| 274 | 287 | |
| 275 | 288 | maxLabelWidth = Math.max((int) labelArea.getWidth(), maxLabelWidth);
|
| 276 | 289 | |
| ... | ... | @@ -321,7 +334,7 @@ public class ObserveMapPane extends JMapPane { |
| 321 | 334 | |
| 322 | 335 | int labelMarginBottom = ((ObserveMapPaneLegendItem.LEGEND_ITEM_HEIGHT - fm.getHeight()) / 2) + fm.getDescent();
|
| 323 | 336 | |
| 324 | - graphics.drawString(item.getLabel(),
|
|
| 337 | + graphics.drawString(item.getLabel(addPointCount),
|
|
| 325 | 338 | x + LEGEND_MARGIN + ObserveMapPaneLegendItem.LEGEND_SYMBOL_WIDTH,
|
| 326 | 339 | y + ObserveMapPaneLegendItem.LEGEND_ITEM_HEIGHT - labelMarginBottom);
|
| 327 | 340 |
| ... | ... | @@ -22,6 +22,7 @@ package fr.ird.observe.client.datasource.editor.api.content.data.map; |
| 22 | 22 | * #L%
|
| 23 | 23 | */
|
| 24 | 24 | |
| 25 | +import io.ultreia.java4all.i18n.I18n;
|
|
| 25 | 26 | import org.geotools.styling.Style;
|
| 26 | 27 | import org.locationtech.jts.geom.Coordinate;
|
| 27 | 28 | import org.opengis.feature.simple.SimpleFeature;
|
| ... | ... | @@ -37,14 +38,18 @@ public class ObserveMapPaneLegendItem { |
| 37 | 38 | protected static final int LEGEND_SYMBOL_WIDTH = 50;
|
| 38 | 39 | protected static final int LEGEND_MARGIN = 5;
|
| 39 | 40 | protected static final Color LEGEND_BACKGROUND = new Color(1f, 1f, 1f, 0.8f);
|
| 40 | - protected SimpleFeature simpleFeature;
|
|
| 41 | - protected Style style;
|
|
| 42 | - protected String label;
|
|
| 41 | + protected final SimpleFeature simpleFeature;
|
|
| 42 | + protected final Style style;
|
|
| 43 | + protected final String label;
|
|
| 44 | + protected final int notValidCount;
|
|
| 45 | + protected final int validCount;
|
|
| 43 | 46 | |
| 44 | - public ObserveMapPaneLegendItem(SimpleFeature simpleFeature, Style style, String label) {
|
|
| 47 | + public ObserveMapPaneLegendItem(SimpleFeature simpleFeature, Style style, String label, int notValidCount, int validCount) {
|
|
| 45 | 48 | this.simpleFeature = simpleFeature;
|
| 46 | 49 | this.style = style;
|
| 47 | 50 | this.label = label;
|
| 51 | + this.notValidCount = notValidCount;
|
|
| 52 | + this.validCount = validCount;
|
|
| 48 | 53 | }
|
| 49 | 54 | |
| 50 | 55 | public static Coordinate[] lineCoordinates() {
|
| ... | ... | @@ -62,23 +67,27 @@ public class ObserveMapPaneLegendItem { |
| 62 | 67 | return simpleFeature;
|
| 63 | 68 | }
|
| 64 | 69 | |
| 65 | - public void setSimpleFeature(SimpleFeature simpleFeature) {
|
|
| 66 | - this.simpleFeature = simpleFeature;
|
|
| 67 | - }
|
|
| 68 | - |
|
| 69 | 70 | public Style getStyle() {
|
| 70 | 71 | return style;
|
| 71 | 72 | }
|
| 72 | 73 | |
| 73 | - public void setStyle(Style style) {
|
|
| 74 | - this.style = style;
|
|
| 75 | - }
|
|
| 74 | + public String getLabel(boolean addPointCount) {
|
|
| 75 | + String label = this.label;
|
|
| 76 | + if (addPointCount && validCount > 0) {
|
|
| 77 | + if (validCount == 1) {
|
|
| 78 | + label += " " + I18n.t("observe.ui.datasource.editor.content.map.legend.valid.count", validCount);
|
|
| 79 | + } else {
|
|
| 80 | + label += " " + I18n.t("observe.ui.datasource.editor.content.map.legend.valid.counts", validCount);
|
|
| 81 | + }
|
|
| 82 | + }
|
|
| 83 | + if (notValidCount > 0) {
|
|
| 84 | + if (notValidCount == 1) {
|
|
| 85 | + label += " " + I18n.t("observe.ui.datasource.editor.content.map.legend.not.valid.count", notValidCount);
|
|
| 86 | + } else {
|
|
| 87 | + label += " " + I18n.t("observe.ui.datasource.editor.content.map.legend.not.valid.counts", notValidCount);
|
|
| 76 | 88 | |
| 77 | - public String getLabel() {
|
|
| 89 | + }
|
|
| 90 | + }
|
|
| 78 | 91 | return label;
|
| 79 | 92 | }
|
| 80 | - |
|
| 81 | - public void setLabel(String label) {
|
|
| 82 | - this.label = label;
|
|
| 83 | - }
|
|
| 84 | 93 | } |
| ... | ... | @@ -68,15 +68,16 @@ import java.nio.file.Path; |
| 68 | 68 | import java.text.SimpleDateFormat;
|
| 69 | 69 | import java.util.ArrayList;
|
| 70 | 70 | import java.util.Arrays;
|
| 71 | +import java.util.Comparator;
|
|
| 71 | 72 | import java.util.Date;
|
| 72 | 73 | import java.util.EnumMap;
|
| 73 | -import java.util.HashSet;
|
|
| 74 | 74 | import java.util.LinkedHashSet;
|
| 75 | 75 | import java.util.LinkedList;
|
| 76 | 76 | import java.util.List;
|
| 77 | 77 | import java.util.Map;
|
| 78 | 78 | import java.util.Optional;
|
| 79 | 79 | import java.util.Set;
|
| 80 | +import java.util.stream.Collectors;
|
|
| 80 | 81 | |
| 81 | 82 | /**
|
| 82 | 83 | * @author Tony Chemit - dev@tchemit.fr
|
| ... | ... | @@ -97,6 +98,7 @@ public abstract class TripMapContentBuilderSupport implements TripMapContentBuil |
| 97 | 98 | protected static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("MM-dd");
|
| 98 | 99 | |
| 99 | 100 | protected final List<ObserveMapPaneLegendItem> legendItems;
|
| 101 | + protected final Map<TripMapPointType, List<TripMapPoint>> validPoints = new EnumMap<>(TripMapPointType.class);
|
|
| 100 | 102 | protected final Map<TripMapPointType, List<TripMapPoint>> notValidPoints = new EnumMap<>(TripMapPointType.class);
|
| 101 | 103 | protected final Set<TripMapPointType> acceptedTripPointTypes;
|
| 102 | 104 | protected final SimpleFeatureBuilder lineBuilder;
|
| ... | ... | @@ -206,6 +208,7 @@ public abstract class TripMapContentBuilderSupport implements TripMapContentBuil |
| 206 | 208 | @Override
|
| 207 | 209 | public void reset() {
|
| 208 | 210 | legendItems.clear();
|
| 211 | + validPoints.clear();
|
|
| 209 | 212 | notValidPoints.clear();
|
| 210 | 213 | if (mapContent != null) {
|
| 211 | 214 | mapContent.dispose();
|
| ... | ... | @@ -245,43 +248,46 @@ public abstract class TripMapContentBuilderSupport implements TripMapContentBuil |
| 245 | 248 | pointBuilder.add(formatDate(tripMapPoint.getTime()));
|
| 246 | 249 | pointBuilder.add(tripMapPoint.getType().name());
|
| 247 | 250 | pointsFeatures.add(pointBuilder.buildFeature(null));
|
| 251 | + validPoints.computeIfAbsent(tripMapPoint.getType(), e -> new LinkedList<>()).add(tripMapPoint);
|
|
| 248 | 252 | }
|
| 249 | 253 | |
| 250 | 254 | public void addPoints(List<TripMapPoint> tripMapPoints, String layerName, String notValidPointsLabel) {
|
| 251 | 255 | DefaultFeatureCollection pointsFeatures = new DefaultFeatureCollection();
|
| 252 | 256 | Style stylePoints = findStyle(styledLayerDescriptor, layerName);
|
| 253 | 257 | |
| 254 | - Set<TripMapPointType> pointTypeInLegend = new HashSet<>();
|
|
| 255 | 258 | for (TripMapPoint tripMapPoint : tripMapPoints) {
|
| 256 | 259 | if (tripMapPoint.isValid()) {
|
| 257 | 260 | addPoint(pointsFeatures, tripMapPoint);
|
| 258 | - pointTypeInLegend.add(tripMapPoint.getType());
|
|
| 259 | 261 | } else {
|
| 260 | 262 | notValidPoints.computeIfAbsent(tripMapPoint.getType(), e -> new LinkedList<>()).add(tripMapPoint);
|
| 261 | 263 | }
|
| 262 | 264 | }
|
| 263 | - pointTypeInLegend.retainAll(acceptedTripPointTypes);
|
|
| 264 | 265 | if (!pointsFeatures.isEmpty()) {
|
| 265 | 266 | Layer pointsLayer = new FeatureLayer(pointsFeatures, stylePoints, layerName);
|
| 266 | 267 | mapContent.addLayer(pointsLayer);
|
| 267 | 268 | }
|
| 269 | + Set<TripMapPointType> pointTypeInLegend = validPoints.keySet();
|
|
| 270 | + pointTypeInLegend.retainAll(acceptedTripPointTypes);
|
|
| 268 | 271 | |
| 269 | - Set<TripMapPointType> notValidTypes = new LinkedHashSet<>(notValidPoints.keySet());
|
|
| 272 | + Set<TripMapPointType> notValidTypes = notValidPoints.keySet().stream().sorted(Comparator.comparing(TripMapPointType::getLabel)).collect(Collectors.toCollection(LinkedHashSet::new));
|
|
| 270 | 273 | |
| 271 | - for (TripMapPointType type : pointTypeInLegend) {
|
|
| 274 | + List<TripMapPointType> sortedPointTypeInLegend = pointTypeInLegend.stream().sorted(Comparator.comparing(TripMapPointType::getLabel)).collect(Collectors.toList());
|
|
| 275 | + for (TripMapPointType type : sortedPointTypeInLegend) {
|
|
| 272 | 276 | List<TripMapPoint> notValidPointsForType = notValidPoints.get(type);
|
| 277 | + List<TripMapPoint> validPointsForType = validPoints.get(type);
|
|
| 278 | + int notValidCount = notValidPointsForType == null ? 0 : notValidPointsForType.size();
|
|
| 279 | + int validCount = validPointsForType == null ? 0 : validPointsForType.size();
|
|
| 273 | 280 | String label = type.getLabel();
|
| 274 | - if (notValidPointsForType != null && !notValidPointsForType.isEmpty()) {
|
|
| 275 | - label += " " + I18n.t("observe.ui.datasource.editor.content.map.legend.not.valid.count", notValidPointsForType.size());
|
|
| 281 | + if (notValidCount > 0) {
|
|
| 276 | 282 | notValidTypes.remove(type);
|
| 277 | 283 | }
|
| 278 | - addPointLegend(stylePoints, type.name(), label);
|
|
| 284 | + addPointLegend(stylePoints, type.name(), label, notValidCount, validCount);
|
|
| 279 | 285 | }
|
| 280 | 286 | if (!notValidTypes.isEmpty()) {
|
| 281 | 287 | for (TripMapPointType type : notValidTypes) {
|
| 282 | 288 | List<TripMapPoint> notValidPointsForType = notValidPoints.get(type);
|
| 283 | 289 | String label = I18n.t(notValidPointsLabel, notValidPointsForType.size()) + " - " + type.getLabel();
|
| 284 | - addPointLegend(stylePoints, "notValidPoint", label);
|
|
| 290 | + addPointLegend(stylePoints, "notValidPoint", label, 0, 0);
|
|
| 285 | 291 | }
|
| 286 | 292 | }
|
| 287 | 293 | }
|
| ... | ... | @@ -354,17 +360,17 @@ public abstract class TripMapContentBuilderSupport implements TripMapContentBuil |
| 354 | 360 | }
|
| 355 | 361 | lineBuilder.add(legendName);
|
| 356 | 362 | SimpleFeature simpleFeature = lineBuilder.buildFeature(null);
|
| 357 | - ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(simpleFeature, styleLines, legendLabel);
|
|
| 363 | + ObserveMapPaneLegendItem legendTripDay = new ObserveMapPaneLegendItem(simpleFeature, styleLines, legendLabel, 0, 0);
|
|
| 358 | 364 | legendItems.add(legendTripDay);
|
| 359 | 365 | }
|
| 360 | 366 | |
| 361 | - protected void addPointLegend(Style stylePoints, String legendName, String legendLabel) {
|
|
| 367 | + protected void addPointLegend(Style stylePoints, String legendName, String legendLabel, int notValidCount, int validCount) {
|
|
| 362 | 368 | Point point = getGeometryFactory().createPoint(ObserveMapPaneLegendItem.pointCoordinates());
|
| 363 | 369 | pointBuilder.add(point);
|
| 364 | 370 | pointBuilder.add("");
|
| 365 | 371 | pointBuilder.add(legendName);
|
| 366 | 372 | SimpleFeature simpleFeature = pointBuilder.buildFeature(null);
|
| 367 | - ObserveMapPaneLegendItem legendPoint = new ObserveMapPaneLegendItem(simpleFeature, stylePoints, legendLabel);
|
|
| 373 | + ObserveMapPaneLegendItem legendPoint = new ObserveMapPaneLegendItem(simpleFeature, stylePoints, legendLabel, notValidCount, validCount);
|
|
| 368 | 374 | legendItems.add(legendPoint);
|
| 369 | 375 | }
|
| 370 | 376 | } |
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | <import>
|
| 23 | 23 | fr.ird.observe.dto.data.TripMapConfigDto
|
| 24 | 24 | java.awt.CardLayout
|
| 25 | + java.util.Objects
|
|
| 25 | 26 | </import>
|
| 26 | 27 | |
| 27 | 28 | <CardLayout id="contentLayout"/>
|
| ... | ... | @@ -44,6 +45,7 @@ |
| 44 | 45 | <JCheckBoxMenuItem id='toggleLegend'/>
|
| 45 | 46 | <JRadioButtonMenuItem id='legendPositionTop' styleClass='legendPosition'/>
|
| 46 | 47 | <JRadioButtonMenuItem id='legendPositionBottom' styleClass='legendPosition'/>
|
| 48 | + <JCheckBoxMenuItem id='addPointCount'/>
|
|
| 47 | 49 | </JToolBar>
|
| 48 | 50 | </JPanel>
|
| 49 | 51 |
| ... | ... | @@ -50,16 +50,20 @@ |
| 50 | 50 | }
|
| 51 | 51 | |
| 52 | 52 | .legendPosition {
|
| 53 | - buttonGroup:"legendPosition";
|
|
| 54 | - enabled:{toggleLegend.isSelected()};
|
|
| 53 | + buttonGroup: legendPosition;
|
|
| 55 | 54 | }
|
| 56 | 55 | |
| 57 | 56 | #legendPositionTop {
|
| 58 | 57 | selected:{observeMapPane.isLegendPositionTop()};
|
| 59 | - enabled:{observeMapPane.isLegendPositionBottom()}
|
|
| 58 | + enabled:{observeMapPane.isShowLegend() && observeMapPane.isLegendPositionBottom()}
|
|
| 60 | 59 | }
|
| 61 | 60 | |
| 62 | 61 | #legendPositionBottom {
|
| 63 | 62 | selected:{observeMapPane.isLegendPositionBottom()};
|
| 64 | - enabled:{observeMapPane.isLegendPositionTop()}
|
|
| 63 | + enabled:{observeMapPane.isShowLegend() && observeMapPane.isLegendPositionTop()}
|
|
| 65 | 64 | }
|
| 65 | + |
|
| 66 | +#addPointCount {
|
|
| 67 | + enabled:{observeMapPane.isShowLegend()};
|
|
| 68 | + selected:{observeMapPane.isAddPointCount()};
|
|
| 69 | +} |
|
| \ No newline at end of file |
| 1 | +package fr.ird.observe.client.datasource.editor.api.content.data.map.actions;
|
|
| 2 | + |
|
| 3 | +/*-
|
|
| 4 | + * #%L
|
|
| 5 | + * ObServe Client :: DataSource :: Editor :: API
|
|
| 6 | + * %%
|
|
| 7 | + * Copyright (C) 2008 - 2023 IRD, Ultreia.io
|
|
| 8 | + * %%
|
|
| 9 | + * This program is free software: you can redistribute it and/or modify
|
|
| 10 | + * it under the terms of the GNU General Public License as
|
|
| 11 | + * published by the Free Software Foundation, either version 3 of the
|
|
| 12 | + * License, or (at your option) any later version.
|
|
| 13 | + *
|
|
| 14 | + * This program is distributed in the hope that it will be useful,
|
|
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 | + * GNU General Public License for more details.
|
|
| 18 | + *
|
|
| 19 | + * You should have received a copy of the GNU General Public
|
|
| 20 | + * License along with this program. If not, see
|
|
| 21 | + * <http://www.gnu.org/licenses/gpl-3.0.html>.
|
|
| 22 | + * #L%
|
|
| 23 | + */
|
|
| 24 | + |
|
| 25 | +import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi;
|
|
| 26 | +import fr.ird.observe.client.datasource.editor.api.content.data.map.ObserveMapPane;
|
|
| 27 | +import fr.ird.observe.client.datasource.editor.api.content.data.map.TripMapUI;
|
|
| 28 | + |
|
| 29 | +import java.awt.event.ActionEvent;
|
|
| 30 | + |
|
| 31 | +import static io.ultreia.java4all.i18n.I18n.t;
|
|
| 32 | + |
|
| 33 | +/**
|
|
| 34 | + * Created at 22/11/2023.
|
|
| 35 | + *
|
|
| 36 | + * @author Tony Chemit - dev@tchemit.fr
|
|
| 37 | + * @since 9.3.0
|
|
| 38 | + */
|
|
| 39 | +public class AddPointCount extends TripMapUIActionSupport implements ConfigureMapAction {
|
|
| 40 | + |
|
| 41 | + public AddPointCount() {
|
|
| 42 | + super(t("observe.ui.datasource.editor.content.map.addPointCount"),
|
|
| 43 | + t("observe.ui.datasource.editor.content.map.addPointCount"),
|
|
| 44 | + null, ObserveKeyStrokesEditorApi.KEY_STROKE_SHOW_POINT_COUNT);
|
|
| 45 | + }
|
|
| 46 | + |
|
| 47 | + @Override
|
|
| 48 | + protected void doActionPerformed(ActionEvent e, TripMapUI ui) {
|
|
| 49 | + ObserveMapPane observeMapPane = ui.getObserveMapPane();
|
|
| 50 | + boolean newValue = !observeMapPane.isAddPointCount();
|
|
| 51 | + observeMapPane.setAddPointCount(newValue);
|
|
| 52 | + ui.getHandler().updateMap(observeMapPane.isShowLegend());
|
|
| 53 | + }
|
|
| 54 | +} |
| ... | ... | @@ -63,9 +63,12 @@ public class TripMapContentBuilder extends fr.ird.observe.client.datasource.edit |
| 63 | 63 | TripMapPointType.psActivityObsWithFreeSchoolType,
|
| 64 | 64 | TripMapPointType.psActivityObsWithObjectSchoolType,
|
| 65 | 65 | TripMapPointType.psActivityLogbook,
|
| 66 | + TripMapPointType.psActivityLogbookWithSampling,
|
|
| 66 | 67 | TripMapPointType.psActivityLogbookInHarbour,
|
| 67 | 68 | TripMapPointType.psActivityLogbookWithFreeSchoolType,
|
| 69 | + TripMapPointType.psActivityLogbookWithFreeSchoolTypeWithSampling,
|
|
| 68 | 70 | TripMapPointType.psActivityLogbookWithObjectSchoolType,
|
| 71 | + TripMapPointType.psActivityLogbookWithObjectSchoolTypeWithSampling,
|
|
| 69 | 72 | TripMapPointType.psTransmittingBuoyLostLogbook
|
| 70 | 73 | )), createLineBuilder(true));
|
| 71 | 74 | }
|
| ... | ... | @@ -81,6 +84,7 @@ public class TripMapContentBuilder extends fr.ird.observe.client.datasource.edit |
| 81 | 84 | result.add("mapPsStyleLogbookTextSize");
|
| 82 | 85 | result.add("mapPsStyleLogbookLineColor");
|
| 83 | 86 | result.add("mapPsStyleLogbookPointColor");
|
| 87 | + result.add("mapPsStyleLogbookWithSamplingPointColor");
|
|
| 84 | 88 | result.add("mapPsStyleLogbookTransmittingBuoyLostPointColor");
|
| 85 | 89 | return result;
|
| 86 | 90 | }
|
| ... | ... | @@ -318,6 +318,33 @@ |
| 318 | 318 | </Rule>
|
| 319 | 319 | </FeatureTypeStyle>
|
| 320 | 320 | |
| 321 | + <FeatureTypeStyle>
|
|
| 322 | + <Rule>
|
|
| 323 | + <Name>Other (with sampling)</Name>
|
|
| 324 | + <ogc:Filter>
|
|
| 325 | + <ogc:PropertyIsEqualTo>
|
|
| 326 | + <ogc:PropertyName>pointType</ogc:PropertyName>
|
|
| 327 | + <ogc:Literal>psActivityLogbookWithSampling</ogc:Literal>
|
|
| 328 | + </ogc:PropertyIsEqualTo>
|
|
| 329 | + </ogc:Filter>
|
|
| 330 | + <PointSymbolizer>
|
|
| 331 | + <Graphic>
|
|
| 332 | + <Mark>
|
|
| 333 | + <WellKnownName>ttf://Serif#U+2299</WellKnownName>
|
|
| 334 | + <Fill>
|
|
| 335 | + <CssParameter name="fill">${mapPsStyleLogbookWithSamplingPointColor}</CssParameter>
|
|
| 336 | + </Fill>
|
|
| 337 | + <Stroke>
|
|
| 338 | + <CssParameter name="stroke">#000000</CssParameter>
|
|
| 339 | + <CssParameter name="stroke-width">1</CssParameter>
|
|
| 340 | + </Stroke>
|
|
| 341 | + </Mark>
|
|
| 342 | + <Size>16</Size>
|
|
| 343 | + </Graphic>
|
|
| 344 | + </PointSymbolizer>
|
|
| 345 | + </Rule>
|
|
| 346 | + </FeatureTypeStyle>
|
|
| 347 | + |
|
| 321 | 348 | <FeatureTypeStyle>
|
| 322 | 349 | <Rule>
|
| 323 | 350 | <Name>With free school type</Name>
|
| ... | ... | @@ -345,6 +372,33 @@ |
| 345 | 372 | </Rule>
|
| 346 | 373 | </FeatureTypeStyle>
|
| 347 | 374 | |
| 375 | + <FeatureTypeStyle>
|
|
| 376 | + <Rule>
|
|
| 377 | + <Name>With free school type (with sampling)</Name>
|
|
| 378 | + <ogc:Filter>
|
|
| 379 | + <ogc:PropertyIsEqualTo>
|
|
| 380 | + <ogc:PropertyName>pointType</ogc:PropertyName>
|
|
| 381 | + <ogc:Literal>psActivityLogbookWithFreeSchoolTypeWithSampling</ogc:Literal>
|
|
| 382 | + </ogc:PropertyIsEqualTo>
|
|
| 383 | + </ogc:Filter>
|
|
| 384 | + <PointSymbolizer>
|
|
| 385 | + <Graphic>
|
|
| 386 | + <Mark>
|
|
| 387 | + <WellKnownName>ttf://Serif#U+25C8</WellKnownName>
|
|
| 388 | + <Fill>
|
|
| 389 | + <CssParameter name="fill">${mapPsStyleLogbookWithSamplingPointColor}</CssParameter>
|
|
| 390 | + </Fill>
|
|
| 391 | + <Stroke>
|
|
| 392 | + <CssParameter name="stroke">#000000</CssParameter>
|
|
| 393 | + <CssParameter name="stroke-width">1</CssParameter>
|
|
| 394 | + </Stroke>
|
|
| 395 | + </Mark>
|
|
| 396 | + <Size>16</Size>
|
|
| 397 | + </Graphic>
|
|
| 398 | + </PointSymbolizer>
|
|
| 399 | + </Rule>
|
|
| 400 | + </FeatureTypeStyle>
|
|
| 401 | + |
|
| 348 | 402 | <FeatureTypeStyle>
|
| 349 | 403 | <Rule>
|
| 350 | 404 | <Name>With object school type</Name>
|
| ... | ... | @@ -366,7 +420,34 @@ |
| 366 | 420 | <CssParameter name="stroke-width">1</CssParameter>
|
| 367 | 421 | </Stroke>
|
| 368 | 422 | </Mark>
|
| 369 | - <Size>12</Size>
|
|
| 423 | + <Size>16</Size>
|
|
| 424 | + </Graphic>
|
|
| 425 | + </PointSymbolizer>
|
|
| 426 | + </Rule>
|
|
| 427 | + </FeatureTypeStyle>
|
|
| 428 | + |
|
| 429 | + <FeatureTypeStyle>
|
|
| 430 | + <Rule>
|
|
| 431 | + <Name>With object school type (with sampling)</Name>
|
|
| 432 | + <ogc:Filter>
|
|
| 433 | + <ogc:PropertyIsEqualTo>
|
|
| 434 | + <ogc:PropertyName>pointType</ogc:PropertyName>
|
|
| 435 | + <ogc:Literal>psActivityLogbookWithObjectSchoolTypeWithSampling</ogc:Literal>
|
|
| 436 | + </ogc:PropertyIsEqualTo>
|
|
| 437 | + </ogc:Filter>
|
|
| 438 | + <PointSymbolizer>
|
|
| 439 | + <Graphic>
|
|
| 440 | + <Mark>
|
|
| 441 | + <WellKnownName>ttf://Serif#U+2295</WellKnownName>
|
|
| 442 | + <Fill>
|
|
| 443 | + <CssParameter name="fill">${mapPsStyleLogbookWithSamplingPointColor}</CssParameter>
|
|
| 444 | + </Fill>
|
|
| 445 | + <Stroke>
|
|
| 446 | + <CssParameter name="stroke">#000000</CssParameter>
|
|
| 447 | + <CssParameter name="stroke-width">1</CssParameter>
|
|
| 448 | + </Stroke>
|
|
| 449 | + </Mark>
|
|
| 450 | + <Size>16</Size>
|
|
| 370 | 451 | </Graphic>
|
| 371 | 452 | </PointSymbolizer>
|
| 372 | 453 | </Rule>
|
| ... | ... | @@ -103,6 +103,7 @@ observe.config.map.ps.style.logbook.point.color=[PS - Logbook] Color for points |
| 103 | 103 | observe.config.map.ps.style.logbook.text.color=[PS - Logbook] Color for text
|
| 104 | 104 | observe.config.map.ps.style.logbook.text.size=[PS - Logbook] Size for text
|
| 105 | 105 | observe.config.map.ps.style.logbook.transmitting.buoy.lost.point.color=[PS - Logbook] Color for transmitting buoy lost points
|
| 106 | +observe.config.map.ps.style.logbook.withSampling.point.color=[PS - Logbook] Color for points (with sampling)
|
|
| 106 | 107 | observe.config.map.ps.style.observations.line.color=[PS - Observations] Color for lines
|
| 107 | 108 | observe.config.map.ps.style.observations.point.color=[PS - Observations] Color for points
|
| 108 | 109 | observe.config.map.ps.style.observations.text.color=[PS - Observations] Color for text
|
| ... | ... | @@ -703,6 +704,7 @@ observe.ui.datasource.editor.content.map.action.zoomMoins=Zoom out |
| 703 | 704 | observe.ui.datasource.editor.content.map.action.zoomMoins.tip=Zoom out
|
| 704 | 705 | observe.ui.datasource.editor.content.map.action.zoomPlus=Zoom in
|
| 705 | 706 | observe.ui.datasource.editor.content.map.action.zoomPlus.tip=Zoom in
|
| 707 | +observe.ui.datasource.editor.content.map.addPointCount=Display point counts in legend
|
|
| 706 | 708 | observe.ui.datasource.editor.content.map.east=East
|
| 707 | 709 | observe.ui.datasource.editor.content.map.export.chooseFile.ok=Exporter
|
| 708 | 710 | observe.ui.datasource.editor.content.map.export.chooseFile.png=PNG image
|
| ... | ... | @@ -713,13 +715,16 @@ observe.ui.datasource.editor.content.map.legend.logbook.hauling=Logbook - Haulin |
| 713 | 715 | observe.ui.datasource.editor.content.map.legend.logbook.setting=Logbook - Setting
|
| 714 | 716 | observe.ui.datasource.editor.content.map.legend.logbook.trip=Logbook - Route
|
| 715 | 717 | observe.ui.datasource.editor.content.map.legend.logbook.tripSegment=Logbook - Segment
|
| 716 | -observe.ui.datasource.editor.content.map.legend.not.valid.count=( %d points are not displayed )
|
|
| 718 | +observe.ui.datasource.editor.content.map.legend.not.valid.count=( %d point are not displayed )
|
|
| 719 | +observe.ui.datasource.editor.content.map.legend.not.valid.counts=( %d points are not displayed )
|
|
| 717 | 720 | observe.ui.datasource.editor.content.map.legend.obs.hauling=Observation - Hauling
|
| 718 | 721 | observe.ui.datasource.editor.content.map.legend.obs.setting=Observation - Setting
|
| 719 | 722 | observe.ui.datasource.editor.content.map.legend.obs.trip=Observation - Route
|
| 720 | 723 | observe.ui.datasource.editor.content.map.legend.obs.tripBetweenTwoDays=Night trip
|
| 721 | 724 | observe.ui.datasource.editor.content.map.legend.obs.tripDay=Observation - Day trip
|
| 722 | 725 | observe.ui.datasource.editor.content.map.legend.tip=To display or hide legend
|
| 726 | +observe.ui.datasource.editor.content.map.legend.valid.count=- %d point is displayed
|
|
| 727 | +observe.ui.datasource.editor.content.map.legend.valid.counts=- %d point(s) are displayed
|
|
| 723 | 728 | observe.ui.datasource.editor.content.map.legendBottom=Display legend at bottom
|
| 724 | 729 | observe.ui.datasource.editor.content.map.legendBottom.tip=Display legend at bottom
|
| 725 | 730 | observe.ui.datasource.editor.content.map.legendTop=Display legend at top
|
| ... | ... | @@ -103,6 +103,7 @@ observe.config.map.ps.style.logbook.point.color=[PS - Logbook] Color for points |
| 103 | 103 | observe.config.map.ps.style.logbook.text.color=[PS - Logbook] Color for text
|
| 104 | 104 | observe.config.map.ps.style.logbook.text.size=[PS - Logbook] Size for text
|
| 105 | 105 | observe.config.map.ps.style.logbook.transmitting.buoy.lost.point.color=[PS - Logbook] Color for transmitting buoy lost points
|
| 106 | +observe.config.map.ps.style.logbook.withSampling.point.color=[PS - Logbook] Color for points (with sampling) \#TODO
|
|
| 106 | 107 | observe.config.map.ps.style.observations.line.color=[PS - Observations] Color for lines
|
| 107 | 108 | observe.config.map.ps.style.observations.point.color=[PS - Observations] Color for points
|
| 108 | 109 | observe.config.map.ps.style.observations.text.color=[PS - Observations] Color for text
|
| ... | ... | @@ -703,6 +704,7 @@ observe.ui.datasource.editor.content.map.action.zoomMoins=Zoom out \#TODO |
| 703 | 704 | observe.ui.datasource.editor.content.map.action.zoomMoins.tip=Zoom out \#TODO
|
| 704 | 705 | observe.ui.datasource.editor.content.map.action.zoomPlus=Zoom in \#TODO
|
| 705 | 706 | observe.ui.datasource.editor.content.map.action.zoomPlus.tip=Zoom in \#TODO
|
| 707 | +observe.ui.datasource.editor.content.map.addPointCount=Display point counts in legend \#TODO
|
|
| 706 | 708 | observe.ui.datasource.editor.content.map.east=Este
|
| 707 | 709 | observe.ui.datasource.editor.content.map.export.chooseFile.ok=Exportar
|
| 708 | 710 | observe.ui.datasource.editor.content.map.export.chooseFile.png=imagen PNG
|
| ... | ... | @@ -713,13 +715,16 @@ observe.ui.datasource.editor.content.map.legend.logbook.hauling=Logbook - Arrast |
| 713 | 715 | observe.ui.datasource.editor.content.map.legend.logbook.setting=Logbook - Calada
|
| 714 | 716 | observe.ui.datasource.editor.content.map.legend.logbook.trip=Logbook - Trayecto
|
| 715 | 717 | observe.ui.datasource.editor.content.map.legend.logbook.tripSegment=Logbook - Trayecto
|
| 716 | -observe.ui.datasource.editor.content.map.legend.not.valid.count=( %d points are not displayed )
|
|
| 718 | +observe.ui.datasource.editor.content.map.legend.not.valid.count=( %d point is not displayed )
|
|
| 719 | +observe.ui.datasource.editor.content.map.legend.not.valid.counts=( %d points are not displayed )
|
|
| 717 | 720 | observe.ui.datasource.editor.content.map.legend.obs.hauling=Observation - Arrastre
|
| 718 | 721 | observe.ui.datasource.editor.content.map.legend.obs.setting=Observation - Calada
|
| 719 | 722 | observe.ui.datasource.editor.content.map.legend.obs.trip=Observation - Route
|
| 720 | 723 | observe.ui.datasource.editor.content.map.legend.obs.tripBetweenTwoDays=Observation - Trayecto del noche
|
| 721 | 724 | observe.ui.datasource.editor.content.map.legend.obs.tripDay=Observation - Trayecto
|
| 722 | 725 | observe.ui.datasource.editor.content.map.legend.tip=To display or hide legend \#TODO
|
| 726 | +observe.ui.datasource.editor.content.map.legend.valid.count=- %d point is displayed \#TODO
|
|
| 727 | +observe.ui.datasource.editor.content.map.legend.valid.counts=- %d points are displayed \#TODO
|
|
| 723 | 728 | observe.ui.datasource.editor.content.map.legendBottom=Display legend at bottom
|
| 724 | 729 | observe.ui.datasource.editor.content.map.legendBottom.tip=Display legend at bottom
|
| 725 | 730 | observe.ui.datasource.editor.content.map.legendTop=Display legend at top
|
| ... | ... | @@ -103,6 +103,7 @@ observe.config.map.ps.style.logbook.point.color=[Senne - Livre de bord] Couleur |
| 103 | 103 | observe.config.map.ps.style.logbook.text.color=[Senne - Livre de bord] Couleur pour les textes
|
| 104 | 104 | observe.config.map.ps.style.logbook.text.size=[Senne - Livre de bord] Taille pour les textes
|
| 105 | 105 | observe.config.map.ps.style.logbook.transmitting.buoy.lost.point.color=[Senne - Observations] Couleur pour la fin de transmission de balise
|
| 106 | +observe.config.map.ps.style.logbook.withSampling.point.color=[Senne - Livre de bord] Couleur pour les points (avec échantillonnage)
|
|
| 106 | 107 | observe.config.map.ps.style.observations.line.color=[Senne - Observations] Couleur pour les traces
|
| 107 | 108 | observe.config.map.ps.style.observations.point.color=[Senne - Observations] Couleur pour les points
|
| 108 | 109 | observe.config.map.ps.style.observations.text.color=[Senne - Observations] Couleur pour les textes
|
| ... | ... | @@ -703,6 +704,7 @@ observe.ui.datasource.editor.content.map.action.zoomMoins=Réduire |
| 703 | 704 | observe.ui.datasource.editor.content.map.action.zoomMoins.tip=Réduire
|
| 704 | 705 | observe.ui.datasource.editor.content.map.action.zoomPlus=Agrandir
|
| 705 | 706 | observe.ui.datasource.editor.content.map.action.zoomPlus.tip=Agrandir
|
| 707 | +observe.ui.datasource.editor.content.map.addPointCount=Afficher le nombre de points dans la légende
|
|
| 706 | 708 | observe.ui.datasource.editor.content.map.east=Est
|
| 707 | 709 | observe.ui.datasource.editor.content.map.export.chooseFile.ok=Exporter
|
| 708 | 710 | observe.ui.datasource.editor.content.map.export.chooseFile.png=image PNG
|
| ... | ... | @@ -713,17 +715,20 @@ observe.ui.datasource.editor.content.map.legend.logbook.hauling=Livre de bord - |
| 713 | 715 | observe.ui.datasource.editor.content.map.legend.logbook.setting=Livre de bord - Filage
|
| 714 | 716 | observe.ui.datasource.editor.content.map.legend.logbook.trip=Livre de bord - Trajet
|
| 715 | 717 | observe.ui.datasource.editor.content.map.legend.logbook.tripSegment=Livre de bord - Trajet
|
| 716 | -observe.ui.datasource.editor.content.map.legend.not.valid.count=( dont %d points non affichés )
|
|
| 718 | +observe.ui.datasource.editor.content.map.legend.not.valid.count=( dont un point non affiché )
|
|
| 719 | +observe.ui.datasource.editor.content.map.legend.not.valid.counts=( dont %d points non affichés )
|
|
| 717 | 720 | observe.ui.datasource.editor.content.map.legend.obs.hauling=Observation - Virage
|
| 718 | 721 | observe.ui.datasource.editor.content.map.legend.obs.setting=Observation - Filage
|
| 719 | 722 | observe.ui.datasource.editor.content.map.legend.obs.trip=Observation - Trajet
|
| 720 | 723 | observe.ui.datasource.editor.content.map.legend.obs.tripBetweenTwoDays=Observation - Trajet de nuit
|
| 721 | 724 | observe.ui.datasource.editor.content.map.legend.obs.tripDay=Observation - Trajet de jour
|
| 722 | 725 | observe.ui.datasource.editor.content.map.legend.tip=Pour afficher ou masquer la légende
|
| 723 | -observe.ui.datasource.editor.content.map.legendBottom=Afficher la légende en haut
|
|
| 724 | -observe.ui.datasource.editor.content.map.legendBottom.tip=Afficher la légende en haut
|
|
| 725 | -observe.ui.datasource.editor.content.map.legendTop=Afficher la légende en bas
|
|
| 726 | -observe.ui.datasource.editor.content.map.legendTop.tip=Afficher la légende en bas
|
|
| 726 | +observe.ui.datasource.editor.content.map.legend.valid.count=- un point affiché
|
|
| 727 | +observe.ui.datasource.editor.content.map.legend.valid.counts=- %d points affichés
|
|
| 728 | +observe.ui.datasource.editor.content.map.legendBottom=Afficher la légende en bas
|
|
| 729 | +observe.ui.datasource.editor.content.map.legendBottom.tip=Afficher la légende en bas
|
|
| 730 | +observe.ui.datasource.editor.content.map.legendTop=Afficher la légende en haut
|
|
| 731 | +observe.ui.datasource.editor.content.map.legendTop.tip=Afficher la légende en hat
|
|
| 727 | 732 | observe.ui.datasource.editor.content.map.logbook.points.not.valid=Livre de bord - Nombre de points non affichés \: %d
|
| 728 | 733 | observe.ui.datasource.editor.content.map.miles=milles
|
| 729 | 734 | observe.ui.datasource.editor.content.map.north=Nord
|
| ... | ... | @@ -33,7 +33,10 @@ observe.constant.TripMapPointType.llTripLandingHarbour |
| 33 | 33 | observe.constant.TripMapPointType.psActivityLogbook
|
| 34 | 34 | observe.constant.TripMapPointType.psActivityLogbookInHarbour
|
| 35 | 35 | observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolType
|
| 36 | +observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolTypeWithSampling
|
|
| 36 | 37 | observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolType
|
| 38 | +observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolTypeWithSampling
|
|
| 39 | +observe.constant.TripMapPointType.psActivityLogbookWithSampling
|
|
| 37 | 40 | observe.constant.TripMapPointType.psActivityObs
|
| 38 | 41 | observe.constant.TripMapPointType.psActivityObsInHarbour
|
| 39 | 42 | observe.constant.TripMapPointType.psActivityObsWithFreeSchoolType
|
| ... | ... | @@ -43,9 +43,12 @@ public enum TripMapPointType { |
| 43 | 43 | psActivityObsWithObjectSchoolType,
|
| 44 | 44 | |
| 45 | 45 | psActivityLogbook,
|
| 46 | + psActivityLogbookWithSampling,
|
|
| 46 | 47 | psActivityLogbookInHarbour,
|
| 47 | 48 | psActivityLogbookWithFreeSchoolType,
|
| 49 | + psActivityLogbookWithFreeSchoolTypeWithSampling,
|
|
| 48 | 50 | psActivityLogbookWithObjectSchoolType,
|
| 51 | + psActivityLogbookWithObjectSchoolTypeWithSampling,
|
|
| 49 | 52 | psTransmittingBuoyLostLogbook,
|
| 50 | 53 | |
| 51 | 54 | llTripDepartureHarbour,
|
| ... | ... | @@ -94,7 +94,8 @@ public class TripMapBuilder { |
| 94 | 94 | /* 03 */ " a.latitude," +
|
| 95 | 95 | /* 04 */ " a.longitude," +
|
| 96 | 96 | /* 05 */ " a.vesselActivity," +
|
| 97 | - /* 06 */ " a.schoolType" +
|
|
| 97 | + /* 06 */ " a.schoolType," +
|
|
| 98 | + /* 07 */ " (SELECT count(*) FROM ps_logbook.sampleActivity sa WHERE sa.activity = a.topiaId)" +
|
|
| 98 | 99 | " FROM ps_logbook.route r" +
|
| 99 | 100 | " INNER JOIN ps_logbook.activity a ON a.route = r.topiaId" +
|
| 100 | 101 | " WHERE r.trip = ?" +
|
| ... | ... | @@ -106,15 +107,25 @@ public class TripMapBuilder { |
| 106 | 107 | String schoolType = resultSet.getString(6);
|
| 107 | 108 | String vesselActivityId = resultSet.getString(5);
|
| 108 | 109 | TripMapPointType type = TripMapPointType.psActivityLogbook;
|
| 110 | + boolean withSample = resultSet.getInt(7) > 0;
|
|
| 111 | + if (withSample) {
|
|
| 112 | + type = TripMapPointType.psActivityLogbookWithSampling;
|
|
| 113 | + }
|
|
| 109 | 114 | if (ProtectedIdsPs.PS_COMMON_ACTIVITY_HARBOUR_ID.equals(vesselActivityId)) {
|
| 110 | 115 | type = TripMapPointType.psActivityLogbookInHarbour;
|
| 111 | 116 | } else if (schoolType != null) {
|
| 112 | 117 | switch (schoolType) {
|
| 113 | 118 | case ProtectedIdsPs.PS_COMMON_SCHOOL_TYPE_FREE_ID:
|
| 114 | 119 | type = TripMapPointType.psActivityLogbookWithFreeSchoolType;
|
| 120 | + if (withSample) {
|
|
| 121 | + type = TripMapPointType.psActivityLogbookWithFreeSchoolTypeWithSampling;
|
|
| 122 | + }
|
|
| 115 | 123 | break;
|
| 116 | 124 | case ProtectedIdsPs.PS_COMMON_SCHOOL_TYPE_OBJECT_ID:
|
| 117 | 125 | type = TripMapPointType.psActivityLogbookWithObjectSchoolType;
|
| 126 | + if (withSample) {
|
|
| 127 | + type = TripMapPointType.psActivityLogbookWithObjectSchoolTypeWithSampling;
|
|
| 128 | + }
|
|
| 118 | 129 | break;
|
| 119 | 130 | }
|
| 120 | 131 | }
|
| ... | ... | @@ -460,7 +460,10 @@ observe.constant.TripMapPointType.llTripLandingHarbour=Port landing |
| 460 | 460 | observe.constant.TripMapPointType.psActivityLogbook=Logbook - Other activity
|
| 461 | 461 | observe.constant.TripMapPointType.psActivityLogbookInHarbour=Logbook - In port
|
| 462 | 462 | observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolType=Logbook - Free School type
|
| 463 | +observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolTypeWithSampling=Logbook - Free School type (with sampling)
|
|
| 463 | 464 | observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolType=Logbook - Object School type
|
| 465 | +observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolTypeWithSampling=Logbook - Object School type (with sampling)
|
|
| 466 | +observe.constant.TripMapPointType.psActivityLogbookWithSampling=Logbook - Other activity (with sampling)
|
|
| 464 | 467 | observe.constant.TripMapPointType.psActivityObs=Observation - Other activity
|
| 465 | 468 | observe.constant.TripMapPointType.psActivityObsInHarbour=Observation - In port
|
| 466 | 469 | observe.constant.TripMapPointType.psActivityObsWithFreeSchoolType=Observation - Free School type
|
| ... | ... | @@ -460,7 +460,10 @@ observe.constant.TripMapPointType.llTripLandingHarbour=Puerto de llegada |
| 460 | 460 | observe.constant.TripMapPointType.psActivityLogbook=Logbook - Otro Actividad
|
| 461 | 461 | observe.constant.TripMapPointType.psActivityLogbookInHarbour=Logbook - En puerto
|
| 462 | 462 | observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolType=Logbook - Banco libre
|
| 463 | +observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolTypeWithSampling=Logbook - Banco libre (with sampling) \#TODO
|
|
| 463 | 464 | observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolType=Logbook - Banco a objeto
|
| 465 | +observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolTypeWithSampling=Logbook - Banco a objeto (with sampling) \#TODO
|
|
| 466 | +observe.constant.TripMapPointType.psActivityLogbookWithSampling=Logbook - Otro Actividad (with sampling) \#TODO
|
|
| 464 | 467 | observe.constant.TripMapPointType.psActivityObs=Observation - Otro Actividad
|
| 465 | 468 | observe.constant.TripMapPointType.psActivityObsInHarbour=Observation - En puerto
|
| 466 | 469 | observe.constant.TripMapPointType.psActivityObsWithFreeSchoolType=Observation - Banco libre
|
| ... | ... | @@ -457,10 +457,13 @@ observe.constant.TripMapPointType.llActivityObsWithSettingEnd=Observation - Fin |
| 457 | 457 | observe.constant.TripMapPointType.llActivityObsWithSettingStart=Observation - Début de filage
|
| 458 | 458 | observe.constant.TripMapPointType.llTripDepartureHarbour=Port de départ
|
| 459 | 459 | observe.constant.TripMapPointType.llTripLandingHarbour=Port d'arrivée
|
| 460 | -observe.constant.TripMapPointType.psActivityLogbook=Livre de Bord - Autre activité
|
|
| 461 | -observe.constant.TripMapPointType.psActivityLogbookInHarbour=Livre de Bord - Au port
|
|
| 462 | -observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolType=Livre de Bord - Banc libre
|
|
| 463 | -observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolType=Livre de Bord - Banc objet
|
|
| 460 | +observe.constant.TripMapPointType.psActivityLogbook=Livre de bord - Autre activité
|
|
| 461 | +observe.constant.TripMapPointType.psActivityLogbookInHarbour=Livre de bord - Au port
|
|
| 462 | +observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolType=Livre de bord - Banc libre
|
|
| 463 | +observe.constant.TripMapPointType.psActivityLogbookWithFreeSchoolTypeWithSampling=Livre de bord - Banc libre (avec échantillonnage)
|
|
| 464 | +observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolType=Livre de bord - Banc objet
|
|
| 465 | +observe.constant.TripMapPointType.psActivityLogbookWithObjectSchoolTypeWithSampling=Livre de bord - Banc objet (avec échantillonnage)
|
|
| 466 | +observe.constant.TripMapPointType.psActivityLogbookWithSampling=Livre de bord - Autre activité (avec échantillonnage)
|
|
| 464 | 467 | observe.constant.TripMapPointType.psActivityObs=Observation - Autre activité
|
| 465 | 468 | observe.constant.TripMapPointType.psActivityObsInHarbour=Observation - Au port
|
| 466 | 469 | observe.constant.TripMapPointType.psActivityObsWithFreeSchoolType=Observation - Banc libre
|