01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/publishing/markups/TKMarkupFlagParamClass.java,v 1.5 2000/05/22 15:01:28 careck Exp $
03: *
04: */
05: package com.teamkonzept.publishing.markups;
06:
07: import com.teamkonzept.lib.*;
08:
09: public class TKMarkupFlagParamClass extends TKMarkupParamClass {
10:
11: public String checkValue(String raw) {
12:
13: if (raw == null)
14: return "OFF";
15:
16: String value = raw.trim();
17:
18: if (value.equalsIgnoreCase(""))
19: return "OFF";
20: else if (value.equalsIgnoreCase("OFF"))
21: return "OFF";
22: else if (value.equalsIgnoreCase("ON"))
23: return value.toUpperCase();
24: else
25: return null;
26: }
27:
28: public String typeDefault() {
29:
30: return "ON";
31:
32: }
33:
34: public TKVector getOptions(String data) {
35:
36: TKVector options = new TKVector();
37: options.addElement("ON");
38: options.addElement("OFF");
39: options.addElement("");
40:
41: return options;
42: }
43:
44: public String setOptions(TKVector optionList) {
45:
46: return null;
47: }
48:
49: public boolean isFlag() {
50:
51: return true;
52: }
53: }
|