class ItemRenderer
package feathers.controls.dataRenderers
extends ToggleButton › BasicToggleButton › FeathersControl › MeasureSprite › ValidatingSprite
implements IPointerDelegate, IDataRenderer, ILayoutIndexObject
extended by TreeViewItemRenderer
A generic renderer for UI components that display data collections.
1.0.0
.See also:
Constructor
Variables
alternateBackgroundSkin:DisplayObject
The display object to use as the background skin when the alternate skin is enabled.
The following example passes a bitmap to use as an alternate background skin:
itemRenderer.alternateBackgroundSkin = new Bitmap(bitmapData);
1.0.0
.See also:
disabledSecondaryTextFormat:AbstractTextFormat
The font styles used to render the item renderer's secondary text when the item renderer is disabled.
In the following example, the item renderer's secondary disabled text formatting is customized:
itemRenderer.enabled = false;
itemRenderer.disabledSecondaryTextFormat = new TextFormat("Helvetica", 20, 0xee0000);
The next example sets a disabled secondary text format, but also
provides a text format for the ToggleButtonState.DISABLED(true)
state
that will be used instead of the disabled secondary text format:
itemRenderer.disabledSecondaryTextFormat = new TextFormat("Helvetica", 20, 0xee0000);
itemRenderer.setSecondaryTextFormatForState(ToggleButtonState.DISABLED(true), new TextFormat("Helvetica", 20, 0xff0000));
Note: If the current state is ToggleButtonState.DISABLED(true)
, and
both the disabledSecondaryTextFormat
and selectedSecondaryTextFormat
are set, the disabledSecondaryTextFormat
takes precedence over the
selectedSecondaryTextFormat
.
1.0.0
.See also:
secondaryText:String
The optional secondary text displayed by the item renderer.
The following example sets the item renderer's secondary text:
itemRenderer.secondaryText = "Click Me";
1.0.0
.See also:
secondaryTextFormat:AbstractTextFormat
The font styles used to render the item renderer's secondary text.
In the following example, the item renderer's secondary text formatting is customized:
itemRenderer.secondaryTextFormat = new TextFormat("Helvetica", 20, 0xcc0000);
1.0.0
.See also:
selectedSecondaryTextFormat:AbstractTextFormat
The font styles used to render the item renderer's secondary text when the item renderer is selected.
In the following example, the item renderer's selected secondary text formatting is customized:
itemRenderer.selected = true;
itemRenderer.selectedSecondaryTextFormat = new TextFormat("Helvetica", 20, 0xff0000);
The next example sets a selected secondary text format, but also
provides a text format for the ToggleButtonState.DOWN(true)
state that
will be used instead of the selected secondary text format:
itemRenderer.selectedSecondaryTextFormat = new TextFormat("Helvetica", 20, 0xff0000);
itemRenderer.setSecondaryTextFormatForState(ToggleButtonState.DOWN(true), new TextFormat("Helvetica", 20, 0xcc0000));
Note: If the current state is ToggleButtonState.DISABLED(true)
, and
both the disabledSecondaryTextFormat
and selectedSecondaryTextFormat
are set, the disabledSecondaryTextFormat
takes precedence over the
selectedSecondaryTextFormat
.
1.0.0
.See also:
Methods
getSecondaryTextFormatForState(state:ToggleButtonState):AbstractTextFormat
Gets the secondary text format to be used by the item renderer when its
currentState
property matches the specified state value.
If a secondary text format is not defined for a specific state, returns
null
.
1.0.0
.See also:
setSecondaryTextFormatForState(state:ToggleButtonState, textFormat:AbstractTextFormat):Void
Set the secondary text format to be used by the item renderer when its
currentState
property matches the specified state value.
If a secondary text format is not defined for a specific state, the
value of the secondaryTextFormat
property will be used instead.
1.0.0
.See also: