01: /*
02: * Copyright 2006-2007 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt.
07: *
08: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
09: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
10: * the license for the specific language governing your rights and limitations.
11: *
12: * Additional Contributor(s): Martin Schmid gridvision engineering GmbH
13: */
14: package org.pentaho.reportdesigner.crm.report.model;
15:
16: import org.jetbrains.annotations.NotNull;
17: import org.pentaho.reportdesigner.crm.report.PropertyKeys;
18:
19: import java.beans.BeanDescriptor;
20: import java.beans.IntrospectionException;
21: import java.beans.PropertyDescriptor;
22: import java.beans.SimpleBeanInfo;
23:
24: /**
25: * User: Martin
26: * Date: 21.10.2005
27: * Time: 07:11:26
28: */
29: public class BandReportElementBeanInfo extends SimpleBeanInfo {
30: @NotNull
31: private PropertyDescriptor[] propertyDescriptors;
32:
33: public BandReportElementBeanInfo() throws IntrospectionException {
34: GroupingPropertyDescriptor nameDescriptor = new GroupingPropertyDescriptor(
35: PropertyKeys.NAME, PropertyKeys.GROUP_ID, false, 1,
36: BandReportElement.class);
37: GroupingPropertyDescriptor reportLayoutManagerContentDescriptor = new GroupingPropertyDescriptor(
38: PropertyKeys.REPORT_LAYOUT_MANAGER_TYPE,
39: PropertyKeys.GROUP_APPEARANCE, true, 1,
40: BandReportElement.class);
41: GroupingPropertyDescriptor styleExpressionsDescriptor = new GroupingPropertyDescriptor(
42: PropertyKeys.STYLE_EXPRESSIONS,
43: PropertyKeys.GROUP_APPEARANCE, false, 2,
44: BandReportElement.class);
45: GroupingPropertyDescriptor showInLayoutGUIDescriptor = new GroupingPropertyDescriptor(
46: PropertyKeys.SHOW_IN_LAYOUT_GUI,
47: PropertyKeys.GROUP_APPEARANCE, false, 3,
48: BandReportElement.class);
49: GroupingPropertyDescriptor backgroundDescriptor = new GroupingPropertyDescriptor(
50: PropertyKeys.BACKGROUND, PropertyKeys.GROUP_APPEARANCE,
51: false, 4, BandReportElement.class);
52: GroupingPropertyDescriptor paddingContentDescriptor = new GroupingPropertyDescriptor(
53: PropertyKeys.PADDING, PropertyKeys.GROUP_APPEARANCE,
54: false, 5, BandReportElement.class);
55: GroupingPropertyDescriptor elementBorderDescriptor = new GroupingPropertyDescriptor(
56: PropertyKeys.ELEMENT_BORDER,
57: PropertyKeys.GROUP_APPEARANCE, false, 6,
58: BandReportElement.class);
59:
60: GroupingPropertyDescriptor positionContentDescriptor = new GroupingPropertyDescriptor(
61: PropertyKeys.POSITION, PropertyKeys.GROUP_SPATIAL,
62: false, 2, BandReportElement.class);
63: GroupingPropertyDescriptor minimumSizeContentDescriptor = new GroupingPropertyDescriptor(
64: PropertyKeys.MINIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
65: false, 3, BandReportElement.class);
66: GroupingPropertyDescriptor maximumSizeContentDescriptor = new GroupingPropertyDescriptor(
67: PropertyKeys.MAXIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
68: false, 4, BandReportElement.class);
69:
70: propertyDescriptors = new PropertyDescriptor[] {
71: nameDescriptor, reportLayoutManagerContentDescriptor,
72: backgroundDescriptor, styleExpressionsDescriptor,
73: paddingContentDescriptor, elementBorderDescriptor,
74: showInLayoutGUIDescriptor, positionContentDescriptor,
75: minimumSizeContentDescriptor,
76: maximumSizeContentDescriptor };
77: }
78:
79: @NotNull
80: public BeanDescriptor getBeanDescriptor() {
81: return new BeanDescriptor(BandReportElement.class);
82: }
83:
84: @NotNull
85: public PropertyDescriptor[] getPropertyDescriptors() {
86: return propertyDescriptors;
87: }
88:
89: }
|