Packagecom.adobe.portfolio.components.supportClasses
Classpublic class CanvasItem
InheritanceCanvasItem Inheritance spark.components.supportClasses.SkinnableComponent
Implements mx.managers.IFocusManagerComponent, spark.components.IItemRenderer, mx.controls.listClasses.IListItemRenderer, IListenAndWatch



Public Properties
 PropertyDefined By
  canvasData : CanvasItemData
CanvasItem
  data : Object
CanvasItem
  dragging : Boolean
CanvasItem
  imageOpacity : Number
[read-only]
CanvasItem
  itemIndex : int
CanvasItem
  label : String
CanvasItem
  selected : Boolean
CanvasItem
  showsCaret : Boolean
CanvasItem
Protected Properties
 PropertyDefined By
  imageContext : PropertyContext
[read-only]
CanvasItem
  textContext : PropertyContext
[read-only]
CanvasItem
Public Methods
 MethodDefined By
  
CanvasItem
  
CanvasItem
  
loseContext():Boolean
CanvasItem
  
CanvasItem
  
takeContext():Boolean
CanvasItem
  
takeFocus():void
CanvasItem
Protected Methods
 MethodDefined By
  
[override]
CanvasItem
  
[override]
CanvasItem
  
handleContainsPoint(handle:GraphicElement, point:Point):Boolean
CanvasItem
  
onDataPropertyChanged(event:PropertyChangeEvent):void
CanvasItem
  
onMouseDoubleClick(event:MouseEvent):void
CanvasItem
  
onMouseDown(event:MouseEvent):void
CanvasItem
  
onMouseHandles(event:MouseEvent):void
Once setClickedHandle has setup the dragging properties, onMouseHandles updates the item state when the mouse is moved, and applies the new properties to the underlying data on a mouse up.
CanvasItem
  
onMouseRoll(event:MouseEvent):void
CanvasItem
  
onSetImageClick(event:MouseEvent):void
CanvasItem
  
onTextChange(event:TextOperationEvent):void
CanvasItem
  
partAdded(partName:String, instance:Object):void
[override] Called when a skin has added a skin part for this instance.
CanvasItem
  
partRemoved(partName:String, instance:Object):void
[override] Called when a skin has removed a skin part for this instance.
CanvasItem
  
setAuthoringMode(value:Boolean):void
CanvasItem
  
setClickedHandle(event:MouseEvent):void
setClickedHandle determines which (if any) drag handle is under the provided event, and sets up the current dragging properties to manipulate this object based on the result.
CanvasItem
  
setupDraggingHandle(draggingLeft:Boolean, draggingRight:Boolean, draggingTop:Boolean, draggingBottom:Boolean):void
CanvasItem
  
CanvasItem
Events
 Event Summary Defined By
  Dispatched when the user requests that this item be removed from its parent.CanvasItem
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
handleBC:spark.primitives.supportClasses.GraphicElement
Required: false Part Type: Static

CanvasItem
  
handleBL:spark.primitives.supportClasses.GraphicElement
Required: false Part Type: Static

CanvasItem
  
handleBorder:spark.primitives.Rect
Required: false Part Type: Static

CanvasItem
  
handleBR:spark.primitives.supportClasses.GraphicElement
Required: false Part Type: Static

CanvasItem
  
handleML:spark.primitives.supportClasses.GraphicElement
Required: false Part Type: Static

CanvasItem
  
handleMove:spark.primitives.Rect
Required: false Part Type: Static

CanvasItem
  
handleMR:spark.primitives.supportClasses.GraphicElement
Required: false Part Type: Static

CanvasItem
  
handleTC:spark.primitives.supportClasses.GraphicElement
Required: false Part Type: Static

CanvasItem
  
handleTL:spark.primitives.supportClasses.GraphicElement
Required: false Part Type: Static

CanvasItem
  
handleTR:spark.primitives.supportClasses.GraphicElement
Required: false Part Type: Static

CanvasItem
  
imageComponent:mx.controls.Image
Required: true Part Type: Static

CanvasItem
  
setImageButton:mx.core.IButton
Required: false Part Type: Static

CanvasItem
  
textArea:spark.components.TextArea
Required: true Part Type: Static

CanvasItem
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
  
imageAuthoringNormal
CanvasItem
  
imageAuthoringOver
CanvasItem
  
imageAuthoringOverAndSelected
CanvasItem
  
imageAuthoringSelected
CanvasItem
  
imageNormal
CanvasItem
  
imageOver
CanvasItem
  
imageOverAndSelected
CanvasItem
  
imageSelected
CanvasItem
  
textAuthoringNormal
CanvasItem
  
textAuthoringOver
CanvasItem
  
textAuthoringOverAndSelected
CanvasItem
  
textAuthoringSelected
CanvasItem
  
textNormal
CanvasItem
  
textOver
CanvasItem
  
textOverAndSelected
CanvasItem
  
textSelected
CanvasItem
Public Constants
 ConstantDefined By
  EVENT_REMOVE : String = removeItem
[static]
CanvasItem
  SKIN_PART_HANDLE_BORDER : String = handleBorder
[static]
CanvasItem
  SKIN_PART_HANDLE_BOTTOM_CENTER : String = handleBC
[static]
CanvasItem
  SKIN_PART_HANDLE_BOTTOM_LEFT : String = handleBL
[static]
CanvasItem
  SKIN_PART_HANDLE_BOTTOM_RIGHT : String = handleBR
[static]
CanvasItem
  SKIN_PART_HANDLE_MIDDLE_LEFT : String = handleML
[static]
CanvasItem
  SKIN_PART_HANDLE_MIDDLE_RIGHT : String = handleMR
[static]
CanvasItem
  SKIN_PART_HANDLE_MOVE : String = handleMove
[static]
CanvasItem
  SKIN_PART_HANDLE_TOP_CENTER : String = handleTC
[static]
CanvasItem
  SKIN_PART_HANDLE_TOP_LEFT : String = handleTL
[static]
CanvasItem
  SKIN_PART_HANDLE_TOP_RIGHT : String = handleTR
[static]
CanvasItem
  SKIN_PART_IMAGE_COMPONENT : String = imageComponent
[static]
CanvasItem
  SKIN_PART_SET_IMAGE_BUTTON : String = setImageButton
[static]
CanvasItem
  SKIN_PART_TEXT_AREA : String = textArea
[static]
CanvasItem
  SKIN_STATE_IMAGE_AUTHORING_NORMAL : String = imageAuthoringNormal
[static]
CanvasItem
  SKIN_STATE_IMAGE_AUTHORING_OVER : String = imageAuthoringOver
[static]
CanvasItem
  SKIN_STATE_IMAGE_AUTHORING_OVER_AND_SELECTED : String = imageAuthoringOverAndSelected
[static]
CanvasItem
  SKIN_STATE_IMAGE_AUTHORING_SELECTED : String = imageAuthoringSelected
[static]
CanvasItem
  SKIN_STATE_IMAGE_NORMAL : String = imageNormal
[static]
CanvasItem
  SKIN_STATE_IMAGE_OVER : String = imageOver
[static]
CanvasItem
  SKIN_STATE_IMAGE_OVER_AND_SELECTED : String = imageOverAndSelected
[static]
CanvasItem
  SKIN_STATE_IMAGE_SELECTED : String = imageSelected
[static]
CanvasItem
  SKIN_STATE_TEXT_AUTHORING_NORMAL : String = textAuthoringNormal
[static]
CanvasItem
  SKIN_STATE_TEXT_AUTHORING_OVER : String = textAuthoringOver
[static]
CanvasItem
  SKIN_STATE_TEXT_AUTHORING_OVER_AND_SELECTED : String = textAuthoringOverAndSelected
[static]
CanvasItem
  SKIN_STATE_TEXT_AUTHORING_SELECTED : String = textAuthoringSelected
[static]
CanvasItem
  SKIN_STATE_TEXT_NORMAL : String = textNormal
[static]
CanvasItem
  SKIN_STATE_TEXT_OVER : String = textOver
[static]
CanvasItem
  SKIN_STATE_TEXT_OVER_AND_SELECTED : String = textOverAndSelected
[static]
CanvasItem
  SKIN_STATE_TEXT_SELECTED : String = textSelected
[static]
CanvasItem
Protected Constants
 ConstantDefined By
  collectionManager : CollectionManager
[static] The navigator's CollectionManager instance.
CanvasItem
Property Detail
canvasDataproperty
canvasData:CanvasItemData

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


Implementation
    public function get canvasData():CanvasItemData
    public function set canvasData(value:CanvasItemData):void
dataproperty 
data:Object


Implementation
    public function get data():Object
    public function set data(value:Object):void
draggingproperty 
dragging:Boolean


Implementation
    public function get dragging():Boolean
    public function set dragging(value:Boolean):void
imageContextproperty 
imageContext:PropertyContext  [read-only]


Implementation
    protected function get imageContext():PropertyContext
imageOpacityproperty 
imageOpacity:Number  [read-only]

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


Implementation
    public function get imageOpacity():Number
itemIndexproperty 
itemIndex:int


Implementation
    public function get itemIndex():int
    public function set itemIndex(value:int):void
labelproperty 
label:String


Implementation
    public function get label():String
    public function set label(value:String):void
selectedproperty 
selected:Boolean


Implementation
    public function get selected():Boolean
    public function set selected(value:Boolean):void
showsCaretproperty 
showsCaret:Boolean


Implementation
    public function get showsCaret():Boolean
    public function set showsCaret(value:Boolean):void
textContextproperty 
textContext:PropertyContext  [read-only]


Implementation
    protected function get textContext():PropertyContext
Constructor Detail
CanvasItem()Constructor
public function CanvasItem()



Method Detail
addListenAndWatch()method
public function addListenAndWatch():void

commitProperties()method 
override protected function commitProperties():void

getCurrentSkinState()method 
override protected function getCurrentSkinState():String

Returns
String
handleContainsPoint()method 
protected function handleContainsPoint(handle:GraphicElement, point:Point):Boolean

Parameters

handle:GraphicElement
 
point:Point

Returns
Boolean
loseContext()method 
public function loseContext():Boolean

Returns
Boolean
onDataPropertyChanged()method 
protected function onDataPropertyChanged(event:PropertyChangeEvent):void

Parameters

event:PropertyChangeEvent

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

Parameters

event:MouseEvent

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

Parameters

event:MouseEvent

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

Once setClickedHandle has setup the dragging properties, onMouseHandles updates the item state when the mouse is moved, and applies the new properties to the underlying data on a mouse up.

Parameters

event:MouseEvent

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

Parameters

event:MouseEvent

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

Parameters

event:MouseEvent

onTextChange()method 
protected function onTextChange(event:TextOperationEvent):void

Parameters

event:TextOperationEvent

partAdded()method 
override protected function partAdded(partName:String, instance:Object):void

Called when a skin has added a skin part for this instance.

Parameters

partName:String
 
instance:Object

partRemoved()method 
override protected function partRemoved(partName:String, instance:Object):void

Called when a skin has removed a skin part for this instance.

Parameters

partName:String
 
instance:Object

removeListenAndWatch()method 
public function removeListenAndWatch():void

setAuthoringMode()method 
protected function setAuthoringMode(value:Boolean):void

Parameters

value:Boolean

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

setClickedHandle determines which (if any) drag handle is under the provided event, and sets up the current dragging properties to manipulate this object based on the result.

Parameters

event:MouseEvent

setupDraggingHandle()method 
protected function setupDraggingHandle(draggingLeft:Boolean, draggingRight:Boolean, draggingTop:Boolean, draggingBottom:Boolean):void

Parameters

draggingLeft:Boolean
 
draggingRight:Boolean
 
draggingTop:Boolean
 
draggingBottom:Boolean

setupDraggingMove()method 
protected function setupDraggingMove():void

takeContext()method 
public function takeContext():Boolean

Returns
Boolean
takeFocus()method 
public function takeFocus():void

Event Detail
removeItem Event
Event Object Type: flash.events.Event

Dispatched when the user requests that this item be removed from its parent.

Constant Detail
collectionManagerConstant
protected static const collectionManager:CollectionManager

The navigator's CollectionManager instance. All host interaction should go through this instance, rather than the INavigatorHost directly.

EVENT_REMOVEConstant 
public static const EVENT_REMOVE:String = removeItem

SKIN_PART_HANDLE_BORDERConstant 
public static const SKIN_PART_HANDLE_BORDER:String = handleBorder

SKIN_PART_HANDLE_BOTTOM_CENTERConstant 
public static const SKIN_PART_HANDLE_BOTTOM_CENTER:String = handleBC

SKIN_PART_HANDLE_BOTTOM_LEFTConstant 
public static const SKIN_PART_HANDLE_BOTTOM_LEFT:String = handleBL

SKIN_PART_HANDLE_BOTTOM_RIGHTConstant 
public static const SKIN_PART_HANDLE_BOTTOM_RIGHT:String = handleBR

SKIN_PART_HANDLE_MIDDLE_LEFTConstant 
public static const SKIN_PART_HANDLE_MIDDLE_LEFT:String = handleML

SKIN_PART_HANDLE_MIDDLE_RIGHTConstant 
public static const SKIN_PART_HANDLE_MIDDLE_RIGHT:String = handleMR

SKIN_PART_HANDLE_MOVEConstant 
public static const SKIN_PART_HANDLE_MOVE:String = handleMove

SKIN_PART_HANDLE_TOP_CENTERConstant 
public static const SKIN_PART_HANDLE_TOP_CENTER:String = handleTC

SKIN_PART_HANDLE_TOP_LEFTConstant 
public static const SKIN_PART_HANDLE_TOP_LEFT:String = handleTL

SKIN_PART_HANDLE_TOP_RIGHTConstant 
public static const SKIN_PART_HANDLE_TOP_RIGHT:String = handleTR

SKIN_PART_IMAGE_COMPONENTConstant 
public static const SKIN_PART_IMAGE_COMPONENT:String = imageComponent

SKIN_PART_SET_IMAGE_BUTTONConstant 
public static const SKIN_PART_SET_IMAGE_BUTTON:String = setImageButton

SKIN_PART_TEXT_AREAConstant 
public static const SKIN_PART_TEXT_AREA:String = textArea

SKIN_STATE_IMAGE_AUTHORING_NORMALConstant 
public static const SKIN_STATE_IMAGE_AUTHORING_NORMAL:String = imageAuthoringNormal

SKIN_STATE_IMAGE_AUTHORING_OVERConstant 
public static const SKIN_STATE_IMAGE_AUTHORING_OVER:String = imageAuthoringOver

SKIN_STATE_IMAGE_AUTHORING_OVER_AND_SELECTEDConstant 
public static const SKIN_STATE_IMAGE_AUTHORING_OVER_AND_SELECTED:String = imageAuthoringOverAndSelected

SKIN_STATE_IMAGE_AUTHORING_SELECTEDConstant 
public static const SKIN_STATE_IMAGE_AUTHORING_SELECTED:String = imageAuthoringSelected

SKIN_STATE_IMAGE_NORMALConstant 
public static const SKIN_STATE_IMAGE_NORMAL:String = imageNormal

SKIN_STATE_IMAGE_OVERConstant 
public static const SKIN_STATE_IMAGE_OVER:String = imageOver

SKIN_STATE_IMAGE_OVER_AND_SELECTEDConstant 
public static const SKIN_STATE_IMAGE_OVER_AND_SELECTED:String = imageOverAndSelected

SKIN_STATE_IMAGE_SELECTEDConstant 
public static const SKIN_STATE_IMAGE_SELECTED:String = imageSelected

SKIN_STATE_TEXT_AUTHORING_NORMALConstant 
public static const SKIN_STATE_TEXT_AUTHORING_NORMAL:String = textAuthoringNormal

SKIN_STATE_TEXT_AUTHORING_OVERConstant 
public static const SKIN_STATE_TEXT_AUTHORING_OVER:String = textAuthoringOver

SKIN_STATE_TEXT_AUTHORING_OVER_AND_SELECTEDConstant 
public static const SKIN_STATE_TEXT_AUTHORING_OVER_AND_SELECTED:String = textAuthoringOverAndSelected

SKIN_STATE_TEXT_AUTHORING_SELECTEDConstant 
public static const SKIN_STATE_TEXT_AUTHORING_SELECTED:String = textAuthoringSelected

SKIN_STATE_TEXT_NORMALConstant 
public static const SKIN_STATE_TEXT_NORMAL:String = textNormal

SKIN_STATE_TEXT_OVERConstant 
public static const SKIN_STATE_TEXT_OVER:String = textOver

SKIN_STATE_TEXT_OVER_AND_SELECTEDConstant 
public static const SKIN_STATE_TEXT_OVER_AND_SELECTED:String = textOverAndSelected

SKIN_STATE_TEXT_SELECTEDConstant 
public static const SKIN_STATE_TEXT_SELECTED:String = textSelected