Added the functionality of disabling and enabling the uitable 81/18181/5
rishubhjain [Tue, 24 May 2016 13:44:30 +0000 (06:44 -0700)]
Change-Id: Id361068f18423d3511c83476b71d01472d771fdc

scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/uitable/SwingScilabUiTable.java
scilab/modules/gui/tests/unit_tests/table.dia.ref
scilab/modules/gui/tests/unit_tests/table.tst

index e972407..7999f51 100644 (file)
@@ -430,6 +430,14 @@ public class SwingScilabUiTable extends JScrollPane implements SwingViewObject,
     }
 
     /**
+     * To enable or disable editing on table.
+     * @param status status value either True or False
+     */
+    public void setEnabled(boolean status){
+        uiTable.setEnabled(status);
+    }
+
+    /**
      * Get the UID
      * @return the UID
      */
index 7b5d427..1282262 100644 (file)
@@ -36,3 +36,5 @@ set(h, "string", ["", "c1", "c2", "c3", "c4", "c5";..
                   "", "1.2", "3.2", "43.3", "0", "0.3";..
                   "", "x", "y", "z", "w", "c";..
                   "", "1", "2", "3", "4", "5"]);
+h.enable="off";
+h.enable="on";
index 198a91b..81e2c6b 100644 (file)
@@ -44,3 +44,5 @@ set(h, "string", ["", "c1", "c2", "c3", "c4", "c5";..
                   "", "1.2", "3.2", "43.3", "0", "0.3";..
                   "", "x", "y", "z", "w", "c";..
                   "", "1", "2", "3", "4", "5"]);
+h.enable="off";
+h.enable="on";