Package | com.gestureworks.cml.element |
Class | public class Key |
Inheritance | Key Button Container ContainerFactory ElementFactory flash.display.Sprite |
var ke:Key = new Key(); ke.text = "a"; ke.init(); addChild(ke);
See also
Property | Defined By | ||
---|---|---|---|
alpha : Number [override] [write-only]
sets the alpha for display objects
| ElementFactory | ||
blur : Boolean
Sets the drop shadow effect
| ElementFactory | ||
bottom : Number
sets the bottom value
| ElementFactory | ||
capsOn : Boolean
A flag indicating the "capitalized" state of the text. | Key | ||
charCode : uint
The character code (unicode) value of the key pressed
| Key | ||
childList : ChildList [read-only]
store the child list
| ContainerFactory | ||
class_ : String
Object's css class;
| ElementFactory | ||
className : String
sets the class name of displayobject
| ElementFactory | ||
cmlIndex : int
sets the cml index
| ElementFactory | ||
debug : Boolean = false | Button | ||
debugStyle : *
sets the debug style
| ElementFactory | ||
dimensionsTo : String
sets the dimensions of the container
| ContainerFactory | ||
dispatch : String
Assigns a message to dispatch with a button state event. | Button | ||
dispatchDefault : Boolean = false | Button | ||
displayEvents : String
Use for dispatch completes. | ElementFactory | ||
down : *
Sets button state association with down event
| Button | ||
downTextColor : uint
The color of the text when touched down
| Key | ||
dropShadow : Boolean
Sets the drop shadow effect
| ElementFactory | ||
height : Number [override]
Sets width of the display object in pixels
| ElementFactory | ||
heightPercent : String
sets the height percent of display object
| ElementFactory | ||
hit : *
The hit object is the object recieving the input events
| Button | ||
horizontalCenter : Number
sets the horizontal center of display object
| ElementFactory | ||
icon : *
The icon displayed on the key element
| Key | ||
id : String
sets the id of child
| ElementFactory | ||
index : int
sets the index of display object
| ElementFactory | ||
infoSource : String
sets info source
| ContainerFactory | ||
initial : *
Sets the initial button state object
| Button | ||
initTextColor : uint
The inital text color
| Key | ||
keyCode : uint
The key code (unicode) value of the key pressed
| Key | ||
layout : *
Sets the layout of the container
| Container | ||
layoutComplete : Function
Sets the function to call when the layout is complete
| Container | ||
layoutList : Dictionary
Defines the layoutlist
| Container | ||
layoutUpdate : Function
Sets the function to call when the layout updates
| Container | ||
left : Number
sets left value
| ElementFactory | ||
mouseDown : *
Sets button state association with mouse down event
| Button | ||
mouseOut : *
Sets button state association with mouse out event
| Button | ||
mouseOver : *
Sets button state association with mouse over event
| Button | ||
mouseUp : *
Sets button state association with mouse up event
| Button | ||
out : *
Sets button state association with out event
| Button | ||
outTextColor : uint
The text color when touched out
| Key | ||
over : *
Sets button state association with over event (mouse only)
| Button | ||
overTextColor : uint
The text color when touched over
| Key | ||
paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | Container | ||
paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | Container | ||
paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | Container | ||
paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | Container | ||
position : String
Sets the position
| Container | ||
propertyStates : Array Deprecated: Please Use state | ElementFactory | ||
right : Number
sets the right value
| ElementFactory | ||
scale : Number
Sets both the x and y scale values
| ElementFactory | ||
scaleX : Number [override]
Sets width of the display object in pixels
| ElementFactory | ||
scaleY : Number [override]
Sets width of the display object in pixels
| ElementFactory | ||
shiftCharCode : uint
The character code (unicode) value of the key pressed while in a shift state
| Key | ||
shiftOn : Boolean
A flag indicating the shift state of the text. | Key | ||
shiftText : String
The text displayed on the key while in a shift state
| Key | ||
side : String
Attaches an event string to a button to listen for to toggle visibility when that event is dispatched. | Button | ||
state : Array
property states array
| ElementFactory | ||
tap : *
Sets the button state association with tap event. | Button | ||
text : *
The text displayed on the key
| Key | ||
toggle : String
An alternative to button state events, the toggle displays the next child at each event defined by the
toggle value (e.g. | Button | ||
top : Number
sets top value
| ElementFactory | ||
touchDown : *
Sets button state association with touch down event
| Button | ||
touchOut : *
Sets button state association with touch out event
| Button | ||
touchOver : *
Sets button state association with touch out event
| Button | ||
touchUp : *
Sets button state association with touch up event
| Button | ||
up : *
Sets button state association with up event
| Button | ||
upTextColor : uint
The text color when touched up
| Key | ||
verticalCenter : Number
sets the vertical center of display object
| ElementFactory | ||
width : Number [override]
Sets width of the display object in pixels
| ElementFactory | ||
widthPercent : String
sets the percent of width of display object
| ElementFactory |
Method | Defined By | ||
---|---|---|---|
Key()
Constructor
| Key | ||
addAllChildren():void
This method searches the childlist and add the children
| ContainerFactory | ||
addChild(child:DisplayObject):DisplayObject [override]
Adds child to display list and, if not already added, the child list
TODO: This mechanism should be abstracted to better syncrhonize child and display lists
| Container | ||
applyLayout(value:* = null):void
Apply the containers layout
| Container | ||
childToList(id:String, child:*):void
this method append to the childlist
| ContainerFactory | ||
clone():* [override]
Returns clone of self
| Button | ||
displayComplete():void [override]
CML initialization
| Key | ||
dispose():void [override]
Dispose methods
| Key | ||
getIndex(index:int):*
returns childlist index
| Container | ||
getKey(key:String):*
returns the childlist key
| Container | ||
hideIndex(index:int):void
hides the childlist index
| Container | ||
hideKey(key:String):void
hides the childlist key
| Container | ||
init():void [override]
Initialization function
| Key | ||
onFlip(e:StateEvent):void | Button | ||
parseCML(cml:XMLList):XMLList [override]
Parse cml for local layouts. | Container | ||
postparseCML(cml:XMLList):void
post parses the cml file
| ElementFactory | ||
reset():void | Button | ||
runToggle():void | Button | ||
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | Container | ||
setDimensionsToChild():void
This method sets the dimensions of childlist
| ContainerFactory | ||
showIndex(index:int):void
shows the childlist index
| Container | ||
showKey(key:String):void
shows the childlist key
| Container | ||
updateLayout():void
Updates dimensions
| Button | ||
updateProperties(state:Number = 0):void
this method updates the properties
| ElementFactory |
Method | Defined By | ||
---|---|---|---|
onDown(event:*):void [override]
The down event handler. | Key | ||
onMouseDown(event:*):void
Processes the mouse down event by displaying the mouseDown state and hiding the other states. | Button | ||
onMouseOut(event:*):void
Processes the mouse out event by displaying the mouseOut state and hiding the other states. | Button | ||
onMouseOver(event:*):void
Processes the mouse over event by displaying the mouseOver state and hiding the other states. | Button | ||
onMouseUp(event:*):void
Processes the mouse up event by displaying the mouseUp state and hiding the other states. | Button | ||
onOut(event:*):void [override]
The out event handler. | Key | ||
onOver(event:*):void [override]
The over event handler. | Key | ||
onTap(event:*):void | Button | ||
onToggle(event:*):void
Displays the the next child on the specified button event. | Button | ||
onTouchDown(event:*):void
Processes the touch down event by displaying the touchDown state and hiding the other states. | Button | ||
onTouchOut(event:*):void
Processes the touch out event by displaying the touchOut state and hiding the other states. | Button | ||
onTouchOver(event:*):void
Processes the touch over event by displaying the touchOver state and hiding the other states. | Button | ||
onTouchUp(event:*):void
Processes the touch up event by displaying the touchUp state and hiding the other states. | Button | ||
onUp(event:*):void [override]
The up event handler. | Key |
capsOn | property |
capsOn:Boolean
A flag indicating the "capitalized" state of the text. Only valid for letter characters.
public function get capsOn():Boolean
public function set capsOn(value:Boolean):void
charCode | property |
charCode:uint
The character code (unicode) value of the key pressed
public function get charCode():uint
public function set charCode(value:uint):void
downTextColor | property |
downTextColor:uint
The color of the text when touched down
public function get downTextColor():uint
public function set downTextColor(value:uint):void
icon | property |
icon:*
The icon displayed on the key element
public function get icon():*
public function set icon(value:any):void
initTextColor | property |
initTextColor:uint
The inital text color
public function get initTextColor():uint
public function set initTextColor(value:uint):void
keyCode | property |
keyCode:uint
The key code (unicode) value of the key pressed
public function get keyCode():uint
public function set keyCode(value:uint):void
outTextColor | property |
outTextColor:uint
The text color when touched out
public function get outTextColor():uint
public function set outTextColor(value:uint):void
overTextColor | property |
overTextColor:uint
The text color when touched over
public function get overTextColor():uint
public function set overTextColor(value:uint):void
shiftCharCode | property |
shiftCharCode:uint
The character code (unicode) value of the key pressed while in a shift state
public function get shiftCharCode():uint
public function set shiftCharCode(value:uint):void
shiftOn | property |
shiftOn:Boolean
A flag indicating the shift state of the text. Any key can have a text value for a shift state and one for the initial state.
public function get shiftOn():Boolean
public function set shiftOn(value:Boolean):void
shiftText | property |
shiftText:String
The text displayed on the key while in a shift state
public function get shiftText():String
public function set shiftText(value:String):void
text | property |
text:*
The text displayed on the key
public function get text():*
public function set text(value:any):void
upTextColor | property |
upTextColor:uint
The text color when touched up
public function get upTextColor():uint
public function set upTextColor(value:uint):void
Key | () | Constructor |
public function Key()
Constructor
displayComplete | () | method |
override public function displayComplete():void
CML initialization
dispose | () | method |
override public function dispose():void
Dispose methods
init | () | method |
override public function init():void
Initialization function
onDown | () | method |
override protected function onDown(event:*):void
The down event handler. Dispatches a KEY_DOWN event containing the character key codes. The key location has an arbitrary value (10) to identify its origin.
Parameters
event:* — event triggered when touched/clicked
|
onOut | () | method |
override protected function onOut(event:*):void
The out event handler.
Parameters
event:* — event triggered when a key is released from an over event
|
onOver | () | method |
override protected function onOver(event:*):void
The over event handler.
Parameters
event:* — event triggered when a key is intersected from outside
|
onUp | () | method |
override protected function onUp(event:*):void
The up event handler.
Parameters
event:* — event triggered when a key is released from a down event
|