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 java.io.Serializable;
22  import org.devaki.nextobjects.workspace.models.BaseModel;
23  import org.devaki.nextobjects.workspace.models.graphics.ObjectView;
24  /***
25   * the class is responsible for drawing lines objects
26   * @author <a href="mailto:eflorent@devaki.org">Emmanuel Florent</a>
27   */
28  public abstract class BaseLine extends BaseObject implements Serializable
29  {
30      /***
31       * the parent class
32       */
33      private BaseObject prtClass;
34      /***
35       * the child class
36       */
37      private BaseObject childClass;
38      /***
39       * Construct a BaseLine with a pre-defined NOModel
40       * @param pModel the context model
41       */
42      public BaseLine(final BaseModel pModel)
43      {
44          super(pModel);
45          this.setMyModel(pModel);
46      }
47      /***
48       * Construct a BaseLine by coppiing
49       * @param pBaseLine the object to clone
50       */
51      public BaseLine(final BaseLine pBaseLine)
52      {
53          super(pBaseLine);
54          this.prtClass = pBaseLine.getParentClass();
55          this.childClass = pBaseLine.getChildClass();
56      }
57      /***
58       * get the LineView
59       * @return the  object view
60       */
61      public abstract ObjectView getObjectView();
62      /***
63       * Get the parent class
64       * @return the parent class
65       */
66      public final BaseObject getParentClass()
67      {
68          return prtClass;
69      }
70      /***
71       * Get the child class
72       * @return the child class
73       */
74      public final BaseObject getChildClass()
75      {
76          return childClass;
77      }
78      /***
79       * set the child class
80       * @param pObject the child class
81       */
82      public final void setChildClass(final BaseObject pObject)
83      {
84          childClass = pObject;
85      }
86      /***
87       * set the parent class
88       * @param pObject the parent class
89       */
90      public final void setParentClass(final BaseObject pObject)
91      {
92          prtClass = pObject;
93      }
94  }