JAL-1355
[jalview.git] / src / jalview / schemabinding / version2 / AlcodonFrame.java
index a0e1ea1..c7d2f17 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;
 
@@ -159,9 +161,11 @@ public class AlcodonFrame implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodMapList.size())
     {
-      throw new IndexOutOfBoundsException("getAlcodMap: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodMapList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getAlcodMap",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._alcodMapList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.AlcodMap) _alcodMapList
@@ -209,9 +213,11 @@ public class AlcodonFrame implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodonList.size())
     {
-      throw new IndexOutOfBoundsException("getAlcodon: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "getAlcodon",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._alcodonList.size() - 1)).toString()
+        })); 
     }
 
     return (jalview.schemabinding.version2.Alcodon) _alcodonList.get(index);
@@ -378,9 +384,11 @@ public class AlcodonFrame implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodMapList.size())
     {
-      throw new IndexOutOfBoundsException("setAlcodMap: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodMapList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                         "setAlcodMap",
+                         Integer.valueOf(index).toString(),
+                         Integer.valueOf((this._alcodonList.size() - 1)).toString()
+          })); 
     }
 
     this._alcodMapList.set(index, vAlcodMap);
@@ -418,9 +426,11 @@ public class AlcodonFrame implements java.io.Serializable
     // check bounds for index
     if (index < 0 || index >= this._alcodonList.size())
     {
-      throw new IndexOutOfBoundsException("setAlcodon: Index value '"
-              + index + "' not in range [0.."
-              + (this._alcodonList.size() - 1) + "]");
+        throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{
+                 "setAlcodon",
+                 Integer.valueOf(index).toString(),
+                 Integer.valueOf((this._alcodonList.size() - 1)).toString()
+        })); 
     }
 
     this._alcodonList.set(index, vAlcodon);