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 BandToplevelItemReportElementBeanInfo extends
030: SimpleBeanInfo {
031: @NotNull
032: private PropertyDescriptor[] propertyDescriptors;
033:
034: public BandToplevelItemReportElementBeanInfo()
035: throws IntrospectionException {
036: GroupingPropertyDescriptor pageBreakBeforeContentDescriptor = new GroupingPropertyDescriptor(
037: PropertyKeys.PAGE_BREAK_BEFORE,
038: PropertyKeys.GROUP_APPEARANCE, false, 1,
039: BandToplevelItemReportElement.class);
040: GroupingPropertyDescriptor pageBreakAfterContentDescriptor = new GroupingPropertyDescriptor(
041: PropertyKeys.PAGE_BREAK_AFTER,
042: PropertyKeys.GROUP_APPEARANCE, false, 2,
043: BandToplevelItemReportElement.class);
044: GroupingPropertyDescriptor visualHeightDescriptor = new GroupingPropertyDescriptor(
045: PropertyKeys.VISUAL_HEIGHT,
046: PropertyKeys.GROUP_APPEARANCE, false, 3,
047: BandToplevelItemReportElement.class);
048: GroupingPropertyDescriptor showInLayoutGUIDescriptor = new GroupingPropertyDescriptor(
049: PropertyKeys.SHOW_IN_LAYOUT_GUI,
050: PropertyKeys.GROUP_APPEARANCE, false, 4,
051: BandToplevelItemReportElement.class);
052: GroupingPropertyDescriptor rowBandingDefinitionDescriptor = new GroupingPropertyDescriptor(
053: PropertyKeys.ROW_BANDING_DEFINITION,
054: PropertyKeys.GROUP_APPEARANCE, false, 5,
055: BandToplevelItemReportElement.class);
056: GroupingPropertyDescriptor styleExpressionsDescriptor = new GroupingPropertyDescriptor(
057: PropertyKeys.STYLE_EXPRESSIONS,
058: PropertyKeys.GROUP_APPEARANCE, false, 6,
059: BandToplevelItemReportElement.class);
060: GroupingPropertyDescriptor backgroundDescriptor = new GroupingPropertyDescriptor(
061: PropertyKeys.BACKGROUND, PropertyKeys.GROUP_APPEARANCE,
062: false, 7, BandToplevelItemReportElement.class);
063: GroupingPropertyDescriptor elementBorderDescriptor = new GroupingPropertyDescriptor(
064: PropertyKeys.ELEMENT_BORDER,
065: PropertyKeys.GROUP_APPEARANCE, false, 8,
066: BandToplevelItemReportElement.class);
067: GroupingPropertyDescriptor paddingContentDescriptor = new GroupingPropertyDescriptor(
068: PropertyKeys.PADDING, PropertyKeys.GROUP_APPEARANCE,
069: false, 9, BandToplevelItemReportElement.class);
070: //GroupingPropertyDescriptor reportLayoutManagerContentDescriptor = new GroupingPropertyDescriptor(PropertyKeys.REPORT_LAYOUT_MANAGER_TYPE, PropertyKeys.GROUP_APPEARANCE, true, 1, BandToplevelItemReportElement.class);
071:
072: GroupingPropertyDescriptor minimumSizeContentDescriptor = new GroupingPropertyDescriptor(
073: PropertyKeys.MINIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
074: false, 2, BandToplevelItemReportElement.class);
075: GroupingPropertyDescriptor maximumSizeContentDescriptor = new GroupingPropertyDescriptor(
076: PropertyKeys.MAXIMUM_SIZE, PropertyKeys.GROUP_SPATIAL,
077: false, 3, BandToplevelItemReportElement.class);
078:
079: propertyDescriptors = new PropertyDescriptor[] {
080: pageBreakBeforeContentDescriptor,
081: pageBreakAfterContentDescriptor, backgroundDescriptor,
082: styleExpressionsDescriptor,
083: rowBandingDefinitionDescriptor, visualHeightDescriptor,
084: showInLayoutGUIDescriptor,
085: minimumSizeContentDescriptor,
086: maximumSizeContentDescriptor, elementBorderDescriptor,
087: paddingContentDescriptor,
088: //reportLayoutManagerContentDescriptor
089: };
090: }
091:
092: @NotNull
093: public BeanDescriptor getBeanDescriptor() {
094: return new BeanDescriptor(BandToplevelItemReportElement.class);
095: }
096:
097: @NotNull
098: public PropertyDescriptor[] getPropertyDescriptors() {
099: return propertyDescriptors;
100: }
101:
102: }
|