Tony CHEMIT pushed to branch feature/issue-2907 at ultreiaio / ird-observe
Commits:
-
db656bff
by Tony Chemit at 2024-09-16T09:55:28+02:00
-
a5aa662b
by Tony Chemit at 2024-09-16T09:55:34+02:00
-
fd17f34c
by Tony Chemit at 2024-09-16T12:11:59+02:00
-
674fa7bd
by Tony Chemit at 2024-09-16T12:12:41+02:00
-
e8808563
by Tony Chemit at 2024-09-16T12:13:22+02:00
-
57d997b6
by Tony Chemit at 2024-09-16T12:31:41+02:00
-
220b5523
by Tony Chemit at 2024-09-16T12:32:14+02:00
-
85ff10fc
by Tony Chemit at 2024-09-16T12:56:28+02:00
-
9f04456c
by Tony Chemit at 2024-09-16T12:56:28+02:00
-
c65391b4
by Tony Chemit at 2024-09-16T12:56:28+02:00
9 changed files:
- client/core/src/main/java/fr/ird/observe/client/util/table/EditableTableModel.java
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUI.jaxx
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUI.jcss
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUIHandler.java
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SetCatchUITableModel.java
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/SizeMeasureTableModel.java
- client/datasource/editor/ll/src/main/java/fr/ird/observe/client/datasource/editor/ll/data/observation/WeightMeasureTableModel.java
- client/datasource/editor/ll/src/main/resources/map/ll-style.xml
- core/persistence/java/src/main/java/fr/ird/observe/entities/data/ll/common/TripTopiaDao.java
Changes:
| ... | ... | @@ -214,7 +214,7 @@ public abstract class EditableTableModel<E extends InlineDataDto> extends Abstra |
| 214 | 214 | this.data.clear();
|
| 215 | 215 | this.data.addAll(data);
|
| 216 | 216 | addDecorator(this.data);
|
| 217 | - if (this.data.isEmpty() && editable && canAddRow) {
|
|
| 217 | + if (isCanAddEmptyRow()) {
|
|
| 218 | 218 | // add an empty row (no fire and select: will be done just below)
|
| 219 | 219 | addNewRow(0, false);
|
| 220 | 220 | }
|
| ... | ... | @@ -566,4 +566,14 @@ public abstract class EditableTableModel<E extends InlineDataDto> extends Abstra |
| 566 | 566 | rows.forEach(r -> r.registerDecorator(rowDecorator));
|
| 567 | 567 | }
|
| 568 | 568 | }
|
| 569 | + |
|
| 570 | + /**
|
|
| 571 | + * FIXME We should stop trying to add a default empty row when data is empty, user must do it, not we...
|
|
| 572 | + *
|
|
| 573 | + * @return {@code true} if can add a new empty row if data is empty.
|
|
| 574 | + */
|
|
| 575 | + protected boolean isCanAddEmptyRow() {
|
|
| 576 | + return this.data.isEmpty() && editable && canAddRow;
|
|
| 577 | + }
|
|
| 578 | + |
|
| 569 | 579 | } |
| ... | ... | @@ -120,17 +120,27 @@ |
| 120 | 120 | <JTabbedPane id='mainTabbedPane'>
|
| 121 | 121 | <tab id='caracteristicTab' i18nProperty="">
|
| 122 | 122 | <Table id='editForm' fill='both' insets='1'>
|
| 123 | - |
|
| 124 | 123 | <row>
|
| 125 | - <cell columns="2">
|
|
| 126 | - <!-- acquisition Mode -->
|
|
| 124 | + <cell columns="2" rows="2">
|
|
| 127 | 125 | <JPanel id='acquisitionMode'>
|
| 128 | 126 | <JRadioButton id='acquisitionModeIndividual'/>
|
| 129 | 127 | <JRadioButton id='acquisitionModeGrouped'/>
|
| 130 | 128 | </JPanel>
|
| 131 | 129 | </cell>
|
| 132 | - <cell columns="2" rows="2">
|
|
| 133 | - <!-- location on longline -->
|
|
| 130 | + <cell>
|
|
| 131 | + <JLabel id='numberLabel'/>
|
|
| 132 | + </cell>
|
|
| 133 | + <cell weightx='1' anchor='east'>
|
|
| 134 | + <NumberEditor id='number' styleClass="int6"/>
|
|
| 135 | + </cell>
|
|
| 136 | + </row>
|
|
| 137 | + <row>
|
|
| 138 | + <cell>
|
|
| 139 | + <JPanel/>
|
|
| 140 | + </cell>
|
|
| 141 | + </row>
|
|
| 142 | + <row>
|
|
| 143 | + <cell columns="2" rows="4">
|
|
| 134 | 144 | <Table id="locationOnLonglinePanel">
|
| 135 | 145 | <row>
|
| 136 | 146 | <cell anchor="west">
|
| ... | ... | @@ -158,9 +168,6 @@ |
| 158 | 168 | </row>
|
| 159 | 169 | </Table>
|
| 160 | 170 | </cell>
|
| 161 | - </row>
|
|
| 162 | - <!-- species -->
|
|
| 163 | - <row>
|
|
| 164 | 171 | <cell>
|
| 165 | 172 | <JLabel id='speciesLabel'/>
|
| 166 | 173 | </cell>
|
| ... | ... | @@ -168,16 +175,7 @@ |
| 168 | 175 | <FilterableComboBox id='species' genericType='SpeciesReference'/>
|
| 169 | 176 | </cell>
|
| 170 | 177 | </row>
|
| 171 | - |
|
| 172 | - <!-- tagNumber -->
|
|
| 173 | - <!-- count -->
|
|
| 174 | 178 | <row>
|
| 175 | - <cell anchor='west'>
|
|
| 176 | - <JLabel id='tagNumberLabel'/>
|
|
| 177 | - </cell>
|
|
| 178 | - <cell anchor='east' weightx="1" fill="both">
|
|
| 179 | - <NormalTextEditor id='tagNumber'/>
|
|
| 180 | - </cell>
|
|
| 181 | 179 | <cell>
|
| 182 | 180 | <JLabel id='countLabel'/>
|
| 183 | 181 | </cell>
|
| ... | ... | @@ -185,22 +183,6 @@ |
| 185 | 183 | <NumberEditor id='count' styleClass="int6"/>
|
| 186 | 184 | </cell>
|
| 187 | 185 | </row>
|
| 188 | - |
|
| 189 | - <!-- number -->
|
|
| 190 | - <row>
|
|
| 191 | - <cell>
|
|
| 192 | - <JLabel id='numberLabel'/>
|
|
| 193 | - </cell>
|
|
| 194 | - <cell weightx='1' anchor='east'>
|
|
| 195 | - <NumberEditor id='number' styleClass="int6"/>
|
|
| 196 | - </cell>
|
|
| 197 | - <cell columns="2">
|
|
| 198 | - <JPanel/>
|
|
| 199 | - </cell>
|
|
| 200 | - </row>
|
|
| 201 | - |
|
| 202 | - <!-- total weight -->
|
|
| 203 | - <!-- weightMeasureMethod -->
|
|
| 204 | 186 | <row>
|
| 205 | 187 | <cell>
|
| 206 | 188 | <JLabel id='totalWeightLabel'/>
|
| ... | ... | @@ -208,6 +190,8 @@ |
| 208 | 190 | <cell weightx='1' anchor='east'>
|
| 209 | 191 | <NumberEditor id='totalWeight' styleClass="float3"/>
|
| 210 | 192 | </cell>
|
| 193 | + </row>
|
|
| 194 | + <row>
|
|
| 211 | 195 | <cell>
|
| 212 | 196 | <JLabel id='weightMeasureMethodLabel'/>
|
| 213 | 197 | </cell>
|
| ... | ... | @@ -215,9 +199,6 @@ |
| 215 | 199 | <FilterableComboBox id='weightMeasureMethod' genericType='WeightMeasureMethodReference'/>
|
| 216 | 200 | </cell>
|
| 217 | 201 | </row>
|
| 218 | - |
|
| 219 | - <!-- catch healthStatus -->
|
|
| 220 | - <!-- hook position -->
|
|
| 221 | 202 | <row>
|
| 222 | 203 | <cell>
|
| 223 | 204 | <JLabel id='catchHealthStatusLabel'/>
|
| ... | ... | @@ -225,16 +206,7 @@ |
| 225 | 206 | <cell weightx='1' anchor='east'>
|
| 226 | 207 | <FilterableComboBox id='catchHealthStatus' genericType='HealthStatusReference'/>
|
| 227 | 208 | </cell>
|
| 228 | - <cell>
|
|
| 229 | - <JLabel id='hookPositionLabel'/>
|
|
| 230 | - </cell>
|
|
| 231 | - <cell weightx='1' anchor='east'>
|
|
| 232 | - <FilterableComboBox id='hookPosition' genericType='HookPositionReference'/>
|
|
| 233 | - </cell>
|
|
| 234 | 209 | </row>
|
| 235 | - |
|
| 236 | - <!-- catch fate -->
|
|
| 237 | - <!-- discard healthStatus -->
|
|
| 238 | 210 | <row>
|
| 239 | 211 | <cell>
|
| 240 | 212 | <JLabel id='catchFateLabel'/>
|
| ... | ... | @@ -249,24 +221,44 @@ |
| 249 | 221 | <FilterableComboBox id='discardHealthStatus' genericType='HealthStatusReference'/>
|
| 250 | 222 | </cell>
|
| 251 | 223 | </row>
|
| 252 | - |
|
| 253 | - <!-- hookWhenDiscarded -->
|
|
| 254 | - <!-- photoReferences -->
|
|
| 255 | 224 | <row>
|
| 225 | + <cell>
|
|
| 226 | + <JLabel id='hookPositionLabel'/>
|
|
| 227 | + </cell>
|
|
| 228 | + <cell weightx='1' anchor='east'>
|
|
| 229 | + <FilterableComboBox id='hookPosition' genericType='HookPositionReference'/>
|
|
| 230 | + </cell>
|
|
| 256 | 231 | <cell anchor="west">
|
| 257 | 232 | <JLabel id='hookWhenDiscardedLabel'/>
|
| 258 | 233 | </cell>
|
| 259 | 234 | <cell anchor='west' fill="both">
|
| 260 | 235 | <BooleanEditor id='hookWhenDiscarded'/>
|
| 261 | 236 | </cell>
|
| 237 | + </row>
|
|
| 238 | + <row>
|
|
| 262 | 239 | <cell anchor='west'>
|
| 263 | 240 | <JLabel id='photoReferencesLabel'/>
|
| 264 | 241 | </cell>
|
| 265 | 242 | <cell anchor='east' weightx="1" fill="both">
|
| 266 | 243 | <NormalTextEditor id='photoReferences'/>
|
| 267 | 244 | </cell>
|
| 245 | + <cell columns="2"/>
|
|
| 246 | + <!-- <cell anchor='west'>-->
|
|
| 247 | + <!-- <JLabel id='sampleReferencesLabel'/>-->
|
|
| 248 | + <!-- </cell>-->
|
|
| 249 | + <!-- <cell anchor='east' weightx="1" fill="both">-->
|
|
| 250 | + <!-- <NormalTextEditor id='sampleReferences'/>-->
|
|
| 251 | + <!-- </cell>-->
|
|
| 268 | 252 | </row>
|
| 253 | + <row>
|
|
| 254 | + <cell anchor='west'>
|
|
| 255 | + <JLabel id='tagNumberLabel'/>
|
|
| 256 | + </cell>
|
|
| 257 | + <cell anchor='east' weightx="1" fill="both">
|
|
| 258 | + <NormalTextEditor id='tagNumber'/>
|
|
| 259 | + </cell>
|
|
| 269 | 260 | |
| 261 | + </row>
|
|
| 270 | 262 | </Table>
|
| 271 | 263 | </tab>
|
| 272 | 264 |
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | }
|
| 27 | 27 | |
| 28 | 28 | #mainTabbedPane {
|
| 29 | - _focusComponent:{newComponentArray(acquisitionModeIndividual,depredated,beatDiameter)};
|
|
| 29 | + _focusComponent:{newComponentArray(number,depredated,beatDiameter)};
|
|
| 30 | 30 | }
|
| 31 | 31 | |
| 32 | 32 | /* ***************************************************************************** */
|
| ... | ... | @@ -43,7 +43,6 @@ import org.apache.logging.log4j.Logger; |
| 43 | 43 | import org.nuiton.jaxx.validator.swing.SwingValidator;
|
| 44 | 44 | |
| 45 | 45 | import javax.swing.AbstractAction;
|
| 46 | -import javax.swing.JComponent;
|
|
| 47 | 46 | import javax.swing.JToolBar;
|
| 48 | 47 | import java.awt.Component;
|
| 49 | 48 | import java.awt.event.ActionEvent;
|
| ... | ... | @@ -74,19 +73,20 @@ public class SetCatchUIHandler extends GeneratedSetCatchUIHandler { |
| 74 | 73 | |
| 75 | 74 | @Override
|
| 76 | 75 | protected Component getFocusComponentOnSelectedRow(SetCatchUI ui, boolean notPersisted, boolean newRow, CatchDto tableEditBean, CatchDto previousRowBean) {
|
| 77 | - JComponent requestFocus;
|
|
| 78 | - if (newRow) {
|
|
| 79 | - requestFocus = ui.getSpecies();
|
|
| 80 | - } else {
|
|
| 81 | - int acquisitionMode = tableEditBean.getAcquisitionMode();
|
|
| 82 | - CatchAcquisitionMode acquisitionModeEnum = CatchAcquisitionMode.valueOf(acquisitionMode);
|
|
| 83 | - if (acquisitionModeEnum.equals(CatchAcquisitionMode.GROUPED)) {
|
|
| 84 | - requestFocus = ui.getCount();
|
|
| 85 | - } else {
|
|
| 86 | - requestFocus = ui.getCatchHealthStatus();
|
|
| 87 | - }
|
|
| 88 | - }
|
|
| 89 | - return requestFocus;
|
|
| 76 | + //FIXME Review this on Focus clean session
|
|
| 77 | +// JComponent requestFocus;
|
|
| 78 | +// if (newRow) {
|
|
| 79 | +// requestFocus = ui.getNumber();
|
|
| 80 | +// } else {
|
|
| 81 | +// int acquisitionMode = tableEditBean.getAcquisitionMode();
|
|
| 82 | +// CatchAcquisitionMode acquisitionModeEnum = CatchAcquisitionMode.valueOf(acquisitionMode);
|
|
| 83 | +// if (acquisitionModeEnum.equals(CatchAcquisitionMode.GROUPED)) {
|
|
| 84 | +// requestFocus = ui.getCount();
|
|
| 85 | +// } else {
|
|
| 86 | +// requestFocus = ui.getCatchHealthStatus();
|
|
| 87 | +// }
|
|
| 88 | +// }
|
|
| 89 | + return ui.getNumber();
|
|
| 90 | 90 | }
|
| 91 | 91 | |
| 92 | 92 | @Override
|
| ... | ... | @@ -351,6 +351,9 @@ public class SetCatchUIHandler extends GeneratedSetCatchUIHandler { |
| 351 | 351 | boolean enableInlineModels = newValue && (ui.getModel().getStates().isReadingMode() || ui.getModel().getStates().isEditing());
|
| 352 | 352 | getTableModel().inlineModels().keySet().forEach(i -> {
|
| 353 | 353 | i.setEditable(enableInlineModels);
|
| 354 | + if (newValue && (!ui.getModel().getStates().isReadingMode() || ui.getModel().getStates().isEditing())) {
|
|
| 355 | + i.validate();
|
|
| 356 | + }
|
|
| 354 | 357 | if (!enableInlineModels) {
|
| 355 | 358 | int selectedRow = ui.getTableModel().getSelectedRow();
|
| 356 | 359 | if (selectedRow != -1) {
|
| ... | ... | @@ -23,6 +23,7 @@ package fr.ird.observe.client.datasource.editor.ll.data.observation; |
| 23 | 23 | */
|
| 24 | 24 | |
| 25 | 25 | import fr.ird.observe.client.util.table.EditableListProperty;
|
| 26 | +import fr.ird.observe.client.util.table.renderer.DecoratorTableRenderer;
|
|
| 26 | 27 | import fr.ird.observe.dto.data.CatchAcquisitionMode;
|
| 27 | 28 | import fr.ird.observe.dto.data.ll.observation.CatchDto;
|
| 28 | 29 | import fr.ird.observe.dto.data.ll.observation.SizeMeasureDto;
|
| ... | ... | @@ -30,6 +31,8 @@ import fr.ird.observe.dto.data.ll.observation.WeightMeasureDto; |
| 30 | 31 | import org.apache.logging.log4j.LogManager;
|
| 31 | 32 | import org.apache.logging.log4j.Logger;
|
| 32 | 33 | |
| 34 | +import javax.swing.JTable;
|
|
| 35 | +import javax.swing.table.TableColumnModel;
|
|
| 33 | 36 | import java.util.Collection;
|
| 34 | 37 | import java.util.List;
|
| 35 | 38 | |
| ... | ... | @@ -79,6 +82,15 @@ public class SetCatchUITableModel extends GeneratedSetCatchUITableModel { |
| 79 | 82 | return weightMeasuresTableModel;
|
| 80 | 83 | }
|
| 81 | 84 | |
| 85 | + @Override
|
|
| 86 | + public void initTableUISize(JTable table) {
|
|
| 87 | + super.initTableUISize(table);
|
|
| 88 | + TableColumnModel columnModel = table.getColumnModel();
|
|
| 89 | + ((DecoratorTableRenderer) columnModel.getColumn(2).getCellRenderer()).getDecorator().setIndex(1);
|
|
| 90 | + ((DecoratorTableRenderer) columnModel.getColumn(3).getCellRenderer()).getDecorator().setIndex(1);
|
|
| 91 | + ((DecoratorTableRenderer) columnModel.getColumn(4).getCellRenderer()).getDecorator().setIndex(1);
|
|
| 92 | + }
|
|
| 93 | + |
|
| 82 | 94 | @Override
|
| 83 | 95 | protected void onBeforeResetRow(int row) {
|
| 84 | 96 | super.onBeforeResetRow(row);
|
| ... | ... | @@ -105,4 +105,8 @@ public class SizeMeasureTableModel extends EditableTableModelWithCache<SizeMeasu |
| 105 | 105 | return SizeMeasureDto.newDto(new Date());
|
| 106 | 106 | }
|
| 107 | 107 | |
| 108 | + @Override
|
|
| 109 | + protected boolean isCanAddEmptyRow() {
|
|
| 110 | + return false;
|
|
| 111 | + }
|
|
| 108 | 112 | } |
| ... | ... | @@ -103,4 +103,8 @@ public class WeightMeasureTableModel extends EditableTableModelWithCache<WeightM |
| 103 | 103 | return !Objects.equals(oldValue, aValue);
|
| 104 | 104 | }
|
| 105 | 105 | |
| 106 | + @Override
|
|
| 107 | + protected boolean isCanAddEmptyRow() {
|
|
| 108 | + return false;
|
|
| 109 | + }
|
|
| 106 | 110 | } |
| ... | ... | @@ -37,7 +37,7 @@ |
| 37 | 37 | <CssParameter name="fill-opacity">0.5</CssParameter>
|
| 38 | 38 | </Fill>
|
| 39 | 39 | </PolygonSymbolizer>
|
| 40 | - <TextSymbolizer>
|
|
| 40 | + <!--TextSymbolizer>
|
|
| 41 | 41 | <Label>
|
| 42 | 42 | <ogc:PropertyName>label</ogc:PropertyName>
|
| 43 | 43 | </Label>
|
| ... | ... | @@ -57,7 +57,7 @@ |
| 57 | 57 | <Fill>
|
| 58 | 58 | <CssParameter name="fill">#000000</CssParameter>
|
| 59 | 59 | </Fill>
|
| 60 | - </TextSymbolizer>
|
|
| 60 | + </TextSymbolizer-->
|
|
| 61 | 61 | </Rule>
|
| 62 | 62 | </FeatureTypeStyle>
|
| 63 | 63 | </UserStyle>
|
| ... | ... | @@ -76,7 +76,7 @@ |
| 76 | 76 | <CssParameter name="fill-opacity">0.5</CssParameter>
|
| 77 | 77 | </Fill>
|
| 78 | 78 | </PolygonSymbolizer>
|
| 79 | - <TextSymbolizer>
|
|
| 79 | + <!--TextSymbolizer>
|
|
| 80 | 80 | <Label>
|
| 81 | 81 | <ogc:PropertyName>label</ogc:PropertyName>
|
| 82 | 82 | </Label>
|
| ... | ... | @@ -96,7 +96,7 @@ |
| 96 | 96 | <Fill>
|
| 97 | 97 | <CssParameter name="fill">#220000</CssParameter>
|
| 98 | 98 | </Fill>
|
| 99 | - </TextSymbolizer>
|
|
| 99 | + </TextSymbolizer-->
|
|
| 100 | 100 | </Rule>
|
| 101 | 101 | </FeatureTypeStyle>
|
| 102 | 102 | </UserStyle>
|
| ... | ... | @@ -250,6 +250,27 @@ |
| 250 | 250 | <Size>8</Size>
|
| 251 | 251 | </Graphic>
|
| 252 | 252 | </PointSymbolizer>
|
| 253 | + <TextSymbolizer>
|
|
| 254 | + <Label>
|
|
| 255 | + <ogc:PropertyName>label</ogc:PropertyName>
|
|
| 256 | + </Label>
|
|
| 257 | + <Font>
|
|
| 258 | + <CssParameter name="font-size">14</CssParameter>
|
|
| 259 | + <CssParameter name="font-style">normal</CssParameter>
|
|
| 260 | + <CssParameter name="font-weight">bold</CssParameter>
|
|
| 261 | + </Font>
|
|
| 262 | + <LabelPlacement>
|
|
| 263 | + <PointPlacement>
|
|
| 264 | + <Displacement>
|
|
| 265 | + <DisplacementX>5</DisplacementX>
|
|
| 266 | + <DisplacementY>5</DisplacementY>
|
|
| 267 | + </Displacement>
|
|
| 268 | + </PointPlacement>
|
|
| 269 | + </LabelPlacement>
|
|
| 270 | + <Fill>
|
|
| 271 | + <CssParameter name="fill">#000000</CssParameter>
|
|
| 272 | + </Fill>
|
|
| 273 | + </TextSymbolizer>
|
|
| 253 | 274 | </Rule>
|
| 254 | 275 | </FeatureTypeStyle>
|
| 255 | 276 | |
| ... | ... | @@ -267,7 +288,7 @@ |
| 267 | 288 | <Mark>
|
| 268 | 289 | <WellKnownName>Triangle</WellKnownName>
|
| 269 | 290 | <Fill>
|
| 270 | - <CssParameter name="fill">${mapLlStyleObservationsPointColor}</CssParameter>
|
|
| 291 | + <CssParameter name="fill">${mapLlStyleObservationsLineSettingColor}</CssParameter>
|
|
| 271 | 292 | </Fill>
|
| 272 | 293 | <Stroke>
|
| 273 | 294 | <CssParameter name="stroke">#000000</CssParameter>
|
| ... | ... | @@ -277,6 +298,27 @@ |
| 277 | 298 | <Size>16</Size>
|
| 278 | 299 | </Graphic>
|
| 279 | 300 | </PointSymbolizer>
|
| 301 | + <TextSymbolizer>
|
|
| 302 | + <Label>
|
|
| 303 | + <ogc:PropertyName>label</ogc:PropertyName>
|
|
| 304 | + </Label>
|
|
| 305 | + <Font>
|
|
| 306 | + <CssParameter name="font-size">14</CssParameter>
|
|
| 307 | + <CssParameter name="font-style">normal</CssParameter>
|
|
| 308 | + <CssParameter name="font-weight">bold</CssParameter>
|
|
| 309 | + </Font>
|
|
| 310 | + <LabelPlacement>
|
|
| 311 | + <PointPlacement>
|
|
| 312 | + <Displacement>
|
|
| 313 | + <DisplacementX>5</DisplacementX>
|
|
| 314 | + <DisplacementY>5</DisplacementY>
|
|
| 315 | + </Displacement>
|
|
| 316 | + </PointPlacement>
|
|
| 317 | + </LabelPlacement>
|
|
| 318 | + <Fill>
|
|
| 319 | + <CssParameter name="fill">#000000</CssParameter>
|
|
| 320 | + </Fill>
|
|
| 321 | + </TextSymbolizer>
|
|
| 280 | 322 | </Rule>
|
| 281 | 323 | </FeatureTypeStyle>
|
| 282 | 324 | <FeatureTypeStyle>
|
| ... | ... | @@ -293,7 +335,7 @@ |
| 293 | 335 | <Mark>
|
| 294 | 336 | <WellKnownName>Square</WellKnownName>
|
| 295 | 337 | <Fill>
|
| 296 | - <CssParameter name="fill">${mapLlStyleObservationsPointColor}</CssParameter>
|
|
| 338 | + <CssParameter name="fill">${mapLlStyleObservationsLineSettingColor}</CssParameter>
|
|
| 297 | 339 | </Fill>
|
| 298 | 340 | <Stroke>
|
| 299 | 341 | <CssParameter name="stroke">#000000</CssParameter>
|
| ... | ... | @@ -319,7 +361,7 @@ |
| 319 | 361 | <Mark>
|
| 320 | 362 | <WellKnownName>Circle</WellKnownName>
|
| 321 | 363 | <Fill>
|
| 322 | - <CssParameter name="fill">${mapLlStyleObservationsPointColor}</CssParameter>
|
|
| 364 | + <CssParameter name="fill">${mapLlStyleObservationsLineHaulingColor}</CssParameter>
|
|
| 323 | 365 | </Fill>
|
| 324 | 366 | <Stroke>
|
| 325 | 367 | <CssParameter name="stroke">#000000</CssParameter>
|
| ... | ... | @@ -345,7 +387,7 @@ |
| 345 | 387 | <Mark>
|
| 346 | 388 | <WellKnownName>X</WellKnownName>
|
| 347 | 389 | <Fill>
|
| 348 | - <CssParameter name="fill">${mapLlStyleObservationsPointColor}</CssParameter>
|
|
| 390 | + <CssParameter name="fill">${mapLlStyleObservationsLineHaulingColor}</CssParameter>
|
|
| 349 | 391 | </Fill>
|
| 350 | 392 | <Stroke>
|
| 351 | 393 | <CssParameter name="stroke">#000000</CssParameter>
|
| ... | ... | @@ -464,6 +506,27 @@ |
| 464 | 506 | <Size>8</Size>
|
| 465 | 507 | </Graphic>
|
| 466 | 508 | </PointSymbolizer>
|
| 509 | + <TextSymbolizer>
|
|
| 510 | + <Label>
|
|
| 511 | + <ogc:PropertyName>label</ogc:PropertyName>
|
|
| 512 | + </Label>
|
|
| 513 | + <Font>
|
|
| 514 | + <CssParameter name="font-size">16</CssParameter>
|
|
| 515 | + <CssParameter name="font-style">normal</CssParameter>
|
|
| 516 | + <CssParameter name="font-weight">bold</CssParameter>
|
|
| 517 | + </Font>
|
|
| 518 | + <LabelPlacement>
|
|
| 519 | + <PointPlacement>
|
|
| 520 | + <Displacement>
|
|
| 521 | + <DisplacementX>5</DisplacementX>
|
|
| 522 | + <DisplacementY>5</DisplacementY>
|
|
| 523 | + </Displacement>
|
|
| 524 | + </PointPlacement>
|
|
| 525 | + </LabelPlacement>
|
|
| 526 | + <Fill>
|
|
| 527 | + <CssParameter name="fill">#000000</CssParameter>
|
|
| 528 | + </Fill>
|
|
| 529 | + </TextSymbolizer>
|
|
| 467 | 530 | </Rule>
|
| 468 | 531 | </FeatureTypeStyle>
|
| 469 | 532 | |
| ... | ... | @@ -481,7 +544,7 @@ |
| 481 | 544 | <Mark>
|
| 482 | 545 | <WellKnownName>Triangle</WellKnownName>
|
| 483 | 546 | <Fill>
|
| 484 | - <CssParameter name="fill">${mapLlStyleLogbookPointColor}</CssParameter>
|
|
| 547 | + <CssParameter name="fill">${mapLlStyleLogbookLineSettingColor}</CssParameter>
|
|
| 485 | 548 | </Fill>
|
| 486 | 549 | <Stroke>
|
| 487 | 550 | <CssParameter name="stroke">#000000</CssParameter>
|
| ... | ... | @@ -491,6 +554,27 @@ |
| 491 | 554 | <Size>16</Size>
|
| 492 | 555 | </Graphic>
|
| 493 | 556 | </PointSymbolizer>
|
| 557 | + <TextSymbolizer>
|
|
| 558 | + <Label>
|
|
| 559 | + <ogc:PropertyName>label</ogc:PropertyName>
|
|
| 560 | + </Label>
|
|
| 561 | + <Font>
|
|
| 562 | + <CssParameter name="font-size">14</CssParameter>
|
|
| 563 | + <CssParameter name="font-style">normal</CssParameter>
|
|
| 564 | + <CssParameter name="font-weight">bold</CssParameter>
|
|
| 565 | + </Font>
|
|
| 566 | + <LabelPlacement>
|
|
| 567 | + <PointPlacement>
|
|
| 568 | + <Displacement>
|
|
| 569 | + <DisplacementX>5</DisplacementX>
|
|
| 570 | + <DisplacementY>5</DisplacementY>
|
|
| 571 | + </Displacement>
|
|
| 572 | + </PointPlacement>
|
|
| 573 | + </LabelPlacement>
|
|
| 574 | + <Fill>
|
|
| 575 | + <CssParameter name="fill">#000000</CssParameter>
|
|
| 576 | + </Fill>
|
|
| 577 | + </TextSymbolizer>
|
|
| 494 | 578 | </Rule>
|
| 495 | 579 | </FeatureTypeStyle>
|
| 496 | 580 | |
| ... | ... | @@ -508,7 +592,7 @@ |
| 508 | 592 | <Mark>
|
| 509 | 593 | <WellKnownName>Square</WellKnownName>
|
| 510 | 594 | <Fill>
|
| 511 | - <CssParameter name="fill">${mapLlStyleLogbookPointColor}</CssParameter>
|
|
| 595 | + <CssParameter name="fill">${mapLlStyleLogbookLineSettingColor}</CssParameter>
|
|
| 512 | 596 | </Fill>
|
| 513 | 597 | <Stroke>
|
| 514 | 598 | <CssParameter name="stroke">#000000</CssParameter>
|
| ... | ... | @@ -535,7 +619,7 @@ |
| 535 | 619 | <Mark>
|
| 536 | 620 | <WellKnownName>Circle</WellKnownName>
|
| 537 | 621 | <Fill>
|
| 538 | - <CssParameter name="fill">${mapLlStyleLogbookPointColor}</CssParameter>
|
|
| 622 | + <CssParameter name="fill">${mapLlStyleLogbookLineHaulingColor}</CssParameter>
|
|
| 539 | 623 | </Fill>
|
| 540 | 624 | <Stroke>
|
| 541 | 625 | <CssParameter name="stroke">#000000</CssParameter>
|
| ... | ... | @@ -562,7 +646,7 @@ |
| 562 | 646 | <Mark>
|
| 563 | 647 | <WellKnownName>X</WellKnownName>
|
| 564 | 648 | <Fill>
|
| 565 | - <CssParameter name="fill">${mapLlStyleLogbookPointColor}</CssParameter>
|
|
| 649 | + <CssParameter name="fill">${mapLlStyleLogbookLineHaulingColor}</CssParameter>
|
|
| 566 | 650 | </Fill>
|
| 567 | 651 | <Stroke>
|
| 568 | 652 | <CssParameter name="stroke">#000000</CssParameter>
|
| ... | ... | @@ -71,9 +71,14 @@ public class TripTopiaDao extends AbstractTripTopiaDao<Trip> { |
| 71 | 71 | return;
|
| 72 | 72 | }
|
| 73 | 73 | |
| 74 | + TripMapPoint activityPoint = Entities.addPointWithTimestamp(TripMapPointType.llActivityObs, resultSet, 0, points);
|
|
| 75 | + log.debug(String.format("[LL-Logbook] Added activity point: %s", activityPoint));
|
|
| 76 | + |
|
| 74 | 77 | TripMapPoint settingStart = Entities.addPointWithTimestamp(TripMapPointType.llActivityObsWithSettingStart, resultSet, 5, points);
|
| 75 | 78 | log.debug(String.format("[LL-Observation] Added set settingStart point: %s", settingStart));
|
| 76 | - |
|
| 79 | + if (settingStart.isValid()) {
|
|
| 80 | + points.remove(activityPoint);
|
|
| 81 | + }
|
|
| 77 | 82 | TripMapPoint settingEnd = Entities.addPointWithTimestamp(TripMapPointType.llActivityObsWithSettingEnd, resultSet, 8, points);
|
| 78 | 83 | log.debug(String.format("[LL-Observation] Added set settingEnd point: %s", settingEnd));
|
| 79 | 84 | |
| ... | ... | @@ -101,9 +106,14 @@ public class TripTopiaDao extends AbstractTripTopiaDao<Trip> { |
| 101 | 106 | return;
|
| 102 | 107 | }
|
| 103 | 108 | |
| 109 | + TripMapPoint activityPoint = Entities.addPointWithTimestamp(TripMapPointType.llActivityLogbook, resultSet, 0, points);
|
|
| 110 | + log.debug(String.format("[LL-Logbook] Added activity point: %s", activityPoint));
|
|
| 111 | + |
|
| 104 | 112 | TripMapPoint settingStart = Entities.addPointWithTimestamp(TripMapPointType.llActivityLogbookWithSettingStart, resultSet, 5, points);
|
| 105 | 113 | log.debug(String.format("[LL-Logbook] Added set settingStart point: %s", settingStart));
|
| 106 | - |
|
| 114 | + if (settingStart.isValid()) {
|
|
| 115 | + points.remove(activityPoint);
|
|
| 116 | + }
|
|
| 107 | 117 | TripMapPoint settingEnd = Entities.addPointWithTimestamp(TripMapPointType.llActivityLogbookWithSettingEnd, resultSet, 8, points);
|
| 108 | 118 | log.debug(String.format("[LL-Logbook] Added set settingEnd point: %s", settingEnd));
|
| 109 | 119 |