KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > gjt > jclasslib > mdi > MDIConfig


1 /*
2     This library is free software; you can redistribute it and/or
3     modify it under the terms of the GNU General Public
4     License as published by the Free Software Foundation; either
5     version 2 of the license, or (at your option) any later version.
6 */

7
8 package org.gjt.jclasslib.mdi;
9
10 import java.util.List JavaDoc;
11
12 /**
13     Serializable configuration object for the window state of an MDI frame.
14
15     @author <a HREF="mailto:jclasslib@ej-technologies.com">Ingo Kegel</a>
16     @version $Revision: 1.1 $ $Date: 2003/08/18 07:59:17 $
17 */

18 public class MDIConfig {
19
20     private List JavaDoc internalFrameDescs;
21     private InternalFrameDesc activeFrameDesc;
22
23     /**
24      * Get the list of internal frame descriptions.
25      * @return the list.
26      */

27     public List JavaDoc getInternalFrameDescs() {
28         return internalFrameDescs;
29     }
30
31     /**
32      * Set the list of internal frame descriptions.
33      * @param internalFrameDescs the list.
34      */

35     public void setInternalFrameDescs(List JavaDoc internalFrameDescs) {
36         this.internalFrameDescs = internalFrameDescs;
37     }
38
39     /**
40      * Get the internal frame description of the active internal frame.
41      * @return the internal frame description.
42      */

43     public InternalFrameDesc getActiveFrameDesc() {
44         return activeFrameDesc;
45     }
46
47     /**
48      * Set the internal frame description of the active internal frame.
49      * @param activeFrameDesc the internal frame description.
50      */

51     public void setActiveFrameDesc(InternalFrameDesc activeFrameDesc) {
52         this.activeFrameDesc = activeFrameDesc;
53     }
54
55     /**
56      * Serializable description object for the state of an internal frame.
57      */

58     public static class InternalFrameDesc {
59
60         private String JavaDoc className;
61         private Object JavaDoc initParam;
62         private int x;
63         private int y;
64         private int width;
65         private int height;
66         private boolean maximized;
67         private boolean iconified;
68
69         /**
70          * Get the class name of the internal frame.
71          * @return the class name.
72          */

73         public String JavaDoc getClassName() {
74             return className;
75         }
76
77         /**
78          * Set the class name of the internal frame.
79          * @param className the class name.
80          */

81         public void setClassName(String JavaDoc className) {
82             this.className = className;
83         }
84
85         /**
86          * Get the initialization parameter for the internal frame.
87          * @return the initialization parameter
88          */

89         public Object JavaDoc getInitParam() {
90             return initParam;
91         }
92
93         /**
94          * Set the initialization parameter for the internal frame.
95          * @param initParam the initialization parameter
96          */

97         public void setInitParam(Object JavaDoc initParam) {
98             this.initParam = initParam;
99         }
100
101         /**
102          * Get the x-position of the internal frame on the desktop.
103          * @return the x-position.
104          */

105         public int getX() {
106             return x;
107         }
108
109         /**
110          * Set the x-position of the internal frame on the desktop.
111          * @param x the x-position.
112          */

113         public void setX(int x) {
114             this.x = x;
115         }
116
117         /**
118          * Get the y-position of the internal frame on the desktop.
119          * @return the y-position.
120          */

121         public int getY() {
122             return y;
123         }
124
125         /**
126          * Set the y-position of the internal frame on the desktop.
127          * @param y the y-position.
128          */

129         public void setY(int y) {
130             this.y = y;
131         }
132
133         /**
134          * Get the width of the internal frame on the desktop.
135          * @return the width.
136          */

137         public int getWidth() {
138             return width;
139         }
140
141         /**
142          * Set the width of the internal frame on the desktop.
143          * @param width the width.
144          */

145         public void setWidth(int width) {
146             this.width = width;
147         }
148
149         /**
150          * Get the height of the internal frame on the desktop.
151          * @return the height.
152          */

153         public int getHeight() {
154             return height;
155         }
156
157         /**
158          * Set the height of the internal frame on the desktop.
159          * @param height the height.
160          */

161         public void setHeight(int height) {
162             this.height = height;
163         }
164
165         /**
166          * Returns whether the internal frame is maximized.
167          * @return the value.
168          */

169         public boolean isMaximized() {
170             return maximized;
171         }
172
173         /**
174          * Sets whether the internal frame is maximized.
175          * @param maximized the value.
176          */

177         public void setMaximized(boolean maximized) {
178             this.maximized = maximized;
179         }
180
181         /**
182          * Returns whether the internal frame is iconified.
183          * @return the value.
184          */

185         public boolean isIconified() {
186             return iconified;
187         }
188
189         /**
190          * Sets whether the internal frame is iconified.
191          * @param iconified the value.
192          */

193         public void setIconified(boolean iconified) {
194             this.iconified = iconified;
195         }
196     }
197
198 }
199
Popular Tags