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