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   import java.awt.Shape;
9   
10  /**
11   *
12   * @author Pascal Durieu
13   */
14  public class Zone { 
15      private String key;
16      private String tiptext;
17      private Shape shape;
18      
19      public Zone() {}
20      
21      public Zone (String cl, String tt, Shape sh) {
22          this.key = cl;
23          this.tiptext = tt;
24          this.shape = sh;
25      }
26      
27      //get method
28      public String getKey () {return this.key;}
29      public String getTipText () {return this.tiptext;}
30      public Shape getShape() {return this.shape;}
31  
32      //set method
33      public void setKey(String key) {this.key = key;}
34      public void setTipText(String tiptext) {this.tiptext = tiptext;}
35      public void setShape(Shape shape) {this.shape = shape;}
36      
37      @Override
38      public String toString() {
39          return "[" + this.shape + "] key=" + this.key + " text=" + this.tiptext;
40      }
41  
42  }