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 TextFieldReportElementBeanInfo extends SimpleBeanInfo {
030: @NotNull
031: private PropertyDescriptor[] propertyDescriptors;
032:
033: public TextFieldReportElementBeanInfo()
034: throws IntrospectionException {
035: GroupingPropertyDescriptor nameDescriptor = new GroupingPropertyDescriptor(
036: PropertyKeys.NAME, PropertyKeys.GROUP_ID, false, 1,
037: TextFieldReportElement.class);
038:
039: GroupingPropertyDescriptor positionContentDescriptor = new GroupingPropertyDescriptor(
040: PropertyKeys.POSITION, PropertyKeys.GROUP_SPATIAL,
041: false, 1, TextFieldReportElement.class);
042: GroupingPropertyDescriptor minimumSizeContentDescriptor = new GroupingPropertyDescriptor(
043: PropertyKeys.MINIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
044: false, 2, TextFieldReportElement.class);
045: GroupingPropertyDescriptor maximumSizeContentDescriptor = new GroupingPropertyDescriptor(
046: PropertyKeys.MAXIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
047: false, 3, TextFieldReportElement.class);
048:
049: GroupingPropertyDescriptor fieldNameDescriptor = new GroupingPropertyDescriptor(
050: PropertyKeys.FIELD_NAME, PropertyKeys.GROUP_APPEARANCE,
051: true, 1, TextFieldReportElement.class);
052: GroupingPropertyDescriptor nullStringDescriptor = new GroupingPropertyDescriptor(
053: PropertyKeys.NULL_STRING,
054: PropertyKeys.GROUP_APPEARANCE, true, 2,
055: TextFieldReportElement.class);
056: GroupingPropertyDescriptor formulaDescriptor = new GroupingPropertyDescriptor(
057: PropertyKeys.FORMULA, PropertyKeys.GROUP_APPEARANCE,
058: false, 3, TextFieldReportElement.class);
059: GroupingPropertyDescriptor styleExpressionsDescriptor = new GroupingPropertyDescriptor(
060: PropertyKeys.STYLE_EXPRESSIONS,
061: PropertyKeys.GROUP_APPEARANCE, false, 4,
062: TextFieldReportElement.class);
063:
064: GroupingPropertyDescriptor fontDescriptor = new GroupingPropertyDescriptor(
065: PropertyKeys.FONT, PropertyKeys.GROUP_APPEARANCE,
066: false, 101, TextFieldReportElement.class);
067: GroupingPropertyDescriptor underlineDescriptor = new GroupingPropertyDescriptor(
068: PropertyKeys.UNDERLINE, PropertyKeys.GROUP_APPEARANCE,
069: false, 102, TextFieldReportElement.class);
070: GroupingPropertyDescriptor strikethroughDescriptor = new GroupingPropertyDescriptor(
071: PropertyKeys.STRIKETHROUGH,
072: PropertyKeys.GROUP_APPEARANCE, false, 103,
073: TextFieldReportElement.class);
074: GroupingPropertyDescriptor lineHeightDescriptor = new GroupingPropertyDescriptor(
075: PropertyKeys.LINE_HEIGHT,
076: PropertyKeys.GROUP_APPEARANCE, false, 104,
077: TextFieldReportElement.class);
078: GroupingPropertyDescriptor backgroundDescriptor = new GroupingPropertyDescriptor(
079: PropertyKeys.BACKGROUND, PropertyKeys.GROUP_APPEARANCE,
080: false, 105, TextFieldReportElement.class);
081: GroupingPropertyDescriptor foregroundDescriptor = new GroupingPropertyDescriptor(
082: PropertyKeys.FOREGROUND, PropertyKeys.GROUP_APPEARANCE,
083: false, 106, TextFieldReportElement.class);
084: GroupingPropertyDescriptor horizontalAlignmentDescriptor = new GroupingPropertyDescriptor(
085: PropertyKeys.HORIZONTAL_ALIGNMENT,
086: PropertyKeys.GROUP_APPEARANCE, false, 107,
087: TextFieldReportElement.class);
088: GroupingPropertyDescriptor verticalAlignmentDescriptor = new GroupingPropertyDescriptor(
089: PropertyKeys.VERTICAL_ALIGNMENT,
090: PropertyKeys.GROUP_APPEARANCE, false, 108,
091: TextFieldReportElement.class);
092: GroupingPropertyDescriptor reservedLiteralDescriptor = new GroupingPropertyDescriptor(
093: PropertyKeys.RESERVED_LITERAL,
094: PropertyKeys.GROUP_APPEARANCE, false, 109,
095: TextFieldReportElement.class);
096: GroupingPropertyDescriptor trimTextContentDescriptor = new GroupingPropertyDescriptor(
097: PropertyKeys.TRIM_TEXT_CONTENT,
098: PropertyKeys.GROUP_APPEARANCE, false, 110,
099: TextFieldReportElement.class);
100: GroupingPropertyDescriptor dynamicContentDescriptor = new GroupingPropertyDescriptor(
101: PropertyKeys.DYNAMIC_CONTENT,
102: PropertyKeys.GROUP_APPEARANCE, false, 111,
103: TextFieldReportElement.class);
104: GroupingPropertyDescriptor paddingContentDescriptor = new GroupingPropertyDescriptor(
105: PropertyKeys.PADDING, PropertyKeys.GROUP_APPEARANCE,
106: false, 112, TextFieldReportElement.class);
107: GroupingPropertyDescriptor elementBorderDescriptor = new GroupingPropertyDescriptor(
108: PropertyKeys.ELEMENT_BORDER,
109: PropertyKeys.GROUP_APPEARANCE, false, 113,
110: TextFieldReportElement.class);
111:
112: GroupingPropertyDescriptor wrapTextInExcelDescriptor = new GroupingPropertyDescriptor(
113: PropertyKeys.WRAP_TEXT_IN_EXCEL,
114: PropertyKeys.GROUP_OUTPUT, false, 1,
115: TextFieldReportElement.class);
116: GroupingPropertyDescriptor encodingDescriptor = new GroupingPropertyDescriptor(
117: PropertyKeys.ENCODING, PropertyKeys.GROUP_OUTPUT,
118: false, 2, TextFieldReportElement.class);
119: GroupingPropertyDescriptor embedFontDescriptor = new GroupingPropertyDescriptor(
120: PropertyKeys.EMBED_FONT, PropertyKeys.GROUP_OUTPUT,
121: false, 3, TextFieldReportElement.class);
122:
123: propertyDescriptors = new PropertyDescriptor[] {
124: nameDescriptor, styleExpressionsDescriptor,
125: paddingContentDescriptor, positionContentDescriptor,
126: formulaDescriptor, minimumSizeContentDescriptor,
127: maximumSizeContentDescriptor, elementBorderDescriptor,
128: fieldNameDescriptor, nullStringDescriptor,
129: fontDescriptor, underlineDescriptor,
130: strikethroughDescriptor, lineHeightDescriptor,
131: backgroundDescriptor, foregroundDescriptor,
132: dynamicContentDescriptor,
133: horizontalAlignmentDescriptor,
134: verticalAlignmentDescriptor, reservedLiteralDescriptor,
135: trimTextContentDescriptor, wrapTextInExcelDescriptor,
136: encodingDescriptor, embedFontDescriptor };
137: }
138:
139: @NotNull
140: public BeanDescriptor getBeanDescriptor() {
141: return new BeanDescriptor(TextFieldReportElement.class);
142: }
143:
144: @NotNull
145: public PropertyDescriptor[] getPropertyDescriptors() {
146: return propertyDescriptors;
147: }
148:
149: }
|