Packagecom.adobe.portfolio.components.supportClasses
Classpublic class ButtonBuffer
InheritanceButtonBuffer Inheritance mx.core.UIComponent

The ButtonBuffer class provides a transparent component that captures clicks and propagates them through a separate button instance. This allows an enlarged area to act as a button click without affecting additional button states.



Public Properties
 PropertyDefined By
  button : IEventDispatcher
The button that should dispatch a click event when this component is clicked.
ButtonBuffer
  touchOnly : Boolean
True if this component should only propagate click events in environments supporting touch interaction; false if this component should always propagate click events.
ButtonBuffer
Protected Properties
 PropertyDefined By
  isTouchSupported : Boolean
[static] [read-only] Returns true if touch interaction is supported in the current environment; false otherwise.
ButtonBuffer
Protected Methods
 MethodDefined By
  
handleClickListener(shouldListen:Boolean):void
A helper function to add or remove the default click event listener.
ButtonBuffer
  
onBufferClick(event:MouseEvent):void
An event listener that responds to click events on this component and propagates them to button.
ButtonBuffer
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override]
ButtonBuffer
Public Constants
 ConstantDefined By
  DEFAULT_BUFFER_EXTENSION : Number = 10
[static]
ButtonBuffer
Property Detail
buttonproperty
button:IEventDispatcher

The button that should dispatch a click event when this component is clicked.


Implementation
    public function get button():IEventDispatcher
    public function set button(value:IEventDispatcher):void
isTouchSupportedproperty 
isTouchSupported:Boolean  [read-only]

Returns true if touch interaction is supported in the current environment; false otherwise.


Implementation
    protected static function get isTouchSupported():Boolean
touchOnlyproperty 
touchOnly:Boolean

True if this component should only propagate click events in environments supporting touch interaction; false if this component should always propagate click events.


Implementation
    public function get touchOnly():Boolean
    public function set touchOnly(value:Boolean):void

See also

Method Detail
handleClickListener()method
protected function handleClickListener(shouldListen:Boolean):void

A helper function to add or remove the default click event listener.

Parameters

shouldListen:Boolean

See also

onBufferClick()method 
protected function onBufferClick(event:MouseEvent):void

An event listener that responds to click events on this component and propagates them to button.

Parameters

event:MouseEvent

updateDisplayList()method 
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

Parameters

unscaledWidth:Number
 
unscaledHeight:Number

Constant Detail
DEFAULT_BUFFER_EXTENSIONConstant
public static const DEFAULT_BUFFER_EXTENSION:Number = 10