View Javadoc

1   package org.devaki.nextobjects.workspace.models.objects;
2   /*
3   
4   nextobjects Copyright (C) 2001-2005 Emmanuel Florent
5   
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by the
8   Free Software Foundation; either version 2 of the License, or (at your
9   option) any later version.
10  
11  This program is distributed in the hope that it will
12  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13  of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the GNU General Public License for more details.
15  
16  You should have received a copy of the GNU General Public License along
17  with this program; if not, write to the Free Software Foundation, Inc., 59
18  Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  
20  */
21  import org.devaki.nextobjects.workspace.models.BaseModel;
22  import org.devaki.nextobjects.workspace.models.graphics.ObjectView;
23  import org.devaki.nextobjects.workspace.models.graphics.LabelView;
24  
25  /***
26   * This class is responsible for having labels
27   * @author eflorent
28   */
29  public class Label extends BaseClass
30  {
31   /***
32    * The label view
33    */
34   private LabelView labelView;
35  
36   /***
37    * Constructor
38    * @param pModel the context model
39    */
40   public Label(final BaseModel pModel)
41   {
42    super(pModel);
43    this.setName("project notes");
44    this.setNotes("Double click to edit");
45    labelView = new LabelView(this);
46   }
47   /***
48    * Construct a new 'Label' object
49    * @param pObject the label to clone
50    */
51   public Label(final Label pObject)
52   {
53     super(pObject.getMyModel());
54     this.setName(pObject.getName());
55     this.setNotes(pObject.getNotes());
56     this.labelView = new LabelView(this);
57   }
58   /***
59    * get the label view
60    * @return labelView
61    */
62   public final ObjectView getObjectView()
63   {
64    return labelView;
65   }
66  }