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 BandToplevelReportElementBeanInfo extends SimpleBeanInfo {
30: @NotNull
31: private PropertyDescriptor[] propertyDescriptors;
32:
33: public BandToplevelReportElementBeanInfo()
34: throws IntrospectionException {
35: GroupingPropertyDescriptor pageBreakBeforeContentDescriptor = new GroupingPropertyDescriptor(
36: PropertyKeys.PAGE_BREAK_BEFORE,
37: PropertyKeys.GROUP_APPEARANCE, false, 1,
38: BandToplevelReportElement.class);
39: GroupingPropertyDescriptor pageBreakAfterContentDescriptor = new GroupingPropertyDescriptor(
40: PropertyKeys.PAGE_BREAK_AFTER,
41: PropertyKeys.GROUP_APPEARANCE, false, 2,
42: BandToplevelReportElement.class);
43: GroupingPropertyDescriptor visualHeightDescriptor = new GroupingPropertyDescriptor(
44: PropertyKeys.VISUAL_HEIGHT,
45: PropertyKeys.GROUP_APPEARANCE, false, 3,
46: BandToplevelReportElement.class);
47: GroupingPropertyDescriptor showInLayoutGUIDescriptor = new GroupingPropertyDescriptor(
48: PropertyKeys.SHOW_IN_LAYOUT_GUI,
49: PropertyKeys.GROUP_APPEARANCE, false, 4,
50: BandToplevelReportElement.class);
51: GroupingPropertyDescriptor styleExpressionsDescriptor = new GroupingPropertyDescriptor(
52: PropertyKeys.STYLE_EXPRESSIONS,
53: PropertyKeys.GROUP_APPEARANCE, false, 5,
54: BandToplevelReportElement.class);
55: GroupingPropertyDescriptor backgroundDescriptor = new GroupingPropertyDescriptor(
56: PropertyKeys.BACKGROUND, PropertyKeys.GROUP_APPEARANCE,
57: false, 6, BandToplevelReportElement.class);
58: GroupingPropertyDescriptor elementBorderDescriptor = new GroupingPropertyDescriptor(
59: PropertyKeys.ELEMENT_BORDER,
60: PropertyKeys.GROUP_APPEARANCE, false, 7,
61: BandToplevelReportElement.class);
62: GroupingPropertyDescriptor paddingContentDescriptor = new GroupingPropertyDescriptor(
63: PropertyKeys.PADDING, PropertyKeys.GROUP_APPEARANCE,
64: false, 8, BandToplevelReportElement.class);
65: //GroupingPropertyDescriptor reportLayoutManagerContentDescriptor = new GroupingPropertyDescriptor(PropertyKeys.REPORT_LAYOUT_MANAGER_TYPE, PropertyKeys.GROUP_APPEARANCE, true, 1, BandToplevelReportElement.class);
66:
67: GroupingPropertyDescriptor minimumSizeContentDescriptor = new GroupingPropertyDescriptor(
68: PropertyKeys.MINIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
69: false, 6, BandToplevelReportElement.class);
70: GroupingPropertyDescriptor maximumSizeContentDescriptor = new GroupingPropertyDescriptor(
71: PropertyKeys.MAXIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
72: false, 7, BandToplevelReportElement.class);
73:
74: propertyDescriptors = new PropertyDescriptor[] {
75: pageBreakBeforeContentDescriptor,
76: pageBreakAfterContentDescriptor, backgroundDescriptor,
77: styleExpressionsDescriptor, visualHeightDescriptor,
78: showInLayoutGUIDescriptor,
79: minimumSizeContentDescriptor,
80: maximumSizeContentDescriptor, elementBorderDescriptor,
81: paddingContentDescriptor,
82: //reportLayoutManagerContentDescriptor
83: };
84: }
85:
86: @NotNull
87: public BeanDescriptor getBeanDescriptor() {
88: return new BeanDescriptor(BandToplevelReportElement.class);
89: }
90:
91: @NotNull
92: public PropertyDescriptor[] getPropertyDescriptors() {
93: return propertyDescriptors;
94: }
95:
96: }
|