Packagestarling.utils
Classpublic class Padding
InheritancePadding Inheritance EventDispatcher Inheritance Object

The padding class stores one number for each of four directions, thus describing the padding around a 2D object.



Public Properties
 PropertyDefined By
  bottom : Number
The padding towards the bottom.
Padding
  left : Number
The padding on the left side.
Padding
  right : Number
The padding on the right side.
Padding
  top : Number
The padding towards the top.
Padding
Public Methods
 MethodDefined By
  
Padding(left:Number = 0, right:Number = 0, top:Number = 0, bottom:Number = 0)
Creates a new instance with the given properties.
Padding
 Inherited
addEventListener(type:String, listener:Function):void
Registers an event listener at a certain object.
EventDispatcher
  
Creates a new instance with the exact same values.
Padding
  
copyFrom(padding:Padding):void
Copies all properties from another Padding instance.
Padding
 Inherited
dispatchEvent(event:Event):void
Dispatches an event to all objects that have registered listeners for its type.
EventDispatcher
 Inherited
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void
Dispatches an event with the given parameters to all objects that have registered listeners for the given type.
EventDispatcher
 Inherited
hasEventListener(type:String, listener:Function = null):Boolean
If called with one argument, figures out if there are any listeners registered for the given event type.
EventDispatcher
 Inherited
removeEventListener(type:String, listener:Function):void
Removes an event listener from the object.
EventDispatcher
 Inherited
removeEventListeners(type:String = null):void
Removes all event listeners with a certain type, or all of them if type is null.
EventDispatcher
  
setTo(left:Number = 0, right:Number = 0, top:Number = 0, bottom:Number = 0):void
Sets all four values at once.
Padding
Events
 Event Summary Defined By
  Dispatched when any property of the instance changes.Padding
Property Detail
bottomproperty
bottom:Number

The padding towards the bottom.


Implementation
    public function get bottom():Number
    public function set bottom(value:Number):void
leftproperty 
left:Number

The padding on the left side.


Implementation
    public function get left():Number
    public function set left(value:Number):void
rightproperty 
right:Number

The padding on the right side.


Implementation
    public function get right():Number
    public function set right(value:Number):void
topproperty 
top:Number

The padding towards the top.


Implementation
    public function get top():Number
    public function set top(value:Number):void
Constructor Detail
Padding()Constructor
public function Padding(left:Number = 0, right:Number = 0, top:Number = 0, bottom:Number = 0)

Creates a new instance with the given properties.

Parameters
left:Number (default = 0)
 
right:Number (default = 0)
 
top:Number (default = 0)
 
bottom:Number (default = 0)
Method Detail
clone()method
public function clone():Padding

Creates a new instance with the exact same values.

Returns
Padding
copyFrom()method 
public function copyFrom(padding:Padding):void

Copies all properties from another Padding instance. Pass null to reset all values to zero.

Parameters

padding:Padding

setTo()method 
public function setTo(left:Number = 0, right:Number = 0, top:Number = 0, bottom:Number = 0):void

Sets all four values at once.

Parameters

left:Number (default = 0)
 
right:Number (default = 0)
 
top:Number (default = 0)
 
bottom:Number (default = 0)

Event Detail
change Event
Event Object Type: starling.events.Event

Dispatched when any property of the instance changes.