Author: echatellier Date: 2013-11-07 23:42:17 +0100 (Thu, 07 Nov 2013) New Revision: 3830 Url: http://forge.codelutin.com/projects/isis-fish/repository/revisions/3830 Log: Ajout des interfaces de calibration (maquette) Added: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationHandler.java branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationMethodUI.jaxx branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationUI.jaxx branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/widget/DummyLayerUI.java Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/SimulationUI.jaxx branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/WelcomePanelUI.jaxx branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/WelcomeTabUI.jaxx branches/4.0.1/src/main/resources/i18n/isis-fish_en_GB.properties branches/4.0.1/src/main/resources/i18n/isis-fish_fr_FR.properties Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/SimulationUI.jaxx =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/SimulationUI.jaxx 2013-11-03 20:47:26 UTC (rev 3829) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/SimulationUI.jaxx 2013-11-07 22:42:17 UTC (rev 3830) @@ -111,5 +111,5 @@ <JMenuItem id="miImport" text="isisfish.simulation.menu.import" onActionPerformed="importSimulation()"/> </JMenu> </JMenuBar> - <JTabbedPane id="bodyTabbedPane" constraints='BorderLayout.CENTER'/> + <JTabbedPane id="bodyTabbedPane" constraints='BorderLayout.CENTER' decorator="boxed"/> </JPanel> Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/WelcomePanelUI.jaxx =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/WelcomePanelUI.jaxx 2013-11-03 20:47:26 UTC (rev 3829) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/WelcomePanelUI.jaxx 2013-11-07 22:42:17 UTC (rev 3830) @@ -5,7 +5,7 @@ $Id$ $HeadURL$ %% - Copyright (C) 2006 - 2010 Ifremer, Code Lutin + Copyright (C) 2006 - 2013 Ifremer, Code Lutin, Chatellier Eric %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as Modified: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/WelcomeTabUI.jaxx =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/WelcomeTabUI.jaxx 2013-11-03 20:47:26 UTC (rev 3829) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/WelcomeTabUI.jaxx 2013-11-07 22:42:17 UTC (rev 3830) @@ -30,6 +30,7 @@ fr.ifremer.isisfish.ui.input.InputSaveVerifier fr.ifremer.isisfish.ui.sensitivity.SensitivitySaveVerifier fr.ifremer.isisfish.ui.sensitivity.SensitivityInputHandler + fr.ifremer.isisfish.ui.calibration.CalibrationHandler javax.swing.ImageIcon </import> @@ -58,6 +59,10 @@ <fr.ifremer.isisfish.ui.sensitivity.SensitivityUI id="sensitivityUI" constructorParams='new JAXXInitialContext().add(new InputAction()).add(new SensitivitySaveVerifier()).add(new SimulAction()).add(new SensitivityInputHandler()).add(this)' /> </tab> + <tab title=' ' icon='{new ImageIcon(getClass().getResource("/images/SimulationLauncher.gif"))}'> + <fr.ifremer.isisfish.ui.calibration.CalibrationUI id="calibrationUI" + constructorParams='new JAXXInitialContext().add(new InputAction()).add(new SensitivitySaveVerifier()).add(new SimulAction()).add(new CalibrationHandler()).add(this)' /> + </tab> <tab title=' ' icon='{new ImageIcon(getClass().getResource("/images/calc.gif"))}'> <fr.ifremer.isisfish.ui.result.ResultUI /> </tab> Added: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationHandler.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationHandler.java (rev 0) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationHandler.java 2013-11-07 22:42:17 UTC (rev 3830) @@ -0,0 +1,29 @@ +/* + * #%L + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2013 Ifremer, Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ +package fr.ifremer.isisfish.ui.calibration; + +import fr.ifremer.isisfish.ui.input.InputHandler; + +public class CalibrationHandler extends InputHandler { + +} Added: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationMethodUI.jaxx =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationMethodUI.jaxx (rev 0) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationMethodUI.jaxx 2013-11-07 22:42:17 UTC (rev 3830) @@ -0,0 +1,119 @@ +<!-- + #%L + IsisFish + + $Id$ + $HeadURL$ + %% + Copyright (C) 2013 Ifremer, CodeLutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> +<Table> + <import> + java.awt.CardLayout + javax.swing.ComboBoxModel + javax.swing.table.DefaultTableModel + </import> + + <script><![CDATA[ + + + ]]></script> + <row> + <cell fill="horizontal"> + <JLabel text="isisfish.calibration.select"/> + </cell> + <cell fill="horizontal" weightx="1.0"> + <JComboBox id="fieldCalibrationMethodSelect" /> + </cell> + </row> + <row> + <cell columns="2" fill="both" weightx="1.0" weighty="1.0"> + <JScrollPane> + <JTable id="simulCalibrationMethodParam" rowHeight='24'/> + </JScrollPane> + </cell> + </row> + <row> + <cell columns="2" fill="both" weightx="1.0" weighty="1.0"> + <JPanel id="factorCardinalityPanel" layout="{new CardLayout()}"> + <JLabel text="isisfish.calibration.methodfactorsupported" horizontalAlignment="center" + border="{BorderFactory.createEtchedBorder()}" font-style="italic" constraints='"factorCardinalitySupported"'/> + <JScrollPane id="factorCardinalityScrollPane" constraints='"factorCardinalityNotSupported"'> + <JTable id="factorCardinality" rowHeight='24' /> + </JScrollPane> + </JPanel> + </cell> + </row> + <row> + <cell fill="both" columns='3' weightx="1.0"> + <JLabel text="isisfish.calibration.objectives"/> + </cell> + </row> + <row> + <cell columns='2' fill="both" weightx="1.0" weighty="1.0"> + <Table> + <row> + <cell fill="both" weightx="0.5" weighty="1.0"> + <JScrollPane> + <JList id="availableCalibrationObjectives" selectionMode="{javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION}" /> + </JScrollPane> + </cell> + <cell fill="both" weighty="1.0"> + <Table> + <row> + <cell fill="both"> + <JButton id="addObjectiveButton" text="isisfish.common.add" enabled="false" /> + </cell> + </row> + <row> + <cell fill="both"> + <JButton id="removeObjectiveButton" text="isisfish.common.remove" enabled="false" /> + </cell> + </row> + <row> + <cell fill="both"> + <JButton id="clearObjectiveButton" text="isisfish.common.clear" enabled="false" /> + </cell> + </row> + </Table> + </cell> + <cell fill="both" weightx="0.5" weighty="1.0"> + <JScrollPane> + <JList id="selectedCalibrationObjectives" selectionMode="{javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION}" /> + </JScrollPane> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell fill="both" columns='2' weightx="1.0" weighty="1.0"> + <JScrollPane> + <JTable id="objectiveParamsTable" rowHeight='24' /> + </JScrollPane> + </cell> + </row> + <row> + <cell fill="horizontal"> + <JLabel text="isisfish.calibration.optimization"/> + </cell> + <cell fill="horizontal" weightx="1.0"> + <JComboBox id="fieldCalibrationScriptSelect" /> + </cell> + </row> +</Table> Added: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationUI.jaxx =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationUI.jaxx (rev 0) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/calibration/CalibrationUI.jaxx 2013-11-07 22:42:17 UTC (rev 3830) @@ -0,0 +1,98 @@ +<!-- + #%L + IsisFish + + $Id$ + $HeadURL$ + %% + Copyright (C) 2013 Ifremer, CodeLutin, Chatellier Eric + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> +<fr.ifremer.isisfish.ui.SimulationUI> + + <import> + fr.ifremer.isisfish.ui.input.InputAction + jaxx.runtime.JAXXContext + jaxx.runtime.context.JAXXInitialContext + jaxx.runtime.SwingUtil + </import> + + <script><![CDATA[ + protected void $afterCompleteSetup() { + SwingUtil.getLayer(bodyTabbedPane).setUI(dummyLayer); + } + + /** + * Refresh all simulation launch UI. + */ + @Override + protected void regionStorageChanged() { + + } + + @Override + public void refresh() { + + } + + @Override + public void selectParametersTab() { + + } + + @Override + public void setEnabledPrescriptTab(boolean selected) { + // no prescript in AS + } + + @Override + public void setEnabledSimulationPlanTab(boolean selected) { + // no simulation plan in AS + } + + @Override + public void refreshFactorTree() { + + } + ]]></script> + + <CalibrationHandler id="handler" /> + + <fr.ifremer.isisfish.ui.widget.DummyLayerUI id="dummyLayer" /> + <JTabbedPane id="bodyTabbedPane"> + <tab title='isisfish.params.title'> + <fr.ifremer.isisfish.ui.simulator.ParamsUI id='paramsUI' sensitivity='true' regionStorage="{getRegionStorage()}" + constructorParams='new JAXXInitialContext().add(new InputAction()).add("SimulationUI", this).add(this)' /> + </tab> + <tab title='isisfish.sensitivity.title'> + <fr.ifremer.isisfish.ui.sensitivity.SensitivityTabUI id="sensitivityTabUI" + constructorParams='new JAXXInitialContext().add(new InputAction()).add("SimulationUI", this).add(this)' /> + </tab> + <tab title='isisfish.calibration.title'> + <CalibrationMethodUI id="calibrationMethodUI" constructorParams='this'/> + </tab> + <tab title='isisfish.export.title'> + <fr.ifremer.isisfish.ui.simulator.ExportUI id="exportUI" constructorParams='this'/> + </tab> + <tab title='isisfish.resultChoice.title'> + <fr.ifremer.isisfish.ui.simulator.ResultChoiceUI id="resultChoiceUI" constructorParams='this'/> + </tab> + <tab title='isisfish.advancedParameters.title'> + <fr.ifremer.isisfish.ui.simulator.AdvancedParamsUI id="advancedParamsUI" constructorParams='this'/> + </tab> + </JTabbedPane> +</fr.ifremer.isisfish.ui.SimulationUI> Added: branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/widget/DummyLayerUI.java =================================================================== --- branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/widget/DummyLayerUI.java (rev 0) +++ branches/4.0.1/src/main/java/fr/ifremer/isisfish/ui/widget/DummyLayerUI.java 2013-11-07 22:42:17 UTC (rev 3830) @@ -0,0 +1,64 @@ +/* + * #%L + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2013 Ifremer, Codelutin, Chatellier Eric + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ +package fr.ifremer.isisfish.ui.widget; + +import java.awt.Color; +import java.awt.Font; +import java.awt.Graphics2D; + +import javax.swing.JComponent; + +import org.jdesktop.jxlayer.JXLayer; +import org.jdesktop.jxlayer.plaf.AbstractLayerUI; + +public class DummyLayerUI extends AbstractLayerUI<JComponent> { + + /** serialVersionUID. */ + private static final long serialVersionUID = 309245880711380974L; + + @Override + protected void paintLayer(Graphics2D g2, JXLayer<? extends JComponent> l) { + super.paintLayer(g2, l); + + // position + //g2.translate(-35, 90); // top left + g2.translate(l.getBounds().getMaxX() - 160, l.getBounds().getMaxY()); // bottom right + + // yellow backgroung + g2.rotate(Math.PI * -42 / 180); + g2.setColor(Color.YELLOW); + g2.fillRect(10, 10, 200, 30); + + // text + g2.translate(70, 15); + g2.setFont(new Font("Dialog", Font.BOLD, 16)); + g2.setColor(Color.BLACK); + g2.drawString("Maquette",10,10); + + // for test only + g2.translate(-3, 10); + g2.setFont(new Font("Dialog", Font.ITALIC, 10)); + g2.setColor(Color.BLACK); + g2.drawString("(non fonctionnelle)",10,10); + } +} Modified: branches/4.0.1/src/main/resources/i18n/isis-fish_en_GB.properties =================================================================== --- branches/4.0.1/src/main/resources/i18n/isis-fish_en_GB.properties 2013-11-03 20:47:26 UTC (rev 3829) +++ branches/4.0.1/src/main/resources/i18n/isis-fish_en_GB.properties 2013-11-07 22:42:17 UTC (rev 3830) @@ -97,6 +97,11 @@ isisfish.advancedParams.simulationCache=Simulation cache isisfish.advancedParams.simulationStatistique=Simulation statistics isisfish.advancedParams.simulatorUse=Simulator to Use +isisfish.calibration.methodfactorsupported= +isisfish.calibration.objectives= +isisfish.calibration.optimization= +isisfish.calibration.select= +isisfish.calibration.title= isisfish.cell.comments=Comments isisfish.cell.land=Land isisfish.cell.latitude=Latitude Modified: branches/4.0.1/src/main/resources/i18n/isis-fish_fr_FR.properties =================================================================== --- branches/4.0.1/src/main/resources/i18n/isis-fish_fr_FR.properties 2013-11-03 20:47:26 UTC (rev 3829) +++ branches/4.0.1/src/main/resources/i18n/isis-fish_fr_FR.properties 2013-11-07 22:42:17 UTC (rev 3830) @@ -97,6 +97,11 @@ isisfish.advancedParams.simulationCache=Simulation cache isisfish.advancedParams.simulationStatistique=Simulation statistique isisfish.advancedParams.simulatorUse=Simulateur à utiliser +isisfish.calibration.methodfactorsupported=La méthode de calibration choisie gère les cardinalités des facteurs +isisfish.calibration.objectives=Fonctions d'objectif +isisfish.calibration.optimization=Script d'optimisation +isisfish.calibration.select=Méthode de calibration +isisfish.calibration.title=Calibration isisfish.cell.comments=Commentaires isisfish.cell.land=Terre isisfish.cell.latitude=Latitude