Author: tchemit Date: 2012-12-10 07:59:02 +0100 (Mon, 10 Dec 2012) New Revision: 38 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/38 Log: - fix decoration - refactor fishingOperation screen (still need to add pmfm table) Added: trunk/tutti-ui-swing/src/main/resources/icons/action-reset.png Modified: trunk/tutti-persistence/src/main/xmi/tutti-persistence.zargo trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/DecoratorService.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUI.css trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUI.jaxx trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUIHandler.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUIModel.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/species/frequency/SpeciesFrequencyUI.css trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties Modified: trunk/tutti-persistence/src/main/xmi/tutti-persistence.zargo =================================================================== (Binary files differ) Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/DecoratorService.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/DecoratorService.java 2012-12-10 02:45:40 UTC (rev 37) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/DecoratorService.java 2012-12-10 06:59:02 UTC (rev 38) @@ -86,7 +86,7 @@ registerMultiJXPathDecorator(Program.class, "${name}$s", "#", " - "); registerMultiJXPathDecorator(ScientificCruise.class, "${name}$s", "#", " - "); - registerMultiJXPathDecorator(FishingOperation.class, "${stationNumber}$s#${traitNumber}$s#${date}$td/%3$tm/%3$tY", "#", " - "); + registerMultiJXPathDecorator(FishingOperation.class, "${stationNumber}$s#${fishingOperationNumber}$s#${date}$td/%3$tm/%3$tY", "#", " - "); registerMultiJXPathDecorator(Zone.class, "${name}$s", "#", " - "); registerMultiJXPathDecorator(Vessel.class, "${name}$s#", "#", " - "); registerMultiJXPathDecorator(Country.class, "${name}$s", "#", " - "); Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUI.css 2012-12-10 02:45:40 UTC (rev 37) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUI.css 2012-12-10 06:59:02 UTC (rev 38) @@ -54,10 +54,6 @@ labelFor: {stationNumberField}; } -#stationNumberTraitNumberLabel { - text: "tutti.label.fishingOperation.stationNumberTraitNumber"; -} - #stationNumberField { property: "stationNumber"; model: {model.getStationNumber()}; @@ -65,14 +61,14 @@ numberPattern: {INT_6_DIGITS_PATTERN}; } -#traitNumberLabel { - text: "tutti.label.fishingOperation.traitNumber"; - labelFor: {traitNumberField}; +#fishingOperationNumberLabel { + text: "tutti.label.fishingOperation.fishingOperationNumber"; + labelFor: {fishingOperationNumberField}; } -#traitNumberField { - property: "traitNumber"; - model: {model.getTraitNumber()}; +#fishingOperationNumberField { + property: "fishingOperationNumber"; + model: {model.getFishingOperationNumber()}; useFloat: false; numberPattern: {INT_6_DIGITS_PATTERN}; } @@ -97,6 +93,128 @@ selectedItem: {model.getStrata()}; } +#subStrataLabel { + text: "tutti.label.fishingOperation.subStrata"; + labelFor: {subStrataComboBox}; +} + +#subStrataComboBox { + property: "subStrata"; + selectedItem: {model.getSubStrata()}; +} + +#localiteLabel { + text: "tutti.label.fishingOperation.localite"; + labelFor: {localiteField}; +} + +#localiteField { + text: {model.getLocalite()}; +} + +#gearLongitudeLabel { + text: "tutti.label.fishingOperation.gearLongitude"; +} + +#gearLatitudeLabel { + text: "tutti.label.fishingOperation.gearLatitude"; +} + +#gearDateLabel { + text: "tutti.label.fishingOperation.gearDate"; +} + +#gearTimeLabel { + text: "tutti.label.fishingOperation.gearTime"; +} + +#gearShootingStartLabel { + text: "tutti.label.fishingOperation.gearShootingStart"; +} + +#gearShootingEndLabel { + text: "tutti.label.fishingOperation.gearShootingEnd"; +} + +#gearShootingStartLongitudeField { + text: {getStringValue(model.getGearShootingStartLongitude())}; +} + +#gearShootingStartLatitudeField { + text: {getStringValue(model.getGearShootingStartLatitude())}; +} + +#gearShootingStartDateField { + date: {model.getGearShootingStartDate()}; + formats: {"dd/MM/yyyy"}; +} + +#gearShootingStartTimeField { + text: {getStringValue(model.getGearShootingStartTime())}; +} + +#gearShootingEndLongitudeField { + text: {getStringValue(model.getGearShootingEndLongitude())}; +} + +#gearShootingEndLatitudeField { + text: {getStringValue(model.getGearShootingEndLatitude())}; +} + +#gearShootingEndDateField { + date: {model.getGearShootingEndDate()}; + formats: {"dd/MM/yyyy"}; +} + +#gearShootingEndTimeField { + text: {getStringValue(model.getGearShootingEndTime())}; +} + +#fishingOperationValidPanel { + floatable: false; + borderPainted: false; + opaque: false; +} + +#resetValidStateButton { + actionIcon: "reset"; + text: "tutti.action.reset.fishingOperationValidState"; +} + +#fishingOperationValidRadio { + text: "tutti.label.fishingOperation.fishingOperationValid"; + selected: {model.getFishingOperationValid() == Boolean.TRUE}; + buttonGroup: "fishingOperationValid"; +} + +#fishingOperationInvalidRadio { + text: "tutti.label.fishingOperation.fishingOperationInvalid"; + selected: {model.getFishingOperationValid() == Boolean.FALSE}; + buttonGroup: "fishingOperationValid"; +} +#fishingOperationResetRadio { + selected: {model.getFishingOperationValid() == null}; + buttonGroup: "fishingOperationValid"; +} + +#fishingOperationRectiligneCheckBox { + text: "tutti.label.fishingOperation.fishingOperationRectiligne"; + selected: {model.isFishingOperationRectiligne()}; +} + +#distanceChaluteeLabel { + text: "tutti.label.fishingOperation.distanceChalutee"; + labelFor: {distanceChaluteeField}; +} + +#distanceChaluteeField { + property: "distanceChalutee"; + model: {model.getDistanceChalutee()}; + useFloat: false; + numberPattern: {INT_6_DIGITS_PATTERN}; + enabled: {!model.isFishingOperationRectiligne()}; +} + #beaufortScaleLabel { text: "tutti.label.fishingOperation.beaufortScale"; labelFor: {beaufortScaleComboBox}; @@ -195,27 +313,6 @@ selected: {model.isSystemeFermetureCul()}; } -#traitRectiligneCheckBox { - text: "tutti.label.fishingOperation.traitRectiligne"; - selected: {model.isTraitRectiligne()}; -} - -#distanceChaluteeLabel { - text: "tutti.label.fishingOperation.distanceChalutee"; - labelFor: {distanceChaluteeField}; -} - -#distanceChaluteeDureeLabel { - text: "tutti.label.fishingOperation.distanceChaluteeDuree"; -} - -#distanceChaluteeField { - property: "distanceChalutee"; - model: {model.getDistanceChalutee()}; - useFloat: false; - numberPattern: {INT_6_DIGITS_PATTERN}; -} - #dureeLabel { text: "tutti.label.fishingOperation.duree"; labelFor: {dureeField}; @@ -228,20 +325,6 @@ numberPattern: {INT_6_DIGITS_PATTERN}; } -#traitValidCheckBox { - text: "tutti.label.fishingOperation.traitValid"; - selected: {model.isTraitValid()}; -} - -#localiteLabel { - text: "tutti.label.fishingOperation.localite"; - labelFor: {localiteField}; -} - -#localiteField { - text: {model.getLocalite()}; -} - #saisisseurPane { horizontalScrollBarPolicy: {JScrollPane.HORIZONTAL_SCROLLBAR_NEVER}; verticalScrollBarPolicy: {JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED}; @@ -262,33 +345,6 @@ text: {model.getComment()}; } -#gearShootingStartLongitudeLabel { - text: "tutti.label.fishingOperation.gearShootingStartLongitude"; - labelFor: {gearShootingStartLongitudeField}; -} - -#gearShootingStartLongitudeField { - text: {getStringValue(model.getGearShootingStartLongitude())}; -} - -#gearShootingStartLatitudeLabel { - text: "tutti.label.fishingOperation.gearShootingStartLatitude"; - labelFor: {gearShootingStartLatitudeField}; -} - -#gearShootingStartLatitudeField { - text: {getStringValue(model.getGearShootingStartLatitude())}; -} - -#gearShootingStartTimeLabel { - text: "tutti.label.fishingOperation.gearShootingStartTime"; - labelFor: {gearShootingStartTimeField}; -} - -#gearShootingStartTimeField { - text: {getStringValue(model.getGearShootingStartTime())}; -} - #gearShootingStartDepthLabel { text: "tutti.label.fishingOperation.gearShootingStartDepth"; labelFor: {gearShootingStartDepthField}; @@ -301,33 +357,6 @@ numberPattern: {INT_6_DIGITS_PATTERN}; } -#gearShootingEndLongitudeLabel { - text: "tutti.label.fishingOperation.gearShootingEndLongitude"; - labelFor: {gearShootingEndLongitudeField}; -} - -#gearShootingEndLongitudeField { - text: {getStringValue(model.getGearShootingEndLongitude())}; -} - -#gearShootingEndLatitudeLabel { - text: "tutti.label.fishingOperation.gearShootingEndLatitude"; - labelFor: {gearShootingEndLatitudeField}; -} - -#gearShootingEndLatitudeField { - text: {getStringValue(model.getGearShootingEndLatitude())}; -} - -#gearShootingEndTimeLabel { - text: "tutti.label.fishingOperation.gearShootingEndTime"; - labelFor: {gearShootingEndTimeField}; -} - -#gearShootingEndTimeField { - text: {getStringValue(model.getGearShootingEndTime())}; -} - #gearShootingEndDepthLabel { text: "tutti.label.fishingOperation.gearShootingEndDepth"; labelFor: {gearShootingEndDepthField}; Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUI.jaxx =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUI.jaxx 2012-12-10 02:45:40 UTC (rev 37) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUI.jaxx 2012-12-10 06:59:02 UTC (rev 38) @@ -30,7 +30,6 @@ fr.ifremer.tutti.persistence.entities.referential.Strata fr.ifremer.tutti.persistence.entities.data.FishingOperation fr.ifremer.tutti.persistence.entities.referential.Person - fr.ifremer.tutti.ui.swing.TuttiUIContext jaxx.runtime.swing.editor.bean.BeanComboBox jaxx.runtime.swing.editor.bean.BeanListHeader @@ -64,246 +63,225 @@ ]]></script> <FishingOperationTabUIHandler id='handler' - initializer='getContextValue(FishingOperationTabUIHandler.class)'/> + initializer='getContextValue(FishingOperationTabUIHandler.class)'/> <FishingOperationTabUIModel id='model' - initializer='getContextValue(FishingOperationTabUIModel.class)'/> + initializer='getContextValue(FishingOperationTabUIModel.class)'/> <SwingValidatorMessageTableModel id='errorTableModel'/> <BeanValidator id='validator' bean='model' errorTableModel='errorTableModel' uiClass='jaxx.runtime.validator.swing.ui.ImageValidationUI'> <field name='stationNumber' component='stationNumberField'/> - <field name='traitNumber' component='traitNumberField'/> - <field name='date' component='dateField'/> - <field name='comment' component='commentField'/> - <field name='saisisseur' component='saisisseurPane'/> + <field name='fishingOperationNumber' + component='fishingOperationNumberField'/> + <field name='date' component='dateField'/> + <field name='comment' component='commentField'/> + <field name='saisisseur' component='saisisseurPane'/> </BeanValidator> <JPanel id='traitPane' constraints='BorderLayout.CENTER' layout='{new BorderLayout()}'> <JTabbedPane id='traitTabPane' constraints='BorderLayout.CENTER'> - <tab id='traitGeneralTab' title='tutti.label.tab.fishingOperation.general'> + <tab id='traitGeneralTab' + title='tutti.label.tab.fishingOperation.general'> <Table fill='both' id='generalForm'> - <!-- Numero station --> + <!-- Numero station / Numéro trait / Date --> <row> <cell anchor='west'> - <!--JLabel id='stationNumberLabel'/--> - <JLabel id='stationNumberTraitNumberLabel'/> + <JLabel id='stationNumberLabel'/> </cell> - <cell weightx='1.0'> - <JPanel layout='{new GridLayout(1,0)}'> - <NumberEditor id='stationNumberField' constructorParams='this'/> - <NumberEditor id='traitNumberField' constructorParams='this'/> - </JPanel> + <cell weightx='0.3'> + <NumberEditor id='stationNumberField' constructorParams='this'/> </cell> - </row> - - <!-- Numero fishingOperation / chalut --> - <!--row> <cell> - <JLabel id='traitNumberLabel'/> + <JLabel id='fishingOperationNumberLabel'/> </cell> - <cell> - <NumberEditor id='traitNumberField' constructorParams='this'/> + <cell weightx='0.3'> + <NumberEditor id='fishingOperationNumberField' + constructorParams='this'/> </cell> - </row--> - - <!-- Date --> - <row> <cell> <JLabel id='dateLabel'/> </cell> - <cell> + <cell weightx='0.3'> <JXDatePicker id='dateField' onActionPerformed='handler.setDate(event, "date")'/> </cell> </row> - <!-- Strate d'association --> + <!-- Strate d'association / Sous Strate / Localité --> <row> <cell> <JLabel id='strataLabel'/> </cell> - <cell fill='horizontal'> + <cell weightx='0.3'> <BeanComboBox id='strataComboBox' constructorParams='this' genericType='Strata'/> </cell> - </row> - - <!-- Beaufort scale --> - <row> - <cell anchor='west'> - <JLabel id='beaufortScaleLabel'/> + <cell> + <JLabel id='subStrataLabel'/> </cell> - <cell fill='horizontal'> - <BeanComboBox id='beaufortScaleComboBox' constructorParams='this' - genericType='BeaufortScale'/> + <cell weightx='0.3'> + <BeanComboBox id='subStrataComboBox' constructorParams='this' + genericType='Strata'/> </cell> - </row> - - <!-- Wind direction --> - <row> - <cell anchor='west'> - <JLabel id='windDirectionLabel'/> + <cell> + <JLabel id='localiteLabel'/> </cell> - <cell fill='horizontal'> - <NumberEditor id='windDirectionField' constructorParams='this'/> + <cell weightx='0.3'> + <JTextField id='localiteField' + onKeyReleased='handler.setText(event, "localite")'/> </cell> </row> - <!-- Sea state--> + <!-- début de traine long-lat-date-heure + fin de traine long-lat-date-heure --> <row> - <cell anchor='west'> - <JLabel id='seaStateLabel'/> - </cell> - <cell fill='horizontal'> - <BeanComboBox id='seaStateComboBox' constructorParams='this' - genericType='SeaState'/> - </cell> - </row> + <cell columns='6'> + <JPanel layout="{new BorderLayout()}"> + <Table id="gearCaracteristicsTable" fill="both" weightx='1' + constraints='BorderLayout.CENTER'> + <row> + <cell> + <JLabel/> + </cell> + <cell> + <JLabel id='gearLongitudeLabel'/> + </cell> + <cell> + <JLabel id='gearLatitudeLabel'/> + </cell> + <cell> + <JLabel id='gearDateLabel'/> + </cell> + <cell> + <JLabel id='gearTimeLabel'/> + </cell> + </row> - <!-- Ouverture horizontale --> - <row> - <cell anchor='west'> - <JLabel id='ouvertureHorizontaleVerticaleLabel'/> - </cell> - <cell fill='horizontal'> - <JPanel layout='{new GridLayout(1,0)}'> - <NumberEditor id='ouvertureHorizontaleField' - constructorParams='this'/> - <NumberEditor id='ouvertureVerticaleField' - constructorParams='this'/> + <row> + <cell> + <JLabel id='gearShootingStartLabel'/> + </cell> + <cell> + <JTextField id='gearShootingStartLongitudeField' + onKeyReleased='handler.setGearShootingStartLongitude(((JTextField)event.getSource()).getText())'/> + </cell> + <cell> + <JTextField id='gearShootingStartLatitudeLabel' + onKeyReleased='handler.setGearShootingStartLatitude(((JTextField)event.getSource()).getText())'/> + </cell> + <cell> + <JXDatePicker id='gearShootingStartDateField' + onActionPerformed='handler.setDate(event, "gearShootingStartDate")'/> + </cell> + <cell> + <JTextField id='gearShootingStartTimeField' + onKeyReleased='handler.setGearShootingStartTime(((JTextField)event.getSource()).getText())'/> + </cell> + </row> + <row> + <cell> + <JLabel id='gearShootingEndLabel'/> + </cell> + <cell> + <JTextField id='gearShootingEndLongitudeField' + onKeyReleased='handler.setGearShootingEndLongitude(((JTextField)event.getSource()).getText())'/> + </cell> + <cell> + <JTextField id='gearShootingEndLatitudeLabel' + onKeyReleased='handler.setGearShootingEndLatitude(((JTextField)event.getSource()).getText())'/> + </cell> + <cell> + <JXDatePicker id='gearShootingEndDateField' + onActionPerformed='handler.setDate(event, "gearShootingEndDate")'/> + </cell> + <cell> + <JTextField id='gearShootingEndTimeField' + onKeyReleased='handler.setGearShootingEndTime(((JTextField)event.getSource()).getText())'/> + </cell> + </row> + </Table> </JPanel> </cell> </row> - <!-- Ouverture verticale --> - <!--row> - <cell anchor='west'> - <JLabel id='ouvertureVerticaleLabel'/> - </cell> - <cell fill='horizontal'> - <NumberEditor id='ouvertureVerticaleField' - constructorParams='this'/> - </cell> - </row--> - - <!-- Longueur funes --> + <!-- Fishing operation valid / invalid--> <row> - <cell anchor='west'> - <JLabel id='longueurFunesBrasLabel'/> + <cell columns="2"> + <JToolBar id='fishingOperationValidPanel' + layout='{new BorderLayout()}'> + <JButton id='resetValidStateButton' + constraints='BorderLayout.WEST' + onActionPerformed="model.setFishingOperationValid(null)"/> + <JRadioButton id='fishingOperationResetRadio' + constraints='BorderLayout.EAST'/> + </JToolBar> </cell> - <cell fill='horizontal'> - <JPanel layout='{new GridLayout(1,0)}'> - <NumberEditor id='longueurFunesField' constructorParams='this'/> - <NumberEditor id='longueurBrasField' constructorParams='this'/> - </JPanel> + <cell columns="2"> + <JRadioButton id='fishingOperationValidRadio' + onActionPerformed='model.setFishingOperationValid(Boolean.TRUE)'/> </cell> + <cell columns="2"> + <JRadioButton id='fishingOperationInvalidRadio' + onActionPerformed='model.setFishingOperationValid(Boolean.FALSE)'/> + </cell> </row> - <!-- Longueur bras --> - <!--row> - <cell anchor='west'> - <JLabel id='longueurBrasLabel'/> - </cell> - <cell fill='horizontal'> - <NumberEditor id='longueurBrasField' constructorParams='this'/> - </cell> - </row--> - - <!-- Distance chalutée --> + <!-- FishingOperation rectiligne / distance chalutee / durée --> <row> - <cell anchor='west'> - <JLabel id='distanceChaluteeDureeLabel'/> + <cell> + <JCheckBox id='fishingOperationRectiligneCheckBox' + onItemStateChanged='handler.setBoolean(event, "fishingOperationRectiligne")'/> </cell> - <cell fill='horizontal'> - <JPanel layout='{new GridLayout(1,0)}'> - <NumberEditor id='distanceChaluteeField' constructorParams='this'/> - <NumberEditor id='dureeField' constructorParams='this'/> + <cell columns="3"> + <JPanel layout="{new BorderLayout()}"> + <JLabel id='distanceChaluteeLabel' + constraints='BorderLayout.WEST'/> + <NumberEditor id='distanceChaluteeField' + constraints='BorderLayout.CENTER' + constructorParams='this'/> </JPanel> </cell> - </row> - - <!-- Durée --> - <!--row> <cell anchor='west'> <JLabel id='dureeLabel'/> </cell> <cell fill='horizontal'> <NumberEditor id='dureeField' constructorParams='this'/> </cell> - </row--> - - <!-- Localité --> - <row> - <cell> - <JLabel id='localiteLabel'/> - </cell> - <cell> - <JTextField id='localiteField' - onKeyReleased='handler.setText(event, "localite")'/> - </cell> </row> - <!-- FishingOperation valide / Rectiligne --> + <!-- Actions d'import --> <row> - <cell columns='2'> + <cell columns='6'> <JPanel layout='{new GridLayout(1,0)}'> - <JCheckBox id='traitValidCheckBox' - onItemStateChanged='handler.setBoolean(event, "traitValid")'/> - <JCheckBox id='traitRectiligneCheckBox' - onItemStateChanged='handler.setBoolean(event, "traitRectiligne")'/> + <JButton id='importPupitriButton' + onActionPerformed='handler.importPupitri()'/> + <JButton id='importCasinoButton' + onActionPerformed='handler.importCasino()'/> </JPanel> </cell> </row> - <!-- Système de fermeture du cul / Geometrie mesuree --> - <row> - <cell columns='2'> - <JPanel layout='{new GridLayout(1,0)}'> - <JCheckBox id='systemeFermetureCulCheckBox' - onItemStateChanged='handler.setBoolean(event, "systemeFermetureCul")'/> - <JCheckBox id='geometrieMesureeCheckBox' - onItemStateChanged='handler.setBoolean(event, "geometrieMesuree")'/> - </JPanel> - </cell> - </row> - - <!-- FishingOperation rectiligne --> - <!--row> - <cell columns='2'> - <JCheckBox id='traitRectiligneCheckBox' - onItemStateChanged='handler.setBoolean(event, "traitRectiligne")'/> - </cell> - </row--> - - <!-- Geometrie mesuree --> - <!--row> - <cell columns='2'> - <JCheckBox id='geometrieMesureeCheckBox' - onItemStateChanged='handler.setBoolean(event, "geometrieMesuree")'/> - </cell> - </row--> - <!-- Saisisseur --> <row weighty='0.3'> - <cell columns='2'> + <cell columns='6'> <JScrollPane id='saisisseurPane' columnHeaderView="{saisisseurHeader}" onFocusGained='saisisseurList.requestFocus()'> - <JList id='saisisseurList' - onValueChanged='handler.selectListData(event, "saisisseur")'/> - <BeanListHeader id='saisisseurHeader' genericType='Person'/> - </JScrollPane> + <JList id='saisisseurList' + onValueChanged='handler.selectListData(event, "saisisseur")'/> + <BeanListHeader id='saisisseurHeader' genericType='Person'/> + </JScrollPane> </cell> </row> <!-- Commentaire --> <row weighty='0.3'> - <cell columns='2'> + <cell columns='6'> <JScrollPane id='commentPane' onFocusGained='commentField.requestFocus()'> <JTextArea id='commentField' @@ -311,114 +289,133 @@ </JScrollPane> </cell> </row> - <row> - <cell columns='2'> - <JPanel layout='{new GridLayout(1,0)}'> - <JButton id='importPupitriButton' - onActionPerformed='handler.importPupitri()'/> - <JButton id='importCasinoButton' - onActionPerformed='handler.importCasino()'/> - </JPanel> - </cell> - </row> </Table> </tab> - <tab id='traitGearShootingTab' title='tutti.label.tab.fishingOperation.gearShooting'> + <tab id='traitGearShootingTab' + title='tutti.label.tab.fishingOperation.gearShooting'> <Table fill='both' id='gearShootingForm'> - <!-- GearShootingStart Longitude --> + <!-- GearShootingStart Depth --> <row> <cell> - <JLabel id='gearShootingStartLongitudeLabel'/> + <JLabel id='gearShootingStartDepthLabel'/> </cell> <cell weightx='1.0'> - <JTextField id='gearShootingStartLongitudeField' - onKeyReleased='handler.setGearShootingStartLongitude(((JTextField)event.getSource()).getText())'/> + <NumberEditor id='gearShootingStartDepthField' + constructorParams='this'/> </cell> </row> - <!-- GearShootingStart Latitude --> + <!-- GearShootingEnd Depth --> <row> <cell> - <JLabel id='gearShootingStartLatitudeLabel'/> + <JLabel id='gearShootingEndDepthLabel'/> </cell> <cell weightx='1.0'> - <JTextField id='gearShootingStartLatitudeField' - onKeyReleased='handler.setGearShootingStartLatitude(((JTextField)event.getSource()).getText())'/> + <NumberEditor id='gearShootingEndDepthField' + constructorParams='this'/> </cell> </row> - <!-- GearShootingStart Time --> + <!-- Ouverture horizontale --> <row> - <cell> - <JLabel id='gearShootingStartTimeLabel'/> + <cell anchor='west'> + <JLabel id='ouvertureHorizontaleLabel'/> </cell> - <cell weightx='1.0'> - <JTextField id='gearShootingStartTimeField' - onKeyReleased='handler.setGearShootingStartTime(((JTextField)event.getSource()).getText())'/> + <cell fill='horizontal'> + <NumberEditor id='ouvertureHorizontaleField' + constructorParams='this'/> </cell> </row> - <!-- GearShootingStart Depth --> + <!-- Ouverture verticale --> <row> - <cell> - <JLabel id='gearShootingStartDepthLabel'/> + <cell anchor='west'> + <JLabel id='ouvertureVerticaleLabel'/> </cell> - <cell weightx='1.0'> - <NumberEditor id='gearShootingStartDepthField' + <cell fill='horizontal'> + <NumberEditor id='ouvertureVerticaleField' constructorParams='this'/> </cell> </row> - <!-- GearShootingEnd Longitude --> + <!-- Longueur funes --> <row> - <cell> - <JLabel id='gearShootingEndLongitudeLabel'/> + <cell anchor='west'> + <JLabel id='longueurFunesLabel'/> </cell> - <cell weightx='1.0'> - <JTextField id='gearShootingEndLongitudeField' - onKeyReleased='handler.setGearShootingEndLongitude(((JTextField)event.getSource()).getText())'/> + <cell fill='horizontal'> + <NumberEditor id='longueurFunesField' constructorParams='this'/> </cell> </row> - <!-- GearShootingEnd Latitude --> + <!-- Longueur bras --> <row> - <cell> - <JLabel id='gearShootingEndLatitudeLabel'/> + <cell anchor='west'> + <JLabel id='longueurBrasLabel'/> </cell> - <cell weightx='1.0'> - <JTextField id='gearShootingEndLatitudeField' - onKeyReleased='handler.setGearShootingEndLatitude(((JTextField)event.getSource()).getText())'/> + <cell fill='horizontal'> + <NumberEditor id='longueurBrasField' constructorParams='this'/> </cell> </row> - <!-- GearShootingEnd Time --> + <!-- Système de fermeture du cul / Geometrie mesuree --> <row> - <cell> - <JLabel id='gearShootingEndTimeLabel'/> + <cell columns='2'> + <JPanel layout='{new GridLayout(1,0)}'> + <JCheckBox id='systemeFermetureCulCheckBox' + onItemStateChanged='handler.setBoolean(event, "systemeFermetureCul")'/> + <JCheckBox id='geometrieMesureeCheckBox' + onItemStateChanged='handler.setBoolean(event, "geometrieMesuree")'/> + </JPanel> </cell> + </row> + </Table> + </tab> + + <tab id='environmentTab' + title='tutti.label.tab.fishingOperation.environment'> + + <Table fill='both' id='environmentForm'> + + <!-- Beaufort scale --> + <row> + <cell anchor='west'> + <JLabel id='beaufortScaleLabel'/> + </cell> <cell weightx='1.0'> - <JTextField id='gearShootingEndTimeField' - onKeyReleased='handler.setGearShootingEndTime(((JTextField)event.getSource()).getText())'/> + <BeanComboBox id='beaufortScaleComboBox' constructorParams='this' + genericType='BeaufortScale'/> </cell> </row> - <!-- GearShootingEnd Depth --> + <!-- Wind direction --> <row> - <cell> - <JLabel id='gearShootingEndDepthLabel'/> + <cell anchor='west'> + <JLabel id='windDirectionLabel'/> </cell> - <cell weightx='1.0'> - <NumberEditor id='gearShootingEndDepthField' - constructorParams='this'/> + <cell fill='horizontal'> + <NumberEditor id='windDirectionField' constructorParams='this'/> </cell> </row> + + <!-- Sea state--> + <row> + <cell anchor='west'> + <JLabel id='seaStateLabel'/> + </cell> + <cell fill='horizontal'> + <BeanComboBox id='seaStateComboBox' constructorParams='this' + genericType='SeaState'/> + </cell> + </row> </Table> </tab> - <tab id='traitHydrologyTabContent' title='tutti.label.tab.fishingOperation.hydrology'> + <tab id='traitHydrologyTabContent' + title='tutti.label.tab.fishingOperation.hydrology'> <Table fill='both' id='hydrologyForm'> Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUIHandler.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUIHandler.java 2012-12-10 02:45:40 UTC (rev 37) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUIHandler.java 2012-12-10 06:59:02 UTC (rev 38) @@ -38,7 +38,6 @@ import java.awt.BorderLayout; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import java.sql.Date; import java.util.List; /** @@ -96,6 +95,9 @@ @Override public void afterInitUI() { + ui.getFishingOperationValidPanel().remove( + ui.getFishingOperationResetRadio()); + FishingOperationTabUIModel model = ui.getModel(); initUI(ui); @@ -134,7 +136,7 @@ boolean empty = bean == null; - FishingOperationTabUIModel model = ui.getModel(); + FishingOperationTabUIModel model = getModel(); // clean previous selection ui.getSaisisseurHeader().getList().clearSelection(); @@ -165,7 +167,7 @@ public void cancel() { - String id = ui.getModel().getId(); + String id = getModel().getId(); if (log.isInfoEnabled()) { log.info("Cancel edition for fishingOperation: " + id); @@ -215,26 +217,26 @@ } public void setGearShootingStartLatitude(String text) { - ui.getModel().setGearShootingStartLatitude(Float.valueOf(text)); + getModel().setGearShootingStartLatitude(Float.valueOf(text)); } public void setGearShootingStartLongitude(String text) { - ui.getModel().setGearShootingStartLongitude(Float.valueOf(text)); + getModel().setGearShootingStartLongitude(Float.valueOf(text)); } public void setGearShootingStartTime(String text) { - ui.getModel().setGearShootingStartTime(Date.valueOf(text)); + getModel().setGearShootingStartTime(Integer.valueOf(text)); } public void setGearShootingEndLatitude(String text) { - ui.getModel().setGearShootingEndLatitude(Float.valueOf(text)); + getModel().setGearShootingEndLatitude(Float.valueOf(text)); } public void setGearShootingEndLongitude(String text) { - ui.getModel().setGearShootingEndLongitude(Float.valueOf(text)); + getModel().setGearShootingEndLongitude(Float.valueOf(text)); } public void setGearShootingEndTime(String text) { - ui.getModel().setGearShootingEndTime(Date.valueOf(text)); + getModel().setGearShootingEndTime(Integer.valueOf(text)); } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUIModel.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUIModel.java 2012-12-10 02:45:40 UTC (rev 37) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/FishingOperationTabUIModel.java 2012-12-10 06:59:02 UTC (rev 38) @@ -51,16 +51,20 @@ public static final String PROPERTY_STATION_NUMBER = "stationNumber"; - public static final String PROPERTY_TRAIT_NUMBER = "traitNumber"; + public static final String PROPERTY_FISHING_OPERATION_NUMBER = "fishingOperationNumber"; public static final String PROPERTY_DATE = "date"; public static final String PROPERTY_STRATA = "strata"; + public static final String PROPERTY_SUB_STRATA = "subStrata"; + public static final String PROPERTY_GEAR_SHOOTING_START_LATITUDE = "gearShootingStartLatitude"; public static final String PROPERTY_GEAR_SHOOTING_START_LONGITUDE = "gearShootingStartLongitude"; + public static final String PROPERTY_GEAR_SHOOTING_START_DATE = "gearShootingStartDate"; + public static final String PROPERTY_GEAR_SHOOTING_START_TIME = "gearShootingStartTime"; public static final String PROPERTY_GEAR_SHOOTING_START_DEPTH = "gearShootingStartDepth"; @@ -71,6 +75,8 @@ public static final String PROPERTY_GEAR_SHOOTING_END_TIME = "gearShootingEndTime"; + public static final String PROPERTY_GEAR_SHOOTING_END_DATE = "gearShootingEndDate"; + public static final String PROPERTY_GEAR_SHOOTING_END_DEPTH = "gearShootingEndDepth"; public static final String PROPERTY_BEAUFORT_SCALE = "beaufortScale"; @@ -91,13 +97,13 @@ public static final String PROPERTY_SYSTEME_FERMETURE_CUL = "systemeFermetureCul"; - public static final String PROPERTY_TRAIT_RECTILIGNE = "traitRectiligne"; + public static final String PROPERTY_FISHING_OPERATION_RECTILIGNE = "fishingOperationRectiligne"; public static final String PROPERTY_DISTANCE_CHALUTEE = "distanceChalutee"; public static final String PROPERTY_DUREE = "duree"; - public static final String PROPERTY_TRAIT_VALID = "traitValid"; + public static final String PROPERTY_FISHING_OPERATION_VALID = "fishingOperationValid"; public static final String PROPERTY_LOCALITE = "localite"; @@ -131,26 +137,32 @@ protected Integer stationNumber; - protected Integer traitNumber; + protected Integer fishingOperationNumber; protected Date date; protected Strata strata; + protected Strata subStrata; + protected Float gearShootingStartLatitude; protected Float gearShootingStartLongitude; - protected Date gearShootingStartTime; + protected Date gearShootingStartDate; + protected Integer gearShootingStartTime; + protected Float gearShootingStartDepth; protected Float gearShootingEndLatitude; protected Float gearShootingEndLongitude; - protected Date gearShootingEndTime; + protected Date gearShootingEndDate; + protected Integer gearShootingEndTime; + protected Float gearShootingEndDepth; protected BeaufortScale beaufortScale; @@ -171,13 +183,13 @@ protected boolean systemeFermetureCul; - protected boolean traitRectiligne; + protected boolean fishingOperationRectiligne; protected Float distanceChalutee; protected Float duree; - protected boolean traitValid; + protected Boolean fishingOperationValid; protected String localite; @@ -244,14 +256,14 @@ firePropertyChange(PROPERTY_STATION_NUMBER, oldValue, stationNumber); } - public Integer getTraitNumber() { - return traitNumber; + public Integer getFishingOperationNumber() { + return fishingOperationNumber; } - public void setTraitNumber(Integer traitNumber) { - Object oldValue = getTraitNumber(); - this.traitNumber = traitNumber; - firePropertyChange(PROPERTY_TRAIT_NUMBER, oldValue, traitNumber); + public void setFishingOperationNumber(Integer fishingOperationNumber) { + Object oldValue = getFishingOperationNumber(); + this.fishingOperationNumber = fishingOperationNumber; + firePropertyChange(PROPERTY_FISHING_OPERATION_NUMBER, oldValue, fishingOperationNumber); } public Date getDate() { @@ -274,6 +286,16 @@ firePropertyChange(PROPERTY_STRATA, oldValue, strata); } + public Strata getSubStrata() { + return subStrata; + } + + public void setSubStrata(Strata subStrata) { + Object oldValue = getSubStrata(); + this.subStrata = subStrata; + firePropertyChange(PROPERTY_SUB_STRATA, oldValue, subStrata); + } + public Float getGearShootingStartLatitude() { return gearShootingStartLatitude; } @@ -294,11 +316,21 @@ firePropertyChange(PROPERTY_GEAR_SHOOTING_START_LONGITUDE, oldValue, gearShootingStartLongitude); } - public Date getGearShootingStartTime() { + public Date getGearShootingStartDate() { + return gearShootingStartDate; + } + + public void setGearShootingStartDate(Date gearShootingStartDate) { + Object oldValue = getGearShootingStartDate(); + this.gearShootingStartDate = gearShootingStartDate; + firePropertyChange(PROPERTY_GEAR_SHOOTING_START_DATE, oldValue, gearShootingStartDate); + } + + public Integer getGearShootingStartTime() { return gearShootingStartTime; } - public void setGearShootingStartTime(Date gearShootingStartTime) { + public void setGearShootingStartTime(Integer gearShootingStartTime) { Object oldValue = getGearShootingStartTime(); this.gearShootingStartTime = gearShootingStartTime; firePropertyChange(PROPERTY_GEAR_SHOOTING_START_TIME, oldValue, gearShootingStartTime); @@ -334,11 +366,21 @@ firePropertyChange(PROPERTY_GEAR_SHOOTING_END_LONGITUDE, oldValue, gearShootingEndLongitude); } - public Date getGearShootingEndTime() { + public Date getGearShootingEndDate() { + return gearShootingEndDate; + } + + public void setGearShootingEndDate(Date gearShootingEndDate) { + Object oldValue = getGearShootingEndDate(); + this.gearShootingEndDate = gearShootingEndDate; + firePropertyChange(PROPERTY_GEAR_SHOOTING_END_DATE, oldValue, gearShootingEndDate); + } + + public Integer getGearShootingEndTime() { return gearShootingEndTime; } - public void setGearShootingEndTime(Date gearShootingEndTime) { + public void setGearShootingEndTime(Integer gearShootingEndTime) { Object oldValue = getGearShootingEndTime(); this.gearShootingEndTime = gearShootingEndTime; firePropertyChange(PROPERTY_GEAR_SHOOTING_END_TIME, oldValue, gearShootingEndTime); @@ -444,14 +486,14 @@ firePropertyChange(PROPERTY_SYSTEME_FERMETURE_CUL, oldValue, systemeFermetureCul); } - public boolean isTraitRectiligne() { - return traitRectiligne; + public boolean isFishingOperationRectiligne() { + return fishingOperationRectiligne; } - public void setTraitRectiligne(boolean traitRectiligne) { - Object oldValue = isTraitRectiligne(); - this.traitRectiligne = traitRectiligne; - firePropertyChange(PROPERTY_TRAIT_RECTILIGNE, oldValue, traitRectiligne); + public void setFishingOperationRectiligne(boolean fishingOperationRectiligne) { + Object oldValue = isFishingOperationRectiligne(); + this.fishingOperationRectiligne = fishingOperationRectiligne; + firePropertyChange(PROPERTY_FISHING_OPERATION_RECTILIGNE, oldValue, fishingOperationRectiligne); } public Float getDistanceChalutee() { @@ -474,14 +516,14 @@ firePropertyChange(PROPERTY_DUREE, oldValue, duree); } - public boolean isTraitValid() { - return traitValid; + public Boolean getFishingOperationValid() { + return fishingOperationValid; } - public void setTraitValid(boolean traitValid) { - Object oldValue = isTraitValid(); - this.traitValid = traitValid; - firePropertyChange(PROPERTY_TRAIT_VALID, oldValue, traitValid); + public void setFishingOperationValid(Boolean fishingOperationValid) { + Object oldValue = getFishingOperationValid(); + this.fishingOperationValid = fishingOperationValid; + firePropertyChange(PROPERTY_FISHING_OPERATION_VALID, oldValue, fishingOperationValid); } public String getLocalite() { Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/species/frequency/SpeciesFrequencyUI.css =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/species/frequency/SpeciesFrequencyUI.css 2012-12-10 02:45:40 UTC (rev 37) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/catches/species/frequency/SpeciesFrequencyUI.css 2012-12-10 06:59:02 UTC (rev 38) @@ -25,7 +25,6 @@ NumberEditor { autoPopup: {handler.getConfig().isAutoPopupNumberEditor()}; showPopupButton: {handler.getConfig().isShowNumberEditorButton()}; - } #stepLabel { Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties =================================================================== --- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2012-12-10 02:45:40 UTC (rev 37) +++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2012-12-10 06:59:02 UTC (rev 38) @@ -22,6 +22,7 @@ tutti.action.reload.actions=Recharger les actions tutti.action.reload.home=Reload home screen tutti.action.reload.ui=Recharger l'interface graphique +tutti.action.reset.fishingOperationValidState=Réinitialiser tutti.action.save=Enregistrer tutti.action.selectCampaign=Campagne tutti.action.selectCampaign.tip=Sélectionner la campagne à utiliser @@ -49,15 +50,25 @@ tutti.label.fishingOperation.averageBottomTemperature=Température de fond moyenne tutti.label.fishingOperation.beaufortScale=Force du vent tutti.label.fishingOperation.date=Date -tutti.label.fishingOperation.distanceChaluteeDuree=Distance chalutée / Durée +tutti.label.fishingOperation.distanceChalutee=Distance chalutée +tutti.label.fishingOperation.duree=Durée +tutti.label.fishingOperation.fishingOperationInvalid=Trait invalide +tutti.label.fishingOperation.fishingOperationNumber=Numéro de Trait +tutti.label.fishingOperation.fishingOperationRectiligne=Trait rectiligne +tutti.label.fishingOperation.fishingOperationValid=Trait valide +tutti.label.fishingOperation.gearDate=Date +tutti.label.fishingOperation.gearLatitude=Latitude +tutti.label.fishingOperation.gearLongitude=Longitude +tutti.label.fishingOperation.gearShootingDate=Date +tutti.label.fishingOperation.gearShootingEnd=Fin de traine tutti.label.fishingOperation.gearShootingEndBottomSalinity=Salinité de fond fin de traine tutti.label.fishingOperation.gearShootingEndBottomTemperature=Température de fond fin de traine tutti.label.fishingOperation.gearShootingEndDepth=Profondeur fin de traine -tutti.label.fishingOperation.gearShootingEndLatitude=Latitude fin de traine -tutti.label.fishingOperation.gearShootingEndLongitude=Longitude fin de traine tutti.label.fishingOperation.gearShootingEndSurfaceSalinity=Salinité de surface fin de traine tutti.label.fishingOperation.gearShootingEndSurfaceTemperature=Temperature de surface fin de traine -tutti.label.fishingOperation.gearShootingEndTime=Fin de traine +tutti.label.fishingOperation.gearShootingLatitude=Latitude +tutti.label.fishingOperation.gearShootingLongitude=Longitude +tutti.label.fishingOperation.gearShootingStart=Début de traine tutti.label.fishingOperation.gearShootingStartBottomSalinity=Salinité de fond début de traine tutti.label.fishingOperation.gearShootingStartBottomTemperature=Température de fond début de traine tutti.label.fishingOperation.gearShootingStartDepth=Profondeur début de traine @@ -66,16 +77,19 @@ tutti.label.fishingOperation.gearShootingStartSurfaceSalinity=Salinité de surface début de traine tutti.label.fishingOperation.gearShootingStartSurfaceTemperature=Temperature de surface début de traine tutti.label.fishingOperation.gearShootingStartTime=Début de traine +tutti.label.fishingOperation.gearShootingTime=Heure +tutti.label.fishingOperation.gearTime=Heure tutti.label.fishingOperation.geometrieMesuree=Géométrie mesurée tutti.label.fishingOperation.localite=Localité -tutti.label.fishingOperation.longueurFunesBras=Longueur des funes / bras -tutti.label.fishingOperation.ouvertureHorizontaleVerticale=Ouverture horizontale / verticale +tutti.label.fishingOperation.longueurBras=Longueur des funes +tutti.label.fishingOperation.longueurFunes=Longueur des bras +tutti.label.fishingOperation.ouvertureHorizontale=Ouverture horizontale +tutti.label.fishingOperation.ouvertureVerticale=Ouverture verticale tutti.label.fishingOperation.seaState=Etat de la mer -tutti.label.fishingOperation.stationNumberTraitNumber=Numéro de la station / Trait -tutti.label.fishingOperation.strata=Strate d'association +tutti.label.fishingOperation.stationNumber=Numéro de la station +tutti.label.fishingOperation.strata=Strate +tutti.label.fishingOperation.subStrata=Sous strate tutti.label.fishingOperation.systemeFermetureCul=Système de fermeture de cul -tutti.label.fishingOperation.traitRectiligne=Trait rectiligne -tutti.label.fishingOperation.traitValid=Trait valide tutti.label.fishingOperation.windDirection=Direction du vent tutti.label.frequencyConfiguration.maxStep=Classe max tutti.label.frequencyConfiguration.minStep=Classe min @@ -118,7 +132,8 @@ tutti.label.tab.accidentel=Captures accidentelles tutti.label.tab.benthos=Benthos tutti.label.tab.fishingOperation=Trait -tutti.label.tab.fishingOperation.gearShooting=Données de traine +tutti.label.tab.fishingOperation.environment=Environnement +tutti.label.tab.fishingOperation.gearShooting=Mise en oeuvre de l'engin tutti.label.tab.fishingOperation.general=Caractéristiques générales tutti.label.tab.fishingOperation.hydrology=Paramètres hydrologiques tutti.label.tab.macroDechet=Macro déchets Added: trunk/tutti-ui-swing/src/main/resources/icons/action-reset.png =================================================================== (Binary files differ) Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-reset.png ___________________________________________________________________ Added: svn:mime-type + image/png