KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > gui > graph > model > Display


1 /***
2  * FractalGUI: a graphical tool to edit Fractal component configurations.
3  * Copyright (C) 2003 France Telecom R&D
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Contact: fractal@objectweb.org
20  *
21  * Authors: Eric Bruneton, Patrice Fauvel
22  */

23
24 package org.objectweb.fractal.gui.graph.model;
25
26 import java.awt.Rectangle JavaDoc;
27
28 /**
29  * A model for the display. A display is used to render components as graphs
30  * of boxes and lines (representing components and bindings).
31  */

32
33 public interface Display {
34
35   /**
36    * Returns the size of this display.
37    *
38    * @return the size of this display, in pixels.
39    * @see #setScreenSize
40    */

41
42   Rectangle JavaDoc getScreenSize ();
43
44   /**
45    * Sets the size of this display.
46    *
47    * @param screenSize the new size of this display, in pixels.
48    * @see #getScreenSize
49    */

50
51   void setScreenSize (Rectangle JavaDoc screenSize);
52
53   /**
54    * Returns the area of the component graph shown by this display. Indeed a
55    * display may show only a portion of a component graph, which may be changed
56    * by zooming or scrolling.
57    *
58    * @return the area of the component graph shown by this display. This area
59    * is specified in the following way: if sr is the screen size, and dr is
60    * the displayed area, then the configuration in drawn in the rectangle
61    * (sr.x+sr.w*dr.x0, sr.y+sr.h*dr.y0, sr.x+sr.w*dr.x1, sr.y+sr.h*dr.y1).
62    * So, if sr is equal to (0,0,1,1), the configuration is drawn in the
63    * full screen rectangle, if it is equal to (0.5,0,1,1) the configuration
64    * is drawn in the half right part of the screen rectangle, and so on.
65    * @see #setDisplayedArea
66    */

67
68   Rect getDisplayedArea ();
69
70   /**
71    * Sets the area of the component graph shown by this display.
72    *
73    * @param displayedArea the new area of the component graph shown by this
74    * display.
75    * @see #getDisplayedArea
76    */

77
78   void setDisplayedArea (Rect displayedArea);
79
80   /**
81    * Returns <tt>true</tt> if this display is anti aliased.
82    *
83    * @return <tt>true</tt> if this display is anti aliased.
84    * @see #setIsAntialiasing
85    */

86
87   boolean isAntialiasing ();
88
89   /**
90    * Sets the anti aliasing option of this display.
91    *
92    * @param isAntialiasing the new anti aliasing option of this display.
93    */

94
95   void setIsAntialiasing (boolean isAntialiasing);
96
97   /**
98    * Returns the max depth at which the component graph is shown by this
99    * display.
100    *
101    * @return the max depth at which the component graph is shown by this
102    * display.
103    * @see #setMaxDepth
104    */

105
106   int getMaxDepth ();
107
108   /**
109    * Sets the max depth at which the component graph is shown by this display.
110    *
111    * @param maxDepth the new max depth at which the component graph is shown by
112    * this display.
113    * @see #getMaxDepth
114    */

115
116   void setMaxDepth (int maxDepth);
117
118   /**
119    * Sets the displaying mode for the interfaces name of this display.
120    *
121    */

122
123   void setItfNameDisplayMode ();
124
125   /**
126    * Returns the displaying mode for the interfaces name of this display.
127    *
128    */

129
130   int getItfNameDisplayMode ();
131 }
132
Popular Tags