Merge branch 'Release_2_8_2_Branch' into JAL-429_phylip-file-support
[jalview.git] / src / jalview / schemabinding / version2 / Viewport.java
index 03bd2a9..1faf480 100644 (file)
@@ -24,6 +24,8 @@ package jalview.schemabinding.version2;
 //- Imported classes and packages -/
 //---------------------------------/
 
+import jalview.util.MessageManager;
+
 import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;
 
@@ -845,9 +847,11 @@ public class Viewport implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._calcIdParamList.size())
     {
-      throw new IndexOutOfBoundsException("getCalcIdParam: Index value '"
-              + index + "' not in range [0.."
-              + (this._calcIdParamList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "getCalcIdParam",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._calcIdParamList.size() - 1)).toString()
+          })); 
     }
 
     return (jalview.schemabinding.version2.CalcIdParam) _calcIdParamList
@@ -995,9 +999,11 @@ public class Viewport implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._hiddenColumnsList.size())
     {
-      throw new IndexOutOfBoundsException("getHiddenColumns: Index value '"
-              + index + "' not in range [0.."
-              + (this._hiddenColumnsList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getHiddenColumns",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._hiddenColumnsList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.HiddenColumns) _hiddenColumnsList
@@ -2121,9 +2127,11 @@ public class Viewport implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._calcIdParamList.size())
     {
-      throw new IndexOutOfBoundsException("setCalcIdParam: Index value '"
-              + index + "' not in range [0.."
-              + (this._calcIdParamList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setCalcIdParam",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._calcIdParamList.size() - 1)).toString()
+          })); 
     }
 
     this._calcIdParamList.set(index, vCalcIdParam);
@@ -2280,9 +2288,11 @@ public class Viewport implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._hiddenColumnsList.size())
     {
-      throw new IndexOutOfBoundsException("setHiddenColumns: Index value '"
-              + index + "' not in range [0.."
-              + (this._hiddenColumnsList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setHiddenColumns",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._hiddenColumnsList.size() - 1)).toString()
+        })); 
     }
 
     this._hiddenColumnsList.set(index, vHiddenColumns);