Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.controls.menuClasses 
IMenuItemRenderer 
Packagemx.controls.menuClasses
Interfacepublic interface IMenuItemRenderer
Implementors MenuItemRenderer

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The IMenuItemRenderer interface defines the interface that a menu item renderer for a Menu control must implement.

The menu item renderers are often recycled. Once they are created, they may be used again simply by being given new data. Therefore, in individual implementations, component developers must make sure that component properties are not assumed to contain specific initial, or default values.

To implement this interface, a component developer must define a setter and getter method that implements the menu property. Typically, the setter method writes the value of the data property to an internal variable, and the getter method returns the current value of the internal variable, as the following example shows:

     // Internal variable for the property value.
     private var _menu:Menu;
 
     // Define the getter method.
     public function get menu():Menu
     {
         return _menu;
     }
 
     // Define the setter method.
     public function set menu(value:Menu):void
     {
         _menu = value;
     }
  



Public Properties
 PropertyDefined By
  measuredBranchIconWidth : Number
[read-only] The width of the branch icon.
IMenuItemRenderer
  measuredIconWidth : Number
[read-only] The width of the icon.
IMenuItemRenderer
  measuredTypeIconWidth : Number
[read-only] The width of the type icon (radio/check).
IMenuItemRenderer
  menu : Menu
A reference to this menu item renderer's Menu control, if it contains one.
IMenuItemRenderer
Property Detail

measuredBranchIconWidth

property
measuredBranchIconWidth:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The width of the branch icon.



Implementation
    public function get measuredBranchIconWidth():Number

measuredIconWidth

property 
measuredIconWidth:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The width of the icon.



Implementation
    public function get measuredIconWidth():Number

measuredTypeIconWidth

property 
measuredTypeIconWidth:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The width of the type icon (radio/check).



Implementation
    public function get measuredTypeIconWidth():Number

menu

property 
menu:Menu

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

A reference to this menu item renderer's Menu control, if it contains one. This indicates that this menu item renderer is a branch node, capable of popping up a sub menu.



Implementation
    public function get menu():Menu
    public function set menu(value:Menu):void