001: /*
002: * Copyright 2006-2007 Pentaho Corporation. All rights reserved.
003: * This software was developed by Pentaho Corporation and is provided under the terms
004: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
005: * this file except in compliance with the license. If you need a copy of the license,
006: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt.
007: *
008: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
009: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
010: * the license for the specific language governing your rights and limitations.
011: *
012: * Additional Contributor(s): Martin Schmid gridvision engineering GmbH
013: */
014: package org.pentaho.reportdesigner.crm.report.model;
015:
016: import org.jetbrains.annotations.NotNull;
017: import org.pentaho.reportdesigner.crm.report.PropertyKeys;
018:
019: import java.beans.BeanDescriptor;
020: import java.beans.IntrospectionException;
021: import java.beans.PropertyDescriptor;
022: import java.beans.SimpleBeanInfo;
023:
024: /**
025: * User: Martin
026: * Date: 21.10.2005
027: * Time: 07:11:26
028: */
029: public class ResourceLabelReportElementBeanInfo extends SimpleBeanInfo {
030: @NotNull
031: private PropertyDescriptor[] propertyDescriptors;
032:
033: public ResourceLabelReportElementBeanInfo()
034: throws IntrospectionException {
035: GroupingPropertyDescriptor nameDescriptor = new GroupingPropertyDescriptor(
036: PropertyKeys.NAME, PropertyKeys.GROUP_ID, false, 1,
037: ResourceLabelReportElement.class);
038:
039: GroupingPropertyDescriptor positionContentDescriptor = new GroupingPropertyDescriptor(
040: PropertyKeys.POSITION, PropertyKeys.GROUP_SPATIAL,
041: false, 1, ResourceLabelReportElement.class);
042: GroupingPropertyDescriptor minimumSizeContentDescriptor = new GroupingPropertyDescriptor(
043: PropertyKeys.MINIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
044: false, 2, ResourceLabelReportElement.class);
045: GroupingPropertyDescriptor maximumSizeContentDescriptor = new GroupingPropertyDescriptor(
046: PropertyKeys.MAXIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
047: false, 3, ResourceLabelReportElement.class);
048:
049: GroupingPropertyDescriptor resourceBaseStringDescriptor = new GroupingPropertyDescriptor(
050: PropertyKeys.RESOURCE_BASE,
051: PropertyKeys.GROUP_APPEARANCE, true, 1,
052: ResourceLabelReportElement.class);
053: GroupingPropertyDescriptor fieldNameDescriptor = new GroupingPropertyDescriptor(
054: PropertyKeys.RESOURCE_KEY,
055: PropertyKeys.GROUP_APPEARANCE, true, 2,
056: ResourceLabelReportElement.class);
057: GroupingPropertyDescriptor nullStringDescriptor = new GroupingPropertyDescriptor(
058: PropertyKeys.NULL_STRING,
059: PropertyKeys.GROUP_APPEARANCE, true, 3,
060: ResourceLabelReportElement.class);
061: GroupingPropertyDescriptor styleExpressionsDescriptor = new GroupingPropertyDescriptor(
062: PropertyKeys.STYLE_EXPRESSIONS,
063: PropertyKeys.GROUP_APPEARANCE, false, 5,
064: ResourceLabelReportElement.class);
065:
066: GroupingPropertyDescriptor fontDescriptor = new GroupingPropertyDescriptor(
067: PropertyKeys.FONT, PropertyKeys.GROUP_APPEARANCE,
068: false, 101, ResourceLabelReportElement.class);
069: GroupingPropertyDescriptor underlineDescriptor = new GroupingPropertyDescriptor(
070: PropertyKeys.UNDERLINE, PropertyKeys.GROUP_APPEARANCE,
071: false, 102, ResourceLabelReportElement.class);
072: GroupingPropertyDescriptor strikethroughDescriptor = new GroupingPropertyDescriptor(
073: PropertyKeys.STRIKETHROUGH,
074: PropertyKeys.GROUP_APPEARANCE, false, 103,
075: ResourceLabelReportElement.class);
076: GroupingPropertyDescriptor lineHeightDescriptor = new GroupingPropertyDescriptor(
077: PropertyKeys.LINE_HEIGHT,
078: PropertyKeys.GROUP_APPEARANCE, false, 104,
079: ResourceLabelReportElement.class);
080: GroupingPropertyDescriptor backgroundDescriptor = new GroupingPropertyDescriptor(
081: PropertyKeys.BACKGROUND, PropertyKeys.GROUP_APPEARANCE,
082: false, 105, ResourceLabelReportElement.class);
083: GroupingPropertyDescriptor foregroundDescriptor = new GroupingPropertyDescriptor(
084: PropertyKeys.FOREGROUND, PropertyKeys.GROUP_APPEARANCE,
085: false, 106, ResourceLabelReportElement.class);
086: GroupingPropertyDescriptor horizontalAlignmentDescriptor = new GroupingPropertyDescriptor(
087: PropertyKeys.HORIZONTAL_ALIGNMENT,
088: PropertyKeys.GROUP_APPEARANCE, false, 107,
089: ResourceLabelReportElement.class);
090: GroupingPropertyDescriptor verticalAlignmentDescriptor = new GroupingPropertyDescriptor(
091: PropertyKeys.VERTICAL_ALIGNMENT,
092: PropertyKeys.GROUP_APPEARANCE, false, 108,
093: ResourceLabelReportElement.class);
094: GroupingPropertyDescriptor reservedLiteralDescriptor = new GroupingPropertyDescriptor(
095: PropertyKeys.RESERVED_LITERAL,
096: PropertyKeys.GROUP_APPEARANCE, false, 109,
097: ResourceLabelReportElement.class);
098: GroupingPropertyDescriptor trimTextContentDescriptor = new GroupingPropertyDescriptor(
099: PropertyKeys.TRIM_TEXT_CONTENT,
100: PropertyKeys.GROUP_APPEARANCE, false, 110,
101: ResourceLabelReportElement.class);
102: GroupingPropertyDescriptor dynamicContentDescriptor = new GroupingPropertyDescriptor(
103: PropertyKeys.DYNAMIC_CONTENT,
104: PropertyKeys.GROUP_APPEARANCE, false, 111,
105: ResourceLabelReportElement.class);
106: GroupingPropertyDescriptor paddingContentDescriptor = new GroupingPropertyDescriptor(
107: PropertyKeys.PADDING, PropertyKeys.GROUP_APPEARANCE,
108: false, 112, ResourceLabelReportElement.class);
109: GroupingPropertyDescriptor elementBorderDescriptor = new GroupingPropertyDescriptor(
110: PropertyKeys.ELEMENT_BORDER,
111: PropertyKeys.GROUP_APPEARANCE, false, 113,
112: ResourceLabelReportElement.class);
113:
114: GroupingPropertyDescriptor wrapTextInExcelDescriptor = new GroupingPropertyDescriptor(
115: PropertyKeys.WRAP_TEXT_IN_EXCEL,
116: PropertyKeys.GROUP_OUTPUT, false, 1,
117: ResourceLabelReportElement.class);
118: GroupingPropertyDescriptor encodingDescriptor = new GroupingPropertyDescriptor(
119: PropertyKeys.ENCODING, PropertyKeys.GROUP_OUTPUT,
120: false, 2, ResourceLabelReportElement.class);
121: GroupingPropertyDescriptor embedFontDescriptor = new GroupingPropertyDescriptor(
122: PropertyKeys.EMBED_FONT, PropertyKeys.GROUP_OUTPUT,
123: false, 3, ResourceLabelReportElement.class);
124:
125: propertyDescriptors = new PropertyDescriptor[] {
126: nameDescriptor, styleExpressionsDescriptor,
127: positionContentDescriptor, paddingContentDescriptor,
128: minimumSizeContentDescriptor,
129: maximumSizeContentDescriptor,
130: resourceBaseStringDescriptor, fieldNameDescriptor,
131: elementBorderDescriptor, nullStringDescriptor,
132: fontDescriptor, underlineDescriptor,
133: strikethroughDescriptor, lineHeightDescriptor,
134: backgroundDescriptor, foregroundDescriptor,
135: dynamicContentDescriptor,
136: horizontalAlignmentDescriptor,
137: verticalAlignmentDescriptor, reservedLiteralDescriptor,
138: trimTextContentDescriptor, wrapTextInExcelDescriptor,
139: encodingDescriptor, embedFontDescriptor };
140:
141: }
142:
143: @NotNull
144: public BeanDescriptor getBeanDescriptor() {
145: return new BeanDescriptor(ResourceLabelReportElement.class);
146: }
147:
148: @NotNull
149: public PropertyDescriptor[] getPropertyDescriptors() {
150: return propertyDescriptors;
151: }
152:
153: }
|