KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > buchuki > ensmer > builtin > Message


1 /*
2  * Copyright 2005 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
17 package com.buchuki.ensmer.builtin;
18
19 import com.buchuki.ensmer.EnsmerManager;
20 import com.buchuki.ensmer.input.InputManager;
21 import com.buchuki.ensmer.input.command.*;
22 import com.buchuki.ensmer.input.event.*;
23 import com.buchuki.ensmer.object.Backend;
24 import com.buchuki.ensmer.text.TextInput;
25 import com.sun.j3d.utils.geometry.Text2D;
26 import java.awt.Font JavaDoc;
27 import java.awt.event.KeyEvent JavaDoc;
28 import java.io.Serializable JavaDoc;
29 import javax.media.j3d.*;
30 import javax.vecmath.Color3f;
31
32 /**
33  * Class to represent a message (such as an error message or warning) on the
34  * screen.
35  *
36  * @author Dusty Phillips [dusty@buchuki.com]
37  */

38 public class Message extends Backend {
39     
40     /**
41      * Creates a new instance of a default (empty) Message
42      */

43     public Message() {
44     }
45     
46     /**
47      * Create a message object based on previously serialized data
48      */

49     public Message(Serializable JavaDoc data) {
50         this();
51         message = (String JavaDoc) data;
52     }
53     
54     /**
55      * Get the Serializable for the object
56      */

57     public Serializable JavaDoc getSerializable() {
58         return message;
59     }
60     
61     /**
62      * Set the Message
63      *
64      * @param message the new message property
65      */

66     public void setMessage(String JavaDoc message) {
67         this.message = message;
68         fireChangeEvent();
69     }
70     
71     /**
72      * Get the message
73      */

74     public String JavaDoc getMessage() {
75         return message;
76     }
77     
78     /**
79      * The message represented
80      */

81     private String JavaDoc message;
82     
83 }
84
Popular Tags