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 ImageURLFieldReportElementBeanInfo extends SimpleBeanInfo {
30: @NotNull
31: private PropertyDescriptor[] propertyDescriptors;
32:
33: public ImageURLFieldReportElementBeanInfo()
34: throws IntrospectionException {
35: GroupingPropertyDescriptor nameDescriptor = new GroupingPropertyDescriptor(
36: PropertyKeys.NAME, PropertyKeys.GROUP_ID, false, 1,
37: ImageURLFieldReportElement.class);
38:
39: GroupingPropertyDescriptor positionContentDescriptor = new GroupingPropertyDescriptor(
40: PropertyKeys.POSITION, PropertyKeys.GROUP_SPATIAL,
41: false, 1, ImageURLFieldReportElement.class);
42: GroupingPropertyDescriptor minimumSizeContentDescriptor = new GroupingPropertyDescriptor(
43: PropertyKeys.MINIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
44: false, 2, ImageURLFieldReportElement.class);
45: GroupingPropertyDescriptor maximumSizeContentDescriptor = new GroupingPropertyDescriptor(
46: PropertyKeys.MAXIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
47: false, 3, ImageURLFieldReportElement.class);
48:
49: GroupingPropertyDescriptor fieldNameDescriptor = new GroupingPropertyDescriptor(
50: PropertyKeys.FIELD_NAME, PropertyKeys.GROUP_APPEARANCE,
51: true, 1, ImageURLFieldReportElement.class);
52: GroupingPropertyDescriptor keepAspectDescriptor = new GroupingPropertyDescriptor(
53: PropertyKeys.KEEP_ASPECT,
54: PropertyKeys.GROUP_APPEARANCE, false, 2,
55: ImageURLFieldReportElement.class);
56: GroupingPropertyDescriptor formulaDescriptor = new GroupingPropertyDescriptor(
57: PropertyKeys.FORMULA, PropertyKeys.GROUP_APPEARANCE,
58: false, 3, ImageURLFieldReportElement.class);
59: GroupingPropertyDescriptor paddingContentDescriptor = new GroupingPropertyDescriptor(
60: PropertyKeys.PADDING, PropertyKeys.GROUP_APPEARANCE,
61: false, 4, ImageURLFieldReportElement.class);
62: GroupingPropertyDescriptor elementBorderDescriptor = new GroupingPropertyDescriptor(
63: PropertyKeys.ELEMENT_BORDER,
64: PropertyKeys.GROUP_APPEARANCE, false, 5,
65: ImageURLFieldReportElement.class);
66:
67: propertyDescriptors = new PropertyDescriptor[] {
68: nameDescriptor, positionContentDescriptor,
69: formulaDescriptor, elementBorderDescriptor,
70: minimumSizeContentDescriptor,
71: maximumSizeContentDescriptor, fieldNameDescriptor,
72: keepAspectDescriptor, paddingContentDescriptor };
73: }
74:
75: @NotNull
76: public BeanDescriptor getBeanDescriptor() {
77: return new BeanDescriptor(ImageURLFieldReportElement.class);
78: }
79:
80: @NotNull
81: public PropertyDescriptor[] getPropertyDescriptors() {
82: return propertyDescriptors;
83: }
84:
85: }
|