01: package com.salmonllc.forms;
02:
03: /////////////////////////
04: //$Archive: /JADE/SourceCode/com/salmonllc/forms/FormComponent.java $
05: //$Author: Srufle $
06: //$Revision: 7 $
07: //$Modtime: 7/31/02 7:13p $
08: /////////////////////////
09:
10: import com.salmonllc.html.*;
11:
12: /**
13: * This type is a type safe container for DetailForm Components.
14: */
15: public class FormComponent {
16: private String _captionString;
17: private HtmlText _captionTextComp;
18: private HtmlComponent _formComponent;
19: private int _flags;
20:
21: /**
22: * Constructor
23: * @param caption java.lang.String
24: * @param component com.salmonllc.html.HtmlComponent
25: * @param flags int
26: */
27: public FormComponent(HtmlText captionCompIn,
28: HtmlComponent component, int flags) {
29: if (captionCompIn != null) {
30: _captionString = captionCompIn.getText();
31: } else {
32: _captionString = "";
33: }
34: _captionTextComp = captionCompIn;
35: _formComponent = component;
36: _flags = flags;
37: }
38:
39: /**
40: * Get the Caption as a String
41: */
42:
43: public String getCaptionString() {
44: return _captionString;
45: }
46:
47: /**
48: * Get the Caption as a HtmlText Component.
49: */
50: public HtmlText getCaptionTextComp() {
51: return _captionTextComp;
52: }
53:
54: /**
55: * Get the flags value.
56: */
57: public int getFlags() {
58: return _flags;
59: }
60:
61: /**
62: * Get the detail HtmlComponent.
63: */
64: public HtmlComponent getFormComponent() {
65: return _formComponent;
66: }
67: }
|