+/*\r
+ * This file is part of the Vamsas Client version 0.1. \r
+ * Copyright 2009 by Jim Procter, Iain Milne, Pierre Marguerite, \r
+ * Andrew Waterhouse and Dominik Lindner.\r
+ * \r
+ * Earlier versions have also been incorporated into Jalview version 2.4 \r
+ * since 2008, and TOPALi version 2 since 2007.\r
+ * \r
+ * The Vamsas Client is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU Lesser General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ * \r
+ * The Vamsas Client is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU Lesser General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU Lesser General Public License\r
+ * along with the Vamsas Client. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
package uk.ac.vamsas.client.picking;\r
\r
/**\r
* Message class that can be used to send mouse over events.\r
*/\r
-public class MouseOverMessage extends Message\r
-{\r
- private String vorbaID;\r
- private int position;\r
- \r
- /**\r
- * Constructs a new mouse over message.\r
- * @param vorbaID the VAMSAS object ID of the event's source (usually an\r
- * alignment or alignment sequence)\r
- * @param position a position on the source in its coordinate system (ie a\r
- * column or nucleotide/residue position)\r
- */\r
- public MouseOverMessage(String vorbaID, int position)\r
- {\r
- this.vorbaID = vorbaID;\r
- this.position = position;\r
- \r
- message = "MOUSEOVER\t"\r
- + "vorbaID=" + vorbaID + "\t" + "position=" + position;\r
- }\r
- \r
- /**\r
- * Constructs a new mouse over message from its underlying string format.\r
- * @param str the string representation of an instance of this object\r
- * @throws java.lang.Exception if the message cannot be reconstructed\r
- */\r
- MouseOverMessage(String str)\r
- throws Exception\r
- {\r
- message = str;\r
- \r
- String[] elements = str.split("\t");\r
- \r
- for (int i = 0; i < elements.length; i++)\r
- {\r
- if (elements[i].startsWith("vorbaID="))\r
- vorbaID = elements[i].substring(8);\r
- else if (elements[i].startsWith("position="))\r
- position = Integer.parseInt(elements[i].substring(9));\r
- }\r
- }\r
- \r
- /**\r
- * Returns the VAMSAS object ID associated with this message.\r
- * @return the VAMSAS object ID associated with this message\r
- */\r
- public String getVorbaID()\r
- { return vorbaID; }\r
- \r
- /**\r
- * Returns the position value associated with this message.\r
- * @return the position value associated with this message\r
- */\r
- public int getPosition()\r
- { return position; }\r
-}
\ No newline at end of file
+public class MouseOverMessage extends Message {\r
+ private String vorbaID;\r
+\r
+ private int position;\r
+\r
+ /**\r
+ * Constructs a new mouse over message.\r
+ * \r
+ * @param vorbaID\r
+ * the VAMSAS object ID of the event's source (usually an alignment\r
+ * or alignment sequence)\r
+ * @param position\r
+ * a position on the source in its coordinate system (ie a column or\r
+ * nucleotide/residue position)\r
+ */\r
+ public MouseOverMessage(String vorbaID, int position) {\r
+ this.vorbaID = vorbaID;\r
+ this.position = position;\r
+\r
+ message = "MOUSEOVER\t" + "vorbaID=" + vorbaID + "\t" + "position="\r
+ + position;\r
+ }\r
+\r
+ /**\r
+ * Constructs a new mouse over message from its underlying string format.\r
+ * \r
+ * @param str\r
+ * the string representation of an instance of this object\r
+ * @throws java.lang.Exception\r
+ * if the message cannot be reconstructed\r
+ */\r
+ MouseOverMessage(String str) throws Exception {\r
+ message = str;\r
+\r
+ String[] elements = str.split("\t");\r
+\r
+ for (int i = 0; i < elements.length; i++) {\r
+ if (elements[i].startsWith("vorbaID="))\r
+ vorbaID = elements[i].substring(8);\r
+ else if (elements[i].startsWith("position="))\r
+ position = Integer.parseInt(elements[i].substring(9));\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Returns the VAMSAS object ID associated with this message.\r
+ * \r
+ * @return the VAMSAS object ID associated with this message\r
+ */\r
+ public String getVorbaID() {\r
+ return vorbaID;\r
+ }\r
+\r
+ /**\r
+ * Returns the position value associated with this message.\r
+ * \r
+ * @return the position value associated with this message\r
+ */\r
+ public int getPosition() {\r
+ return position;\r
+ }\r
+}\r