KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > model > core > ContentImage


1 /*
2  * Copyright 2004 Blandware (http://www.blandware.com)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.blandware.atleap.model.core;
17
18 /**
19  * <p>Content image - that is some content resource that is actually an image of
20  * supported type.</p>
21  * <p>
22  * Content image may be inserted to content of HTML-type fields while editing it
23  * in edit mode. Also content image may be assigned to menu item.
24  * </p>
25  * <p><a HREF="ContentImage.java.htm"><i>View Source</i></a>
26  * </p>
27  * <p/>
28  *
29  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
30  * @version $Revision: 1.14 $ $Date: 2005/10/19 07:27:38 $
31  * @see ContentResource
32  * @struts.form include-all="false" extends="ContentResourceForm"
33  * @hibernate.joined-subclass table="`al_core_image`" lazy="false"
34  * @hibernate.joined-subclass-key column="`resource_id`"
35  */

36 public class ContentImage extends ContentResource {
37
38     //~ Instance variables
39

40     /**
41      * Width of the image
42      */

43     protected Integer JavaDoc width;
44     /**
45      * Height of the image
46      */

47     protected Integer JavaDoc height;
48
49     //~ Methods
50

51     /**
52      * Returns width of this image
53      *
54      * @return width of image
55      * @hibernate.property
56      * @hibernate.column name="`width`" not-null="true" unique="false"
57      * @struts.form-field
58      * @struts.validator type="required,integer"
59      */

60     public Integer JavaDoc getWidth() {
61         return width;
62     }
63
64     /**
65      * Sets width of this image
66      *
67      * @param width the width of the image
68      */

69     public void setWidth(Integer JavaDoc width) {
70         this.width = width;
71     }
72
73     /**
74      * Returns height of this image
75      *
76      * @return height of image
77      * @hibernate.property
78      * @hibernate.column name="`height`" not-null="true" unique="false"
79      * @struts.form-field
80      * @struts.validator type="required,integer"
81      */

82     public Integer JavaDoc getHeight() {
83         return height;
84     }
85
86     /**
87      * Sets height of the image
88      *
89      * @param height the height of the image
90      */

91     public void setHeight(Integer JavaDoc height) {
92         this.height = height;
93     }
94
95 }
96
Popular Tags