KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > core > metadata > WindowLocationMetaData


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.core.metadata;
10
11 import org.jboss.portal.common.metadata.MetaData;
12 import org.jboss.portal.server.ServerObjectID;
13
14 /**
15  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
16  * @version $Revision: 1.1 $
17  */

18 public class WindowLocationMetaData implements MetaData
19 {
20
21    private ServerObjectID id;
22    private String JavaDoc region;
23    private int height;
24
25    public WindowLocationMetaData(
26          ServerObjectID id,
27          String JavaDoc region,
28          int height)
29    {
30       this.id = id;
31       this.region = region;
32       this.height = height;
33    }
34
35    public ServerObjectID getID()
36    {
37       return id;
38    }
39
40    public String JavaDoc getRegion()
41    {
42       return region;
43    }
44
45    public void setRegion(String JavaDoc region)
46    {
47       this.region = region;
48    }
49
50    public int getHeight()
51    {
52       return height;
53    }
54
55    public void setHeight(int height)
56    {
57       this.height = height;
58    }
59
60    public boolean equals(Object JavaDoc o)
61    {
62       if (this == o)
63       {
64          return true;
65       }
66       if (o instanceof WindowLocationMetaData)
67       {
68          WindowLocationMetaData other = (WindowLocationMetaData)o;
69          return other.id.equals(id);
70       }
71       return false;
72    }
73
74    public int hashCode()
75    {
76       return id.hashCode();
77    }
78 }
79
Popular Tags