Picking API now has message classes and basic implementation of interfaces (for its...
[vamsas.git] / src / uk / ac / vamsas / client / picking / MouseOverMessage.java
1 package uk.ac.vamsas.client.picking;\r
2 \r
3 /**\r
4  * Message class that can be used to send mouse over events.\r
5  */\r
6 public class MouseOverMessage extends Message\r
7 {\r
8         private String vorbaID;\r
9         private int position;\r
10         \r
11         /**\r
12          * Constructs a new mouse over message.\r
13          * @param vorbaID the VAMSAS object ID of the event's source (usually an\r
14          * alignment or alignment sequence)\r
15          * @param position a position on the source in its coordinate system (ie a\r
16          * column or nucleotide/residue position)\r
17          */\r
18         public MouseOverMessage(String vorbaID, int position)\r
19         {\r
20                 this.vorbaID = vorbaID;\r
21                 this.position = position;\r
22                 \r
23                 message = "MOUSEOVER_"\r
24                         + "vorbaID=" + vorbaID + "_" + "position=" + position;\r
25         }\r
26         \r
27         /**\r
28          * Constructs a new mouse over message from its underlying string format.\r
29          * @param str the string representation of an instance of this object\r
30          * @throws java.lang.Exception if the message cannot be reconstructed\r
31          */\r
32         MouseOverMessage(String str)\r
33                 throws Exception\r
34         {\r
35                 String[] elements = str.split("_");\r
36                 \r
37         }\r
38 }