01: /*
02: * Copyright 2005 jWic group (http://www.jwic.de)
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: * de.jwic.controls.LabelControl
17: * $Id: LabelControl.java,v 1.4 2007/05/10 09:59:32 lordsam Exp $
18: */package de.jwic.controls;
19:
20: import de.jwic.base.IControlContainer;
21:
22: /**
23: * Represents a label that displays just text. A style can be specified
24: * to format the label.
25: * @author Florian Lippisch
26: */
27: public class LabelControl extends HTMLElement {
28:
29: private static final long serialVersionUID = 1L;
30:
31: private String strText = "";
32:
33: /**
34: * @param container
35: */
36: public LabelControl(IControlContainer container) {
37: super (container, null);
38: }
39:
40: /**
41: * @param container
42: * @param name
43: */
44: public LabelControl(IControlContainer container, String name) {
45: super (container, name);
46: }
47:
48: /**
49: *
50: * @return java.lang.String
51: */
52: public String getText() {
53: return strText;
54: }
55:
56: /**
57: *
58: * @param newText java.lang.String
59: */
60: public void setText(String newText) {
61: strText = newText;
62: setRequireRedraw(true);
63: }
64:
65: /* (non-Javadoc)
66: * @see de.jwic.base.Control#actionPerformed(java.lang.String, java.lang.String)
67: */
68: public void actionPerformed(String actionId, String parameter) {
69: // Nothing to do
70:
71: }
72: }
|