Silent the useless serial java warning 67/8667/1
Sylvestre Ledru [Sun, 12 Aug 2012 10:10:19 +0000 (12:10 +0200)]
Change-Id: I14ed1c2fad09427e3aaab93a7119f6c86c3e66b7

132 files changed:
scilab/modules/console/src/java/org/scilab/modules/console/SciInputCommandView.java
scilab/modules/console/src/java/org/scilab/modules/console/SciOutputView.java
scilab/modules/graph/src/java/org/scilab/modules/graph/ScilabComponent.java
scilab/modules/graph/src/java/org/scilab/modules/graph/actions/GroupAction.java
scilab/modules/graph/src/java/org/scilab/modules/graph/actions/RedoAction.java
scilab/modules/graph/src/java/org/scilab/modules/graph/actions/UnGroupAction.java
scilab/modules/graph/src/java/org/scilab/modules/graph/actions/UndoAction.java
scilab/modules/graph/src/java/org/scilab/modules/graph/actions/ZoomInAction.java
scilab/modules/graph/src/java/org/scilab/modules/graph/actions/ZoomOutAction.java
scilab/modules/graph/src/java/org/scilab/modules/graph/io/ScilabObjectCodec.java
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/console/SwingScilabConsole.java
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/filechooser/ImagePreview.java
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/filechooser/SwingScilabExportFileChooser.java
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/helpbrowser/SwingScilabHelpBrowserViewer.java
scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/label/SwingScilabLabel.java
scilab/modules/gui/src/java/org/scilab/modules/gui/graphicWindow/PanelLayout.java
scilab/modules/gui/src/java/org/scilab/modules/gui/utils/ClosingOperationsManager.java
scilab/modules/gui/src/java/org/scilab/modules/gui/utils/HelpSearchField.java
scilab/modules/helptools/src/java/org/scilab/modules/helptools/UnhandledDocbookTagException.java
scilab/modules/preferences/src/java/org/scilab/modules/preferences/Component/PreviewCode.java
scilab/modules/preferences/src/java/org/scilab/modules/preferences/Component/ScilabDoubleEntry.java
scilab/modules/preferences/src/java/org/scilab/modules/preferences/Component/Table.java
scilab/modules/preferences/src/java/org/scilab/modules/preferences/Component/Title.java
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/editor/FigureFrame.java
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/util/OutOfMemoryException.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/OpenURLAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PageSetupAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PasteColumnAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PreviousTabAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/PrintAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RecentFileAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RedoAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RepeatSelectionOnColumnAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/RestoreOpenedFilesAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteAllFilesAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SaveAndExecuteFileAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchFilesAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SearchWordInFilesAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/SelectBlockAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/actions/UnTabifyAction.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SciNotesContents.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabScrollPane.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/ScilabTabbedPane.java
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/SearchFile.java
scilab/modules/types/src/java/org/scilab/modules/types/ScilabSparseException.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/BooleanFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/CompiledFunctionFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/DoubleFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/FunctionLibFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/GraphicHandlesFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/IntegerFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/ListFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/MListFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/PointerFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/PolynomialFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/ScilabVarFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/ScilabVarFilteringButtonAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/StringFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/TListFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/actions/UncompiledFunctionFilteringAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/datatable/SwingEditvarTableModel.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabFileBrowserComponent.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabFileBrowserHistory.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabFileSelectorComboBox.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabFileSelectorFilter.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabFileSelectorPanel.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabTreeTableCellRenderer.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabTreeTableModelAdapter.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/SwingScilabTreeTable.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/ChangeCWDAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/CloseAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/EditFileWithDefaultAppAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/ExecuteCommandAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/ExecuteFileInConsoleAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/ExecuteFileInXcosAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/GoToHomeAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/GoToSCIAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/LoadFileAsGraphAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/LoadFileInScilabAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/OpenFileInSciNotesAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/OpenFileWithDefaultAppAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/ValidateAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/rowheader/HeaderRenderer.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/rowheader/RowHeader.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/rowheader/RowHeaderCellEditor.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/rowheader/RowHeaderRenderer.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/variablebrowser/actions/CloseAction.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/variableeditor/ScilabTabbedPane.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/variableeditor/TableVariableEditor.java
scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/variableeditor/undo/CellsUndoManager.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/XcosTab.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/AboutXcosAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CloseAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/CompileAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DebugLevelAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DiagramBackgroundAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/DumpAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/EditFormatAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/ExternalAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/InitModelicaAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/SetContextAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/SetupAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/ShowHideShadowAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/StartAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/StopAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/dialog/DebugLevelDialog.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/dialog/SetContextDialog.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/actions/dialog/SetupDialog.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/BasicBlock.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/BlockParametersAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/CodeGenerationAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/FlipAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/MirrorAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/RegionToSuperblockAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/RotateAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/actions/ShowParentAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/listener/ProdPortLabelingListener.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/listener/SumPortLabelingListener.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/positionning/BigSom.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/positionning/GroundBlock.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/positionning/Product.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/positionning/RoundBlock.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/positionning/Summation.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/block/positionning/VoltageSensorBlock.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/graph/ScicosParameters.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/graph/swing/GraphComponent.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/graph/swing/handler/ConnectionHandler.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/link/actions/StyleHorizontalAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/link/actions/StyleStraightAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/link/actions/StyleVerticalAction.java
scilab/modules/xcos/src/java/org/scilab/modules/xcos/link/actions/TextAction.java

index 5be16b8..e713e38 100644 (file)
@@ -64,6 +64,7 @@ import com.artenum.rosetta.util.StringConstants;
  * @author Vincent COUVERT
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SciInputCommandView extends ConsoleTextPane implements InputCommandView, CaretListener, ViewFactory {
 
     private static final long serialVersionUID = 1L;
index ca1214c..93d8ff5 100644 (file)
@@ -58,6 +58,7 @@ import com.artenum.rosetta.util.StringConstants;
  *
  * @author Vincent COUVERT
  */
+@SuppressWarnings(value = { "serial" })
 public class SciOutputView extends JEditorPane implements OutputView, ViewFactory {
     private static final long serialVersionUID = 1L;
 
@@ -98,10 +99,10 @@ public class SciOutputView extends JEditorPane implements OutputView, ViewFactor
         super();
 
         setEditorKit(new DefaultEditorKit() {
-                public ViewFactory getViewFactory() {
-                    return SciOutputView.this;
-                }
-            });
+            public ViewFactory getViewFactory() {
+                return SciOutputView.this;
+            }
+        });
 
         /* A PlainDocument contains only "box" for lines not for all characters (as in a StyledDocument)
            so there are less boxes to explore in a PlainDocument... */
@@ -179,10 +180,10 @@ public class SciOutputView extends JEditorPane implements OutputView, ViewFactor
         getCaret().setSelectionVisible(true);
 
         addFocusListener(new FocusAdapter() {
-                public void focusGained(FocusEvent e) {
-                    ((JTextPane) getConsole().getConfiguration().getInputCommandView()).requestFocus();
-                }
-            });
+            public void focusGained(FocusEvent e) {
+                ((JTextPane) getConsole().getConfiguration().getInputCommandView()).requestFocus();
+            }
+        });
     }
 
     /**
@@ -276,9 +277,9 @@ public class SciOutputView extends JEditorPane implements OutputView, ViewFactor
             }
         }
 
-       if (console != null) {
-           console.updateScrollPosition();
-       }
+        if (console != null) {
+            console.updateScrollPosition();
+        }
     }
 
     /**
index 954b208..6d7bab0 100644 (file)
@@ -30,6 +30,7 @@ import com.mxgraph.view.mxGraphView;
 /**
  * Implement the default component for the {@link ScilabGraph}.
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabComponent extends mxGraphComponent {
     /**
      * Color use to mask the graph when the graph is locked
@@ -185,6 +186,7 @@ public class ScilabComponent extends mxGraphComponent {
      * Implement a graph control which paint a foreground on top of the view
      * when the graph is locked.
      */
+    @SuppressWarnings(value = { "serial" })
     public class ScilabGraphControl extends mxGraphControl {
 
         /**
index 76a1ffc..172f6d1 100644 (file)
@@ -3,11 +3,11 @@
  * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
  * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
  * Copyright (C) 2010 - DIGITEO - Clement DAVID
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -28,42 +28,43 @@ import com.mxgraph.swing.util.mxGraphActions;
 /**
  * Group any blocks and ease the manipulation of them.
  */
+@SuppressWarnings(value = { "serial" })
 public class GroupAction extends MultiSelectionDependantAction {
-       /** Name of the action */
-       public static final String NAME = ScilabGraphMessages.GROUP;
-       /** Icon name of the action */
-       public static final String SMALL_ICON = "";
-       /** Mnemonic key of the action */
-       public static final int MNEMONIC_KEY = KeyEvent.VK_G;
-       /** Accelerator key for the action */
-       public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
-       
-       /**
-        * Default constructor
-        * 
-        * @param scilabGraph
-        *            The associated graph
-        */
-       public GroupAction(ScilabGraph scilabGraph) {
-               super(scilabGraph);
-       }
+    /** Name of the action */
+    public static final String NAME = ScilabGraphMessages.GROUP;
+    /** Icon name of the action */
+    public static final String SMALL_ICON = "";
+    /** Mnemonic key of the action */
+    public static final int MNEMONIC_KEY = KeyEvent.VK_G;
+    /** Accelerator key for the action */
+    public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+
+    /**
+     * Default constructor
+     *
+     * @param scilabGraph
+     *            The associated graph
+     */
+    public GroupAction(ScilabGraph scilabGraph) {
+        super(scilabGraph);
+    }
 
-       /**
-        * Create the menu associated with this action.
-        * @param scilabGraph the associated graph
-        * @return The associated menu
-        */
-       public static MenuItem groupMenu(ScilabGraph scilabGraph) {
-               return createMenu(scilabGraph, GroupAction.class);
-       }
+    /**
+     * Create the menu associated with this action.
+     * @param scilabGraph the associated graph
+     * @return The associated menu
+     */
+    public static MenuItem groupMenu(ScilabGraph scilabGraph) {
+        return createMenu(scilabGraph, GroupAction.class);
+    }
 
-       /**
-        * Action to be done
-        * @param e Event descriptor 
-        */
-       public void actionPerformed(ActionEvent e) {
-               mxGraphActions.getGroupAction().actionPerformed(new ActionEvent(getGraph(e).getAsComponent(),
-                               e.getID(), e.getActionCommand()));
-       }
+    /**
+     * Action to be done
+     * @param e Event descriptor
+     */
+    public void actionPerformed(ActionEvent e) {
+        mxGraphActions.getGroupAction().actionPerformed(new ActionEvent(getGraph(e).getAsComponent(),
+                e.getID(), e.getActionCommand()));
+    }
 
 }
index 56f1509..4e7db9b 100644 (file)
@@ -3,11 +3,11 @@
  * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
  * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
  * Copyright (C) 2010 - DIGITEO - Clement DAVID
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -32,110 +32,111 @@ import com.mxgraph.util.mxUndoManager;
 /**
  * Redo manager
  */
+@SuppressWarnings(value = { "serial" })
 public class RedoAction extends DefaultAction {
-       /** Name of the action */
-       public static final String NAME = ScilabGraphMessages.REDO;
-       /** Icon name of the action */
+    /** Name of the action */
+    public static final String NAME = ScilabGraphMessages.REDO;
+    /** Icon name of the action */
     public static final String SMALL_ICON = "edit-redo";
-       /** Mnemonic key of the action */
-       public static final int MNEMONIC_KEY = KeyEvent.VK_Y;
-       /** Accelerator key for the action */
-       public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
-
-       /**
-        * Manage enable modification
-        */
-       private final class RedoConstraint extends ActionConstraint {
-               private final ScilabGraph scilabGraph;
-               
-               /**
-                * Default constructor
-                * @param scilabGraph the graph to work on
-                */
-               public RedoConstraint(ScilabGraph scilabGraph) {
-                       this.scilabGraph = scilabGraph;
-               }
-
-               /**
-                * @param action
-                *            the current action
-                * @param scilabGraph
-                *            the associated graph
-                * @see org.scilab.modules.graph.actions.base.ActionConstraint#install(org.scilab.modules.graph.actions.base.DefaultAction,
-                *      org.scilab.modules.graph.ScilabGraph)
-                */
-               @Override
-               public void install(DefaultAction action, ScilabGraph scilabGraph) {
-                       super.install(action, scilabGraph);
-                       
-                       registerAsListener(scilabGraph.getUndoManager());
-               }
-               
-               /**
-                * @param manager the associated UndoManager 
-                */
-               public void registerAsListener(mxUndoManager manager) {
-                       manager.addListener(mxEvent.UNDO, this);
-                       manager.addListener(mxEvent.REDO, this);
-                       manager.addListener(mxEvent.ADD, this);
-                       manager.addListener(mxEvent.CLEAR, this);
-               }
-               
-               /**
-                * To be checked
-                * @param sender the event sender
-                * @param evt the current event
-                * @see com.mxgraph.util.mxEventSource.mxIEventListener#invoke(java.lang.Object, com.mxgraph.util.mxEventObject)
-                */
-               @Override
+    /** Mnemonic key of the action */
+    public static final int MNEMONIC_KEY = KeyEvent.VK_Y;
+    /** Accelerator key for the action */
+    public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+
+    /**
+     * Manage enable modification
+     */
+    private final class RedoConstraint extends ActionConstraint {
+        private final ScilabGraph scilabGraph;
+
+        /**
+         * Default constructor
+         * @param scilabGraph the graph to work on
+         */
+        public RedoConstraint(ScilabGraph scilabGraph) {
+            this.scilabGraph = scilabGraph;
+        }
+
+        /**
+         * @param action
+         *            the current action
+         * @param scilabGraph
+         *            the associated graph
+         * @see org.scilab.modules.graph.actions.base.ActionConstraint#install(org.scilab.modules.graph.actions.base.DefaultAction,
+         *      org.scilab.modules.graph.ScilabGraph)
+         */
+        @Override
+        public void install(DefaultAction action, ScilabGraph scilabGraph) {
+            super.install(action, scilabGraph);
+
+            registerAsListener(scilabGraph.getUndoManager());
+        }
+
+        /**
+         * @param manager the associated UndoManager
+         */
+        public void registerAsListener(mxUndoManager manager) {
+            manager.addListener(mxEvent.UNDO, this);
+            manager.addListener(mxEvent.REDO, this);
+            manager.addListener(mxEvent.ADD, this);
+            manager.addListener(mxEvent.CLEAR, this);
+        }
+
+        /**
+         * To be checked
+         * @param sender the event sender
+         * @param evt the current event
+         * @see com.mxgraph.util.mxEventSource.mxIEventListener#invoke(java.lang.Object, com.mxgraph.util.mxEventObject)
+         */
+        @Override
         public void invoke(Object sender, mxEventObject evt) {
-                       boolean canRedo = scilabGraph.getUndoManager().canRedo();
-                       super.setEnabled(canRedo);
-               }
-       }
-       
-       /**
-        * Constructor
-        * @param scilabGraph corresponding Scilab Graph
-        */
-       public RedoAction(ScilabGraph scilabGraph) {
-               super(scilabGraph);
-               
-               RedoConstraint c = new RedoConstraint(scilabGraph);
-               c.install(this, scilabGraph);
-       }
-
-       /**
-        * Create a button for a graph toolbar
-        * @param scilabGraph corresponding Scilab Graph
-        * @return the button
-        */
-       public static PushButton redoButton(ScilabGraph scilabGraph) {
-               return createButton(scilabGraph, RedoAction.class);
-       }
-
-       /**
-        * Create a menu for a graph menubar
-        * @param scilabGraph corresponding Scilab Graph
-        * @return the menu
-        */
-       public static MenuItem redoMenu(ScilabGraph scilabGraph) {
-               return createMenu(scilabGraph, RedoAction.class);
-       }
-
-       /**
-        * Action associated
-        * 
-        * @param e
-        *            the event
-        * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
-        */
-       @Override
+            boolean canRedo = scilabGraph.getUndoManager().canRedo();
+            super.setEnabled(canRedo);
+        }
+    }
+
+    /**
+     * Constructor
+     * @param scilabGraph corresponding Scilab Graph
+     */
+    public RedoAction(ScilabGraph scilabGraph) {
+        super(scilabGraph);
+
+        RedoConstraint c = new RedoConstraint(scilabGraph);
+        c.install(this, scilabGraph);
+    }
+
+    /**
+     * Create a button for a graph toolbar
+     * @param scilabGraph corresponding Scilab Graph
+     * @return the button
+     */
+    public static PushButton redoButton(ScilabGraph scilabGraph) {
+        return createButton(scilabGraph, RedoAction.class);
+    }
+
+    /**
+     * Create a menu for a graph menubar
+     * @param scilabGraph corresponding Scilab Graph
+     * @return the menu
+     */
+    public static MenuItem redoMenu(ScilabGraph scilabGraph) {
+        return createMenu(scilabGraph, RedoAction.class);
+    }
+
+    /**
+     * Action associated
+     *
+     * @param e
+     *            the event
+     * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
+     */
+    @Override
     public void actionPerformed(ActionEvent e) {
-               final ScilabGraph graph = getGraph(e);
+        final ScilabGraph graph = getGraph(e);
 
-               graph.removeUndoHandler();
-               graph.getUndoManager().redo();
-               graph.registerUndoHandler();
-       }
+        graph.removeUndoHandler();
+        graph.getUndoManager().redo();
+        graph.registerUndoHandler();
+    }
 }
index 0436e75..536d681 100644 (file)
@@ -3,11 +3,11 @@
  * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
  * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
  * Copyright (C) 2010 - DIGITEO - Clement DAVID
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -28,43 +28,44 @@ import com.mxgraph.swing.util.mxGraphActions;
 /**
  * Ungroup any blocks and ease the manipulation of them.
  */
+@SuppressWarnings(value = { "serial" })
 public class UnGroupAction extends DefaultAction {
-       /** Name of the action */
-       public static final String NAME = ScilabGraphMessages.UNGROUP;
-       /** Icon name of the action */
-       public static final String SMALL_ICON = "";
-       /** Mnemonic key of the action */
-       public static final int MNEMONIC_KEY = KeyEvent.VK_G;
-       /** Accelerator key for the action */
-       public static final int ACCELERATOR_KEY = KeyEvent.SHIFT_DOWN_MASK
-                       | Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
-       
-       /**
-        * Default constructor
-        * 
-        * @param scilabGraph
-        *            The associated graph
-        */
-       public UnGroupAction(ScilabGraph scilabGraph) {
-               super(scilabGraph);
-       }
+    /** Name of the action */
+    public static final String NAME = ScilabGraphMessages.UNGROUP;
+    /** Icon name of the action */
+    public static final String SMALL_ICON = "";
+    /** Mnemonic key of the action */
+    public static final int MNEMONIC_KEY = KeyEvent.VK_G;
+    /** Accelerator key for the action */
+    public static final int ACCELERATOR_KEY = KeyEvent.SHIFT_DOWN_MASK
+            | Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+
+    /**
+     * Default constructor
+     *
+     * @param scilabGraph
+     *            The associated graph
+     */
+    public UnGroupAction(ScilabGraph scilabGraph) {
+        super(scilabGraph);
+    }
 
-       /**
-        * Create the menu associated with this action.
-        * @param scilabGraph the associated graph
-        * @return The associated menu
-        */
-       public static MenuItem ungroupMenu(ScilabGraph scilabGraph) {
-               return createMenu(scilabGraph, UnGroupAction.class);
-       }
+    /**
+     * Create the menu associated with this action.
+     * @param scilabGraph the associated graph
+     * @return The associated menu
+     */
+    public static MenuItem ungroupMenu(ScilabGraph scilabGraph) {
+        return createMenu(scilabGraph, UnGroupAction.class);
+    }
 
-       /**
-        * Action to be done
-        * @param e Event descriptor 
-        */
-       public void actionPerformed(ActionEvent e) {
-               mxGraphActions.getUngroupAction().actionPerformed(new ActionEvent(getGraph(e).getAsComponent(),
-                               e.getID(), e.getActionCommand()));
-       }
+    /**
+     * Action to be done
+     * @param e Event descriptor
+     */
+    public void actionPerformed(ActionEvent e) {
+        mxGraphActions.getUngroupAction().actionPerformed(new ActionEvent(getGraph(e).getAsComponent(),
+                e.getID(), e.getActionCommand()));
+    }
 
 }
index a02dd01..091431e 100644 (file)
@@ -3,11 +3,11 @@
  * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
  * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
  * Copyright (C) 2010 - DIGITEO - Clement DAVID
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -32,110 +32,111 @@ import com.mxgraph.util.mxUndoManager;
 /**
  * Undo manager
  */
+@SuppressWarnings(value = { "serial" })
 public class UndoAction extends DefaultAction {
-       /** Name of the action */
-       public static final String NAME = ScilabGraphMessages.UNDO;
-       /** Icon name of the action */
+    /** Name of the action */
+    public static final String NAME = ScilabGraphMessages.UNDO;
+    /** Icon name of the action */
     public static final String SMALL_ICON = "edit-undo";
-       /** Mnemonic key of the action */
-       public static final int MNEMONIC_KEY = KeyEvent.VK_Z;
-       /** Accelerator key for the action */
-       public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
-       
-       /**
-        * Manage enable modification
-        */
-       private final class UndoConstraint extends ActionConstraint {
-               private final ScilabGraph scilabGraph;
-
-               /**
-                * Default constructor
-                * @param scilabGraph the associated scilab graph
-                */
-               public UndoConstraint(ScilabGraph scilabGraph) {
-                       this.scilabGraph = scilabGraph;
-               }
-
-               /**
-                * @param action
-                *            the current action
-                * @param scilabGraph
-                *            the associated graph
-                * @see org.scilab.modules.graph.actions.base.ActionConstraint#install(org.scilab.modules.graph.actions.base.DefaultAction,
-                *      org.scilab.modules.graph.ScilabGraph)
-                */
-               @Override
-               public void install(DefaultAction action, ScilabGraph scilabGraph) {
-                       super.install(action, scilabGraph);
-                       registerAsListener(scilabGraph.getUndoManager());
-               }
-               
-               /**
-                * @param manager the associated UndoManager 
-                */
-               private void registerAsListener(mxUndoManager manager) {
-                       manager.addListener(mxEvent.UNDO, this);
-                       manager.addListener(mxEvent.REDO, this);
-                       manager.addListener(mxEvent.ADD, this);
-                       manager.addListener(mxEvent.CLEAR, this);
-               }
-               
-               /**
-                * To be checked
-                * @param sender the event sender
-                * @param evt the current event
-                * @see com.mxgraph.util.mxEventSource.mxIEventListener#invoke(java.lang.Object, com.mxgraph.util.mxEventObject)
-                */
-               @Override
+    /** Mnemonic key of the action */
+    public static final int MNEMONIC_KEY = KeyEvent.VK_Z;
+    /** Accelerator key for the action */
+    public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+
+    /**
+     * Manage enable modification
+     */
+    private final class UndoConstraint extends ActionConstraint {
+        private final ScilabGraph scilabGraph;
+
+        /**
+         * Default constructor
+         * @param scilabGraph the associated scilab graph
+         */
+        public UndoConstraint(ScilabGraph scilabGraph) {
+            this.scilabGraph = scilabGraph;
+        }
+
+        /**
+         * @param action
+         *            the current action
+         * @param scilabGraph
+         *            the associated graph
+         * @see org.scilab.modules.graph.actions.base.ActionConstraint#install(org.scilab.modules.graph.actions.base.DefaultAction,
+         *      org.scilab.modules.graph.ScilabGraph)
+         */
+        @Override
+        public void install(DefaultAction action, ScilabGraph scilabGraph) {
+            super.install(action, scilabGraph);
+            registerAsListener(scilabGraph.getUndoManager());
+        }
+
+        /**
+         * @param manager the associated UndoManager
+         */
+        private void registerAsListener(mxUndoManager manager) {
+            manager.addListener(mxEvent.UNDO, this);
+            manager.addListener(mxEvent.REDO, this);
+            manager.addListener(mxEvent.ADD, this);
+            manager.addListener(mxEvent.CLEAR, this);
+        }
+
+        /**
+         * To be checked
+         * @param sender the event sender
+         * @param evt the current event
+         * @see com.mxgraph.util.mxEventSource.mxIEventListener#invoke(java.lang.Object, com.mxgraph.util.mxEventObject)
+         */
+        @Override
         public void invoke(Object sender, mxEventObject evt) {
-                       boolean canUndo = scilabGraph.getUndoManager().canUndo();
-                       super.setEnabled(canUndo);
-               }
-       }
-       
-       /**
-        * Constructor
-        * @param scilabGraph corresponding Scilab Graph
-        */
-       public UndoAction(ScilabGraph scilabGraph) {
-               super(scilabGraph);
-               
-               UndoConstraint c = new UndoConstraint(scilabGraph);
-               c.install(this, scilabGraph);
-       }
-
-       /**
-        * Create a button for a graph toolbar
-        * @param scilabGraph corresponding Scilab Graph
-        * @return the button
-        */
-       public static PushButton undoButton(ScilabGraph scilabGraph) {
-               return createButton(scilabGraph, UndoAction.class);
-       }
-
-       /**
-        * Create a menu for a graph menubar
-        * @param scilabGraph corresponding Scilab Graph
-        * @return the menu
-        */
-       public static MenuItem undoMenu(ScilabGraph scilabGraph) {
-               return createMenu(scilabGraph, UndoAction.class);
-       }
-
-       /**
-        * Action associated
-        * 
-        * @param e
-        *            the event
-        * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
-        */
-       @Override
+            boolean canUndo = scilabGraph.getUndoManager().canUndo();
+            super.setEnabled(canUndo);
+        }
+    }
+
+    /**
+     * Constructor
+     * @param scilabGraph corresponding Scilab Graph
+     */
+    public UndoAction(ScilabGraph scilabGraph) {
+        super(scilabGraph);
+
+        UndoConstraint c = new UndoConstraint(scilabGraph);
+        c.install(this, scilabGraph);
+    }
+
+    /**
+     * Create a button for a graph toolbar
+     * @param scilabGraph corresponding Scilab Graph
+     * @return the button
+     */
+    public static PushButton undoButton(ScilabGraph scilabGraph) {
+        return createButton(scilabGraph, UndoAction.class);
+    }
+
+    /**
+     * Create a menu for a graph menubar
+     * @param scilabGraph corresponding Scilab Graph
+     * @return the menu
+     */
+    public static MenuItem undoMenu(ScilabGraph scilabGraph) {
+        return createMenu(scilabGraph, UndoAction.class);
+    }
+
+    /**
+     * Action associated
+     *
+     * @param e
+     *            the event
+     * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
+     */
+    @Override
     public void actionPerformed(ActionEvent e) {
-               final ScilabGraph graph = getGraph(e);
+        final ScilabGraph graph = getGraph(e);
 
-               graph.removeUndoHandler();
-               graph.getUndoManager().undo();
-               graph.registerUndoHandler();
-       }
+        graph.removeUndoHandler();
+        graph.getUndoManager().undo();
+        graph.registerUndoHandler();
+    }
 
 }
index 3043297..99b355d 100644 (file)
@@ -2,11 +2,11 @@
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
  * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -35,114 +35,115 @@ import org.scilab.modules.gui.pushbutton.PushButton;
 /**
  * Zoom management
  */
+@SuppressWarnings(value = { "serial" })
 public class ZoomInAction extends DefaultAction {
-       /** Name of the action */
-       public static final String NAME = ScilabGraphMessages.ZOOM_IN;
-       /** Icon name of the action */
+    /** Name of the action */
+    public static final String NAME = ScilabGraphMessages.ZOOM_IN;
+    /** Icon name of the action */
     public static final String SMALL_ICON = "zoom-in";
-       /** Mnemonic key of the action */
-       public static final int MNEMONIC_KEY = KeyEvent.VK_ADD;
-       /** Accelerator key for the action */
-       public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
-       
-       /** key used on {@link InputMap} for this action */
-       private static final String ZOOM_IN = "zoomIn"; 
-       
-       /**
-        * Implement custom mouse handling for the zoom
-        */
-       private static final class CustomMouseWheelListener implements MouseWheelListener {
-               private final ScilabGraph scilabGraph;
-               
-               /**
-                * Default constructor
-                * @param scilabGraph the current graph
-                */
-               public CustomMouseWheelListener(ScilabGraph scilabGraph) {
-                       this.scilabGraph = scilabGraph;
-               }
-               
-               /**
-                * When the wheel is used
-                * @param e the parameters
-                * @see java.awt.event.MouseWheelListener#mouseWheelMoved(java.awt.event.MouseWheelEvent)
-                */
-               @Override
-               public void mouseWheelMoved(MouseWheelEvent e) {
-                       if ((e.getModifiers() & ACCELERATOR_KEY) != 0) {
-                               if (e.getWheelRotation() < 0) {
-                                       scilabGraph.getAsComponent().zoomIn();
-                               }
-                       }
-               }
-       }
-       
-       /**
-        * Constructor
-        * @param scilabGraph corresponding Scilab Graph
-        */
-       public ZoomInAction(ScilabGraph scilabGraph) {
-               super(scilabGraph);
-               
-               MouseWheelListener mouseListener = new CustomMouseWheelListener(scilabGraph);
-               scilabGraph.getAsComponent().getViewport().addMouseWheelListener(mouseListener);
-               
-               // Multi-shortcut action
-               final ActionMap am = scilabGraph.getAsComponent().getActionMap();
-               final InputMap map = scilabGraph.getAsComponent().getInputMap();
-               
-               // register the action to a unique action keyword
-               am.put(ZOOM_IN, this);
-               
-               // add custom key stroke for this action
-               final KeyStroke[] keystrokes;
-               if (OS.get() == MAC) {
-                       /*
-                        * AZERTY for Mac has a non-supported classic layout
-                        */
-                       keystrokes = new KeyStroke[] {
-                                       KeyStroke.getKeyStroke('/', ACCELERATOR_KEY),
-                                       KeyStroke.getKeyStroke('/', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),        
-                       };
-               } else {
-                       keystrokes = new KeyStroke[] {
-                                       KeyStroke.getKeyStroke('=', ACCELERATOR_KEY),
-                                       KeyStroke.getKeyStroke('=', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
-                                       KeyStroke.getKeyStroke('+', ACCELERATOR_KEY),
-                                       KeyStroke.getKeyStroke('+', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
-                       };
-               }
-               
-               for (KeyStroke k : keystrokes) {
-                       map.put(k, ZOOM_IN);
-               }
-       }
-
-       /**
-        * Create a button for a graph toolbar
-        * @param scilabGraph corresponding Scilab Graph
-        * @return the button
-        */
-       public static PushButton zoominButton(ScilabGraph scilabGraph) {
-               return createButton(scilabGraph, ZoomInAction.class);
-       }
-
-       /**
-        * Create a menu for a graph menubar
-        * @param scilabGraph corresponding Scilab Graph
-        * @return the menu
-        */
-       public static MenuItem zoominMenu(ScilabGraph scilabGraph) {            
-               return createMenu(scilabGraph, ZoomInAction.class);
-       }
-
-       /**
-        * Action associated
-        * @param e the event
-        * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
-        */
-       @Override
-       public void actionPerformed(ActionEvent e) {
-               getGraph(e).getAsComponent().zoomIn();
-       }
+    /** Mnemonic key of the action */
+    public static final int MNEMONIC_KEY = KeyEvent.VK_ADD;
+    /** Accelerator key for the action */
+    public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+
+    /** key used on {@link InputMap} for this action */
+    private static final String ZOOM_IN = "zoomIn";
+
+    /**
+     * Implement custom mouse handling for the zoom
+     */
+    private static final class CustomMouseWheelListener implements MouseWheelListener {
+        private final ScilabGraph scilabGraph;
+
+        /**
+         * Default constructor
+         * @param scilabGraph the current graph
+         */
+        public CustomMouseWheelListener(ScilabGraph scilabGraph) {
+            this.scilabGraph = scilabGraph;
+        }
+
+        /**
+         * When the wheel is used
+         * @param e the parameters
+         * @see java.awt.event.MouseWheelListener#mouseWheelMoved(java.awt.event.MouseWheelEvent)
+         */
+        @Override
+        public void mouseWheelMoved(MouseWheelEvent e) {
+            if ((e.getModifiers() & ACCELERATOR_KEY) != 0) {
+                if (e.getWheelRotation() < 0) {
+                    scilabGraph.getAsComponent().zoomIn();
+                }
+            }
+        }
+    }
+
+    /**
+     * Constructor
+     * @param scilabGraph corresponding Scilab Graph
+     */
+    public ZoomInAction(ScilabGraph scilabGraph) {
+        super(scilabGraph);
+
+        MouseWheelListener mouseListener = new CustomMouseWheelListener(scilabGraph);
+        scilabGraph.getAsComponent().getViewport().addMouseWheelListener(mouseListener);
+
+        // Multi-shortcut action
+        final ActionMap am = scilabGraph.getAsComponent().getActionMap();
+        final InputMap map = scilabGraph.getAsComponent().getInputMap();
+
+        // register the action to a unique action keyword
+        am.put(ZOOM_IN, this);
+
+        // add custom key stroke for this action
+        final KeyStroke[] keystrokes;
+        if (OS.get() == MAC) {
+            /*
+             * AZERTY for Mac has a non-supported classic layout
+             */
+            keystrokes = new KeyStroke[] {
+                KeyStroke.getKeyStroke('/', ACCELERATOR_KEY),
+                KeyStroke.getKeyStroke('/', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
+            };
+        } else {
+            keystrokes = new KeyStroke[] {
+                KeyStroke.getKeyStroke('=', ACCELERATOR_KEY),
+                KeyStroke.getKeyStroke('=', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
+                KeyStroke.getKeyStroke('+', ACCELERATOR_KEY),
+                KeyStroke.getKeyStroke('+', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
+            };
+        }
+
+        for (KeyStroke k : keystrokes) {
+            map.put(k, ZOOM_IN);
+        }
+    }
+
+    /**
+     * Create a button for a graph toolbar
+     * @param scilabGraph corresponding Scilab Graph
+     * @return the button
+     */
+    public static PushButton zoominButton(ScilabGraph scilabGraph) {
+        return createButton(scilabGraph, ZoomInAction.class);
+    }
+
+    /**
+     * Create a menu for a graph menubar
+     * @param scilabGraph corresponding Scilab Graph
+     * @return the menu
+     */
+    public static MenuItem zoominMenu(ScilabGraph scilabGraph) {
+        return createMenu(scilabGraph, ZoomInAction.class);
+    }
+
+    /**
+     * Action associated
+     * @param e the event
+     * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
+     */
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        getGraph(e).getAsComponent().zoomIn();
+    }
 }
index 8cfdbc9..118dad8 100644 (file)
@@ -2,11 +2,11 @@
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
  * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -37,116 +37,117 @@ import org.scilab.modules.gui.pushbutton.PushButton;
  * Zoom management
  * @author Bruno JOFFRET
  */
+@SuppressWarnings(value = { "serial" })
 public class ZoomOutAction extends DefaultAction implements ActionListener {
-       /** Name of the action */
-       public static final String NAME = ScilabGraphMessages.ZOOM_OUT;
-       /** Icon name of the action */
+    /** Name of the action */
+    public static final String NAME = ScilabGraphMessages.ZOOM_OUT;
+    /** Icon name of the action */
     public static final String SMALL_ICON = "zoom-out";
-       /** Mnemonic key of the action */
-       public static final int MNEMONIC_KEY = KeyEvent.VK_SUBTRACT;
-       /** Accelerator key for the action */
-       public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
-
-       /** key used on {@link InputMap} for this action */
-       private static final String ZOOM_OUT = "zoomOut"; 
-       
-       /**
-        * Implement custom mouse handling for the zoom
-        */
-       private static final class CustomMouseWheelListener implements MouseWheelListener {
-               private final ScilabGraph scilabGraph;
-               
-               /**
-                * Default constructor
-                * @param scilabGraph the current graph
-                */
-               public CustomMouseWheelListener(ScilabGraph scilabGraph) {
-                       this.scilabGraph = scilabGraph;
-               }
-               
-               /**
-                * When the wheel is used
-                * @param e the parameters
-                * @see java.awt.event.MouseWheelListener#mouseWheelMoved(java.awt.event.MouseWheelEvent)
-                */
-               @Override
-               public void mouseWheelMoved(MouseWheelEvent e) {
-                       if ((e.getModifiers() & ACCELERATOR_KEY) != 0) {
-                               if (e.getWheelRotation() > 0) {
-                                       scilabGraph.getAsComponent().zoomOut();
-                               }
-                       }
-               }
-       }
-       
-       /**
-        * Constructor
-        * @param scilabGraph corresponding Scilab Graph
-        */
-       public ZoomOutAction(ScilabGraph scilabGraph) {
-               super(scilabGraph);
-               
-               MouseWheelListener mouseListener = new CustomMouseWheelListener(scilabGraph);
-               scilabGraph.getAsComponent().getViewport().addMouseWheelListener(mouseListener);
-               
-               
-               // Multi-shortcut action
-               final ActionMap am = scilabGraph.getAsComponent().getActionMap();
-               final InputMap map = scilabGraph.getAsComponent().getInputMap();
-               
-               // register the action to a unique action keyword
-               am.put(ZOOM_OUT, this);
-               
-               // add custom key stroke for this action
-               final KeyStroke[] keystrokes;
-               if (OS.get() == MAC) {
-                       /*
-                        * AZERTY for Mac has a non-supported classic layout
-                        */
-                       keystrokes = new KeyStroke[] {
-                                       KeyStroke.getKeyStroke('=', ACCELERATOR_KEY),
-                                       KeyStroke.getKeyStroke('=', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
-                       };
-               } else {
-                       keystrokes = new KeyStroke[] {
-                                       KeyStroke.getKeyStroke('-', ACCELERATOR_KEY),
-                                       KeyStroke.getKeyStroke('-', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
-                                       KeyStroke.getKeyStroke('_', ACCELERATOR_KEY),
-                                       KeyStroke.getKeyStroke('_', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
-                       };
-               }
-               
-               for (KeyStroke k : keystrokes) {
-                       map.put(k, ZOOM_OUT);
-               }
-       }
-
-       /**
-        * Create a button for a graph toolbar
-        * @param scilabGraph corresponding Scilab Graph
-        * @return the button
-        */
-       public static PushButton zoomoutButton(ScilabGraph scilabGraph) {
-               return createButton(scilabGraph, ZoomOutAction.class);
-       }
-
-       /**
-        * Create a menu for a graph menubar
-        * @param scilabGraph corresponding Scilab Graph
-        * @return the menu
-        */
-       public static MenuItem zoomoutMenu(ScilabGraph scilabGraph) {
-               return createMenu(scilabGraph, ZoomOutAction.class);
-       }
-
-       /**
-        * Action associated
-        * @param e the event
-        * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
-        */
-       @Override
-       public void actionPerformed(ActionEvent e) {
-               getGraph(e).getAsComponent().zoomOut();
-       }
+    /** Mnemonic key of the action */
+    public static final int MNEMONIC_KEY = KeyEvent.VK_SUBTRACT;
+    /** Accelerator key for the action */
+    public static final int ACCELERATOR_KEY = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
+
+    /** key used on {@link InputMap} for this action */
+    private static final String ZOOM_OUT = "zoomOut";
+
+    /**
+     * Implement custom mouse handling for the zoom
+     */
+    private static final class CustomMouseWheelListener implements MouseWheelListener {
+        private final ScilabGraph scilabGraph;
+
+        /**
+         * Default constructor
+         * @param scilabGraph the current graph
+         */
+        public CustomMouseWheelListener(ScilabGraph scilabGraph) {
+            this.scilabGraph = scilabGraph;
+        }
+
+        /**
+         * When the wheel is used
+         * @param e the parameters
+         * @see java.awt.event.MouseWheelListener#mouseWheelMoved(java.awt.event.MouseWheelEvent)
+         */
+        @Override
+        public void mouseWheelMoved(MouseWheelEvent e) {
+            if ((e.getModifiers() & ACCELERATOR_KEY) != 0) {
+                if (e.getWheelRotation() > 0) {
+                    scilabGraph.getAsComponent().zoomOut();
+                }
+            }
+        }
+    }
+
+    /**
+     * Constructor
+     * @param scilabGraph corresponding Scilab Graph
+     */
+    public ZoomOutAction(ScilabGraph scilabGraph) {
+        super(scilabGraph);
+
+        MouseWheelListener mouseListener = new CustomMouseWheelListener(scilabGraph);
+        scilabGraph.getAsComponent().getViewport().addMouseWheelListener(mouseListener);
+
+
+        // Multi-shortcut action
+        final ActionMap am = scilabGraph.getAsComponent().getActionMap();
+        final InputMap map = scilabGraph.getAsComponent().getInputMap();
+
+        // register the action to a unique action keyword
+        am.put(ZOOM_OUT, this);
+
+        // add custom key stroke for this action
+        final KeyStroke[] keystrokes;
+        if (OS.get() == MAC) {
+            /*
+             * AZERTY for Mac has a non-supported classic layout
+             */
+            keystrokes = new KeyStroke[] {
+                KeyStroke.getKeyStroke('=', ACCELERATOR_KEY),
+                KeyStroke.getKeyStroke('=', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
+            };
+        } else {
+            keystrokes = new KeyStroke[] {
+                KeyStroke.getKeyStroke('-', ACCELERATOR_KEY),
+                KeyStroke.getKeyStroke('-', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
+                KeyStroke.getKeyStroke('_', ACCELERATOR_KEY),
+                KeyStroke.getKeyStroke('_', ACCELERATOR_KEY | KeyEvent.SHIFT_DOWN_MASK),
+            };
+        }
+
+        for (KeyStroke k : keystrokes) {
+            map.put(k, ZOOM_OUT);
+        }
+    }
+
+    /**
+     * Create a button for a graph toolbar
+     * @param scilabGraph corresponding Scilab Graph
+     * @return the button
+     */
+    public static PushButton zoomoutButton(ScilabGraph scilabGraph) {
+        return createButton(scilabGraph, ZoomOutAction.class);
+    }
+
+    /**
+     * Create a menu for a graph menubar
+     * @param scilabGraph corresponding Scilab Graph
+     * @return the menu
+     */
+    public static MenuItem zoomoutMenu(ScilabGraph scilabGraph) {
+        return createMenu(scilabGraph, ZoomOutAction.class);
+    }
+
+    /**
+     * Action associated
+     * @param e the event
+     * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
+     */
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        getGraph(e).getAsComponent().zoomOut();
+    }
 
 }
index f325cd0..c0dbe6d 100644 (file)
@@ -54,6 +54,7 @@ public abstract class ScilabObjectCodec extends mxObjectCodec {
     /**
      * Throw when we cannot load the XML.
      */
+    @SuppressWarnings(value = { "serial" })
     public class UnrecognizeFormatException extends Exception {
         /**
          * Default constructor
index c4daa5e..161824d 100644 (file)
@@ -67,6 +67,7 @@ import com.artenum.rosetta.util.StringConstants;
  * Swing implementation for Scilab Console in GUIs
  * @author Vincent COUVERT
  */
+@SuppressWarnings(value = { "serial" })
 public class SwingScilabConsole extends SciConsole implements SimpleConsole {
 
     private static final long serialVersionUID = 1L;
index 4931182..b38d9fa 100644 (file)
@@ -29,7 +29,7 @@ package org.scilab.modules.gui.bridge.filechooser;
  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */ 
+ */
 
 
 
@@ -39,8 +39,9 @@ import java.awt.*;
 import java.io.File;
 
 /* ImagePreview.java by FileChooserDemo2.java. */
+@SuppressWarnings(value = { "serial" })
 public class ImagePreview extends JComponent
-                          implements PropertyChangeListener {
+    implements PropertyChangeListener {
     ImageIcon thumbnail = null;
     File file = null;
 
@@ -63,7 +64,7 @@ public class ImagePreview extends JComponent
             if (tmpIcon.getIconWidth() > 150) {
                 thumbnail = new ImageIcon(tmpIcon.getImage().
                                           getScaledInstance(150, -1,
-                                                      Image.SCALE_DEFAULT));
+                                                  Image.SCALE_DEFAULT));
             } else { //no need to miniaturize
                 thumbnail = tmpIcon;
             }
@@ -79,7 +80,7 @@ public class ImagePreview extends JComponent
             file = null;
             update = true;
 
-        //If a file became selected, find out which one.
+            //If a file became selected, find out which one.
         } else if (JFileChooser.SELECTED_FILE_CHANGED_PROPERTY.equals(prop)) {
             file = (File) e.getNewValue();
             update = true;
@@ -100,8 +101,8 @@ public class ImagePreview extends JComponent
             loadImage();
         }
         if (thumbnail != null) {
-            int x = getWidth()/2 - thumbnail.getIconWidth()/2;
-            int y = getHeight()/2 - thumbnail.getIconHeight()/2;
+            int x = getWidth() / 2 - thumbnail.getIconWidth() / 2;
+            int y = getHeight() / 2 - thumbnail.getIconHeight() / 2;
 
             if (y < 0) {
                 y = 0;
index a98a227..f6baf99 100644 (file)
@@ -38,6 +38,7 @@ import org.scilab.modules.renderer.JoGLView.DrawerVisitor;
  * @author Sylvestre Koumar
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class SwingScilabExportFileChooser extends SwingScilabFileChooser {
 
     private static final int NB_FILE_MASKS = 12;
index 56fc159..05ac23d 100644 (file)
@@ -81,6 +81,7 @@ import org.scilab.modules.localization.Messages;
  * @author Sylvestre LEDRU
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implements MouseWheelListener {
 
     private static final String SCILAB_PROTO = "scilab://";
@@ -88,7 +89,7 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
     private static final String SCI = ScilabConstants.SCI.getPath().replaceAll("\\\\", "/");;
     private static final String SHIFTEQ = "shiftEquals";
     private static final long serialVersionUID = -2593697956426596790L;
-    private static final int[] fontSizes = new int[]{8, 10, 12, 14, 18, 24, 36};
+    private static final int[] fontSizes = new int[] {8, 10, 12, 14, 18, 24, 36};
     private static final boolean isMac = System.getProperty("os.name").toLowerCase().indexOf("mac") != -1;
 
     private static int currentFontSize = ConfigManager.getHelpFontSize();
@@ -326,7 +327,7 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
             Class scinotesClass = Class.forName("org.scilab.modules.scinotes.SciNotes");
             Class[] arguments = new Class[] {String.class};
             Method method = scinotesClass.getMethod("scinotesWithText", arguments);
-            method.invoke(scinotesClass, new Object[]{code});
+            method.invoke(scinotesClass, new Object[] {code});
 
         } catch (ClassNotFoundException e) {
             System.err.println("Could not find SciNotes class");
@@ -429,34 +430,34 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
         try {
             this.accessibleHtml = (javax.swing.JEditorPane) privateField.get(this);
             accessibleHtml.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
-                    public void propertyChange(java.beans.PropertyChangeEvent evt) {
-                        // Crappy workaround to avoid bad html display (the icons play and edit can be misplaced)
-                        // To improve... (it doesn't always work)
-                        if (evt.getPropertyName().equals("document")) {
-                            accessibleHtml.setVisible(false);
-                            accessibleHtml.validate();
-                        }
-                        if (evt.getPropertyName().equals("page")) {
-                            if (!accessibleHtml.isVisible()) {
-                                modifyFont(0);
-                                SwingUtilities.invokeLater(new Runnable() {
-                                        public void run() {
-                                            accessibleHtml.setVisible(true);
-                                        }
-                                    });
-                            }
+                public void propertyChange(java.beans.PropertyChangeEvent evt) {
+                    // Crappy workaround to avoid bad html display (the icons play and edit can be misplaced)
+                    // To improve... (it doesn't always work)
+                    if (evt.getPropertyName().equals("document")) {
+                        accessibleHtml.setVisible(false);
+                        accessibleHtml.validate();
+                    }
+                    if (evt.getPropertyName().equals("page")) {
+                        if (!accessibleHtml.isVisible()) {
+                            modifyFont(0);
+                            SwingUtilities.invokeLater(new Runnable() {
+                                public void run() {
+                                    accessibleHtml.setVisible(true);
+                                }
+                            });
                         }
                     }
-                });
+                }
+            });
 
             // The previous workaround hides the component accessibleHtml
             // and consequently the focus is given to an other component.
             // So we force the accessibleHtml to keep the focus.
             accessibleHtml.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy() {
-                    public Component getFirstComponent(Container aContainer) {
-                        return x;
-                    }
-                });
+                public Component getFirstComponent(Container aContainer) {
+                    return x;
+                }
+            });
             accessibleHtml.setFocusCycleRoot(true);
 
             String keyModifier = "alt ";
@@ -467,28 +468,28 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
             InputMap inputmap = accessibleHtml.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
             inputmap.put(ScilabKeyStroke.getKeyStroke("OSSCKEY shift EQUALS"), SHIFTEQ);
             accessibleHtml.getActionMap().put(SHIFTEQ, new AbstractAction() {
-                    public void actionPerformed(ActionEvent e) {
-                        SwingScilabHelpBrowserViewer.this.increaseFont();
-                    }
-                });
+                public void actionPerformed(ActionEvent e) {
+                    SwingScilabHelpBrowserViewer.this.increaseFont();
+                }
+            });
             inputmap.put(ScilabKeyStroke.getKeyStroke(keyModifier + "LEFT"), "Previous-page");
             accessibleHtml.getActionMap().put("Previous-page", new AbstractAction() {
-                    public void actionPerformed(ActionEvent e) {
-                        DefaultHelpHistoryModel history = SwingScilabHelpBrowser.getHelpHistory();
-                        if (history.getIndex() > 0) {
-                            history.goBack();
-                        }
+                public void actionPerformed(ActionEvent e) {
+                    DefaultHelpHistoryModel history = SwingScilabHelpBrowser.getHelpHistory();
+                    if (history.getIndex() > 0) {
+                        history.goBack();
                     }
-                });
+                }
+            });
             inputmap.put(ScilabKeyStroke.getKeyStroke(keyModifier + "RIGHT"), "Next-page");
             accessibleHtml.getActionMap().put("Next-page", new AbstractAction() {
-                    public void actionPerformed(ActionEvent e) {
-                        DefaultHelpHistoryModel history = SwingScilabHelpBrowser.getHelpHistory();
-                        if (history.getHistory().size() != (history.getIndex() + 1)) {
-                            history.goForward();
-                        }
+                public void actionPerformed(ActionEvent e) {
+                    DefaultHelpHistoryModel history = SwingScilabHelpBrowser.getHelpHistory();
+                    if (history.getHistory().size() != (history.getIndex() + 1)) {
+                        history.goForward();
                     }
-                });
+                }
+            });
 
             inputmap = accessibleHtml.getInputMap(JComponent.WHEN_FOCUSED);
             inputmap.put(ScilabKeyStroke.getKeyStroke(keyModifier + "LEFT"), new Object());
@@ -517,15 +518,15 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
 
         /* Execute into Scilab */
         ActionListener actionListenerExecuteIntoScilab = new ActionListener() {
-                public void actionPerformed(ActionEvent actionEvent) {
-                    String selection = accessibleHtml.getSelectedText();
-                    if (selection == null) {
-                        ScilabHelpBrowser.getHelpBrowser().getInfoBar().setText(Messages.gettext("No text selected"));
-                    } else {
-                        ScilabConsole.getConsole().getAsSimpleConsole().sendCommandsToScilab(selection, true /* display */, true /* store in history */);
-                    }
+            public void actionPerformed(ActionEvent actionEvent) {
+                String selection = accessibleHtml.getSelectedText();
+                if (selection == null) {
+                    ScilabHelpBrowser.getHelpBrowser().getInfoBar().setText(Messages.gettext("No text selected"));
+                } else {
+                    ScilabConsole.getConsole().getAsSimpleConsole().sendCommandsToScilab(selection, true /* display */, true /* store in history */);
                 }
-            };
+            }
+        };
         menuItem = new JMenuItem(Messages.gettext("Execute into Scilab"));
         menuItem.addActionListener(actionListenerExecuteIntoScilab);
         if (!ScilabConsole.isExistingConsole()) { /* Only available in STD mode */
@@ -536,15 +537,15 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
 
         /* Edit in the Scilab Text Editor */
         ActionListener actionListenerLoadIntoTextEditor = new ActionListener() {
-                public void actionPerformed(ActionEvent actionEvent) {
-                    String selection = accessibleHtml.getSelectedText();
-                    if (selection == null) {
-                        ScilabHelpBrowser.getHelpBrowser().getInfoBar().setText(Messages.gettext("No text selected"));
-                    } else {
-                        edit(selection);
-                    }
+            public void actionPerformed(ActionEvent actionEvent) {
+                String selection = accessibleHtml.getSelectedText();
+                if (selection == null) {
+                    ScilabHelpBrowser.getHelpBrowser().getInfoBar().setText(Messages.gettext("No text selected"));
+                } else {
+                    edit(selection);
                 }
-            };
+            }
+        };
 
         menuItem = new JMenuItem(Messages.gettext("Edit in the Scilab Text Editor"));
         try {
@@ -559,14 +560,14 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
 
         /* Back in the history*/
         ActionListener actionListenerBackHistory = new ActionListener() {
-                public void actionPerformed(ActionEvent actionEvent) {
-                    DefaultHelpHistoryModel history = SwingScilabHelpBrowser.getHelpHistory();
-                    /* Not at the first position */
-                    if (history.getIndex() > 0) {
-                        SwingScilabHelpBrowser.getHelpHistory().goBack();
-                    }
+            public void actionPerformed(ActionEvent actionEvent) {
+                DefaultHelpHistoryModel history = SwingScilabHelpBrowser.getHelpHistory();
+                /* Not at the first position */
+                if (history.getIndex() > 0) {
+                    SwingScilabHelpBrowser.getHelpHistory().goBack();
                 }
-            };
+            }
+        };
 
         menuItem = new JMenuItem(Messages.gettext("Back"));
         menuItem.addActionListener(actionListenerBackHistory);
@@ -574,14 +575,14 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
 
         /* Forward in the history*/
         ActionListener actionListenerForwardHistory = new ActionListener() {
-                public void actionPerformed(ActionEvent actionEvent) {
-                    DefaultHelpHistoryModel history = SwingScilabHelpBrowser.getHelpHistory();
-                    /* Not at the last position */
-                    if (history.getHistory().size() != (history.getIndex() + 1)) {
-                        SwingScilabHelpBrowser.getHelpHistory().goForward();
-                    }
+            public void actionPerformed(ActionEvent actionEvent) {
+                DefaultHelpHistoryModel history = SwingScilabHelpBrowser.getHelpHistory();
+                /* Not at the last position */
+                if (history.getHistory().size() != (history.getIndex() + 1)) {
+                    SwingScilabHelpBrowser.getHelpHistory().goForward();
                 }
-            };
+            }
+        };
 
         menuItem = new JMenuItem(Messages.gettext("Forward"));
         menuItem.addActionListener(actionListenerForwardHistory);
@@ -596,10 +597,10 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
 
         /* Select all */
         ActionListener actionListenerSelectAll = new ActionListener() {
-                public void actionPerformed(ActionEvent actionEvent) {
-                    accessibleHtml.selectAll();
-                }
-            };
+            public void actionPerformed(ActionEvent actionEvent) {
+                accessibleHtml.selectAll();
+            }
+        };
         menuItem = new JMenuItem(Messages.gettext("Select All"));
         menuItem.addActionListener(actionListenerSelectAll);
         popup.add(menuItem);
@@ -607,30 +608,30 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
         /* Edit in the Scilab Text Editor */
         final JMenuItem helpMenuItem = new JMenuItem("Help on the selected text");
 
-        ActionListener actionListenerHelpOnKeyword= new ActionListener() {
-                public void actionPerformed(ActionEvent actionEvent) {
-                    String selection = accessibleHtml.getSelectedText();
-                    if (selection == null) {
-                        ScilabHelpBrowser.getHelpBrowser().getInfoBar().setText(Messages.gettext("No text selected"));
-                    } else {
-                        ScilabHelpBrowser.getHelpBrowser().searchKeywork(selection);
-                    }
+        ActionListener actionListenerHelpOnKeyword = new ActionListener() {
+            public void actionPerformed(ActionEvent actionEvent) {
+                String selection = accessibleHtml.getSelectedText();
+                if (selection == null) {
+                    ScilabHelpBrowser.getHelpBrowser().getInfoBar().setText(Messages.gettext("No text selected"));
+                } else {
+                    ScilabHelpBrowser.getHelpBrowser().searchKeywork(selection);
                 }
-            };
+            }
+        };
         PropertyChangeListener listenerTextItem = new PropertyChangeListener() {
-                public void propertyChange(PropertyChangeEvent arg0) {
-                    String keyword = accessibleHtml.getSelectedText();
-                    if (keyword == null) {
-                        helpMenuItem.setText(Messages.gettext("Help about a selected text"));
-                    } else {
-                        int nbOfDisplayedOnlyXChar = 10;
-                        if (keyword.length() > nbOfDisplayedOnlyXChar) {
-                            keyword = keyword.substring(0, nbOfDisplayedOnlyXChar) + "...";
-                        }
-                        helpMenuItem.setText(Messages.gettext("Help about '") +keyword+"'");
+            public void propertyChange(PropertyChangeEvent arg0) {
+                String keyword = accessibleHtml.getSelectedText();
+                if (keyword == null) {
+                    helpMenuItem.setText(Messages.gettext("Help about a selected text"));
+                } else {
+                    int nbOfDisplayedOnlyXChar = 10;
+                    if (keyword.length() > nbOfDisplayedOnlyXChar) {
+                        keyword = keyword.substring(0, nbOfDisplayedOnlyXChar) + "...";
                     }
+                    helpMenuItem.setText(Messages.gettext("Help about '") + keyword + "'");
                 }
-            };
+            }
+        };
         helpMenuItem.addPropertyChangeListener(listenerTextItem);
         helpMenuItem.addActionListener(actionListenerHelpOnKeyword);
         popup.add(helpMenuItem);
@@ -659,20 +660,20 @@ public class SwingScilabHelpBrowserViewer extends BasicContentViewerUI implement
      */
     public void modifyFont(final int s) {
         SwingUtilities.invokeLater(new Runnable() {
-                public void run() {
-                    try {
-                        HTMLDocument doc = (HTMLDocument) accessibleHtml.getDocument();
-                        StyleContext.NamedStyle style = (StyleContext.NamedStyle) doc.getStyleSheet().getStyle("body");
-                        MutableAttributeSet attr = (MutableAttributeSet) style.getResolveParent();
-                        currentFontSize = Math.min(Math.max(0, currentFontSize + s), 6);
-                        ConfigManager.setHelpFontSize(currentFontSize);
-                        StyleConstants.setFontSize(attr, fontSizes[currentFontSize]);
-                        style.setResolveParent(attr);
-                    } catch (NullPointerException e) {
-                        // Can occur if the user is changing quickly the document
-                    }
+            public void run() {
+                try {
+                    HTMLDocument doc = (HTMLDocument) accessibleHtml.getDocument();
+                    StyleContext.NamedStyle style = (StyleContext.NamedStyle) doc.getStyleSheet().getStyle("body");
+                    MutableAttributeSet attr = (MutableAttributeSet) style.getResolveParent();
+                    currentFontSize = Math.min(Math.max(0, currentFontSize + s), 6);
+                    ConfigManager.setHelpFontSize(currentFontSize);
+                    StyleConstants.setFontSize(attr, fontSizes[currentFontSize]);
+                    style.setResolveParent(attr);
+                } catch (NullPointerException e) {
+                    // Can occur if the user is changing quickly the document
                 }
-            });
+            }
+        });
     }
 
     /**
index 255c436..566cd8d 100644 (file)
@@ -55,6 +55,7 @@ import org.scilab.modules.console.utils.ScilabSpecialTextUtilities;
  * @author Vincent COUVERT
  * @author Marouane BEN JELLOUL
  */
+@SuppressWarnings(value = { "serial" })
 public class SwingScilabLabel extends JScrollPane implements SwingViewObject, SimpleLabel {
 
     private static final long serialVersionUID = 7177323379068859441L;
@@ -379,45 +380,45 @@ public class SwingScilabLabel extends JScrollPane implements SwingViewObject, Si
         gbc.gridheight = 1;
 
         switch (ScilabAlignment.toSwingAlignment(horizontalAlignment)) {
-        case SwingConstants.LEFT:
-            switch (ScilabAlignment.toSwingAlignment(verticalAlignment)) {
-            case SwingConstants.TOP:
-                gbc.anchor = GridBagConstraints.NORTHWEST;
-                break;
-            case SwingConstants.CENTER:
-                gbc.anchor = GridBagConstraints.WEST;
-                break;
-            default: // SwingConstants.BOTTOM
-                gbc.anchor = GridBagConstraints.SOUTHWEST;
-                break;
-            }
-            break;
-        case SwingConstants.CENTER:
-            switch (ScilabAlignment.toSwingAlignment(verticalAlignment)) {
-            case SwingConstants.TOP:
-                gbc.anchor = GridBagConstraints.NORTH;
-                break;
-            case SwingConstants.CENTER:
-                gbc.anchor = GridBagConstraints.CENTER;
-                break;
-            default: // SwingConstants.BOTTOM
-                gbc.anchor = GridBagConstraints.SOUTH;
-                break;
-            }
-            break;
-        default: // SwingConstants.RIGHT
-            switch (ScilabAlignment.toSwingAlignment(verticalAlignment)) {
-            case SwingConstants.TOP:
-                gbc.anchor = GridBagConstraints.NORTHEAST;
+            case SwingConstants.LEFT:
+                switch (ScilabAlignment.toSwingAlignment(verticalAlignment)) {
+                    case SwingConstants.TOP:
+                        gbc.anchor = GridBagConstraints.NORTHWEST;
+                        break;
+                    case SwingConstants.CENTER:
+                        gbc.anchor = GridBagConstraints.WEST;
+                        break;
+                    default: // SwingConstants.BOTTOM
+                        gbc.anchor = GridBagConstraints.SOUTHWEST;
+                        break;
+                }
                 break;
             case SwingConstants.CENTER:
-                gbc.anchor = GridBagConstraints.EAST;
+                switch (ScilabAlignment.toSwingAlignment(verticalAlignment)) {
+                    case SwingConstants.TOP:
+                        gbc.anchor = GridBagConstraints.NORTH;
+                        break;
+                    case SwingConstants.CENTER:
+                        gbc.anchor = GridBagConstraints.CENTER;
+                        break;
+                    default: // SwingConstants.BOTTOM
+                        gbc.anchor = GridBagConstraints.SOUTH;
+                        break;
+                }
                 break;
-            default: // SwingConstants.BOTTOM
-                gbc.anchor = GridBagConstraints.SOUTHEAST;
+            default: // SwingConstants.RIGHT
+                switch (ScilabAlignment.toSwingAlignment(verticalAlignment)) {
+                    case SwingConstants.TOP:
+                        gbc.anchor = GridBagConstraints.NORTHEAST;
+                        break;
+                    case SwingConstants.CENTER:
+                        gbc.anchor = GridBagConstraints.EAST;
+                        break;
+                    default: // SwingConstants.BOTTOM
+                        gbc.anchor = GridBagConstraints.SOUTHEAST;
+                        break;
+                }
                 break;
-            }
-            break;
         }
 
         getAlignmentPanel().add(getLabel(), gbc);
@@ -464,6 +465,7 @@ public class SwingScilabLabel extends JScrollPane implements SwingViewObject, Si
     /**
      * Inner class to handle the case where the label is in LaTeX or in MathML
      */
+    @SuppressWarnings(value = { "serial" })
     public class ScilabJTextPane extends JTextPane {
 
         private int descent;
index 1850ce4..224d5ca 100644 (file)
@@ -26,6 +26,7 @@ import org.scilab.modules.gui.bridge.canvas.SwingScilabCanvas;
 /**
  * @author Pierre Lando
  */
+@SuppressWarnings(value = { "serial" })
 public class PanelLayout implements LayoutManager, Serializable {
 
     public static final String GL_CANVAS = "GL_CANVAS";
index 004a236..b45cede 100644 (file)
@@ -45,6 +45,7 @@ import org.scilab.modules.commons.xml.XConfiguration;
  *
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ClosingOperationsManager {
 
     private static final String EXIT_CONFIRM = Messages.gettext("Are you sure you want to close %s ?");
@@ -107,22 +108,22 @@ public class ClosingOperationsManager {
     }
 
     public static void checkTabForClosing(SwingScilabTab tab) {
-       if (tab != null && !dunnoList.isEmpty()) {
-           if (dunnoList.contains(tab)) {
-               dunnoList.remove(tab);
-           }
-           if (dunnoList.isEmpty() && savedList != null) {
-               close(savedList, null, false, savedMustSave);
-               savedList = null;
-               savedMustSave = false;
-           }
-       }
+        if (tab != null && !dunnoList.isEmpty()) {
+            if (dunnoList.contains(tab)) {
+                dunnoList.remove(tab);
+            }
+            if (dunnoList.isEmpty() && savedList != null) {
+                close(savedList, null, false, savedMustSave);
+                savedList = null;
+                savedMustSave = false;
+            }
+        }
     }
 
     public static void removeFromDunnoList(SwingScilabTab tab) {
-       if (tab != null && !dunnoList.isEmpty() && dunnoList.contains(tab)) {
-           dunnoList.remove(tab);
-       }
+        if (tab != null && !dunnoList.isEmpty() && dunnoList.contains(tab)) {
+            dunnoList.remove(tab);
+        }
     }
 
     /**
@@ -341,12 +342,12 @@ public class ClosingOperationsManager {
      * @param child teh child to remove
      */
     public static void removeDependency(SwingScilabTab child) {
-       for (SwingScilabTab tab : deps.keySet()) {
-           List<SwingScilabTab> children = deps.get(tab);
-           if (children != null) {
-               children.remove(child);
-           }
-       }
+        for (SwingScilabTab tab : deps.keySet()) {
+            List<SwingScilabTab> children = deps.get(tab);
+            if (children != null) {
+                children.remove(child);
+            }
+        }
     }
 
     /**
@@ -672,11 +673,11 @@ public class ClosingOperationsManager {
      */
     private static final boolean canClose(List<SwingScilabTab> list,
                                           SwingScilabWindow window,
-                                         boolean mustSave) {
+                                          boolean mustSave) {
         CheckExitConfirmation cec = XConfiguration.get(CheckExitConfirmation.class, XConfiguration.getXConfigurationDocument(), CONFIRMATION_PATH)[0];
-       dunnoList.clear();
-       savedList = null;
-       savedMustSave = false;
+        dunnoList.clear();
+        savedList = null;
+        savedMustSave = false;
 
         if (cec.checked) {
             String question = makeQuestion(list);
@@ -704,29 +705,29 @@ public class ClosingOperationsManager {
         for (SwingScilabTab t : list) {
             ClosingOperation op = closingOps.get(t);
             if (op != null) {
-               int ret = op.canClose();
-               if (ret == 0) {
-                   dunnoList.clear();
-                   return false;
-               }
-               if (ret == -1) {
-                   dunnoList.add(t);
-               }
-           }
-        }
-
-       if (dunnoList.isEmpty()) {
-           return true;
-       }
-       
-       for (SwingScilabTab tab : dunnoList) {
-           list.remove(tab);
-       }
-
-       savedList = list;
-       savedMustSave = mustSave;
-
-       return false;
+                int ret = op.canClose();
+                if (ret == 0) {
+                    dunnoList.clear();
+                    return false;
+                }
+                if (ret == -1) {
+                    dunnoList.add(t);
+                }
+            }
+        }
+
+        if (dunnoList.isEmpty()) {
+            return true;
+        }
+
+        for (SwingScilabTab tab : dunnoList) {
+            list.remove(tab);
+        }
+
+        savedList = list;
+        savedMustSave = mustSave;
+
+        return false;
     }
 
     /**
index c363872..b2d7e98 100644 (file)
@@ -46,6 +46,7 @@ import org.scilab.modules.commons.ScilabConstants;
  * Class to have an incremental search field.
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class HelpSearchField extends JPanel implements FocusListener, KeyListener {
 
     private static final String SCI = ScilabConstants.SCI.getPath();
@@ -76,11 +77,11 @@ public class HelpSearchField extends JPanel implements FocusListener, KeyListene
         field.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);
         field.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), TAB);
         field.getActionMap().put(TAB, new AbstractAction() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    HelpSearchField.this.textcomp.requestFocus();
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                HelpSearchField.this.textcomp.requestFocus();
+            }
+        });
         JPanel panelButtons = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
         panelButtons.add(new CloseButton());
         panelButtons.add(new TopBotButtons(true));
@@ -98,11 +99,11 @@ public class HelpSearchField extends JPanel implements FocusListener, KeyListene
         this.textcomp = textcomp;
         textcomp.getInputMap(WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), F3);
         textcomp.getActionMap().put(F3, new AbstractAction() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    HelpSearchField.this.showField();
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                HelpSearchField.this.showField();
+            }
+        });
 
         text = null;
         currentPos = 0;
@@ -198,13 +199,13 @@ public class HelpSearchField extends JPanel implements FocusListener, KeyListene
                     final int value = sb.getValue();
                     final int h = sb.getHeight();
                     SwingUtilities.invokeLater(new Runnable() {
-                            @Override
-                            public void run() {
-                                if (rect.y < value || rect.y > value + h) {
-                                    sb.setValue(Math.max(0, rect.y - h / 2));
-                                }
+                        @Override
+                        public void run() {
+                            if (rect.y < value || rect.y > value + h) {
+                                sb.setValue(Math.max(0, rect.y - h / 2));
                             }
-                        });
+                        }
+                    });
                 }
                 textcomp.getHighlighter().addHighlight(start, end, highlighter);
                 currentPos = start;
@@ -279,11 +280,11 @@ public class HelpSearchField extends JPanel implements FocusListener, KeyListene
             setBorderPainted(false);
             setPreferredSize(new Dimension(BUTTONSIZE, BUTTONSIZE));
             addActionListener(new ActionListener() {
-                    @Override
-                    public void actionPerformed(ActionEvent e) {
-                        hideField();
-                    }
-                });
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    hideField();
+                }
+            });
         }
     }
 
@@ -305,32 +306,32 @@ public class HelpSearchField extends JPanel implements FocusListener, KeyListene
             setBorderPainted(false);
             setPreferredSize(new Dimension(BUTTONSIZE, BUTTONSIZE));
             addActionListener(new ActionListener() {
-                    @Override
-                    public void actionPerformed(ActionEvent e) {
-                        String str = field.getText();
-                        String txt = "";
-                        Document doc = textcomp.getDocument();
-                        try {
-                            txt = doc.getText(0, doc.getLength()).toLowerCase();
-                        } catch (BadLocationException ex) {
-                            System.err.println(ex);
-                        }
-
-                        if (str != null) {
-                            int start;
-                            str = str.toLowerCase();
-                            if (top) {
-                                currentPos = Math.max(0, currentPos - 1);;
-                                start = txt.lastIndexOf(str, currentPos);
-                            } else {
-                                currentPos++;
-                                start = txt.indexOf(str, currentPos);
-                            }
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    String str = field.getText();
+                    String txt = "";
+                    Document doc = textcomp.getDocument();
+                    try {
+                        txt = doc.getText(0, doc.getLength()).toLowerCase();
+                    } catch (BadLocationException ex) {
+                        System.err.println(ex);
+                    }
 
-                            highlightText(start, start + str.length());
+                    if (str != null) {
+                        int start;
+                        str = str.toLowerCase();
+                        if (top) {
+                            currentPos = Math.max(0, currentPos - 1);;
+                            start = txt.lastIndexOf(str, currentPos);
+                        } else {
+                            currentPos++;
+                            start = txt.indexOf(str, currentPos);
                         }
+
+                        highlightText(start, start + str.length());
                     }
-                });
+                }
+            });
         }
     }
 }
index 8f5b66d..3654fcb 100644 (file)
@@ -14,9 +14,10 @@ package org.scilab.modules.helptools;
 
 import org.xml.sax.SAXException;
 
+@SuppressWarnings(value = { "serial" })
 public class UnhandledDocbookTagException extends SAXException {
 
     public UnhandledDocbookTagException(String tag) {
-       super("The tag " + tag + " is not handled.");
+        super("The tag " + tag + " is not handled.");
     }
 }
\ No newline at end of file
index 64736c4..f8adcaa 100644 (file)
@@ -39,6 +39,7 @@ import org.scilab.modules.scinotes.ScilabLexerConstants;
  * @author Pierre GRADIT
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class PreviewCode extends Panel implements XComponent, XChooser {
 
     /** Universal identifier for serialization.
index 2b0f550..7575650 100644 (file)
@@ -27,6 +27,7 @@ import org.w3c.dom.Node;
 /**
  * {@link Entry} component which only allow a Scilab single double data text.
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabDoubleEntry extends JFormattedTextField implements XComponent, XChooser {
 
     /*
index a311951..e0a74e4 100644 (file)
@@ -45,6 +45,7 @@ import org.scilab.modules.preferences.XComponent;
  * @author Pierre GRADIT
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class Table extends Panel implements XComponent, XChooser, ListSelectionListener, ActionListener {
 
     /** Universal identifier for serialization.
@@ -97,7 +98,7 @@ public class Table extends Panel implements XComponent, XChooser, ListSelectionL
 
         table.getSelectionModel().addListSelectionListener(this);
         table.getTableHeader().setReorderingAllowed(false);
-       table.setDragEnabled(false);
+        table.setDragEnabled(false);
         setupOpenMask(peer);
         setupControls(peer);
 
@@ -145,13 +146,13 @@ public class Table extends Panel implements XComponent, XChooser, ListSelectionL
 
     public void setupControls(Node peer) {
         if (XCommonManager.getAttribute(peer , "size").equals("dynamic")) {
-            JPanel panel = new JPanel(new GridLayout(5,1));
-            for (int i=0; i<controls.length; i++) {
+            JPanel panel = new JPanel(new GridLayout(5, 1));
+            for (int i = 0; i < controls.length; i++) {
                 panel.add(controls[i]);
                 controls[i].addActionListener((ActionListener) this);
                 controls[i].setEnabled(false);
             }
-            if (model.getRowCount()==0) {
+            if (model.getRowCount() == 0) {
                 controls[0].setEnabled(true);
             }
             this.add(panel, BorderLayout.EAST);
@@ -159,7 +160,7 @@ public class Table extends Panel implements XComponent, XChooser, ListSelectionL
     }
 
     public void openControls() {
-        for (int i=0; i<controls.length; i++) {
+        for (int i = 0; i < controls.length; i++) {
             controls[i].setEnabled(openMask[i]);
         }
     }
@@ -174,38 +175,39 @@ public class Table extends Panel implements XComponent, XChooser, ListSelectionL
             }
         }
         switch (id) {
-        case 0:
-            // Add new row
-            if (actionListener != null) {
-                ActionEvent transmit  = new ActionEvent(this, 0,"tableAdd", e.getWhen(), 0);
-                actionListener.actionPerformed(transmit);
-            }
-            break;
-        case 1:
-            // Move row upper
-            break;
-        case 2:
-            table.getSelectionModel().clearSelection();
-            for (int i=0; i<controls.length; i++) {
-                controls[i].setEnabled(false);
-            }
-            break;
-        case 3: break;
-        case 4:
-            // Delete row
-            System.out.println("[DEBUG] calling actionPerformed(deleteRow)");
-            if (actionListener != null) {
-                ActionEvent transmit = new ActionEvent(this, 0, "tableDel", e.getWhen(), 0);
-                actionListener.actionPerformed(transmit);
-            }
-            break;
+            case 0:
+                // Add new row
+                if (actionListener != null) {
+                    ActionEvent transmit  = new ActionEvent(this, 0, "tableAdd", e.getWhen(), 0);
+                    actionListener.actionPerformed(transmit);
+                }
+                break;
+            case 1:
+                // Move row upper
+                break;
+            case 2:
+                table.getSelectionModel().clearSelection();
+                for (int i = 0; i < controls.length; i++) {
+                    controls[i].setEnabled(false);
+                }
+                break;
+            case 3:
+                break;
+            case 4:
+                // Delete row
+                System.out.println("[DEBUG] calling actionPerformed(deleteRow)");
+                if (actionListener != null) {
+                    ActionEvent transmit = new ActionEvent(this, 0, "tableDel", e.getWhen(), 0);
+                    actionListener.actionPerformed(transmit);
+                }
+                break;
         }
     }
     //end Dynamic_controller
 
-    private final class CustomTableCellRenderer extends DefaultTableCellRenderer{
+    private final class CustomTableCellRenderer extends DefaultTableCellRenderer {
         public Component getTableCellRendererComponent (JTable table,
-                                                        Object obj, boolean isSelected, boolean hasFocus, int row, int column) {
+                Object obj, boolean isSelected, boolean hasFocus, int row, int column) {
             Component cell = super.getTableCellRendererComponent(table, obj, isSelected, hasFocus, row, column);
             if (obj instanceof java.awt.Color) {
                 cell.setBackground((java.awt.Color) obj);
@@ -288,7 +290,7 @@ public class Table extends Panel implements XComponent, XChooser, ListSelectionL
         if (externalChange && !e.getValueIsAdjusting()) {
             openControls();
             if (actionListener != null) {
-               ActionEvent transmit = new ActionEvent(this, 0, "tableSelect", System.currentTimeMillis(), 0);
+                ActionEvent transmit = new ActionEvent(this, 0, "tableSelect", System.currentTimeMillis(), 0);
                 actionListener.actionPerformed(transmit);
             }
         }
@@ -309,7 +311,7 @@ public class Table extends Panel implements XComponent, XChooser, ListSelectionL
     public final void item(final String item) {
         int selectedRow = Integer.parseInt(item);
         externalChange  = false;
-        if ((selectedRow != -1)&&(selectedRow != (table.getSelectedRow() + 1))) {
+        if ((selectedRow != -1) && (selectedRow != (table.getSelectedRow() + 1))) {
             table.setRowSelectionInterval(selectedRow - 1, selectedRow - 1);
             openControls();
         }
@@ -382,32 +384,32 @@ class Model extends AbstractTableModel {
 
     @Override
     public int getColumnCount() {
-       if (nodelist != prevC) {
-           cols = 0;
-           for (int i = 0; i < nodelist.getLength(); i++) {
-               Node node = nodelist.item(i);
-               if (node.getNodeName().equals("tableCol")) {
-                   cols++;
-               }
-           }
-           prevC = nodelist;
-       }
-           
+        if (nodelist != prevC) {
+            cols = 0;
+            for (int i = 0; i < nodelist.getLength(); i++) {
+                Node node = nodelist.item(i);
+                if (node.getNodeName().equals("tableCol")) {
+                    cols++;
+                }
+            }
+            prevC = nodelist;
+        }
+
         return cols;
     }
 
     @Override
     public int getRowCount() {
-       if (nodelist != prevR) {
-           rows = 0;
-           for (int i = 0; i < nodelist.getLength(); i++) {
-               Node node = nodelist.item(i);
-               if (node.getNodeName().equals("tableRow")) {
-                   rows++;
-               }
-           }
-           prevR = nodelist;
-       }
+        if (nodelist != prevR) {
+            rows = 0;
+            for (int i = 0; i < nodelist.getLength(); i++) {
+                Node node = nodelist.item(i);
+                if (node.getNodeName().equals("tableRow")) {
+                    rows++;
+                }
+            }
+            prevR = nodelist;
+        }
 
         return rows;
     }
@@ -491,8 +493,7 @@ class Model extends AbstractTableModel {
         String attr  = getColumnAttr(col);
         Node record  = getRowRecord(row);
         String value = XCommonManager.getAttribute(record , attr);
-        if (value.startsWith("#"))
-        {
+        if (value.startsWith("#")) {
             return XCommonManager.getColor(value);
         }
         return value;
@@ -514,7 +515,7 @@ class Model extends AbstractTableModel {
     public boolean isCellEditable(final int row, final int col) {
         Node record  = getColumnRecord(col);
         String value = XCommonManager.getAttribute(
-            record , "editable", "false");
+                           record , "editable", "false");
         return value == "true";
     }
 
index 4e4c739..6ced05d 100644 (file)
@@ -36,6 +36,7 @@ import org.scilab.modules.preferences.XConfigManager;
  * @author Pierre GRADIT
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class Title extends Panel implements XComponent {
 
     /** Universal identifier for serialization.
index 25282b9..2962100 100644 (file)
@@ -22,6 +22,7 @@ import java.awt.*;
 /**
  * @author Pierre Lando
  */
+@SuppressWarnings(value = { "serial" })
 public class FigureFrame extends JFrame {
     private final TreeModel treeModel;
     public FigureFrame(String id) {
index b15a641..fe1c2b5 100644 (file)
@@ -14,6 +14,7 @@ package org.scilab.modules.renderer.JoGLView.util;
 /**
  * @author Pierre Lando
  */
+@SuppressWarnings(value = { "serial" })
 public class OutOfMemoryException extends Exception {
 
     public OutOfMemoryException() {
index 076a946..160c9be 100644 (file)
@@ -30,6 +30,7 @@ import org.scilab.modules.scinotes.KeywordEvent;
  * OpenURLAction Class
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class OpenURLAction extends DefaultAction {
 
     /**
@@ -66,16 +67,16 @@ public class OpenURLAction extends DefaultAction {
     public static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key) {
         final MenuItem menuitem = createMenu(label, null, new OpenURLAction(label, editor), key);
         ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
-                public void propertyChange(PropertyChangeEvent e) {
-                    if (editor.getTextPane() != null) {
-                        String keyword = editor.getTextPane().getSelectedText();
-                        if (keyword == null) {
-                            KeywordEvent kwe = editor.getTextPane().getKeywordEvent();
-                            menuitem.setEnabled(ScilabLexerConstants.MAIL == kwe.getType() || ScilabLexerConstants.URL == kwe.getType());
-                        }
+            public void propertyChange(PropertyChangeEvent e) {
+                if (editor.getTextPane() != null) {
+                    String keyword = editor.getTextPane().getSelectedText();
+                    if (keyword == null) {
+                        KeywordEvent kwe = editor.getTextPane().getKeywordEvent();
+                        menuitem.setEnabled(ScilabLexerConstants.MAIL == kwe.getType() || ScilabLexerConstants.URL == kwe.getType());
                     }
                 }
-            });
+            }
+        });
 
         return menuitem;
     }
index b93bf23..b4fe5a2 100644 (file)
@@ -26,6 +26,7 @@ import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
  * @author Sylvestre Koumar
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class PageSetupAction extends DefaultAction {
 
     private static PageFormat pageFormat;
index c3389ed..77bace4 100644 (file)
@@ -33,6 +33,7 @@ import org.scilab.modules.scinotes.ScilabEditorKit;
  * @author Bruno JOFRET
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class PasteAction extends DefaultAction {
 
     /**
index 0e991c5..ec723cd 100644 (file)
@@ -34,6 +34,7 @@ import org.scilab.modules.scinotes.ScilabEditorKit;
  * Class for paste action
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class PasteColumnAction extends DefaultAction {
 
     private static final String CR = "\n";
index e2416b3..91900f5 100644 (file)
@@ -22,6 +22,7 @@ import org.scilab.modules.scinotes.SciNotes;
  * @author Sylvestre Koumar
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class PreviousTabAction extends DefaultAction {
 
     /**
index 6d77d4f..a138975 100644 (file)
@@ -26,6 +26,7 @@ import org.scilab.modules.scinotes.utils.CodeExporter;
  * @author Sylvestre Koumar
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class PrintAction extends DefaultAction {
 
     private boolean codeConverterLoaded;
index 44a779b..35f7df5 100644 (file)
@@ -27,6 +27,7 @@ import org.scilab.modules.scinotes.utils.ConfigSciNotesManager;
  * @author Allan SIMON
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class RecentFileAction extends DefaultAction {
 
     private static Menu recentsMenu = ScilabMenu.createMenu();
index 7290af2..f56259b 100644 (file)
@@ -23,6 +23,7 @@ import org.scilab.modules.scinotes.SciNotes;
  * @author Bruno JOFRET
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class RedoAction extends DefaultAction {
 
     /**
index 8eefcef..4b0c281 100644 (file)
@@ -25,6 +25,7 @@ import org.scilab.modules.scinotes.ScilabDocument;
  * Class for paste action
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class RepeatSelectionOnColumnAction extends DefaultAction {
 
     /**
index 900881e..c6e5a48 100644 (file)
@@ -69,6 +69,7 @@ import org.scilab.modules.scinotes.utils.SciNotesMessages;
  * @author Paul Griffiths
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class RestoreOpenedFilesAction extends DefaultCheckAction {
 
     private static final int GAP = 10;
@@ -132,11 +133,11 @@ public class RestoreOpenedFilesAction extends DefaultCheckAction {
         final JDialog dialog = new JDialog(owner);
         dialog.getRootPane().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE , 0), ESCAPE);
         dialog.getRootPane().getActionMap().put(ESCAPE, new AbstractAction() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    dialog.dispose();
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                dialog.dispose();
+            }
+        });
 
         dialog.setPreferredSize(new Dimension(dimX, dimY));
 
@@ -145,27 +146,27 @@ public class RestoreOpenedFilesAction extends DefaultCheckAction {
         ok.setPreferredSize(cancel.getPreferredSize());
         Object[] buttons = new Object[2];
         ok.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    selectedFiles = getOpenedFiles(tree, uuid);
-                    dialog.dispose();
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                selectedFiles = getOpenedFiles(tree, uuid);
+                dialog.dispose();
+            }
+        });
 
         cancel.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    List<UUID> editorID = ConfigSciNotesManager.getOpenFilesEditorList();
-                    for (int i = 0; i < editorID.size(); i++) {
-                        // Remove these files from the list of open files
-                        if (editorID.get(i).toString().equals(uuid)) {
-                            ConfigSciNotesManager.removeFromOpenFiles(editorID.get(i));
-                            break;
-                        }
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                List<UUID> editorID = ConfigSciNotesManager.getOpenFilesEditorList();
+                for (int i = 0; i < editorID.size(); i++) {
+                    // Remove these files from the list of open files
+                    if (editorID.get(i).toString().equals(uuid)) {
+                        ConfigSciNotesManager.removeFromOpenFiles(editorID.get(i));
+                        break;
                     }
-                    dialog.dispose();
                 }
-            });
+                dialog.dispose();
+            }
+        });
 
         if (isWindows()) {
             buttons[0] = ok;
@@ -339,8 +340,8 @@ public class RestoreOpenedFilesAction extends DefaultCheckAction {
          */
         @Override
         public Component getTreeCellRendererComponent(JTree tree, Object value,
-                                                      boolean selected, boolean expanded, boolean leaf, int row,
-                                                      boolean hasFocus) {
+                boolean selected, boolean expanded, boolean leaf, int row,
+                boolean hasFocus) {
             if (leaf) {
                 String stringValue = tree.convertValueToText(value, selected, expanded, leaf, row, false);
                 leafRenderer.setText(stringValue);
@@ -439,16 +440,16 @@ public class RestoreOpenedFilesAction extends DefaultCheckAction {
          */
         @Override
         public Component getTreeCellEditorComponent(JTree tree, Object value,
-                                                    boolean selected, boolean expanded, boolean leaf, int row) {
+                boolean selected, boolean expanded, boolean leaf, int row) {
             Component editor = renderer.getTreeCellRendererComponent(tree, value, true, expanded, leaf, row, true);
             ItemListener itemListener = new ItemListener() {
-                    @Override
-                    public void itemStateChanged(ItemEvent itemEvent) {
-                        if (stopCellEditing()) {
-                            fireEditingStopped();
-                        }
+                @Override
+                public void itemStateChanged(ItemEvent itemEvent) {
+                    if (stopCellEditing()) {
+                        fireEditingStopped();
                     }
-                };
+                }
+            };
             if (editor instanceof JCheckBox) {
                 ((JCheckBox) editor).addItemListener(itemListener);
             }
index 3b44080..aef2563 100644 (file)
@@ -25,6 +25,7 @@ import org.scilab.modules.scinotes.SciNotes;
  * @author Calixte DENIZET
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class SaveAndExecuteAllFilesAction extends SaveAndExecuteFileAction {
 
     /**
index 7b6de1a..2351b07 100644 (file)
@@ -23,6 +23,7 @@ import org.scilab.modules.scinotes.SciNotes;
  * @author Calixte DENIZET
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class SaveAndExecuteFileAction extends ExecuteFileIntoScilabAction {
 
     /**
index eaba69e..f02b24c 100644 (file)
@@ -21,6 +21,7 @@ import org.scilab.modules.scinotes.SciNotes;
  * SearchFilesAction Class
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SearchFilesAction extends SearchWordInFilesAction {
 
     /**
index 157d8e1..3294d3f 100644 (file)
@@ -66,6 +66,7 @@ import org.scilab.modules.scinotes.utils.SearchFile;
  * SearchWordInFilesAction Class
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SearchWordInFilesAction extends DefaultAction implements WindowFocusListener {
 
     private static final long serialVersionUID = 1L;
@@ -220,11 +221,11 @@ public class SearchWordInFilesAction extends DefaultAction implements WindowFocu
         mainFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
         mainFrame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE , 0), ESCAPE);
         mainFrame.getRootPane().getActionMap().put(ESCAPE, new AbstractAction() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    closeWindow();
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                closeWindow();
+            }
+        });
         mainFrame.setTitle(SciNotesMessages.SEARCHINFILES);
         mainFrame.setIconImage(new ImageIcon(ScilabSwingUtilities.findIcon("system-search", "32x32")).getImage());
 
@@ -369,244 +370,244 @@ public class SearchWordInFilesAction extends DefaultAction implements WindowFocu
         mainFrame.setContentPane(panelFrame);
 
         mainFrame.addWindowListener(new WindowListener() {
-                @Override
-                public void windowClosed(WindowEvent arg0) { }
-                @Override
-                public void windowDeiconified(WindowEvent arg0) { }
-                @Override
-                public void windowActivated(WindowEvent arg0) { }
-
-                @Override
-                public void windowClosing(WindowEvent arg0) {
-                    closeWindow();
-                }
+            @Override
+            public void windowClosed(WindowEvent arg0) { }
+            @Override
+            public void windowDeiconified(WindowEvent arg0) { }
+            @Override
+            public void windowActivated(WindowEvent arg0) { }
+
+            @Override
+            public void windowClosing(WindowEvent arg0) {
+                closeWindow();
+            }
 
-                @Override
-                public void windowDeactivated(WindowEvent arg0) { }
-                @Override
-                public void windowIconified(WindowEvent arg0) { };
-                @Override
-                public void windowOpened(WindowEvent arg0) { }
-            });
+            @Override
+            public void windowDeactivated(WindowEvent arg0) { }
+            @Override
+            public void windowIconified(WindowEvent arg0) { };
+            @Override
+            public void windowOpened(WindowEvent arg0) { }
+        });
 
         checkWordCase.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    ConfigSciNotesManager.saveCaseSensitive(checkWordCase.isSelected());
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                ConfigSciNotesManager.saveCaseSensitive(checkWordCase.isSelected());
+            }
+        });
 
         checkFileCase.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    ConfigSciNotesManager.saveFileCase(checkFileCase.isSelected());
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                ConfigSciNotesManager.saveFileCase(checkFileCase.isSelected());
+            }
+        });
 
         checkWhole.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    ConfigSciNotesManager.saveWholeWord(checkWhole.isSelected());
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                ConfigSciNotesManager.saveWholeWord(checkWhole.isSelected());
+            }
+        });
 
         checkRecursive.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    ConfigSciNotesManager.saveRecursive(checkRecursive.isSelected());
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                ConfigSciNotesManager.saveRecursive(checkRecursive.isSelected());
+            }
+        });
 
         checkRegular.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    ConfigSciNotesManager.saveRegularExpression(checkRegular.isSelected());
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                ConfigSciNotesManager.saveRegularExpression(checkRegular.isSelected());
+            }
+        });
 
         checkLineByLine.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    ConfigSciNotesManager.saveLineByLine(checkLineByLine.isSelected());
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                ConfigSciNotesManager.saveLineByLine(checkLineByLine.isSelected());
+            }
+        });
 
         chooseBaseDirButton.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    SwingScilabFileChooser fileChooser = ((SwingScilabFileChooser) ScilabFileChooser.createFileChooser().getAsSimpleFileChooser());
-                    fileChooser.setDialogTitle(SciNotesMessages.CHOOSEBASEDIR);
-                    fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-                    fileChooser.setAcceptAllFileFilterUsed(false);
-                    if (fileChooser.showOpenDialog(getEditor()) == JFileChooser.APPROVE_OPTION) {
-                        File path = fileChooser.getSelectedFile();
-                        if (path == null || path.isFile()) {
-                            path = fileChooser.getCurrentDirectory();
-                        }
-                        comboBaseDir.getEditor().setItem(path.toString());
-                        updateFindButtonStatus(true);
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                SwingScilabFileChooser fileChooser = ((SwingScilabFileChooser) ScilabFileChooser.createFileChooser().getAsSimpleFileChooser());
+                fileChooser.setDialogTitle(SciNotesMessages.CHOOSEBASEDIR);
+                fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+                fileChooser.setAcceptAllFileFilterUsed(false);
+                if (fileChooser.showOpenDialog(getEditor()) == JFileChooser.APPROVE_OPTION) {
+                    File path = fileChooser.getSelectedFile();
+                    if (path == null || path.isFile()) {
+                        path = fileChooser.getCurrentDirectory();
                     }
+                    comboBaseDir.getEditor().setItem(path.toString());
+                    updateFindButtonStatus(true);
                 }
-            });
+            }
+        });
 
         buttonFind.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    updateCombos();
-                    startSearch();
-                }
-            });
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                updateCombos();
+                startSearch();
+            }
+        });
 
         buttonStop.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    stopSearch();
-                }
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                stopSearch();
+            }
 
-            });
+        });
 
         buttonStop.addPropertyChangeListener(new PropertyChangeListener() {
-                @Override
-                public void propertyChange(PropertyChangeEvent e) {
-                    if (mainFrame.isVisible() && e.getPropertyName().equals(SearchFile.SEARCHDONE)) {
-                        boolean newValue = (Boolean) e.getNewValue();
-                        buttonFind.setEnabled(newValue);
-                        buttonStop.setEnabled(!newValue);
-                    } else if (e.getPropertyName().equals(ENABLED)) {
-                        boolean newValue = (Boolean) e.getNewValue();
-                        comboBaseDir.setEnabled(!newValue);
-                        comboFilePattern.setEnabled(!newValue);
-                        chooseBaseDirButton.setEnabled(!newValue);
-                    }
+            @Override
+            public void propertyChange(PropertyChangeEvent e) {
+                if (mainFrame.isVisible() && e.getPropertyName().equals(SearchFile.SEARCHDONE)) {
+                    boolean newValue = (Boolean) e.getNewValue();
+                    buttonFind.setEnabled(newValue);
+                    buttonStop.setEnabled(!newValue);
+                } else if (e.getPropertyName().equals(ENABLED)) {
+                    boolean newValue = (Boolean) e.getNewValue();
+                    comboBaseDir.setEnabled(!newValue);
+                    comboFilePattern.setEnabled(!newValue);
+                    chooseBaseDirButton.setEnabled(!newValue);
                 }
-            });
+            }
+        });
 
         buttonClose.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    closeWindow();
-                }
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                closeWindow();
+            }
 
-            });
+        });
 
         comboBaseDir.addItemListener(new ItemListener() {
-                @Override
-                public void itemStateChanged(ItemEvent e) {
-                    updateFindButtonStatus(true);
-                }
-            });
+            @Override
+            public void itemStateChanged(ItemEvent e) {
+                updateFindButtonStatus(true);
+            }
+        });
 
         comboBaseDir.addPopupMenuListener(new PopupMenuListener() {
-                @Override
-                public void popupMenuCanceled(PopupMenuEvent e) {
-                    comboBaseDirCanceled = true;
-                }
+            @Override
+            public void popupMenuCanceled(PopupMenuEvent e) {
+                comboBaseDirCanceled = true;
+            }
 
-                @Override
-                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+            @Override
+            public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
 
-                @Override
-                public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
-            });
+            @Override
+            public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
+        });
 
         comboBaseDir.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
-                @Override
-                public void keyTyped(KeyEvent e) { }
-                @Override
-                public void keyReleased(KeyEvent e) {
-                    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
-                        if (comboBaseDirCanceled) {
-                            comboBaseDirCanceled = false;
-                        } else {
-                            closeWindow();
-                        }
+            @Override
+            public void keyTyped(KeyEvent e) { }
+            @Override
+            public void keyReleased(KeyEvent e) {
+                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+                    if (comboBaseDirCanceled) {
+                        comboBaseDirCanceled = false;
+                    } else {
+                        closeWindow();
                     }
-                    updateFindButtonStatus(true);
                 }
+                updateFindButtonStatus(true);
+            }
 
-                @Override
-                public void keyPressed(KeyEvent e) { }
-            });
+            @Override
+            public void keyPressed(KeyEvent e) { }
+        });
 
         comboFilePattern.addItemListener(new ItemListener() {
-                @Override
-                public void itemStateChanged(ItemEvent e) {
-                    updateFindButtonStatus(false);
-                }
-            });
+            @Override
+            public void itemStateChanged(ItemEvent e) {
+                updateFindButtonStatus(false);
+            }
+        });
 
         comboFilePattern.addPopupMenuListener(new PopupMenuListener() {
-                @Override
-                public void popupMenuCanceled(PopupMenuEvent e) {
-                    comboFilePatternCanceled = true;
-                }
+            @Override
+            public void popupMenuCanceled(PopupMenuEvent e) {
+                comboFilePatternCanceled = true;
+            }
 
-                @Override
-                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+            @Override
+            public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
 
-                @Override
-                public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
-            });
+            @Override
+            public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
+        });
 
         comboFilePattern.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
-                @Override
-                public void keyTyped(KeyEvent e) { }
-                @Override
-                public void keyReleased(KeyEvent e) {
-                    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
-                        if (comboFilePatternCanceled) {
-                            comboFilePatternCanceled = false;
-                        } else {
-                            closeWindow();
-                        }
+            @Override
+            public void keyTyped(KeyEvent e) { }
+            @Override
+            public void keyReleased(KeyEvent e) {
+                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+                    if (comboFilePatternCanceled) {
+                        comboFilePatternCanceled = false;
+                    } else {
+                        closeWindow();
                     }
-                    updateFindButtonStatus(false);
                 }
+                updateFindButtonStatus(false);
+            }
 
-                @Override
-                public void keyPressed(KeyEvent e) { }
-            });
+            @Override
+            public void keyPressed(KeyEvent e) { }
+        });
 
         comboWordPattern.addPopupMenuListener(new PopupMenuListener() {
-                @Override
-                public void popupMenuCanceled(PopupMenuEvent e) {
-                    comboWordPatternCanceled = true;
-                }
+            @Override
+            public void popupMenuCanceled(PopupMenuEvent e) {
+                comboWordPatternCanceled = true;
+            }
 
-                @Override
-                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
+            @Override
+            public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { }
 
-                @Override
-                public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
-            });
+            @Override
+            public void popupMenuWillBecomeVisible(PopupMenuEvent e) { }
+        });
 
         comboWordPattern.getEditor().getEditorComponent().addKeyListener(new KeyListener() {
-                @Override
-                public void keyTyped(KeyEvent e) { }
-                @Override
-                public void keyReleased(KeyEvent e) {
-                    if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
-                        if (comboWordPatternCanceled) {
-                            comboWordPatternCanceled = false;
-                        } else {
-                            closeWindow();
-                        }
+            @Override
+            public void keyTyped(KeyEvent e) { }
+            @Override
+            public void keyReleased(KeyEvent e) {
+                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
+                    if (comboWordPatternCanceled) {
+                        comboWordPatternCanceled = false;
+                    } else {
+                        closeWindow();
                     }
-                    if (checkRegular.isSelected()) {
-                        try {
-                            Pattern.compile((String) comboWordPattern.getEditor().getItem());
-                            ((JTextField) comboWordPattern.getEditor().getEditorComponent()).setForeground(NORMALCOLOR);
-                            buttonFind.setEnabled(true);
-                        } catch (PatternSyntaxException pse) {
-                            ((JTextField) comboWordPattern.getEditor().getEditorComponent()).setForeground(ERRORCOLOR);
-                            buttonFind.setEnabled(false);
-                        }
+                }
+                if (checkRegular.isSelected()) {
+                    try {
+                        Pattern.compile((String) comboWordPattern.getEditor().getItem());
+                        ((JTextField) comboWordPattern.getEditor().getEditorComponent()).setForeground(NORMALCOLOR);
+                        buttonFind.setEnabled(true);
+                    } catch (PatternSyntaxException pse) {
+                        ((JTextField) comboWordPattern.getEditor().getEditorComponent()).setForeground(ERRORCOLOR);
+                        buttonFind.setEnabled(false);
                     }
                 }
+            }
 
-                @Override
-                public void keyPressed(KeyEvent e) { }
-            });
+            @Override
+            public void keyPressed(KeyEvent e) { }
+        });
 
         mainFrame.pack();
         mainFrame.setResizable(false);
index 5c457f6..e79fa32 100644 (file)
@@ -29,6 +29,7 @@ import org.scilab.modules.scinotes.ScilabLexerConstants;
  * Class to handle the block selection
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SelectBlockAction extends DefaultAction {
 
     protected boolean isPopup;
@@ -98,15 +99,15 @@ public class SelectBlockAction extends DefaultAction {
     protected static MenuItem createMenu(String label, final SciNotes editor, KeyStroke key, final SelectBlockAction sba) {
         final MenuItem menuitem = createMenu(label, null, sba, key);
         ((JMenuItem) menuitem.getAsSimpleMenuItem()).addPropertyChangeListener(new PropertyChangeListener() {
-                public void propertyChange(PropertyChangeEvent e) {
-                    if (editor.getTextPane() != null) {
-                        ScilabEditorPane sep = editor.getTextPane();
-                        boolean block = ScilabLexerConstants.isMatchable(sep.getKeywordEvent(!sba.isPopup, false).getType());
-                        block = block || ScilabLexerConstants.isMatchable(sep.getKeywordEvent(!sba.isPopup, true).getType());
-                        menuitem.setEnabled(block);
-                    }
+            public void propertyChange(PropertyChangeEvent e) {
+                if (editor.getTextPane() != null) {
+                    ScilabEditorPane sep = editor.getTextPane();
+                    boolean block = ScilabLexerConstants.isMatchable(sep.getKeywordEvent(!sba.isPopup, false).getType());
+                    block = block || ScilabLexerConstants.isMatchable(sep.getKeywordEvent(!sba.isPopup, true).getType());
+                    menuitem.setEnabled(block);
                 }
-            });
+            }
+        });
 
         return menuitem;
     }
index 5c68543..561cf21 100644 (file)
@@ -26,6 +26,7 @@ import org.scilab.modules.scinotes.ScilabDocument;
  * @author Sylvestre Koumar
  *
  */
+@SuppressWarnings(value = { "serial" })
 public class UnTabifyAction extends DefaultAction {
 
     /**
index 00cf571..057f491 100644 (file)
@@ -25,6 +25,7 @@ import org.scilab.modules.scinotes.SciNotes;
  * Content pane for SciNotes.
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SciNotesContents extends JPanel {
 
     private ScilabTabbedPane stp;
@@ -38,13 +39,13 @@ public class SciNotesContents extends JPanel {
         super(new BorderLayout());
         stp = new ScilabTabbedPane(editor);
         add(stp);
-       addFocusListener(new FocusListener() {
-                public void focusGained(FocusEvent e) {
-                    editor.getTextPane().requestFocus();
-                }
-               
-                public void focusLost(FocusEvent e) { }
-            });
+        addFocusListener(new FocusListener() {
+            public void focusGained(FocusEvent e) {
+                editor.getTextPane().requestFocus();
+            }
+
+            public void focusLost(FocusEvent e) { }
+        });
     }
 
     /**
index 7d8b6c5..5459e04 100644 (file)
@@ -28,6 +28,7 @@ import javax.swing.plaf.basic.BasicScrollBarUI;
  * A ScrollPane where the vertical scrollbar can contains marks to indicate particular positions in the document.
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabScrollPane extends JScrollPane {
 
     private static final Color MARKCOLOR = new Color(229, 192, 0);
index e1de156..e65e641 100644 (file)
@@ -73,6 +73,7 @@ import org.scilab.modules.scinotes.actions.SaveAction;
  * Class for a tabbedpane with close-button
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabTabbedPane extends JTabbedPane implements DragGestureListener,
     DragSourceListener,
     DropTargetListener,
index ce6a576..f96bf36 100644 (file)
@@ -75,6 +75,7 @@ import org.w3c.dom.NodeList;
  * Class SearchFile: open a window with a JTree to show the results of a search in files.
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SearchFile extends SwingScilabTab {
 
     public static final String SEARCHDONE = "SearchFile.SearchDone";
index 261d168..02e9c3b 100644 (file)
@@ -15,6 +15,7 @@ package org.scilab.modules.types;
 /**
  * Exception which can occurred when a Sparse matrix is created
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabSparseException extends Exception {
 
     /**
index 43f5b94..49c4ff6 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class BooleanFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.BOOLEAN;
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.BOOLEAN;
 
-       /**
-        * Constructor
-        * 
-        */
-       public BooleanFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new BooleanFilteringAction());
-               return menu;
-       }
+    /**
+     * Constructor
+     *
+     */
+    public BooleanFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new BooleanFilteringAction());
+        return menu;
+    }
 
 }
 
index 3f1ae65..02e4ee4 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class CompiledFunctionFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.COMPILED_FUNC;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.COMPILED_FUNC;
 
-       /**
-        * Constructor
-        * 
-        */
-       public CompiledFunctionFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new CompiledFunctionFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public CompiledFunctionFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new CompiledFunctionFilteringAction());
+        return menu;
+    }
 
 }
\ No newline at end of file
index de692ba..1d0d9cc 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class DoubleFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.DOUBLE;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.DOUBLE;
 
-       /**
-        * Constructor
-        * 
-        */
-       public DoubleFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new DoubleFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public DoubleFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new DoubleFilteringAction());
+        return menu;
+    }
 
 }
index 373e635..35835fc 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class FunctionLibFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.FUNCTIONLIB;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.FUNCTIONLIB;
 
-       /**
-        * Constructor
-        * 
-        */
-       public FunctionLibFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new FunctionLibFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public FunctionLibFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new FunctionLibFilteringAction());
+        return menu;
+    }
 
 }
\ No newline at end of file
index 0a3e537..94021be 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class GraphicHandlesFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.GRAPHIC_HANDLES;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.GRAPHIC_HANDLES;
 
-       /**
-        * Constructor
-        * 
-        */
-       public GraphicHandlesFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new GraphicHandlesFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public GraphicHandlesFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new GraphicHandlesFilteringAction());
+        return menu;
+    }
 
 }
index a2b1354..15c7b62 100644 (file)
@@ -15,27 +15,28 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class IntegerFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.INTEGER;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.INTEGER;
 
-       /**
-        * Constructor
-        * 
-        */
-       public IntegerFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new IntegerFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public IntegerFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new IntegerFilteringAction());
+        return menu;
+    }
 
 }
 
index cdc7ca4..6b80f50 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class ListFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.LIST;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.LIST;
 
-       /**
-        * Constructor
-        * 
-        */
-       public ListFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new ListFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public ListFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new ListFilteringAction());
+        return menu;
+    }
 
 }
\ No newline at end of file
index 9e2de9c..f272701 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class MListFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.MLIST;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.MLIST;
 
-       /**
-        * Constructor
-        * 
-        */
-       public MListFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new MListFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public MListFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new MListFilteringAction());
+        return menu;
+    }
 
 }
\ No newline at end of file
index c642439..eb386be 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class PointerFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.POINTER;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.POINTER;
 
-       /**
-        * Constructor
-        * 
-        */
-       public PointerFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new PointerFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public PointerFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new PointerFilteringAction());
+        return menu;
+    }
 
 }
\ No newline at end of file
index 6d6a8f6..096a63e 100644 (file)
@@ -15,25 +15,26 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
-public class PolynomialFilteringAction extends FilteringAction{
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.POLYNOMIAL;
-       
+@SuppressWarnings(value = { "serial" })
+public class PolynomialFilteringAction extends FilteringAction {
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.POLYNOMIAL;
 
-       /**
-        * Constructor
-        * 
-        */
-       public PolynomialFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new PolynomialFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public PolynomialFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new PolynomialFilteringAction());
+        return menu;
+    }
 }
index 4a503f2..9f99847 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class ScilabVarFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.SCILABVAR;
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.SCILABVAR;
 
-       /**
-        * Constructor
-        * 
-        */
-       public ScilabVarFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new ScilabVarFilteringAction());
-               return menu;
-       }
+    /**
+     * Constructor
+     *
+     */
+    public ScilabVarFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new ScilabVarFilteringAction());
+        return menu;
+    }
 
 }
 
index aedec9d..02c2e87 100644 (file)
@@ -22,6 +22,7 @@ import org.scilab.modules.gui.utils.ScilabSwingUtilities;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 import org.scilab.modules.ui_data.variablebrowser.ScilabVariableBrowser;
 
+@SuppressWarnings(value = { "serial" })
 public class ScilabVarFilteringButtonAction extends CommonCallBack {
     /** Name of the action */
     public static final String NAME = UiDataMessages.SCILABVAR;
index b7294af..f4fee46 100644 (file)
@@ -15,25 +15,26 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
-public class StringFilteringAction extends FilteringAction{
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.STRING;
-       
+@SuppressWarnings(value = { "serial" })
+public class StringFilteringAction extends FilteringAction {
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.STRING;
 
-       /**
-        * Constructor
-        * 
-        */
-       public StringFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new StringFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public StringFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new StringFilteringAction());
+        return menu;
+    }
 }
index c770694..b749424 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class TListFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.TLIST;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.TLIST;
 
-       /**
-        * Constructor
-        * 
-        */
-       public TListFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new TListFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public TListFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new TListFilteringAction());
+        return menu;
+    }
 
 }
\ No newline at end of file
index 58e555a..b15089d 100644 (file)
@@ -15,26 +15,27 @@ package org.scilab.modules.ui_data.actions;
 import org.scilab.modules.gui.checkboxmenuitem.CheckBoxMenuItem;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 
+@SuppressWarnings(value = { "serial" })
 public class UncompiledFunctionFilteringAction extends FilteringAction {
-       /** Name of the action */
-       public static final String NAME = UiDataMessages.UNCOMPILED_FUNC;
-       
+    /** Name of the action */
+    public static final String NAME = UiDataMessages.UNCOMPILED_FUNC;
 
-       /**
-        * Constructor
-        * 
-        */
-       public UncompiledFunctionFilteringAction() {
-               super();
-       }
-       /**
-        * Create checkbox menu for the graph menu bar
-        * 
-        * @return the menu
-        */
-       public static CheckBoxMenuItem createCheckBoxMenu() {
-               CheckBoxMenuItem menu = createCheckBoxMenu( new UncompiledFunctionFilteringAction());
-               return menu;
-       }
+
+    /**
+     * Constructor
+     *
+     */
+    public UncompiledFunctionFilteringAction() {
+        super();
+    }
+    /**
+     * Create checkbox menu for the graph menu bar
+     *
+     * @return the menu
+     */
+    public static CheckBoxMenuItem createCheckBoxMenu() {
+        CheckBoxMenuItem menu = createCheckBoxMenu( new UncompiledFunctionFilteringAction());
+        return menu;
+    }
 
 }
index c748a37..2134b5c 100644 (file)
@@ -38,6 +38,7 @@ import org.scilab.modules.ui_data.variableeditor.undo.CellsUndoableEdit;
  * @author Allan SIMON
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SwingEditvarTableModel extends DefaultTableModel {
 
     private static final long serialVersionUID = -4255704246347716837L;
@@ -747,7 +748,7 @@ public class SwingEditvarTableModel extends DefaultTableModel {
         } else if (type.equals(EditVar.INTEGER)) {
             ret = new Integer(0);
         } else if (type.equals(EditVar.COMPLEX)) {
-            ret = new Double[]{0.0, 0.0};
+            ret = new Double[] {0.0, 0.0};
         } else if (type.equals(EditVar.BOOLEAN)) {
             ret = Boolean.FALSE;
         } else if (type.equals(EditVar.SPARSE) || type.equals(EditVar.COMPLEXSPARSE) || type.equals(EditVar.BOOLEANSPARSE)) {
@@ -807,21 +808,21 @@ public class SwingEditvarTableModel extends DefaultTableModel {
     private void execCommand(final String com, final Object oldValue, final int row, final int col) {
         try {
             CommonCallBack callback = new CommonCallBack("") {
-                    public void callBack() {
-                        editor.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
-                        if (oldValue != null) {
-                            Object newValue;
-                            if (oldValue instanceof Vector) {
-                                newValue = (Vector) dataVector.clone();
-                            } else {
-                                newValue = getValueAt(row, col);
-                            }
-                            if (!oldValue.equals(newValue)) {
-                                undoManager.addEdit(new CellsUndoableEdit(SwingEditvarTableModel.this, newValue, oldValue, row, col));
-                            }
+                public void callBack() {
+                    editor.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+                    if (oldValue != null) {
+                        Object newValue;
+                        if (oldValue instanceof Vector) {
+                            newValue = (Vector) dataVector.clone();
+                        } else {
+                            newValue = getValueAt(row, col);
+                        }
+                        if (!oldValue.equals(newValue)) {
+                            undoManager.addEdit(new CellsUndoableEdit(SwingEditvarTableModel.this, newValue, oldValue, row, col));
                         }
                     }
-                };
+                }
+            };
             editor.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
             ScilabInterpreterManagement.asynchronousScilabExec(callback, com);
         } catch (InterpreterException e1) {
index e76ccdb..4fcd17a 100644 (file)
@@ -27,6 +27,7 @@ import org.scilab.modules.gui.pushbutton.PushButton;
  * A JPanel containing the different elements composing the File Browser
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabFileBrowserComponent extends JPanel {
 
     private static final int GAP = 3;
@@ -60,10 +61,10 @@ public class ScilabFileBrowserComponent extends JPanel {
      */
     public void setBaseDir(final String baseDir) {
         SwingUtilities.invokeLater(new Runnable() {
-                public void run() {
-                    stt.setBaseDir(baseDir);
-                }
-            });
+            public void run() {
+                stt.setBaseDir(baseDir);
+            }
+        });
     }
 
     /**
index 9fdaf0f..130240f 100644 (file)
@@ -35,6 +35,7 @@ import org.scilab.modules.gui.utils.ScilabSwingUtilities;
  * The File Browser history
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabFileBrowserHistory {
 
     private static final String PREVIOUSICON = ScilabSwingUtilities.findIcon("go-previous");
index 10c6d5e..eb64a83 100644 (file)
@@ -47,6 +47,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  *
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabFileSelectorComboBox extends JComboBox implements DocumentListener {
 
     private static final FileFilter DIRFILTER = new FileFilter() {
@@ -101,7 +102,7 @@ public class ScilabFileSelectorComboBox extends JComboBox implements DocumentLis
                 int code = e.getKeyCode();
                 if (code == KeyEvent.VK_DOWN || code == KeyEvent.VK_KP_DOWN || code == KeyEvent.VK_PAGE_DOWN
                         || code == KeyEvent.VK_UP || code == KeyEvent.VK_KP_UP || code == KeyEvent.VK_PAGE_UP
-                        || code == KeyEvent.VK_END || code == KeyEvent.VK_BEGIN) {
+                || code == KeyEvent.VK_END || code == KeyEvent.VK_BEGIN) {
                     disableUpdateCombo = true;
                 } else {
                     disableUpdateCombo = false;
@@ -381,11 +382,11 @@ public class ScilabFileSelectorComboBox extends JComboBox implements DocumentLis
                 if (isWindows) {
                     char c = Character.toLowerCase(strs[0][i]);
                     j = 1;
-                    for (;j < strs.length && Character.toLowerCase(strs[j][i]) == c; j++);
+                    for (; j < strs.length && Character.toLowerCase(strs[j][i]) == c; j++);
                 } else {
                     char c = strs[0][i];
                     j = 1;
-                    for (;j < strs.length && strs[j][i] == c; j++);
+                    for (; j < strs.length && strs[j][i] == c; j++);
                 }
             }
 
@@ -491,7 +492,7 @@ public class ScilabFileSelectorComboBox extends JComboBox implements DocumentLis
                 int len = trueName.length();
                 if (len != 0) {
                     if (len == 1) {
-                        bound = new String(new char[]{(char) (trueName.charAt(0) + 1)});
+                        bound = new String(new char[] {(char) (trueName.charAt(0) + 1)});
                     } else {
                         bound = trueName.substring(0, len - 1);
                         bound += (char) (trueName.charAt(len - 1) + 1);
index dde7f02..8162675 100644 (file)
@@ -46,6 +46,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  * A panel with file filter and the combo to set the cwd.
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabFileSelectorFilter extends JPanel {
 
     private static boolean isWindows = (OS.get() == OS.WINDOWS);
@@ -80,11 +81,11 @@ public class ScilabFileSelectorFilter extends JPanel {
         setFocusTraversalPolicy(new ContainerOrderFocusTraversalPolicy());
 
         validate = new JButton(new CommonCallBack(null) {
-                @Override
-                public void callBack() {
-                    stt.setFilter(getPattern());
-                }
-            });
+            @Override
+            public void callBack() {
+                stt.setFilter(getPattern());
+            }
+        });
         validate.setIcon(VALIDATE);
 
         caseSensitive = new JCheckBox(UiDataMessages.CASESENSITIVE, !isWindows);
@@ -181,11 +182,11 @@ public class ScilabFileSelectorFilter extends JPanel {
             addFocusListener(this);
             getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "ENTER");
             getActionMap().put("ENTER", new CommonCallBack(null) {
-                    @Override
-                    public void callBack() {
-                        stt.setFilter(getPattern());
-                    }
-                });
+                @Override
+                public void callBack() {
+                    stt.setFilter(getPattern());
+                }
+            });
             toggleContents();
         }
 
index 8e9670f..418ada5 100644 (file)
@@ -24,6 +24,7 @@ import org.scilab.modules.ui_data.filebrowser.actions.ChangeCWDAction;
  * The JPanel containing the combobox used to set the path and the two buttons
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabFileSelectorPanel extends JPanel {
 
     private SwingScilabTreeTable table;
index 3558f65..4199327 100644 (file)
@@ -39,6 +39,7 @@ import org.scilab.modules.gui.events.callback.CommonCallBack;
 /**
  * The table renderer to render the tree in the first column of the JTable
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabTreeTableCellRenderer extends JTree implements TableCellRenderer {
 
     private SwingScilabTreeTable table;
@@ -103,17 +104,17 @@ public class ScilabTreeTableCellRenderer extends JTree implements TableCellRende
                 TreePath selPath = getPathForLocation(e.getX(), e.getY());
                 if (selRow != -1) {
                     switch (e.getClickCount()) {
-                    case 1 :
-                        /*int sel = SwingScilabTreeTable.this.getSelectedRow();
-                              System.out.println(sel+":::"+selRow+":::"+isEditable());
-                              if (sel == selRow) {
-                              System.out.println(getCellEditor().getTreeCellEditorComponent(ScilabTreeTableCellRenderer.this, getCellEditor().getCellEditorValue(), true, false, true, selRow));
-                              }
-                              e.consume();*/
-                        break;
-                    case 2:
-                        ((CommonCallBack) ScilabTreeTableCellRenderer.this.table.getActionMap().get("validate")).callBack();
-                        e.consume();
+                        case 1 :
+                            /*int sel = SwingScilabTreeTable.this.getSelectedRow();
+                                  System.out.println(sel+":::"+selRow+":::"+isEditable());
+                                  if (sel == selRow) {
+                                  System.out.println(getCellEditor().getTreeCellEditorComponent(ScilabTreeTableCellRenderer.this, getCellEditor().getCellEditorValue(), true, false, true, selRow));
+                                  }
+                                  e.consume();*/
+                            break;
+                        case 2:
+                            ((CommonCallBack) ScilabTreeTableCellRenderer.this.table.getActionMap().get("validate")).callBack();
+                            e.consume();
                     }
                 }
             }
index db38357..02539cd 100644 (file)
@@ -23,6 +23,7 @@ import javax.swing.event.TreeExpansionListener;
  * The tree table model abstract implementation
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabTreeTableModelAdapter extends AbstractTableModel {
 
     private JTree tree;
@@ -37,13 +38,13 @@ public class ScilabTreeTableModelAdapter extends AbstractTableModel {
         this.tree = tree;
         this.treeTableModel = treeTableModel;
         tree.addTreeExpansionListener(new TreeExpansionListener() {
-                public void treeExpanded(TreeExpansionEvent event) {
-                    fireTableDataChanged();
-                }
-                public void treeCollapsed(TreeExpansionEvent event) {
-                    fireTableDataChanged();
-                }
-            });
+            public void treeExpanded(TreeExpansionEvent event) {
+                fireTableDataChanged();
+            }
+            public void treeCollapsed(TreeExpansionEvent event) {
+                fireTableDataChanged();
+            }
+        });
     }
 
     /**
index b2ce935..5093e20 100644 (file)
@@ -63,6 +63,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  * The tree table model abstract implementation
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class SwingScilabTreeTable extends JTable {
 
     private static final Insets INSETS = new Insets(0, 2, 0, 0);
@@ -154,7 +155,7 @@ public class SwingScilabTreeTable extends JTable {
         setAutoResizeMode(AUTO_RESIZE_NEXT_COLUMN);
 
         try {
-            isLocationInExpandControl = BasicTreeUI.class.getDeclaredMethod("isLocationInExpandControl", new Class[]{TreePath.class, int.class, int.class});
+            isLocationInExpandControl = BasicTreeUI.class.getDeclaredMethod("isLocationInExpandControl", new Class[] {TreePath.class, int.class, int.class});
             isLocationInExpandControl.setAccessible(true);
         } catch (NoSuchMethodException e) { }
 
index cf07116..70b3b70 100644 (file)
@@ -31,6 +31,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  * Change cwd action
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ChangeCWDAction extends CommonCallBack {
 
     private SwingScilabTreeTable table;
@@ -57,19 +58,19 @@ public class ChangeCWDAction extends CommonCallBack {
     public JButton createButton() {
         PushButton button = ScilabPushButton.createPushButton();
         button.setCallback(new CommonCallBack(null) {
-                public void callBack() {
-                    SwingScilabFileChooser filechooser = new SwingScilabFileChooser();
-                    filechooser.setCurrentDirectory(new File(table.getComboBox().getBaseDir()));
-                    filechooser.setTitle(UiDataMessages.SELECTADIR);
-                    filechooser.setMultipleSelection(false);
-                    filechooser.setDirectorySelectionOnly();
-                    filechooser.displayAndWait();
-                    String[] paths = filechooser.getSelection();
-                    if (paths != null && paths.length != 0) {
-                        changeDir(paths[0]);
-                    }
+            public void callBack() {
+                SwingScilabFileChooser filechooser = new SwingScilabFileChooser();
+                filechooser.setCurrentDirectory(new File(table.getComboBox().getBaseDir()));
+                filechooser.setTitle(UiDataMessages.SELECTADIR);
+                filechooser.setMultipleSelection(false);
+                filechooser.setDirectorySelectionOnly();
+                filechooser.displayAndWait();
+                String[] paths = filechooser.getSelection();
+                if (paths != null && paths.length != 0) {
+                    changeDir(paths[0]);
                 }
-            });
+            }
+        });
         ((SwingScilabPushButton) button.getAsSimplePushButton()).setIcon(FileUtils.getClosedDirIcon());
 
         return (SwingScilabPushButton) button.getAsSimplePushButton();
@@ -81,16 +82,16 @@ public class ChangeCWDAction extends CommonCallBack {
     public JButton createParentDirButton() {
         PushButton button = ScilabPushButton.createPushButton();
         button.setCallback(new CommonCallBack(null) {
-                public void callBack() {
-                    File f = new File(table.getComboBox().getBaseDir());
-                    if (f.exists()) {
-                        File parent = f.getParentFile();
-                        if (parent != null && parent.exists() && parent.canRead()) {
-                            changeDir(parent.getAbsolutePath());
-                        }
+            public void callBack() {
+                File f = new File(table.getComboBox().getBaseDir());
+                if (f.exists()) {
+                    File parent = f.getParentFile();
+                    if (parent != null && parent.exists() && parent.canRead()) {
+                        changeDir(parent.getAbsolutePath());
                     }
                 }
-            });
+            }
+        });
         ((SwingScilabPushButton) button.getAsSimplePushButton()).setIcon(FileUtils.getUpDirIcon());
 
         return (SwingScilabPushButton) button.getAsSimplePushButton();
index 51cd982..a366975 100644 (file)
@@ -28,6 +28,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  * Close action
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class CloseAction extends CommonCallBack {
 
     private static final KeyStroke KEY = ScilabKeyStroke.getKeyStroke("OSSCKEY W");
index 888f9c9..cf28565 100644 (file)
@@ -28,6 +28,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  * Action to edit a file with the default associated application
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class EditFileWithDefaultAppAction extends CommonCallBack {
 
     private static final boolean isWindows = (OS.get() == OS.WINDOWS);
index b6b5e2c..c1ecdaa 100644 (file)
@@ -28,6 +28,7 @@ import org.scilab.modules.ui_data.filebrowser.SwingScilabTreeTable;
  * @author Calixte DENIZET
  */
 
+@SuppressWarnings(value = { "serial" })
 public class ExecuteCommandAction extends CommonCallBack {
 
     private SwingScilabTreeTable table;
index 2b05fee..b217659 100644 (file)
@@ -18,6 +18,7 @@ import org.scilab.modules.ui_data.filebrowser.SwingScilabTreeTable;
  * Action to execute the file in the console
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ExecuteFileInConsoleAction extends ExecuteCommandAction {
 
     private static final String EXEC = "exec('%s',-1)";
index 11732d1..ddd80dd 100644 (file)
@@ -18,6 +18,7 @@ import org.scilab.modules.ui_data.filebrowser.SwingScilabTreeTable;
  * Action to execute the file in Xcos
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ExecuteFileInXcosAction extends ExecuteCommandAction {
 
     private static final String XCOS = "xcos('%s')";
index dec5831..e70b799 100644 (file)
@@ -28,6 +28,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  * Action to go to user-home
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class GoToHomeAction extends CommonCallBack {
 
     /**
index 5b11f26..c769908 100644 (file)
@@ -27,6 +27,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  * Action to go to SCI
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class GoToSCIAction extends CommonCallBack {
 
     /**
index f7dd34e..88a6481 100644 (file)
@@ -18,6 +18,7 @@ import org.scilab.modules.ui_data.filebrowser.SwingScilabTreeTable;
  * Action to load the file as a graph
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class LoadFileAsGraphAction extends ExecuteCommandAction {
 
     private static final String LOADGRAPH = "load_graph('%s')";
index 3ce20a8..027edc8 100644 (file)
@@ -18,6 +18,7 @@ import org.scilab.modules.ui_data.filebrowser.SwingScilabTreeTable;
  * Action to load the file in Scilab
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class LoadFileInScilabAction extends ExecuteCommandAction {
 
     private static final String LOAD = "load('%s')";
index 4d67501..73f2a7f 100644 (file)
@@ -22,6 +22,7 @@ import org.scilab.modules.ui_data.filebrowser.SwingScilabTreeTable;
  * Action to open the file in SciNotes
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class OpenFileInSciNotesAction extends CommonCallBack {
 
     private SwingScilabTreeTable table;
@@ -63,8 +64,10 @@ public class OpenFileInSciNotesAction extends CommonCallBack {
                     Thread t = new Thread(new Runnable() {
                         public void run() {
                             try {
-                                scin.invoke(null, new Object[]{path});
-                            } catch (Exception e) { e.printStackTrace(); }
+                                scin.invoke(null, new Object[] {path});
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
                         }
                     });
                     try {
index d59d45b..d6150e8 100644 (file)
@@ -27,6 +27,7 @@ import org.scilab.modules.ui_data.utils.UiDataMessages;
  * Action to open a file with the default associated application
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class OpenFileWithDefaultAppAction extends CommonCallBack {
 
     private SwingScilabTreeTable table;
index e96d306..be12095 100644 (file)
@@ -27,6 +27,7 @@ import org.scilab.modules.ui_data.filebrowser.SwingScilabTreeTable;
  * Action to validate a file
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ValidateAction extends CommonCallBack {
 
     private SwingScilabTreeTable table;
index e93d7e4..b28cac9 100644 (file)
@@ -32,6 +32,7 @@ import javax.swing.table.TableCellRenderer;
 /**
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class HeaderRenderer extends JLabel implements TableCellRenderer {
 
     private static final Insets INSETS = new Insets(1, 1, 1, 0);
@@ -72,20 +73,20 @@ public class HeaderRenderer extends JLabel implements TableCellRenderer {
         setFont(unselectedFont);
         if (!rowModel) {
             setBorder(new AbstractBorder() {
-                    public Insets getBorderInsets(Component c) {
-                        return INSETS;
-                    }
-
-                    public Insets getBorderInsets(Component c, Insets insets) {
-                        return INSETS;
-                    }
-
-                    public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
-                        g.setColor(HeaderRenderer.this.table.getGridColor().darker());
-                        g.drawLine(x, y, x + width, y);
-                        g.drawLine(x, y, x, y + height);
-                    }
-                });
+                public Insets getBorderInsets(Component c) {
+                    return INSETS;
+                }
+
+                public Insets getBorderInsets(Component c, Insets insets) {
+                    return INSETS;
+                }
+
+                public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
+                    g.setColor(HeaderRenderer.this.table.getGridColor().darker());
+                    g.drawLine(x, y, x + width, y);
+                    g.drawLine(x, y, x, y + height);
+                }
+            });
         }
     }
 
index d88338f..33a2220 100644 (file)
@@ -43,6 +43,7 @@ import org.scilab.modules.ui_data.variableeditor.actions.RemoveRowAction;
  * Class for the RowHeader
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class RowHeader extends JPanel implements TableModelListener {
 
     private static final Insets INSETS = new Insets(1, 0, 0, 0);
@@ -61,25 +62,25 @@ public class RowHeader extends JPanel implements TableModelListener {
         this.table = table;
         table.getModel().addTableModelListener(this);
         model = new DefaultTableModel(0, 1) {
-                public boolean isCellEditable(int iRowIndex, int iColumnIndex) {
-                    return false;
-                }
-            };
+            public boolean isCellEditable(int iRowIndex, int iColumnIndex) {
+                return false;
+            }
+        };
         rowTable = new JTable(model);
         setBorder(new AbstractBorder() {
-                public Insets getBorderInsets(Component c) {
-                    return INSETS;
-                }
-
-                public Insets getBorderInsets(Component c, Insets insets) {
-                    return INSETS;
-                }
-
-                public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
-                    g.setColor(table.getGridColor().darker());
-                    g.drawLine(x, y, x + width, y);
-                }
-            });
+            public Insets getBorderInsets(Component c) {
+                return INSETS;
+            }
+
+            public Insets getBorderInsets(Component c, Insets insets) {
+                return INSETS;
+            }
+
+            public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
+                g.setColor(table.getGridColor().darker());
+                g.drawLine(x, y, x + width, y);
+            }
+        });
         rowTable.setDoubleBuffered(true);
         rowTable.setDragEnabled(false);
         rowTable.setGridColor(table.getGridColor().darker());
@@ -96,81 +97,81 @@ public class RowHeader extends JPanel implements TableModelListener {
         add(rowTable);
         doLayout();
         rowTable.addMouseListener(new MouseAdapter() {
-                public void mousePressed(MouseEvent e) {
-                    if (SwingUtilities.isLeftMouseButton(e)) {
-                        int row  = rowTable.rowAtPoint(e.getPoint());
-                        ListSelectionModel rsm = table.getSelectionModel();
-                        int colC = ((SwingEditvarTableModel) ((TableVariableEditor) table).getModel()).getScilabMatrixColCount();
-                        if (colC == 0) {
-                            colC = 1;
-                        }
+            public void mousePressed(MouseEvent e) {
+                if (SwingUtilities.isLeftMouseButton(e)) {
+                    int row  = rowTable.rowAtPoint(e.getPoint());
+                    ListSelectionModel rsm = table.getSelectionModel();
+                    int colC = ((SwingEditvarTableModel) ((TableVariableEditor) table).getModel()).getScilabMatrixColCount();
+                    if (colC == 0) {
+                        colC = 1;
+                    }
 
-                        if (e.isShiftDown()) {
-                            rsm.setSelectionInterval(row, clickedRow);
-                            table.setColumnSelectionInterval(0, colC - 1);
-                        } else {
-                            if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
-                                if (table.isRowSelected(row)) {
-                                    rsm.removeSelectionInterval(row, row);
-                                } else {
-                                    rsm.addSelectionInterval(row, row);
-                                    table.setColumnSelectionInterval(0, colC - 1);
-                                }
+                    if (e.isShiftDown()) {
+                        rsm.setSelectionInterval(row, clickedRow);
+                        table.setColumnSelectionInterval(0, colC - 1);
+                    } else {
+                        if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
+                            if (table.isRowSelected(row)) {
+                                rsm.removeSelectionInterval(row, row);
                             } else {
-                                rsm.setSelectionInterval(row, row);
+                                rsm.addSelectionInterval(row, row);
                                 table.setColumnSelectionInterval(0, colC - 1);
                             }
-                            clickedRow = row;
+                        } else {
+                            rsm.setSelectionInterval(row, row);
+                            table.setColumnSelectionInterval(0, colC - 1);
                         }
-                        table.requestFocus();
+                        clickedRow = row;
                     }
+                    table.requestFocus();
                 }
-            });
+            }
+        });
 
         rowTable.addMouseMotionListener(new MouseMotionAdapter() {
-                public void mouseDragged(MouseEvent e) {
-                    if (SwingUtilities.isLeftMouseButton(e)) {
-                        Point p = e.getPoint();
-                        int row;
-                        if (p.y >= rowTable.getCellRect(rowTable.getRowCount() - 1, 0, false).y) {
-                            row = rowTable.getRowCount() - 1;
-                        } else {
-                            row = rowTable.rowAtPoint(p);
-                        }
+            public void mouseDragged(MouseEvent e) {
+                if (SwingUtilities.isLeftMouseButton(e)) {
+                    Point p = e.getPoint();
+                    int row;
+                    if (p.y >= rowTable.getCellRect(rowTable.getRowCount() - 1, 0, false).y) {
+                        row = rowTable.getRowCount() - 1;
+                    } else {
+                        row = rowTable.rowAtPoint(p);
+                    }
 
-                        ListSelectionModel rsm = table.getSelectionModel();
-                        int lead = rsm.getLeadSelectionIndex();
-                        if (lead != row) {
-                            if (row == rowTable.getRowCount() - 1) {
-                                ((TableVariableEditor) table).addTenRows();
-                            }
-                            table.scrollRectToVisible(table.getCellRect(row, 0, false));
-                            if (e.isShiftDown()) {
-                                rsm.setSelectionInterval(clickedRow, row);
-                            } else {
-                                if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
-                                    if (rsm.isSelectedIndex(row)) {
-                                        rsm.removeSelectionInterval(lead, row);
-                                        rsm.addSelectionInterval(clickedRow, row);
-                                    } else {
-                                        rsm.addSelectionInterval(clickedRow, row);
-                                    }
+                    ListSelectionModel rsm = table.getSelectionModel();
+                    int lead = rsm.getLeadSelectionIndex();
+                    if (lead != row) {
+                        if (row == rowTable.getRowCount() - 1) {
+                            ((TableVariableEditor) table).addTenRows();
+                        }
+                        table.scrollRectToVisible(table.getCellRect(row, 0, false));
+                        if (e.isShiftDown()) {
+                            rsm.setSelectionInterval(clickedRow, row);
+                        } else {
+                            if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
+                                if (rsm.isSelectedIndex(row)) {
+                                    rsm.removeSelectionInterval(lead, row);
+                                    rsm.addSelectionInterval(clickedRow, row);
                                 } else {
-                                    rsm.setSelectionInterval(clickedRow, row);
+                                    rsm.addSelectionInterval(clickedRow, row);
                                 }
+                            } else {
+                                rsm.setSelectionInterval(clickedRow, row);
                             }
+                        }
 
-                            int colC = ((SwingEditvarTableModel) ((TableVariableEditor) table).getModel()).getScilabMatrixColCount();
-                            if (colC == 0) {
-                                colC = 1;
-                            }
-                            table.setColumnSelectionInterval(0, colC - 1);
-
-                            table.requestFocus();
+                        int colC = ((SwingEditvarTableModel) ((TableVariableEditor) table).getModel()).getScilabMatrixColCount();
+                        if (colC == 0) {
+                            colC = 1;
                         }
+                        table.setColumnSelectionInterval(0, colC - 1);
+
+                        table.requestFocus();
                     }
                 }
-            });
+            }
+        });
     }
 
     /**
@@ -178,11 +179,11 @@ public class RowHeader extends JPanel implements TableModelListener {
      */
     public JPopupMenu createPopupMenu() {
         JPopupMenu popup = new JPopupMenu() {
-                public void show(Component invoker, int x, int y) {
-                    ((TableVariableEditor) table).setPopupRow(rowTable.rowAtPoint(new Point(x, y)));
-                    super.show(invoker, x, y);
-                }
-            };
+            public void show(Component invoker, int x, int y) {
+                ((TableVariableEditor) table).setPopupRow(rowTable.rowAtPoint(new Point(x, y)));
+                super.show(invoker, x, y);
+            }
+        };
         popup.setBorderPainted(true);
         popup.add(InsertRowAction.createMenuItem(table, UiDataMessages.INSERTR));
         popup.add(RemoveRowAction.createMenuItem(table, UiDataMessages.REMOVER));
index 4745635..d564015 100644 (file)
@@ -28,6 +28,7 @@ import javax.swing.table.TableCellEditor;
 /**
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class RowHeaderCellEditor extends AbstractCellEditor implements TableCellEditor {
 
     private JLabel label;
@@ -38,17 +39,17 @@ public class RowHeaderCellEditor extends AbstractCellEditor implements TableCell
      * @param table the table where to put the rowHeader
      */
     public RowHeaderCellEditor(final JTable table) {
-       label = new JLabel();
-       JTableHeader header = table.getTableHeader();
-       label.setOpaque(true);
-       label.setBorder(BorderFactory.createEmptyBorder());
-       label.setHorizontalAlignment(JLabel.CENTER);
-       label.setForeground(UIManager.getColor("textHighlightText"));
-       label.setFont(header.getFont().deriveFont(Font.BOLD));
+        label = new JLabel();
+        JTableHeader header = table.getTableHeader();
+        label.setOpaque(true);
+        label.setBorder(BorderFactory.createEmptyBorder());
+        label.setHorizontalAlignment(JLabel.CENTER);
+        label.setForeground(UIManager.getColor("textHighlightText"));
+        label.setFont(header.getFont().deriveFont(Font.BOLD));
 
-       Color selected = UIManager.getColor("Table.selectionBackground");
-       float[] hsb = Color.RGBtoHSB(selected.getRed(), selected.getGreen(), selected.getBlue(), null);
-       label.setBackground(Color.getHSBColor(hsb[0], 1, hsb[2]));
+        Color selected = UIManager.getColor("Table.selectionBackground");
+        float[] hsb = Color.RGBtoHSB(selected.getRed(), selected.getGreen(), selected.getBlue(), null);
+        label.setBackground(Color.getHSBColor(hsb[0], 1, hsb[2]));
     }
 
     /**
@@ -63,7 +64,7 @@ public class RowHeaderCellEditor extends AbstractCellEditor implements TableCell
      */
     public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int col) {
         this.row = row;
-       label.setText(Integer.toString(row + 1));
+        label.setText(Integer.toString(row + 1));
 
         return label;
     }
index 9c6dd62..af16ae5 100644 (file)
@@ -33,6 +33,7 @@ import org.scilab.modules.ui_data.rowheader.RowHeader;
 /**
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class RowHeaderRenderer extends JLabel implements TableCellRenderer {
 
     private int index;
@@ -43,41 +44,41 @@ public class RowHeaderRenderer extends JLabel implements TableCellRenderer {
      * Constructor
      */
     public RowHeaderRenderer(JTable table, boolean rowModel) {
-       this.table = table;
-       this.rowModel = rowModel;
-       JTableHeader header = table.getTableHeader();
-       setOpaque(true);
-       setBorder(BorderFactory.createEmptyBorder());
-       setHorizontalAlignment(CENTER);
-       setForeground(header.getForeground());
-       setBackground(header.getBackground());
-       setFont(header.getFont());
-       if (!rowModel) {
-           setBorder(BorderFactory.createLineBorder(table.getGridColor().darker(), 1));
-       }
+        this.table = table;
+        this.rowModel = rowModel;
+        JTableHeader header = table.getTableHeader();
+        setOpaque(true);
+        setBorder(BorderFactory.createEmptyBorder());
+        setHorizontalAlignment(CENTER);
+        setForeground(header.getForeground());
+        setBackground(header.getBackground());
+        setFont(header.getFont());
+        if (!rowModel) {
+            setBorder(BorderFactory.createLineBorder(table.getGridColor().darker(), 1));
+        }
     }
 
     public void paintComponent(Graphics g) {
-       JTableHeader header = table.getTableHeader();
-       ListSelectionModel lsm;
-       if (rowModel) {
-           lsm = table.getSelectionModel();
-       } else {
-           lsm = table.getColumnModel().getSelectionModel();
-       }
+        JTableHeader header = table.getTableHeader();
+        ListSelectionModel lsm;
+        if (rowModel) {
+            lsm = table.getSelectionModel();
+        } else {
+            lsm = table.getColumnModel().getSelectionModel();
+        }
 
-       if (lsm.isSelectedIndex(index)) {
-           Color c = UIManager.getColor("Table.selectionBackground");
-           float[] hsb = Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), null);
-           setBackground(Color.getHSBColor(hsb[0], 1, hsb[2]));
-           setFont(header.getFont().deriveFont(Font.BOLD));
-           setForeground(UIManager.getColor("textHighlightText"));
-       } else {
-           setForeground(header.getForeground());
-           setBackground(header.getBackground());
-           setFont(header.getFont());
-       }
-       super.paintComponent(g);
+        if (lsm.isSelectedIndex(index)) {
+            Color c = UIManager.getColor("Table.selectionBackground");
+            float[] hsb = Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), null);
+            setBackground(Color.getHSBColor(hsb[0], 1, hsb[2]));
+            setFont(header.getFont().deriveFont(Font.BOLD));
+            setForeground(UIManager.getColor("textHighlightText"));
+        } else {
+            setForeground(header.getForeground());
+            setBackground(header.getBackground());
+            setFont(header.getFont());
+        }
+        super.paintComponent(g);
     }
 
     /**
@@ -85,13 +86,13 @@ public class RowHeaderRenderer extends JLabel implements TableCellRenderer {
      */
     public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
         if (rowModel) {
-           this.index = row;
-       } else {
-           this.index = column;
-       }
+            this.index = row;
+        } else {
+            this.index = column;
+        }
 
         setText(Integer.toString(index + 1));
-       
+
         return this;
     }
 }
index 3923539..7aea433 100644 (file)
@@ -9,6 +9,7 @@ import org.scilab.modules.ui_data.actions.DefaultAction;
 import org.scilab.modules.ui_data.utils.UiDataMessages;
 import org.scilab.modules.ui_data.variablebrowser.ScilabVariableBrowser;
 
+@SuppressWarnings(value = { "serial" })
 public class CloseAction extends DefaultAction {
 
     /** Name of the action */
index 9322ba5..501d5ff 100644 (file)
@@ -55,6 +55,7 @@ import org.scilab.modules.gui.events.callback.CommonCallBack;
  * Class for a tabbedpane with close-button
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class ScilabTabbedPane extends JTabbedPane implements DragGestureListener,
     DragSourceListener,
     DropTargetListener,
index c019f80..b6cfae5 100644 (file)
@@ -55,6 +55,7 @@ import org.scilab.modules.ui_data.variableeditor.actions.RemoveColumnAction;
  * The table
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class TableVariableEditor extends JTable {
 
     private JScrollPane scrollPane;
@@ -74,114 +75,114 @@ public class TableVariableEditor extends JTable {
         scrollPane = new JScrollPane(this);
         /* Modify the table size when the knob is at the bottom of the vertical scrollbar */
         scrollPane.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {
-                public void adjustmentValueChanged(AdjustmentEvent e) {
-                    BoundedRangeModel brm = scrollPane.getVerticalScrollBar().getModel();
-                    if (brm.getMaximum() - brm.getExtent() - e.getValue() <= 1) {
-                        addTenRows();
-                    }
+            public void adjustmentValueChanged(AdjustmentEvent e) {
+                BoundedRangeModel brm = scrollPane.getVerticalScrollBar().getModel();
+                if (brm.getMaximum() - brm.getExtent() - e.getValue() <= 1) {
+                    addTenRows();
                 }
-            });
+            }
+        });
 
         /* Modify the table size when the knob is at the right of the horizontal scrollbar */
         scrollPane.getHorizontalScrollBar().addAdjustmentListener(new AdjustmentListener() {
-                public void adjustmentValueChanged(AdjustmentEvent e) {
-                    BoundedRangeModel brm = scrollPane.getHorizontalScrollBar().getModel();
-                    if (brm.getMaximum() - brm.getExtent() - e.getValue() <= 1) {
-                        addTenCols();
-                    }
+            public void adjustmentValueChanged(AdjustmentEvent e) {
+                BoundedRangeModel brm = scrollPane.getHorizontalScrollBar().getModel();
+                if (brm.getMaximum() - brm.getExtent() - e.getValue() <= 1) {
+                    addTenCols();
                 }
-            });
+            }
+        });
 
         /* Modify the table size when the scrollpane is resized */
         scrollPane.getViewport().addComponentListener(new ComponentAdapter() {
-                public void componentResized(ComponentEvent e) {
-                    if (((SwingEditvarTableModel) getModel()).enlarge(getMinimalRowNumber() + 1, getMinimalColumnNumber() + 1)) {
-                        ((SwingEditvarTableModel) getModel()).fireTableChanged(new TableModelEvent(getModel()));
-                    }
+            public void componentResized(ComponentEvent e) {
+                if (((SwingEditvarTableModel) getModel()).enlarge(getMinimalRowNumber() + 1, getMinimalColumnNumber() + 1)) {
+                    ((SwingEditvarTableModel) getModel()).fireTableChanged(new TableModelEvent(getModel()));
                 }
-            });
+            }
+        });
 
         getTableHeader().setDefaultRenderer(new HeaderRenderer(this, false));
 
         /* Handle left click on the column header */
         getTableHeader().addMouseListener(new MouseAdapter() {
-                public void mousePressed(MouseEvent e) {
-                    if (getTableHeader().getCursor().getType() == Cursor.DEFAULT_CURSOR && SwingUtilities.isLeftMouseButton(e)) {
-                        JTable table = TableVariableEditor.this;
-                        int column = table.getColumnModel().getColumnIndexAtX(e.getX());
-                        ListSelectionModel csm = table.getColumnModel().getSelectionModel();
-                        int rowC = ((SwingEditvarTableModel) getModel()).getScilabMatrixRowCount();
-                        if (rowC == 0) {
-                            rowC = 1;
-                        }
+            public void mousePressed(MouseEvent e) {
+                if (getTableHeader().getCursor().getType() == Cursor.DEFAULT_CURSOR && SwingUtilities.isLeftMouseButton(e)) {
+                    JTable table = TableVariableEditor.this;
+                    int column = table.getColumnModel().getColumnIndexAtX(e.getX());
+                    ListSelectionModel csm = table.getColumnModel().getSelectionModel();
+                    int rowC = ((SwingEditvarTableModel) getModel()).getScilabMatrixRowCount();
+                    if (rowC == 0) {
+                        rowC = 1;
+                    }
 
-                        if (e.isShiftDown()) {
-                            csm.setSelectionInterval(column, clickedColumn);
-                            table.setRowSelectionInterval(0, rowC - 1);
-                        } else {
-                            if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
-                                if (table.isColumnSelected(column)) {
-                                    csm.removeSelectionInterval(column, column);
-                                } else {
-                                    csm.addSelectionInterval(column, column);
-                                    table.setRowSelectionInterval(0, rowC - 1);
-                                }
+                    if (e.isShiftDown()) {
+                        csm.setSelectionInterval(column, clickedColumn);
+                        table.setRowSelectionInterval(0, rowC - 1);
+                    } else {
+                        if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
+                            if (table.isColumnSelected(column)) {
+                                csm.removeSelectionInterval(column, column);
                             } else {
-                                csm.setSelectionInterval(column, column);
+                                csm.addSelectionInterval(column, column);
                                 table.setRowSelectionInterval(0, rowC - 1);
                             }
-                            clickedColumn = column;
+                        } else {
+                            csm.setSelectionInterval(column, column);
+                            table.setRowSelectionInterval(0, rowC - 1);
                         }
-                        table.requestFocus();
+                        clickedColumn = column;
                     }
+                    table.requestFocus();
                 }
-            });
+            }
+        });
 
         /* Handle left-click drag on the column header */
         getTableHeader().addMouseMotionListener(new MouseMotionAdapter() {
-                public void mouseDragged(MouseEvent e) {
-                    if (getTableHeader().getCursor().getType() == Cursor.DEFAULT_CURSOR && SwingUtilities.isLeftMouseButton(e)) {
-                        JTable table = TableVariableEditor.this;
-                        Point p =  e.getPoint();
-                        int column;
-                        if (p.x >= table.getTableHeader().getHeaderRect(table.getColumnCount() - 1).x) {
-                            column = table.getColumnCount() - 1;
-                        } else {
-                            column = table.getColumnModel().getColumnIndexAtX(p.x);
-                        }
+            public void mouseDragged(MouseEvent e) {
+                if (getTableHeader().getCursor().getType() == Cursor.DEFAULT_CURSOR && SwingUtilities.isLeftMouseButton(e)) {
+                    JTable table = TableVariableEditor.this;
+                    Point p =  e.getPoint();
+                    int column;
+                    if (p.x >= table.getTableHeader().getHeaderRect(table.getColumnCount() - 1).x) {
+                        column = table.getColumnCount() - 1;
+                    } else {
+                        column = table.getColumnModel().getColumnIndexAtX(p.x);
+                    }
 
-                        ListSelectionModel csm = table.getColumnModel().getSelectionModel();
-                        int lead = csm.getLeadSelectionIndex();
-                        if (lead != column) {
-                            if (column == getColumnCount() - 1) {
-                                ((TableVariableEditor) table).addTenCols();
-                            }
-                            table.scrollRectToVisible(table.getTableHeader().getHeaderRect(column));
-                            if (e.isShiftDown()) {
-                                csm.setSelectionInterval(clickedColumn, column);
-                            } else {
-                                if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
-                                    if (csm.isSelectedIndex(column)) {
-                                        csm.removeSelectionInterval(lead, column);
-                                        csm.addSelectionInterval(clickedColumn, column);
-                                    } else {
-                                        csm.addSelectionInterval(clickedColumn, column);
-                                    }
+                    ListSelectionModel csm = table.getColumnModel().getSelectionModel();
+                    int lead = csm.getLeadSelectionIndex();
+                    if (lead != column) {
+                        if (column == getColumnCount() - 1) {
+                            ((TableVariableEditor) table).addTenCols();
+                        }
+                        table.scrollRectToVisible(table.getTableHeader().getHeaderRect(column));
+                        if (e.isShiftDown()) {
+                            csm.setSelectionInterval(clickedColumn, column);
+                        } else {
+                            if ((e.getModifiers() & Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0) {
+                                if (csm.isSelectedIndex(column)) {
+                                    csm.removeSelectionInterval(lead, column);
+                                    csm.addSelectionInterval(clickedColumn, column);
                                 } else {
-                                    csm.setSelectionInterval(clickedColumn, column);
+                                    csm.addSelectionInterval(clickedColumn, column);
                                 }
+                            } else {
+                                csm.setSelectionInterval(clickedColumn, column);
                             }
-                            int rowC = ((SwingEditvarTableModel) getModel()).getScilabMatrixRowCount();
-                            if (rowC == 0) {
-                                rowC = 1;
-                            }
-
-                            table.setRowSelectionInterval(0, rowC - 1);
-                            table.requestFocus();
                         }
+                        int rowC = ((SwingEditvarTableModel) getModel()).getScilabMatrixRowCount();
+                        if (rowC == 0) {
+                            rowC = 1;
+                        }
+
+                        table.setRowSelectionInterval(0, rowC - 1);
+                        table.requestFocus();
                     }
                 }
-            });
+            }
+        });
 
         getTableHeader().setReorderingAllowed(false);
         getTableHeader().setComponentPopupMenu(createPopupMenu());
@@ -189,18 +190,18 @@ public class TableVariableEditor extends JTable {
         /* Click on the upper left corner selects all */
         scrollPane.setCorner(JScrollPane.UPPER_LEFT_CORNER, new JPanel());
         scrollPane.getCorner(JScrollPane.UPPER_LEFT_CORNER).addMouseListener(new MouseAdapter() {
-                public void mousePressed(MouseEvent e) {
-                    selectAll();
-                }
-            });
+            public void mousePressed(MouseEvent e) {
+                selectAll();
+            }
+        });
 
         /* Click on the lower left corner clear the selection */
         scrollPane.setCorner(JScrollPane.LOWER_LEFT_CORNER, new JPanel());
         scrollPane.getCorner(JScrollPane.LOWER_LEFT_CORNER).addMouseListener(new MouseAdapter() {
-                public void mousePressed(MouseEvent e) {
-                    clearSelection();
-                }
-            });
+            public void mousePressed(MouseEvent e) {
+                clearSelection();
+            }
+        });
 
         setFillsViewportHeight(true);
         setRowHeight(18);
@@ -270,11 +271,11 @@ public class TableVariableEditor extends JTable {
      */
     public JPopupMenu createPopupMenu() {
         JPopupMenu popup = new JPopupMenu() {
-                public void show(Component invoker, int x, int y) {
-                    setPopupColumn(getColumnModel().getColumnIndexAtX(x));
-                    super.show(invoker, x, y);
-                }
-            };
+            public void show(Component invoker, int x, int y) {
+                setPopupColumn(getColumnModel().getColumnIndexAtX(x));
+                super.show(invoker, x, y);
+            }
+        };
         popup.setBorderPainted(true);
         popup.add(InsertColumnAction.createMenuItem(this, UiDataMessages.INSERTC));
         popup.add(RemoveColumnAction.createMenuItem(this, UiDataMessages.REMOVEC));
index 7d2400c..0a594be 100644 (file)
@@ -21,6 +21,7 @@ import org.scilab.modules.ui_data.variableeditor.SwingScilabVariableEditor;
  * Class CellsUndoManager
  * @author Calixte DENIZET
  */
+@SuppressWarnings(value = { "serial" })
 public class CellsUndoManager extends UndoManager {
 
     private SwingScilabVariableEditor editor;
index 5d9e666..83c98e9 100644 (file)
@@ -116,6 +116,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
  */
 // CSOFF: ClassFanOutComplexity
 // CSOFF: ClassDataAbstractionCoupling
+@SuppressWarnings(value = { "serial" })
 public class XcosTab extends SwingScilabTab implements SimpleTab {
     public static final String DEFAULT_WIN_UUID = "xcos-default-window";
     public static final String DEFAULT_TAB_UUID = "xcos-default-tab";
index 1b5fdbf..b3540ab 100644 (file)
@@ -26,6 +26,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
 /**
  * Display about box for Xcos
  */
+@SuppressWarnings(value = { "serial" })
 public class AboutXcosAction extends DefaultAction {
     /** Name of the action */
     public static final String NAME = XcosMessages.ABOUT_XCOS;
index 8dc9257..42c518b 100644 (file)
@@ -29,6 +29,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
 /**
  * Diagram closing management
  */
+@SuppressWarnings(value = { "serial" })
 public class CloseAction extends DefaultAction {
     /** Name of the action */
     public static final String NAME = XcosMessages.CLOSE;
index 28f116a..4f227c0 100644 (file)
@@ -31,6 +31,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
 /**
  * Diagram compilation management
  */
+@SuppressWarnings(value = { "serial" })
 public class CompileAction extends SimulationNotRunningAction {
     /** Name of the action */
     public static final String NAME = XcosMessages.COMPILE;
index f32df2f..a570e6b 100644 (file)
@@ -2,11 +2,11 @@
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2009 - DIGITEO - Allan SIMON
  * Copyright (C) 2010 - DIGITEO - Clement DAVID
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -25,6 +25,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
 /**
  * Set the debug level
  */
+@SuppressWarnings(value = { "serial" })
 public class DebugLevelAction extends SimulationNotRunningAction {
     /** Name of the action */
     public static final String NAME = XcosMessages.SET_DEBUG;
@@ -81,7 +82,7 @@ public class DebugLevelAction extends SimulationNotRunningAction {
 
     /**
      * Constructor
-     * 
+     *
      * @param scilabGraph
      *            corresponding Scilab Graph
      */
@@ -91,7 +92,7 @@ public class DebugLevelAction extends SimulationNotRunningAction {
 
     /**
      * Action !!!
-     * 
+     *
      * @param e
      *            action parameters
      * @see org.scilab.modules.graph.actions.base.DefaultAction#actionPerformed(java.awt.event.ActionEvent)
@@ -105,9 +106,9 @@ public class DebugLevelAction extends SimulationNotRunningAction {
         if (comp.isEditing()) {
             return;
         }
-        
+
         final DebugLevelDialog dialog = new DebugLevelDialog(
-                graph.getAsComponent(), graph.getScicosParameters());
+            graph.getAsComponent(), graph.getScicosParameters());
 
         dialog.pack();
         dialog.setVisible(true);
index fd56f70..bcdf0b9 100644 (file)
@@ -2,11 +2,11 @@
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
  * Copyright (C) 2010 - DIGITEO - Clement DAVID
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -30,6 +30,7 @@ import com.mxgraph.swing.mxGraphComponent;
 /**
  * Diagram background color changing
  */
+@SuppressWarnings(value = { "serial" })
 public class DiagramBackgroundAction extends DefaultAction {
     /** Name of the action */
     public static final String NAME = XcosMessages.DIAGRAM_BACKGROUND;
@@ -42,7 +43,7 @@ public class DiagramBackgroundAction extends DefaultAction {
 
     /**
      * Constructor
-     * 
+     *
      * @param scilabGraph
      *            associated diagram
      */
@@ -52,7 +53,7 @@ public class DiagramBackgroundAction extends DefaultAction {
 
     /**
      * Menu for diagram menubar
-     * 
+     *
      * @param scilabGraph
      *            associated diagram
      * @return the menu
@@ -75,9 +76,9 @@ public class DiagramBackgroundAction extends DefaultAction {
         if (comp.isEditing()) {
             return;
         }
-        
+
         Color newColor = JColorChooser.showDialog(comp,
-                XcosMessages.DIAGRAM_BACKGROUND, null);
+                         XcosMessages.DIAGRAM_BACKGROUND, null);
 
         if (newColor != null) {
             comp.getViewport().setOpaque(false);
index abd0f4c..c9dbe80 100644 (file)
@@ -31,6 +31,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
  * This action is only used for debugging purpose but not on any release
  * version.
  */
+@SuppressWarnings(value = { "serial" })
 public class DumpAction extends DefaultAction {
     /** Name of the action */
     public static final String NAME = XcosMessages.DUMP;
index 6db760f..826be91 100644 (file)
@@ -53,6 +53,7 @@ import com.mxgraph.util.mxUtils;
 /**
  * Customize the block representation.
  */
+@SuppressWarnings(value = { "serial" })
 public class EditFormatAction extends DefaultAction {
     /**
      * Name of the action
index 96cd01f..5ed85ca 100644 (file)
@@ -33,6 +33,7 @@ import com.mxgraph.util.mxEventObject;
 /**
  * External action
  */
+@SuppressWarnings(value = { "serial" })
 public class ExternalAction extends DefaultAction {
     /** Name of the action */
     public static final String NAME = "";
index 72db88e..76f10ce 100644 (file)
@@ -31,6 +31,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
 /**
  * Launch the modelica compiler configuration TCL UI
  */
+@SuppressWarnings(value = { "serial" })
 public class InitModelicaAction extends DefaultAction {
     /** the name */
     public static final String NAME = XcosMessages.INIT_MODELICA;
index 2eceb75..92fbc12 100644 (file)
@@ -2,11 +2,11 @@
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2009 - DIGITEO - Allan SIMON
  * Copyright (C) 2010 - DIGITEO - Clement DAVID
- * 
+ *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
- * are also available at    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -25,6 +25,7 @@ import org.scilab.modules.xcos.utils.XcosMessages;
 /**
  * Opens context settings Window
  */
+@SuppressWarnings(value = { "serial" })
 public class SetContextAction extends SimulationNotRunningAction {
     /** Name of the action */
     public static final String NAME = XcosMessages.SET_CONTEXT;
@@ -37,7 +38,7 @@ public class SetContextAction extends SimulationNotRunningAction {
 
     /**
      * Constructor
-     * 
+     *
      * @param scilabGraph
      *            corresponding Scilab Graph
      */
@@ -47,7 +48,7 @@ public class SetContextAction extends SimulationNotRunningAction {
 
     /**
      * Create the associated menu
-     * 
+     *
      * @param scilabGraph
      *            corresponding Scilab Graph
      * @return the menu
@@ -58,7 +59,7 @@ public class SetContextAction extends SimulationNotRunningAction {
 
     /**
      * Action !
-     * 
+     *
      * @param e
      *            the event
      * @see org.scilab.modules.gui.events.callback.CallBack#actionPerformed(java.awt.event.ActionEvent)
@@ -72,9 +73,9 @@ public class SetContextAction extends SimulationNotRunningAction {
         if (comp.isEditing()) {
             return;
         }
-        
+
         final SetContextDialog dialog = new SetContextDialog(
-                comp, graph.getScicosParameters());
+            comp, graph.getScicosParameters());