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