01: /**
02: * Miroslav Popov, Dec 2, 2005
03: * miroslav.popov@gmail.com
04: */package org.enhydra.jawe.base.editor;
05:
06: import java.awt.Color;
07: import java.util.Properties;
08:
09: import org.enhydra.jawe.AdditionalResourceManager;
10: import org.enhydra.jawe.JaWEComponent;
11: import org.enhydra.jawe.ResourceManager;
12: import org.enhydra.jawe.Utils;
13: import org.enhydra.jawe.base.panel.PanelSettings;
14:
15: /**
16: * @author Miroslav Popov
17: *
18: */
19: public class TableEditorSettings extends PanelSettings {
20:
21: public void init(JaWEComponent comp) {
22: loadDefault(comp, new Properties());
23: }
24:
25: public void loadDefault(JaWEComponent comp, Properties properties) {
26: arm = new AdditionalResourceManager(properties);
27:
28: componentSettings.put("UseScrollBar", new Boolean(properties
29: .getProperty("InlinePanel.UseScrollBar", "true")
30: .equals("true")));
31:
32: componentSettings.put("DisplayTitle", new Boolean(properties
33: .getProperty("InlinePanel.DisplayTitle", "false")
34: .equals("true")));
35:
36: componentSettings.put("XMLBasicPanel.RightAllignment",
37: new Boolean(properties.getProperty(
38: "XMLBasicPanel.RightAllignment", "false")
39: .equals("true")));
40:
41: componentSettings.put("EmptyBorder.TOP", new Integer(properties
42: .getProperty("XMLBasicPanel.EmptyBorder.TOP", "0")));
43: componentSettings.put("EmptyBorder.LEFT", new Integer(
44: properties.getProperty(
45: "XMLBasicPanel.EmptyBorder.LEFT", "3")));
46: componentSettings.put("EmptyBorder.BOTTOM", new Integer(
47: properties.getProperty(
48: "XMLBasicPanel.EmptyBorder.BOTTOM", "4")));
49: componentSettings.put("EmptyBorder.RIGHT", new Integer(
50: properties.getProperty(
51: "XMLBasicPanel.EmptyBorder.RIGHT", "3")));
52: componentSettings.put("SimplePanelTextWidth", new Integer(
53: properties.getProperty(
54: "XMLBasicPanel.SimplePanelTextWidth", "250")));
55: componentSettings.put("SimplePanelTextHeight", new Integer(
56: properties.getProperty(
57: "XMLBasicPanel.SimplePanelTextHeight", "20")));
58:
59: componentSettings.put("ShowColumns.XMLTablePanel.Applications",
60: "Id Name");
61: componentSettings.put("ShowColumns.XMLTablePanel.Participants",
62: "Id Name ParticipantType");
63: componentSettings.put(
64: "ShowColumns.XMLTablePanel.WorkflowProcesses",
65: "Id Name AccessLevel");
66:
67: Color color = null;
68: try {
69: color = Utils.getColor(ResourceManager.getResourceString(
70: properties, "BackgroundColor"));
71: } catch (Exception e) {
72: color = Utils.getColor("R=245,G=245,B=245");
73: }
74: componentSettings.put("BackgroundColor", color);
75:
76: }
77: }
|