KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > nextapp > echo2 > app > layout > CellLayoutData


1 /*
2  * This file is part of the Echo Web Application Framework (hereinafter "Echo").
3  * Copyright (C) 2002-2005 NextApp, Inc.
4  *
5  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6  *
7  * The contents of this file are subject to the Mozilla Public License Version
8  * 1.1 (the "License"); you may not use this file except in compliance with
9  * the License. You may obtain a copy of the License at
10  * http://www.mozilla.org/MPL/
11  *
12  * Software distributed under the License is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14  * for the specific language governing rights and limitations under the
15  * License.
16  *
17  * Alternatively, the contents of this file may be used under the terms of
18  * either the GNU General Public License Version 2 or later (the "GPL"), or
19  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
20  * in which case the provisions of the GPL or the LGPL are applicable instead
21  * of those above. If you wish to allow use of your version of this file only
22  * under the terms of either the GPL or the LGPL, and not to allow others to
23  * use your version of this file under the terms of the MPL, indicate your
24  * decision by deleting the provisions above and replace them with the notice
25  * and other provisions required by the GPL or the LGPL. If you do not delete
26  * the provisions above, a recipient may use your version of this file under
27  * the terms of any one of the MPL, the GPL or the LGPL.
28  */

29
30 package nextapp.echo2.app.layout;
31
32 import nextapp.echo2.app.Alignment;
33 import nextapp.echo2.app.Color;
34 import nextapp.echo2.app.FillImage;
35 import nextapp.echo2.app.Insets;
36 import nextapp.echo2.app.LayoutData;
37
38 /**
39  * An abstract base layout data object for components which render their
40  * children in cells.
41  */

42 public abstract class CellLayoutData
43 implements LayoutData {
44     
45     private Color background;
46     private FillImage backgroundImage;
47     private Insets insets;
48     private Alignment alignment;
49     
50     /**
51      * Returns the alignment of the cell.
52      *
53      * @return the alignment
54      */

55     public Alignment getAlignment() {
56         return alignment;
57     }
58     
59     /**
60      * Returns the background color of the cell.
61      *
62      * @return the background color
63      */

64     public Color getBackground() {
65         return background;
66     }
67     
68     /**
69      * Returns the background image of the cell.
70      *
71      * @return the background image
72      */

73     public FillImage getBackgroundImage() {
74         return backgroundImage;
75     }
76     
77     /**
78      * Returns the inset margins of the cell.
79      *
80      * @return the inset margins
81      */

82     public Insets getInsets() {
83         return insets;
84     }
85     
86     /**
87      * Sets the alignment of the cell.
88      *
89      * @param newValue the new alignment
90      */

91     public void setAlignment(Alignment newValue) {
92         alignment = newValue;
93     }
94     
95     /**
96      * Sets the background color of the cell.
97      *
98      * @param newValue the new background color
99      */

100     public void setBackground(Color newValue) {
101         background = newValue;
102     }
103     
104     /**
105      * Sets the background image of the cell.
106      *
107      * @param newValue the new background image
108      */

109     public void setBackgroundImage(FillImage newValue) {
110         backgroundImage = newValue;
111     }
112     
113     /**
114      * Sets the inset margins of the cell.
115      *
116      * @param newValue the inset margins
117      */

118     public void setInsets(Insets newValue) {
119         insets = newValue;
120     }
121 }
122
Popular Tags