KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > browser > gui > lib > AbstractElementBox


1 /*====================================================================
2
3 Objectweb Browser framework
4 Copyright (C) 2000-2003 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Jerome Moroy.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.util.browser.gui.lib;
28
29 import javax.swing.Box JavaDoc;
30 import javax.swing.BoxLayout JavaDoc;
31
32 import org.objectweb.util.browser.gui.api.ElementBox;
33 import org.objectweb.util.browser.gui.api.ValidateReport;
34
35 /**
36  *
37  *
38  * @author <a HREF="mailto:Jerome.Moroy@lifl.fr">Jerome Moroy</a>
39  *
40  * @version 0.1
41  */

42
43 public abstract class AbstractElementBox
44     extends Box JavaDoc
45     implements ElementBox {
46
47     //==================================================================
48
//
49
// Internal states.
50
//
51
//==================================================================
52

53     /** Indicates if the value is mandatory or optional. The default value is true, so, it's mandatory */
54     protected boolean isMandatory_;
55
56     //==================================================================
57
//
58
// Constructors.
59
//
60
//==================================================================
61

62     /**
63      * Empty constructor.
64      */

65     public AbstractElementBox(){
66         this(true);
67     }
68
69     /**
70      * Constructor with params.
71      * @param isMandatory If the value is mandatory : TRUE, else : FALSE
72      */

73     public AbstractElementBox(boolean isMandatory){
74         super(BoxLayout.X_AXIS);
75         isMandatory_ = isMandatory;
76     }
77
78     //==================================================================
79
//
80
// No internal method.
81
//
82
//==================================================================
83

84     //==================================================================
85
//
86
// Public methods for ElementBox interface.
87
//
88
//==================================================================
89

90     /**
91      * @see org.objectweb.util.browser.gui.api.ElementBox#validateBox()
92      */

93     public abstract ValidateReport validateBox();
94
95      /**
96       * Returns this.
97       * @see org.objectweb.util.browser.gui.api.ElementBox#getBox()
98       */

99     public Box JavaDoc getBox() {
100         return this;
101     }
102
103     /**
104      * Nothing to do.
105      * @see org.objectweb.util.browser.gui.api.ElementBox#preInitialize()
106      */

107     public void preInitialize() {
108         // Nothing to do
109
}
110
111     /**
112      * Nothing to do.
113      * @see org.objectweb.util.browser.gui.api.ElementBox#postInitialize()
114      */

115     public void postInitialize() {
116         // Nothing to do
117
}
118
119 }
Popular Tags