KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > buchuki > ensmer > prevayler > PrevayledArea


1 /*
2  * Copyright 2004 Dusty Phillips
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.buchuki.ensmer.prevayler;
17
18 import java.io.Serializable JavaDoc;
19 import java.util.*;
20
21 import javax.vecmath.Matrix4f;
22
23 /**
24  * Class representing prevayled data for a specific area. Specifically, the
25  * Area's position and list of object identifiers is associated with the Area.
26  * The Area identifier is associated in the AreaPrevayler class.
27  *
28  * @author Dusty Phillips [dusty@buchuki.com]
29  */

30 public class PrevayledArea implements Serializable JavaDoc {
31
32     /**
33      * Give it a SerialVersionUID so it can be reinstantiated by later versions
34      * of the class
35      */

36     static final long serialVersionUID = 20050328L;
37
38     /**
39      * Returns the user's position in this area
40      *
41      * @return The user's position in a Matrix4f
42      */

43     public Matrix4f getUserPosition() {
44         return userPosition;
45     }
46
47     /**
48      * Sets the user's position in this area
49      *
50      * @param userPosition The user's new position
51      */

52     public void setUserPosition(Matrix4f userPosition) {
53         this.userPosition = userPosition;
54     }
55     
56     /**
57      * Set whether or not objects can be added to the area
58      *
59      * @param readOnly true if objects cannot be added, false if they can
60      */

61     public void setReadOnly(boolean readOnly) {
62         this.readOnly = readOnly;
63     }
64     
65     /**
66      * Determine whether or not objects can be added to the area
67      *
68      * @return true if objects cannot be added false if they can
69      */

70     public boolean isReadOnly() {
71         return readOnly;
72     }
73     
74     /**
75      * Description of the Field
76      */

77     private Matrix4f userPosition;
78     
79     /**
80      * Whether or not this area is currently Read Only
81      */

82     private boolean readOnly;
83 }
84
85
Popular Tags