Packagecom.adobe.portfolio.layouts
Classpublic class OneUpLayout
InheritanceOneUpLayout Inheritance spark.layouts.supportClasses.LayoutBase
Implements ICardLayout, ICardProvider

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The OneUpLayout class is a LayoutBase that implements the layout of the BasicClickThrough navigator.



Public Properties
 PropertyDefined By
  cardLayoutHelper : CardLayoutHelper
[read-only] The instance of CardLayoutHelper used by this Navigator
OneUpLayout
  cardPosition : Number
The horizontal position of the card, in pixels.
OneUpLayout
  maxCardPosition : Number
The maximum horizontal position that a card can have.
OneUpLayout
  pendingCardPosition : Number
The card position for the card that is pending as the current card.
OneUpLayout
  thumbFitSize : Point
The size, represented as a width and height ordered pair, to use for thumbnails
OneUpLayout
Protected Properties
 PropertyDefined By
  currentFocus : IAttachment
The IAttachment instance that currently has the focus.
OneUpLayout
  focusEffect : Effect = null
The effect to currently playing due to a focus change
OneUpLayout
  lastFocus : IAttachment
The IAttachment instance that last had the focus
OneUpLayout
  pendingDuration : Number = 0
The time, in mimiseconds for pending effects to run
OneUpLayout
  pendingFocus : IAttachment
The IAttachment instance that is will next get the focus (pending)
OneUpLayout
Public Methods
 MethodDefined By
  
Constructor
OneUpLayout
  
elementAdded(index:int):void
[override] Handles the bookeeping when an element is added
OneUpLayout
  
elementRemoved(index:int):void
[override] Handles the bookeeping when an element is removed
OneUpLayout
  
findCardsThatIntersect(marqueeRect:Rectangle):Vector.<int>
Find the list of cards that overlap the specified marquee rectangle.
OneUpLayout
  
generateFocusEffect(oldIndex:int, newIndex:int, duration:Number):Effect
Create a focus change effect
OneUpLayout
  
generateGapEffect(splitIndex:int, duration:Number):Effect
Create an animation effect for a gap in the list.
OneUpLayout
  
getCard(cardPosition:Number):ISimpleCard
Returns the card that is at the specified position
OneUpLayout
  
measure():void
[override] Measures the target's default size based on its content.
OneUpLayout
  
setFocusAttachment(attachment:IAttachment, oldFocus:IAttachment = null):void
Set the target's focus to be the specified attachment
OneUpLayout
  
updateDisplayList(width:Number, height:Number):void
[override] update the display list
OneUpLayout
Protected Methods
 MethodDefined By
  
cardIndexFromPosition(cardPosition:Number):int
Returns the index value for the card at the given horizontal position the cards index value.
OneUpLayout
  
cardPositionFromIndex(elementIndex:int):Number
Returns the card position, in pixels, given the cards index value.
OneUpLayout
  
onEffectEnd(evt:EffectEvent):void
Handler for effect end events
OneUpLayout
  
Handler for Navigator host events passed to the Navigator
OneUpLayout
  
Updates the position of the maximum card (last card in the list) This is called when elements have been added or removed from the list of cards
OneUpLayout
Events
 Event Summary Defined By
  Dispatched after the layout has set its focus to a valid attachment.OneUpLayout
Protected Constants
 ConstantDefined By
  collectionManager : CollectionManager
The instance of the CollectionManager class used by this Navigator
OneUpLayout
  FOCUS_DURATION : Number
The time, in mimiseconds for focus effects to run
OneUpLayout
Property Detail
cardLayoutHelperproperty
cardLayoutHelper:CardLayoutHelper  [read-only]

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The instance of CardLayoutHelper used by this Navigator


Implementation
    public function get cardLayoutHelper():CardLayoutHelper
cardPositionproperty 
cardPosition:Number

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The horizontal position of the card, in pixels.

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


Implementation
    public function get cardPosition():Number
    public function set cardPosition(value:Number):void
currentFocusproperty 
protected var currentFocus:IAttachment

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The IAttachment instance that currently has the focus.

focusEffectproperty 
protected var focusEffect:Effect = null

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The effect to currently playing due to a focus change

lastFocusproperty 
protected var lastFocus:IAttachment

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The IAttachment instance that last had the focus

maxCardPositionproperty 
maxCardPosition:Number

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The maximum horizontal position that a card can have. This is dependent on the target width.

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


Implementation
    public function get maxCardPosition():Number
    public function set maxCardPosition(value:Number):void
pendingCardPositionproperty 
pendingCardPosition:Number

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The card position for the card that is pending as the current card.


Implementation
    public function get pendingCardPosition():Number
    public function set pendingCardPosition(value:Number):void
pendingDurationproperty 
protected var pendingDuration:Number = 0

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The time, in mimiseconds for pending effects to run

pendingFocusproperty 
protected var pendingFocus:IAttachment

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The IAttachment instance that is will next get the focus (pending)

thumbFitSizeproperty 
thumbFitSize:Point

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The size, represented as a width and height ordered pair, to use for thumbnails


Implementation
    public function get thumbFitSize():Point
    public function set thumbFitSize(value:Point):void
Constructor Detail
OneUpLayout()Constructor
public function OneUpLayout()

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Constructor

Method Detail
cardIndexFromPosition()method
protected function cardIndexFromPosition(cardPosition:Number):int

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns the index value for the card at the given horizontal position the cards index value.

Parameters

cardPosition:Number — The horizontal position of the card, in pixels

Returns
int — The index value of the card at the given position
cardPositionFromIndex()method 
protected function cardPositionFromIndex(elementIndex:int):Number

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns the card position, in pixels, given the cards index value.

Parameters

elementIndex:int — The index value for the card

Returns
Number — the position of the card, given in pixels
elementAdded()method 
override public function elementAdded(index:int):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Handles the bookeeping when an element is added

Parameters

index:int — The index value of the element that has been added

elementRemoved()method 
override public function elementRemoved(index:int):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Handles the bookeeping when an element is removed

Parameters

index:int — The index value of the element that has been removed

findCardsThatIntersect()method 
public function findCardsThatIntersect(marqueeRect:Rectangle):Vector.<int>

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Find the list of cards that overlap the specified marquee rectangle.

Parameters

marqueeRect:Rectangle — A bounding rectangle

Returns
Vector.<int> — A vector of integers that represent the indexes of the cards in the layout that intersect the specified marquee rectangle.
generateFocusEffect()method 
public function generateFocusEffect(oldIndex:int, newIndex:int, duration:Number):Effect

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Create a focus change effect

Parameters

oldIndex:int — The index value of the element that is the current (old) focus
 
newIndex:int — The index value of the element that is to be the new focus
 
duration:Number — The duration, in milliseconds, the effect should last

Returns
Effect — The focus effect object
generateGapEffect()method 
public function generateGapEffect(splitIndex:int, duration:Number):Effect

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Create an animation effect for a gap in the list.

Parameters

splitIndex:int — The position in the card index where the gap is to appear
 
duration:Number — The time, in mimiseconds, for the animation effect to last

Returns
Effect — The animation effect
getCard()method 
public function getCard(cardPosition:Number):ISimpleCard

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Returns the card that is at the specified position

Parameters

cardPosition:Number — The position, in pixels, of the card

Returns
ISimpleCard — the instance of ISimpleCard located at the specified position
measure()method 
override public function measure():void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Measures the target's default size based on its content.

onEffectEnd()method 
protected function onEffectEnd(evt:EffectEvent):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Handler for effect end events

Parameters

evt:EffectEvent — The effect end event to be handled

onHostEvent()method 
protected function onHostEvent(evt:CollectionManagerEvent):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Handler for Navigator host events passed to the Navigator

Parameters

evt:CollectionManagerEvent — The host event to handle

setFocusAttachment()method 
public function setFocusAttachment(attachment:IAttachment, oldFocus:IAttachment = null):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Set the target's focus to be the specified attachment

Parameters

attachment:IAttachment — The IAttachement element that is to be the new focus
 
oldFocus:IAttachment (default = null) — The previous FocusAttachment

updateDisplayList()method 
override public function updateDisplayList(width:Number, height:Number):void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

update the display list

Parameters

width:Number — The new width of the target, in pixels, in the targets's coordinates.
 
height:Number — The new height of the target, in pixels, in the targets's coordinates.

updateMaxCardPosition()method 
protected function updateMaxCardPosition():void

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Updates the position of the maximum card (last card in the list) This is called when elements have been added or removed from the list of cards

Event Detail
HANDLED_ATTACHMENT_FOCUS Event
Event Object Type: com.adobe.portfolio.events.LayoutEvent
LayoutEvent.type property = com.adobe.portfolio.events.NavLayoutEvent.HANDLED_ATTACHMENT_FOCUS

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Dispatched after the layout has set its focus to a valid attachment.

Constant Detail
collectionManagerConstant
protected const collectionManager:CollectionManager

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The instance of the CollectionManager class used by this Navigator

FOCUS_DURATIONConstant 
protected const FOCUS_DURATION:Number

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The time, in mimiseconds for focus effects to run