View Javadoc

1   /*
2    * class to associate a key, a text and a Shape
3    * using ShapeBean for facilities (usefull for java.beans.XMLDecoder)
4    * and open the template in the editor.
5    */
6   package org.lsst.ccs.utilities.zonesui;
7   
8   /**
9    *
10   * @author Pascal Durieu
11   */
12  public class ZoneXML { 
13      private String key;
14      private String tiptext;
15      private ShapeBean shapeB;
16      
17      public ZoneXML() {}
18      
19      public ZoneXML (String cl, String tt, ShapeBean sh) {
20          this.key = cl;
21          this.tiptext = tt;
22          this.shapeB = sh;
23      }
24      
25      //get method
26      public String getKey () {return this.key;}
27      public String getTipText () {return this.tiptext;}
28      public ShapeBean getShapeBean() {return this.shapeB;}
29  
30      //set method
31      public void setKey(String key) {this.key = key;}
32      public void setTipText(String tiptext) {this.tiptext = tiptext;}
33      public void setShapeBean(ShapeBean shape) {this.shapeB = shape;}
34      
35      @Override
36      public String toString() {
37          return "[" + this.shapeB + "] key=" + this.key + " text=" + this.tiptext;
38      }
39  
40  }