Packageat.controls
Classpublic class SectionButton
InheritanceSectionButton Inheritance mx.controls.Button

The SectionButton class adds some new functionality to the default Flex Button.

This includes some functionality with Slide navigation. The SectionButton works well as a "next button" or a "previous button" to navigate sequentially in the slide order, but only if a navigationManager is provided.



Public Properties
 PropertyDefined by
  allowLeaveSection : Boolean = true
Allows leaving a section when navigating from one node to the next.
SectionButton
  allowLoopToBegining : Boolean = false
When viewing the last slide in a list, determines the canGoNext value.
SectionButton
  allowLoopToEnd : Boolean = false
When viewing the first slide in a list, determines the canGoPrev value.
SectionButton
  canGoNext : Boolean
[read-only] This value is set by the SectionButton to be used on this SectionButton.
SectionButton
  canGoPrev : Boolean
[read-only] This value is set by the SectionButton to be used on this SectionButton.
SectionButton
  direction : String = "none"
Specifies if this navigation button moves slides forward, backward or neither.
SectionButton
  navigationManager : SlideManager
The navigation manager that allows for automatic navigation when set.
SectionButton
Public Methods
 MethodDefined by
  
Constructor.
SectionButton
Protected Methods
 MethodDefined by
  
Handles a navigation change event when a navigationManager is set.
SectionButton
Property detail
allowLeaveSectionproperty
public var allowLeaveSection:Boolean = true

Allows leaving a section when navigating from one node to the next. If the current node is in section 1 and the next is in section 2, allowLeaveSection being set to false will set the canGoNext/canGoPrev to false.

The default value is true.

allowLoopToBeginingproperty 
public var allowLoopToBegining:Boolean = false

When viewing the last slide in a list, determines the canGoNext value. If allowLoopToBegining is true, (and the move is otherwise valid) canGoNext will evaluate to true, false otherwise.

The default value is false.

allowLoopToEndproperty 
public var allowLoopToEnd:Boolean = false

When viewing the first slide in a list, determines the canGoPrev value. If allowLoopToEnd is true, (and the move is otherwise valid) canGoPrev will evaluate to true, false otherwise.

The default value is false.

canGoNextproperty 
canGoNext:Boolean  [read-only]

This value is set by the SectionButton to be used on this SectionButton. If used as a "next button" for slide navigation, this can be applied to an enabled property if slides need to stay in the current section. It will be false if at the last slide in a section.

The default value is false.

This property can be used as the source for data binding.

Implementation
    public function get canGoNext():Boolean
canGoPrevproperty 
canGoPrev:Boolean  [read-only]

This value is set by the SectionButton to be used on this SectionButton. If used as a "previous button" for slide navigation, this can be applied to an enabled property if slides need to stay in the current section. It will be false if at the first slide in a section.

The default value is false.

This property can be used as the source for data binding.

Implementation
    public function get canGoPrev():Boolean
directionproperty 
public var direction:String = "none"

Specifies if this navigation button moves slides forward, backward or neither. In the case of neither, navigation is handled external to the button, and so is enabling/disabling of the button.

The default value is true.

navigationManagerproperty 
navigationManager:SlideManager  [read-write]

The navigation manager that allows for automatic navigation when set.

By setting this, all of the internal functions to the component can be utilized.

Implementation
    public function get navigationManager():SlideManager
    public function set navigationManager(value:SlideManager):void

See also

Constructor detail
SectionButton()constructor
public function SectionButton()

Constructor.

Method detail
navigationChangeHandler()method
protected function navigationChangeHandler(e:NavigationChangeEvent):void

Handles a navigation change event when a navigationManager is set.

When the navigationManager is set, on every navigation change, the SectionButton sets the canGoNext and canGoPrev booleans to determine if the button can go to the next slide or previous slide based on the current slide. This value can then be set our bound to the component in MXML to set the visible or enabled property of the button to prevent clicking due to business rules being violated.

Parameters
e:NavigationChangeEvent — The navigation change event