class ItemRenderer
package feathers.controls.dataRenderers
extends ToggleButton › BasicToggleButton › FeathersControl › MeasureSprite › ValidatingSprite
implements IPointerDelegate, IDataRenderer, ILayoutIndexObject, IFocusContainer
extended by DrillDownItemRenderer, HierarchicalItemRenderer, SortOrderHeaderRenderer
A generic renderer for UI components that display data collections.
1.0.0
.See also:
Constructor
Variables
accessoryView:DisplayObject
An optional display object positioned on the right side of the item renderer.
The following example passes a button to use as the accessory view:
itemRenderer.accessoryView = new Button("Info");
1.0.0
.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:
secondaryHtmlText:String
Secondary text displayed by the button that is parsed as a simple form of HTML.
The following example sets the button's secondary HTML text:
button.secondaryHtmlText = "<b>Hello</b> <i>World</i>";
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:
showHoverAndDownStates:Bool
Indicates if hover and down states are enabled or not. Can be set to
false
for items that are intended for display only, and should not
appear interactive for mouse and keyboard trigger events or selection.
The ToggleButtonState.UP
state will be used instead of
ToggleButtonState.HOVER
and ToggleButtonState.DOWN
. However, the
item may still render differently when selected versus when it is not
selected.
1.3.0
.showSecondaryText:Bool
Shows or hides the item renderer's secondary text. If the secondary text is hidden, it will not affect the layout of other children, such as the primary text or the icon.
1.0.0
.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: