View Javadoc

1   /*
2    * This file is a part of CAST project.
3    * (c) Copyright 2007, AGH University of Science & Technology
4    * https://caribou.iisg.agh.edu.pl/trac/cast
5    *
6    * Licensed under the Eclipse Public License, Version 1.0 (the "License").
7    * You may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    * http://www.eclipse.org/legal/epl-v10.html
10   */
11  /*
12   * File: IDiagram.java
13   * Created: 2009-04-21
14   * Author: kpietak
15   * $Id$
16   */
17  
18  package pl.edu.agh.cast.model.visual;
19  
20  import java.util.List;
21  
22  import pl.edu.agh.cast.data.model.IDataSet;
23  import pl.edu.agh.cast.data.model.IElement;
24  import pl.edu.agh.cast.data.model.presentation.IPresentationDataSet;
25  import pl.edu.agh.cast.data.model.presentation.IPresentationElement;
26  import pl.edu.agh.cast.data.model.visual.IVisualDataSet;
27  import pl.edu.agh.cast.data.model.visual.IVisualElement;
28  
29  /**
30   * <p>
31   * An interface which describes a single diagram.
32   *
33   * <p>
34   * {@link IDiagram} contains model and view which are displayed in editor as a diagram. Each editor can extend this
35   * interface to define specific behavior and properties.
36   *
37   * @see IPresentationDataSet
38   * @see IVisualDataSet
39   *
40   * @param <M>
41   *            type of presentation data set which can be hold by this diagram
42   * @param <V>
43   *            type of visual data set which can be hold by this diagram
44   *
45   * @author AGH CAST Team
46   */
47  public interface IDiagram<M extends IPresentationDataSet<? extends IPresentationElement<? extends IElement>>, V extends IVisualDataSet<? extends IVisualElement<? extends IPresentationElement<? extends IElement>>, M>> {
48  
49  	/**
50  	 * Gets model which is base for this diagram.
51  	 *
52  	 * @return presentation model data set
53  	 */
54  	public M getModel();
55  
56  	/**
57  	 * Gets list containing presentation and visual data sets in such order.
58  	 *
59  	 * @return list of presentation and visual data sets
60  	 */
61  	public List<IDataSet<? extends IElement>> getDataSets();
62  
63  	/**
64  	 * Returns diagram name. It is alias to <code>getModel().getName()</code> method.
65  	 *
66  	 * @return diagram name
67  	 */
68  	public String getName();
69  
70  	/**
71  	 * Returns legend model for this diagram.
72  	 *
73  	 * @return legend model
74  	 */
75  	public Legend getLegend();
76  
77  }