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