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