View Javadoc

1   /*
2    * Copyright 1999-2006 Faculty of Mathematics, Physics and Informatics, Comenius
3    * University, Bratislava. This file is protected by the Mozilla Public License
4    * version 1.1 (the License); you may not use this file except in compliance
5    * with the License. You may obtain a copy of the License at
6    * http://euromath2.sourceforge.net/license.html Unless required by applicable
7    * law or agreed to in writing, software distributed under the License is
8    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9    * KIND, either express or implied. See the License for the specific language
10   * governing permissions and limitations under the License.
11   */
12  package sk.uniba.euromath.editor.figures;
13  
14  import javax.xml.transform.Source;
15  
16  import org.eclipse.draw2d.IFigure;
17  
18  import sk.uniba.euromath.editor.IRenderer;
19  
20  /***
21   * Is only figure which uses every {@link IRenderer} to produce view. Stores
22   * emp:id from source(opened) document and object from {@link Source} for better
23   * understood what represents.
24   * 
25   * @author Tomáš Studva 1.9.2005
26   */
27  public interface IEMFigure extends IFigure {
28  
29      /***
30       * Returns id of node from source document for which subtree of figures
31       * rooted at this figure or this figure acts as view.
32       * 
33       * @return id of node from source document, can be null if doesn't
34       *         represents anything from source(opened) document
35       */
36      public String getID();
37  
38      /***
39       * Returns Object from object source or Node from transformed document for
40       * which subtree of figures rooted at this figure acts as view.
41       * 
42       * @return Object or Node form Source, can be null if doesn't represents
43       *         anything from Source
44       */
45      public Object getModel();
46  
47      /***
48       * Indicates if EditPart should be crated for this figure. Information for
49       * IEditor.
50       * 
51       * @return true if EditPart should be created for this figure
52       */
53      public boolean needsEditPart();
54  }