01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets;
06:
07: import java.awt.*;
08: import java.util.*;
09: import java.io.*;
10:
11: /**
12: * SHidden defines a hidden field.
13: *
14: * @author Robin Sharp
15: */
16:
17: public class SHidden extends SComponent {
18: /**
19: * Creates a SHidden field.
20: */
21: public SHidden(String value) {
22: this .value = value;
23: }
24:
25: /**
26: * Creates a SHidden field, with no value
27: */
28: public SHidden() {
29: }
30:
31: /**
32: * Returns the name of the L&F class that renders this component.
33: */
34: public Class getUIClass() {
35: return SHidden.class;
36: }
37:
38: /**
39: * Get the field's value.
40: */
41: public String getValue() {
42: return value;
43: }
44:
45: /**
46: * Set the field's value.
47: */
48: public SHidden setValue(String value) {
49: this .value = value;
50: return this ;
51: }
52:
53: /**
54: * Set the value as Text. This sets the text property.
55: */
56: public SComponent setValueAsText(String text) {
57: setValue(text);
58: return this ;
59: }
60:
61: // PRIVATE ////////////////////////////////////////////////////////
62:
63: protected String value;
64:
65: }
|