KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > kawa > models > Label


1 package gnu.kawa.models;
2
3 /** A "label" may have some text and/or an icon.
4  * It probably should be a combination of text and image. */

5
6 public class Label extends Model
7   implements Viewable, java.io.Serializable JavaDoc
8 {
9   String JavaDoc text;
10
11   public Label ()
12   {
13   }
14
15   public Label (String JavaDoc text)
16   {
17     this.text = text;
18   }
19
20   public void makeView (Display display, Object JavaDoc where)
21   {
22     display.addLabel(this, where);
23   }
24
25   public String JavaDoc getText()
26   {
27     return text;
28   }
29
30   public void setText (String JavaDoc text)
31   {
32     this.text = text;
33     notifyListeners("text");
34   }
35 }
36
Popular Tags