//////////////////////////////////////////////////////////////////////////////// // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// package mx.controls.olapDataGridClasses { import mx.core.mx_internal; import mx.core.IFactory; import mx.formatters.Formatter; use namespace mx_internal; /** * The OLAPDataGridRendererProvider class defines the base class for * assigning item renderers used by the OLAPDataGrid control. * Use properties of the OLAPDataGridRendererProvider class to * configure where an item renderer is used in an OLAPDataGrid control. * *
Each cell in an OLAPDataGrid control is a result of an intersection
* between the members along a row and the members along a column of the control.
* However, when you assign an item renderer to an OLAPDataGrid control,
* you only specify the uniqueName
and type
properties
* for one of the dimensions, either row or column.
* Therefore, you can create a situation where two different item renderers
* are assigned to the same cell of the control.
In case of a conflict between two or more item renderers, * the OLAPDataGrid control applies the item renderer based on the following priorities:
* *type
= OLAPDataGrid.OLAP_MEMBER
type
= OLAPDataGrid.OLAP_LEVEL
type
= OLAPDataGrid.OLAP_HIERARCHY
type
= OLAPDataGrid.OLAP_DIMENSION
Therefore, if an item renderer with a type value of
* OLAPDataGrid.OLAP_LEVEL
and an item renderer
* with a type value of OLAPDataGrid.OLAP_HIERARCHY
* are applied to the same cell,
* the OLAPDataGrid control applies the item renderer with a type value
* of OLAPDataGrid.OLAP_LEVEL
.
If two item renderers have the same value for the type property, * the OLAPDataGrid control determines which renderer more closely matches * the item, and uses it.
* * @see mx.controls.OLAPDataGrid * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public class OLAPDataGridRendererProvider { include "../../core/Version.as"; //-------------------------------------------------------------------------- // // Properties // //-------------------------------------------------------------------------- //---------------------------------- // uniqueName //---------------------------------- private var _uniqueName:String; /** * The unique name of the IOLAPElement to which the renderer is applied. * For example, "[TimeDim][YearHier][2007]" is a unique name, * where "2007" is the level belonging to the "YearHier" hierarchy * of the "TimeDim" dimension. * *The uniqueName
property and the type
property
* together specify the target of the item renderer.
* Because the unique name of "[TimeDim][YearHier][2007]"
* specifies a level of an OLAP schema,
* set the type
property to OLAPDataGrid.OLAP_LEVEL
.
OLAPDataGrid.OLAP_DIMENSION
),
* hierarchy(OLAPDataGrid.OLAP_HIERARCHY
),
* level(OLAPDataGrid.OLAP_LEVEL
),
* or member (OLAPDataGrid.OLAP_MEMBER
) of an axis.
*
* Set this property based on the setting of the uniqueName
property.
* For example, if the uniqueName
property references a hierarchy of an OLAP schema,
* set this property to OLAPDataGrid.OLAP_HIERARCHY
.
For example, you define the following style in your application,
* and then use the styleName
property to associate it with
* a specific hierarchy in an OLAP schema:
* <Style> * .monthStyle * { * color:0x755762 * fontSize:14 * } * </Style> * * <mx:ODGHeaderRendererProvider * type="OLAPDataGrid.OLAP_HIERARCHY" * uniqueName="[Time][Month]" styleName="monthStyle"/>* * * @langversion 3.0 * @playerversion Flash 9 * @playerversion AIR 1.1 * @productversion Flex 3 */ public var styleName:String } }