Author: sletellier Date: 2008-10-07 19:03:01 +0000 (Tue, 07 Oct 2008) New Revision: 1533 Added: isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx Log: Interface JAXX Added: isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx =================================================================== --- isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx (rev 0) +++ isis-fish/branches/arbo-maven/src/main/java/fr/ifremer/isisfish/ui/script/ScriptUI.jaxx 2008-10-07 19:03:01 UTC (rev 1533) @@ -0,0 +1,216 @@ +<!-- +/* *##% + * 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="script" layout='{new BorderLayout()}'> +<!-- +title="isisfish.script.title" +visible="true" size='{new Dimension(620,400)}' +--> + +<!-- Fixme : WindowsEvents +<WindowEvents id="events" onOpened="script.Action.opened()" /> +Maximizable="true" Closable="true" +bundle="org.codelutin.i18n.I18nBundleBridge" +--> + +<!-- Fixme : ContextDataSource + <ContextDataSource id="ScriptStorage" context="current" source="ScriptStorage"/> + <ContextDataSource id="ActionLog" context="current" source="ActionLog"/> + <ContextDataSource id="ScriptType" context="current" source="ScriptType"/> + <ContextDataSource id="canCommit" context="current" source="canCommit"/> + <ContextDataSource id="canUpdate" context="current" source="canUpdate"/> + <ContextDataSource id="canDiff" context="current" source="canDiff"/> + <ContextDataSource id="canDelete" context="current" source="canDelete"/> +--> + + <!-- + | Toolbar + +--> + <JPanel id="buttonBar" layout='{new GridLayout()}' constraints='BorderLayout.NORTH'> + <JComboBox id="ScriptTypeChoice"> +<!-- +origin="ScriptType" +renderer="org.codelutin.i18n.I18n._(.)" +--> + + <!-- no change name in combo box, or change for menu and in Action.newScript too --> +<!-- Fixme : comboboxmodel + <comboboxmodel origin="fr.ifremer.isisfish.ui.script.Action.getScriptTypesNames()"/> +--> + </JComboBox> + <JButton id="buttonScriptNew" text="isisfish.script.new"/> +<!-- +ToolTipText="Create a new script" +actionCommand="script.Action.newScript($tree, $treeModel, $ScriptTypeChoice/selectedItem)" +--> + <JButton id="buttonScriptSave" text="isisfish.script.save"/> +<!-- +ToolTipText="Save current script" +origin="util:isValid($ScriptStorage)" +actionCommand="script.Action.saveScript($ScriptStorage, $scriptJedit/text)" +--> + <JButton id="buttonScriptExport" text="isisfish.script.txtExport"/> +<!-- +ToolTipText="Export selected script(s) to zip archive" +origin="$tree/selectionPaths" +actionCommand="script.Action.exportScript($tree)" +--> + <JButton id="buttonScriptCommit" text="isisfish.script.commit"/> +<!-- +ToolTipText="Commit script to CVS server" +origin="$canCommit" +actionCommand="script.Action.commitScript($tree, $ScriptStorage, $scriptJedit/text)" +--> + <JButton id="buttonScriptUpdate" text="isisfish.script.update"/> +<!-- +ToolTipText="Update current script from server" +origin="$canUpdate" +actionCommand="script.Action.updateScript($tree,$ScriptStorage)" +--> + <JButton id="buttonScriptCut" text="isisfish.script.cut"/> +<!-- +ToolTipText="Cut current selection (Ctrl-x)" +origin="util:isValid($ScriptStorage)" +actionCommand="xpath:cut($scriptJedit)" +--> + <JButton id="buttonScriptCopy" text="isisfish.script.copy"/> +<!-- +ToolTipText="Copy current selection (Ctrl-c)" +origin="util:isValid($ScriptStorage)" +actionCommand="xpath:copy($scriptJedit)" +--> + <JButton id="buttonScriptPaste" text="isisfish.script.paste"/> +<!-- +ToolTipText="Paste current selection (Ctrl-v)" +origin="util:isValid($ScriptStorage)" +actionCommand="xpath:paste($scriptJedit)" +--> + <JButton id="buttonScriptCheck" text="isisfish.script.check"/> +<!-- +ToolTipText="Check syntax of the current script" +origin="util:isInstance('fr.ifremer.isisfish.datastore.JavaSourceStorage', $ScriptStorage)" +actionCommand="script.Action.checkScript($ScriptStorage, $scriptJedit/text)" +--> + <JButton id="buttonScriptEval" text="isisfish.script.evaluate"/> +<!-- +ToolTipText="Try to eval current script (must be have main method)" +origin="util:isInstance('fr.ifremer.isisfish.datastore.JavaSourceStorage', $ScriptStorage)" +actionCommand="script.Action.evaluateScript($ScriptStorage, $scriptJedit/text)" +--> + </JPanel> + + <!-- + | Content editor + +--> + <JSplitPane oneTouchExpandable="true" dividerLocation="250" orientation="HORIZONTAL" constraints='BorderLayout.CENTER'> + +<!-- Fixme : pas compris : JSplitPane does not accept constraints +constraints='"contentPanel"' +--> + <!-- + | Tree script selection + +--> + <JScrollPane> +<!-- Fixme : non plus : JScrollPane does not accept constraints +constraints='"tree"' +--> + <JTree id="tree" name="tree" rootVisible="false"> +<!-- Fixme : NestedTreeModel, TreeRenderer and TreeSelectionEvents + <NestedTreeModel id="treeModel"> + <TreeNode name="Root"> + <TreeNode name="Script" userObject="'Script'"> + <TreeNode origin="fr.ifremer.isisfish.datastore.ScriptStorage.getScriptNames()"/> + </TreeNode> + <TreeNode name="Simulator" userObject="'Simulator'"> + <TreeNode origin="fr.ifremer.isisfish.datastore.SimulatorStorage.getSimulatorNames()"/> + </TreeNode> + <TreeNode name="Export" userObject="'Export'"> + <TreeNode origin="fr.ifremer.isisfish.datastore.ExportStorage.getExportNames()"/> + </TreeNode> + <TreeNode name="Rule" userObject="'Rule'"> + <TreeNode origin="fr.ifremer.isisfish.datastore.RuleStorage.getRuleNames()"/> + </TreeNode> + <TreeNode name="AnalysePlan" userObject="'AnalysePlan'"> + <TreeNode origin="fr.ifremer.isisfish.datastore.AnalysePlanStorage.getAnalysePlanNames()"/> + </TreeNode> + <TreeNode name="EquationModel" userObject="'EquationModel'"> + <TreeNode origin="fr.ifremer.isisfish.datastore.FormuleStorage.getCategories()"> + <TreeNode treeOrigin=".." childsPropertyName="fr.ifremer.isisfish.datastore.FormuleStorage.getFormuleNames(.)"/> + </TreeNode> + </TreeNode> + </TreeNode> + </NestedTreeModel> + + <TreeRenderer> + <DefaultTreeRenderer type="fr.ifremer.isisfish.datastore.RegionStorage" childsPropertyName="name"/> + <DefaultTreeRenderer type="java.lang.String" childsPropertyName="org.codelutin.i18n.I18n._(.)"/> + </TreeRenderer> + + <TreeSelectionEvents id="treeSelectionListener" + onValueChanged="thread:script.Action.loadScript($tree, $tree/selectionPath/path[2]/userObject, $tree/selectionPath/lastPathComponent)"/> +--> + </JTree> + </JScrollPane> + <JSplitPane oneTouchExpandable="true" dividerLocation="250" orientation="VERTICAL"> + + <!-- + | Editor script + +--> +<!-- Fixme : editor + <editor id="scriptJedit" constraints='"fieldScriptEdit"'/> + +origin="$ScriptStorage/file" +--> + <!-- + | Log area + +--> + <JScrollPane> + <JTextArea id="actionLogArea" editable="false"/> +<!-- Fixme : Pas compris non plus (constraints) +constraints='"actionLogArea"' +origin="$ActionLog" +--> + </JScrollPane> + </JSplitPane> + </JSplitPane> + + <!-- + | Status bar + +--> + + +<!-- +<xpanel constraints='"scriptStatusBar"' xml="StatusBar.xml"/> +<StatusBar2/> +--> +</JPanel>