Package | starling.utils |
Class | public class Padding |
Inheritance | Padding EventDispatcher Object |
Property | Defined By | ||
---|---|---|---|
bottom : Number The padding towards the bottom. | Padding | ||
horizontal : Number [read-only] The sum of left and right padding. | 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 | ||
vertical : Number [read-only] The sum of top and bottom padding. | Padding |
Method | Defined By | ||
---|---|---|---|
Padding(left:Number = 0, right:Number = 0, top:Number = 0, bottom:Number = 0) Creates a new instance with the given properties. | Padding | ||
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 | ||
Copies all properties from another Padding instance. | Padding | ||
dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher | ||
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 | ||
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 | ||
removeEventListener(type:String, listener:Function):void Removes an event listener from the object. | EventDispatcher | ||
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 sides at once. | Padding | ||
setToSymmetric(horizontal:Number, vertical:Number):void Sets left and right to horizontal, top and bottom to vertical. | Padding | ||
setToUniform(value:Number):void Sets all four sides to the same value. | Padding |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when any property of the instance changes. | Padding |
bottom | property |
bottom:Number
The padding towards the bottom.
public function get bottom():Number
public function set bottom(value:Number):void
horizontal | property |
horizontal:Number
[read-only] The sum of left and right padding.
public function get horizontal():Number
left | property |
left:Number
The padding on the left side.
public function get left():Number
public function set left(value:Number):void
right | property |
right:Number
The padding on the right side.
public function get right():Number
public function set right(value:Number):void
top | property |
top:Number
The padding towards the top.
public function get top():Number
public function set top(value:Number):void
vertical | property |
vertical:Number
[read-only] The sum of top and bottom padding.
public function get vertical():Number
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.
Parametersleft:Number (default = 0 )
| |
right:Number (default = 0 )
| |
top:Number (default = 0 )
| |
bottom:Number (default = 0 )
|
clone | () | method |
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 sides at once.
Parameters
left:Number (default = 0 )
| |
right:Number (default = 0 )
| |
top:Number (default = 0 )
| |
bottom:Number (default = 0 )
|
setToSymmetric | () | method |
public function setToSymmetric(horizontal:Number, vertical:Number):void
Sets left and right to horizontal
, top and bottom to vertical
.
Parameters
horizontal:Number | |
vertical:Number |
setToUniform | () | method |
public function setToUniform(value:Number):void
Sets all four sides to the same value.
Parameters
value:Number |
change | Event |