r1531 - isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator
Author: sletellier Date: 2008-10-07 18:59:57 +0000 (Tue, 07 Oct 2008) New Revision: 1531 Added: isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/AdvancedParamsAction.java isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/AdvancedParamsUI.jaxx isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/ExportUI.jaxx isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/PreScriptsUI.jaxx Log: Interface JAXX Added: isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/AdvancedParamsAction.java =================================================================== --- isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/AdvancedParamsAction.java (rev 0) +++ isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/AdvancedParamsAction.java 2008-10-07 18:59:57 UTC (rev 1531) @@ -0,0 +1,49 @@ +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin + * + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * IsisFish.java + * + * Created: 1 aout 2005 18:37:25 CEST + * + * @author Benjamin POUSSIN <poussin at codelutin.com> + * @version $Revision: 1312 $ + * + * Last update: $Date: 2008-08-28 10:21:07 +0200 (jeu, 28 aoû 2008) $ + * by : $Author: sletellier $ + */ + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +/** + * + * @author letellier + */ +package fr.ifremer.isisfish.ui.simulator; + +public class AdvancedParamsAction{ + public AdvancedParamsAction(){ + + } + public void getSimulatorNames(){ + + } +} Added: isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/AdvancedParamsUI.jaxx =================================================================== --- isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/AdvancedParamsUI.jaxx (rev 0) +++ isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/AdvancedParamsUI.jaxx 2008-10-07 18:59:57 UTC (rev 1531) @@ -0,0 +1,221 @@ +<!-- +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin + * + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * IsisFish.java + * + * Created: 1 aout 2005 18:37:25 CEST + * + * @author Benjamin POUSSIN <poussin at codelutin.com> + * @version $Revision: 1312 $ + * + * Last update: $Date: 2008-08-28 10:21:07 +0200 (jeu, 28 aoû 2008) $ + * by : $Author: sletellier $ + */ + --> +<Table> + <script> + <![CDATA[ + fieldSimulationStatistique.setSelected(getContextValue(SimulAction.class).getSimulationParameter().getLocal()); +// fieldSimulationCache.setSelected(getContextValue(SimulAction.class).getSimulationParameter().getSubProcess()); + + public AdvancedParamsUI (SimulAction action){ + setContextValue(action); + } + protected void addTagValue(){ + getContextValue(SimulAction.class).addTagValue(fieldTag.getText(), fieldValue.getText()); + } + protected void removeTagValue(){ + // getContextValue(SimulAction.class).removeTagValue(tableTagValue.getValueAt(getSelectedRow(),0)); + } + protected void saveTagValue(){ + // getContextValue(SimulAction.class).saveTagValue(); + } + ]]> + </script> +<!-- +actionCommand="simulator.SimulatorAction.addTagValue($SimulationParameter, $fieldTag/text, $fieldValue/text);refreshView($tableTagValue)" +--> +<!-- +actionCommand="simulator.SimulatorAction.removeTagValue($SimulationParameter, getValueAt($tableTagValue, $tableTagValue/selectedRow, 0));refreshView($tableTagValue)" +--> +<!-- +actionCommand="simulator.SimulatorAction.saveTagValue($SimulationParameter/tagValue);simulator.SimulatorAction.saveSimulatorChoice($fieldSimulAdvParamsSimulatorSelect/selectedItem, $fieldSimulAdvParamsSimulatorLocal/selected)" +--> + <row> + <cell fill="horizontal" weightx="0.16"> + <Table> + <row> + <cell> + <JLabel text="isisfish.advancedParams.simulatorUse"/> + </cell> + <cell fill="horizontal" weightx="1.0"> + <JPanel/> + </cell> + </row> + </Table> + </cell> + <cell columns="5" fill="horizontal" weightx="0.84"> + <JComboBox id="fieldSimulAdvParamsSimulatorSelect"/> +<!-- +model='{new DefaultComboBoxModel(getContextValue(SimulAction.class).getSimulatorNames())}' +--> + </cell> + </row> + <row> + <cell fill="horizontal" weightx="0.2"> + <JPanel/> + </cell> + <cell columns="2" fill="horizontal" weightx="0.3"> + <JCheckBox text="isisfish.advancedParams.simulationStatistique" id="fieldSimulationStatistique"/> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JPanel/> + </cell> + <cell columns="2" fill="horizontal" weightx="0.3"> + <JCheckBox text="isisfish.advancedParams.simulationCache" id="fieldSimulationCache"/> + </cell> + </row> + <row> + <cell columns="2" fill="horizontal" weightx="0.2"> + <JLabel text="isisfish.advancedParams.simulLevelLogger"/> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsSimulLoggerError" text="isisfish.common.error" buttonGroup="fieldSimulAdvParamsSimulLoggerGroup"/> +<!-- +origin='$SimulationParameter/simulErrorLevel' +--> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsSimulLoggerWarn" text="isisfish.common.warn" buttonGroup="fieldSimulAdvParamsSimulLoggerGroup"/> +<!-- +origin='$SimulationParameter/simulWarnLevel' +--> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsSimulLoggerInfo" text="isisfish.common.info" buttonGroup="fieldSimulAdvParamsSimulLoggerGroup"/> +<!-- +origin='$SimulationParameter/simulInfoLevel'origin='$SimulationParameter/simulInfoLevel' +--> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsSimulLoggerDebug" text="isisfish.common.debug" buttonGroup="fieldSimulAdvParamsSimulLoggerGroup"/> +<!-- +origin='$SimulationParameter/simulDebugLevel' +--> + </cell> + </row> + <row> + <cell columns="2" fill="horizontal" weightx="0.2"> + <JLabel text="isisfish.advancedParams.scriptLevelLogger"/> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsScriptLoggerError" text="isisfish.common.error" buttonGroup="fieldSimulAdvParamsScriptLoggerGroup"/> +<!-- +origin='$SimulationParameter/scriptErrorLevel' +--> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsScriptLoggerWarn" text="isisfish.common.warn" buttonGroup="fieldSimulAdvParamsScriptLoggerGroup"/> +<!-- +origin='$SimulationParameter/scriptWarnLevel' +--> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsScriptLoggerInfo" text="isisfish.common.info" buttonGroup="fieldSimulAdvParamsScriptLoggerGroup"/> +<!-- +origin='$SimulationParameter/scriptInfoLevel' +--> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsScriptLoggerDebug" text="isisfish.common.debug" buttonGroup="fieldSimulAdvParamsScriptLoggerGroup"/> +<!-- +origin='$SimulationParameter/scriptDebugLevel' +--> + </cell> + </row> + <row> + <cell columns="2" fill="horizontal" weightx="0.2"> + <JLabel text="isisfish.advancedParams.libLevelLogger"/> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsLibLoggerError" text="isisfish.common.error" buttonGroup="fieldSimulAdvParamsLibLoggerGroup"/> +<!-- +origin='$SimulationParameter/libErrorLevel' +--> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsLibLoggerWarn" text="isisfish.common.warn" buttonGroup="fieldSimulAdvParamsLibLoggerGroup"/> +<!-- +origin='$SimulationParameter/libWarnLevel' +--> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsLibLoggerInfo" text="isisfish.common.info" buttonGroup="fieldSimulAdvParamsLibLoggerGroup"/> + </cell> + <cell fill="horizontal" weightx="0.2"> + <JRadioButton id="fieldSimulAdvParamsLibLoggerDebug" text="isisfish.common.debug" buttonGroup="fieldSimulAdvParamsLibLoggerGroup"/> +<!-- +origin='$SimulationParameter/libInfoLevel' +--> + </cell> + </row> + <row> + <cell columns="6" fill="horizontal" weightx="1.0"> + <JLabel text="isisfish.advancedParams.freeParameters" horizontalAlignment="0"/> + </cell> + </row> + <row> + <cell fill="horizontal" weightx="0.25"> + <JLabel text="isisfish.common.tag"/> + </cell> + <cell columns="2" fill="horizontal" weightx="0.25"> + <JTextField id="fieldTag"/> + </cell> + <cell fill="horizontal" weightx="0.25"> + <JLabel text="isisfish.common.value"/> + </cell> + <cell columns="2" fill="horizontal" weightx="0.25"> + <JTextField id="fieldValue"/> + </cell> + </row> + <row> + <cell columns="6" fill="horizontal" weightx="1.0"> + <JButton text="isisfish.common.add" onActionPerformed = 'addTagValue()'/> + </cell> + </row> + <row> + <cell columns="6" fill="both" weightx="1.0" weighty="1.0"> + <JScrollPane> + <JTable id="tableTagValue"/> + </JScrollPane> + </cell> + </row> + <row> + <cell columns="6" fill="horizontal" weightx="1.0"> + <JButton text="isisfish.common.remove" onActionPerformed = 'removeTagValue()'/> + </cell> + </row> + <row> + <cell columns="6" fill="horizontal" weightx="1.0"> + <JButton text="isisfish.common.saveNextSimulation" onActionPerformed = 'saveTagValue()'/> + </cell> + </row> +</Table> \ No newline at end of file Added: isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/ExportUI.jaxx =================================================================== --- isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/ExportUI.jaxx (rev 0) +++ isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/ExportUI.jaxx 2008-10-07 18:59:57 UTC (rev 1531) @@ -0,0 +1,78 @@ +<!-- +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin + * + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * IsisFish.java + * + * Created: 1 aout 2005 18:37:25 CEST + * + * @author Benjamin POUSSIN <poussin at codelutin.com> + * @version $Revision: 1312 $ + * + * Last update: $Date: 2008-08-28 10:21:07 +0200 (jeu, 28 aoû 2008) $ + * by : $Author: sletellier $ + */ + --> + +<Table> +<script><![CDATA[ + public ExportUI (SimulAction action){ + setContextValue(action); + } + ]]> + </script> + <row> + <cell columns="4" fill="both" weightx="1.0" weighty="1.0"> + <JScrollPane> + <JList id="listSimulExportChoose" selectionMode="2"> +<!-- Fixme : ListModel + <ListModel origin="$ExportNames"/> + <ListSelectionEvents onValueChanged="Update($listSimulExportChoose/selectedValues, $SimulationParameter/exportNames)"/> + <ListRenderer> + <SimpleToolTipListRenderer origin='fr.ifremer.isisfish.ui.simulator.ToolTipListModelFactory.createExportClassDocsModel($ExportNames)'/> + </ListRenderer> +--> + </JList> + </JScrollPane> + </cell> + </row> + <row> + <cell> + <JLabel text="isisfish.export.directory"/> + </cell> + <cell fill="horizontal" weightx="1.0"> + <JTextField id="fieldSimulExportFolder"/> + </cell> + <cell> + <JButton text="isisfish.common.ellipsis"/> +<!-- +actionCommand="update(org.codelutin.util.FileUtil.getDirectory(), $SimulationParameter/exportDirectory);refreshView($fieldSimulExportFolder)" +--> + </cell> + <cell> + <JButton text="isisfish.common.saveNextSimulation"/> + </cell> + </row> + +<!-- +actionCommand="simulator.SimulatorAction.saveExport($SimulationParameter/exportDirectory, $SimulationParameter/exportNames)" +--> +</Table> + Added: isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx =================================================================== --- isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx (rev 0) +++ isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2008-10-07 18:59:57 UTC (rev 1531) @@ -0,0 +1,336 @@ +<!-- +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin + * + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * IsisFish.java + * + * Created: 1 aout 2005 18:37:25 CEST + * + * @author Benjamin POUSSIN <poussin at codelutin.com> + * @version $Revision: 1312 $ + * + * Last update: $Date: 2008-08-28 10:21:07 +0200 (jeu, 28 aoû 2008) $ + * by : $Author: sletellier $ + */ + --> +<Table insets='0,0,0,0'> + <script><![CDATA[ + import static org.codelutin.i18n.I18nf._; + import fr.ifremer.isisfish.ui.Common; + import fr.ifremer.isisfish.datastore.RuleStorage; + import fr.ifremer.isisfish.ui.WelcomeUI; + import fr.ifremer.isisfish.ui.WelcomePanelUI; + import fr.ifremer.isisfish.simulator.SimulationParameter; + import fr.ifremer.isisfish.ui.widget.renderer.ToolTipComboBoxRenderer2; + + public ParamsUI(SimulAction action){ + setContextValue(action); + } + protected void regionChange(){ + WelcomePanelUI root = getParentContainer(WelcomePanelUI.class); + root.setInfoText(_("isisfish.message.loading.region")); + getContextValue(SimulAction.class).regionChange(fieldSimulParamsRegion.getSelectedItem().toString()); + root.setInfoText(_("isisfish.message.region.loaded")); + } + + public void setSimulationParameter(SimulAction simulAction){ + getContextValue(SimulAction.class).setSimulationParameter(simulAction.getSimulationParameter()); + } + protected void loadOldSimulation(){ + + WelcomePanelUI root = getParentContainer(WelcomePanelUI.class); + root.setInfoText(_("isisfish.message.loading.old.simulation")); + + Exception eee = getContextValue(SimulAction.class).loadOldSimulation(fieldSimulParamsSelect.getSelectedItem().toString()); + if (eee != null){ + // new OutputView("Error.xml", "error", eee.getMessage()); + } + fieldSimulParamsName.setText(getContextValue(SimulAction.class).getStorageName()); + + root.setInfoText(_("isisfish.message.old.simulation.loaded")); + } + protected void addRules(){ + getContextValue(SimulAction.class).addRules(fieldSimulParamsMesuresSelect.getSelectedItem().toString()); + listSimulParamsMesuresList.setListData(getContextValue(SimulAction.class).getRules().toArray()); + } + protected void removeRules(){ + getContextValue(SimulAction.class).removeRules(listSimulParamsMesuresList.getSelectedValue().toString()); + listSimulParamsMesuresList.setListData(getContextValue(SimulAction.class).getRules().toArray()); + } + protected void clearRules(){ + getContextValue(SimulAction.class).clearRules(); + listSimulParamsMesuresList.setListData(getContextValue(SimulAction.class).getRules().toArray()); + } + protected void simul(){ + getContextValue(SimulAction.class).simul(fieldSimulParamsName.getText()); + SimulUI simul = getParentContainer(SimulUI.class); + simul.selTab(6); + } + protected void enablePreSimul(){ + if (fieldUseSimulPreScripts.isSelected()){ + SimulUI simul = getParentContainer(SimulUI.class); + simul.enablePreSimul(); + } + } + protected void enableAnalysePlan(){ + if (fieldSimulUseAnalysePlan.isSelected()){ + SimulUI simul = getParentContainer(SimulUI.class); + simul.enableAnalysePlan(); + } + } + ]]> + </script> + <row> + <cell fill="horizontal" weightx="1.0"> + <Table> + <row> + <cell columns="4" fill="horizontal"> + <JLabel text="isisfish.params.loadOldSimulation"/> + </cell> + </row> + <row> + <cell columns="2" fill="horizontal" weightx="1.0"> + <JComboBox id="fieldSimulParamsSelect" model='{new DefaultComboBoxModel(Common.getOldSimulationItem())}' onActionPerformed='loadOldSimulation()'/> + </cell> + <cell> + <JButton text="isisfish.params.filter" id="buttonSimulParamsSelectFilter"/> + </cell> + <cell> + <JButton text="isisfish.params.clearFilter" id="buttonSimulParamsSelectClearFilter"/> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell fill="both" weightx="1.0" weighty="1.0"> + <Table> + <row> + <cell columns="2" fill="horizontal" weightx="0.5"> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="isisfish.params.simulationName" minimumSize='{new Dimension(140,25)}' preferredSize='{new Dimension(140,25)}'/> + </cell> + <cell fill="both" weightx="1.0"> + <JTextField id="fieldSimulParamsName"/> + </cell> + </row> + </Table> + </cell> + <cell columns="2" fill="horizontal" weightx="0.5"> + <Table> + <row> + <cell columns="2" fill="horizontal"> + <JLabel text="isisfish.common.region"/> + </cell> + <cell fill="horizontal" weightx="1.0"> + <JComboBox id="fieldSimulParamsRegion" model='{new DefaultComboBoxModel(Common.getRegionItem())}' onActionPerformed='regionChange()'/> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell columns="4" fill="horizontal" weightx="1.0"> + <Table> + <row> + <cell> + <JLabel text="isisfish.params.description"/> + </cell> + <cell fill="horizontal" weightx="1.0"> + <JPanel/> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell columns="4" fill="both" weightx="1.0" weighty="0.3"> + <JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'> + <JTextArea id="fieldSimulParamsDesc" text='{getContextValue(SimulAction.class).getSimulationParameter().getDescription()}'/> + </JScrollPane> + </cell> + </row> + <row> + <cell columns="2" fill="horizontal" weightx="0.5"> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="isisfish.params.numberYear" minimumSize='{new Dimension(140,25)}' preferredSize='{new Dimension(140,25)}'/> + </cell> + <cell fill="both" weightx="1.0"> + <JTextField id="fieldSimulParamsNbAnnees" text='{getContextValue(SimulAction.class).getSimulationParameter().getNumberOfYear()}'/> + </cell> + </row> + </Table> + </cell> + <cell columns="2" fill="horizontal" weightx="0.5"> + <JPanel/> + </cell> + </row> + <row> + <cell fill="both" weightx="0.2" weighty="0.1"> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="isisfish.common.strategies"/> + </cell> + </row> + <row> + <cell fill="both" weightx="1.0" weighty="1.0"> + <JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'> + <JList id="listSimulParamsStrategies" selectionMode="2" model='{new DefaultComboBoxModel(getContextValue(SimulAction.class).getSimulationParameter().getStrategies().toArray())}' /> + </JScrollPane> + </cell> + </row> + </Table> + </cell> + <cell fill="both" weightx="0.4" weighty="0.1"> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="isisfish.common.populations"/> + </cell> + </row> + <row> + <cell fill="both" weightx="1.0" weighty="1.0"> + <JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'> + <JList id="listSimulParamsPopulations" selectionMode="2" model='{new DefaultComboBoxModel(getContextValue(SimulAction.class).getSimulationParameter().getPopulations().toArray())}' /> + </JScrollPane> + </cell> + </row> + </Table> + </cell> + <cell fill="both" weightx="0.4" weighty="0.1"> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text="isisfish.common.rules"/> + </cell> + </row> + <row> + <cell fill="horizontal"> +<!-- TODO : Render --> + <JComboBox id="fieldSimulParamsMesuresSelect" model='{new DefaultComboBoxModel(getContextValue(SimulAction.class).getRuleNames().toArray())}' + onActionPerformed='buttonSimulParamsMesuresRemove.setEnabled(true)'/> +<!-- + setToolTipRenderContext(); + private void setToolTipRenderContext(){ + ToolTipComboBoxRenderer2 render = new ToolTipComboBoxRenderer2(); + render.setModel(ToolTipListModelFactory.createRuleDescriptionsModel(RuleStorage.getRuleNames())); + setContextValue(render); + } + + renderer='{getContextValue(ToolTipComboBoxRenderer2.class)}' +<SimpleToolTipComboBoxRenderer origin='fr.ifremer.isisfish.ui.simulator.ToolTipListModelFactory.createRuleDescriptionsModel($RuleNames)'/> +--> + </cell> + </row> + <row> + <cell fill="both" weightx="1.0" weighty="1.0"> + <JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'> + <JList id="listSimulParamsMesuresList" selectionMode="0" model='{new DefaultComboBoxModel(getContextValue(SimulAction.class).getSimulationParameter().getRules().toArray())}' onValueChanged='buttonSimulParamsMesuresClear.setEnabled(true)'/> + </JScrollPane> + </cell> + </row> + </Table> + </cell> + <cell fill="both" weighty="0.1"> + <Table> + <row> + <cell fill="horizontal"> + <JLabel text=" " minimumSize='{new Dimension(2,15)}' preferredSize='{new Dimension(2,15)}'/> + </cell> + </row> + <row> + <cell fill='horizontal'> + <JButton id="buttonSimulParamsMesuresAdd" text="isisfish.common.add" onActionPerformed='addRules()'/> + </cell> + </row> + <row> + <cell fill='horizontal'> + <JButton id="buttonSimulParamsMesuresRemove" text="isisfish.common.remove" enabled="false" onActionPerformed='removeRules()'/> + </cell> + </row> + <row> + <cell fill='horizontal'> + <JButton id="buttonSimulParamsMesuresClear" text="isisfish.common.clear" enabled="false" onActionPerformed='clearRules()'/> + </cell> + </row> + <row> + <cell fill='both' weighty="1.0"> + <JPanel/> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell columns="4" fill="both" weightx="1.0" weighty="0.6"> + <JTabbedPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'> + <tab title='{_("isisfish.params.populationNumbers")}'> + <!--JMatrixPanel id="simulParamsNumbers" name="isisfish.params.populationNumbers"/--> + </tab> + <tab title='{_("isisfish.params.ruleParameters")}'> + <JTable id="simulParamsRules" name="isisfish.params.ruleParameters"> + </JTable> + </tab> + </JTabbedPane> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell fill="horizontal" weightx="1.0"> + <Table> + <row> + <cell fill="horizontal" weightx="0.3"> + <JCheckBox text="isisfish.params.usePreSimulationScript" id="fieldUseSimulPreScripts" onItemStateChanged='enablePreSimul()'/> + </cell> + <cell fill="horizontal" weightx="0.3"> + <JCheckBox text="isisfish.params.useAnalysePlan" id="fieldSimulUseAnalysePlan" onItemStateChanged='enableAnalysePlan()'/> + </cell> + <cell fill="horizontal" weightx="0.3"> + <JCheckBox text="isisfish.params.onlyExportSimulation" id="fieldSimulOnlyExport"/> + </cell> + </row> + </Table> + </cell> + </row> + <row> + <cell fill="horizontal" weightx="1.0"> + <Table> + <row> + <cell> + <JLabel id="lblLauncher" text="isisfish.params.lblLauncher"/> + </cell> + <cell fill="horizontal" weightx="0.5"> + <JComboBox id="comboSelLauncher"/> + </cell> + <cell fill="horizontal" weightx="0.5"> + <JButton id="buttonSimulParamsSimulate" text="isisfish.common.simulate" onActionPerformed='simul()'/> + </cell> + </row> + </Table> + </cell> + </row> +</Table> \ No newline at end of file Added: isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/PreScriptsUI.jaxx =================================================================== --- isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/PreScriptsUI.jaxx (rev 0) +++ isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/simulator/PreScriptsUI.jaxx 2008-10-07 18:59:57 UTC (rev 1531) @@ -0,0 +1,55 @@ +<!-- +/* *##% + * Copyright (C) 2005 + * Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin + * + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + *##%*/ + +/* * + * IsisFish.java + * + * Created: 1 aout 2005 18:37:25 CEST + * + * @author Benjamin POUSSIN <poussin at codelutin.com> + * @version $Revision: 1312 $ + * + * Last update: $Date: 2008-08-28 10:21:07 +0200 (jeu, 28 aoû 2008) $ + * by : $Author: sletellier $ + */ + --> +<JPanel id="simulPreScripts" layout='{new BorderLayout()}'> +<script><![CDATA[ + public PreScriptsUI (SimulAction action){ + setContextValue(action); + } + ]]> + </script> + + <JScrollPane constraints='BorderLayout.CENTER'> + <JTextArea id="fieldSimulPreScript"> +<!-- Fixme : DocmumentEvents +origin="$SimulationParameter/preScript" + <DocumentEvents onModified="Update($fieldSimulPreScript/text, $SimulationParameter/preScript)"/> +--> + </JTextArea> + </JScrollPane> + + <JButton constraints='BorderLayout.SOUTH' text="isisfish.preScript.backParameter"/> +<!-- +actionCommand="simulator.SimulatorAction.selectTab($simulTabs, 'true', '0')" +--> + +</JPanel> \ No newline at end of file
participants (1)
-
sletellier@users.labs.libre-entreprise.org