| Package | com.addicted2flash.layout.core |
| Class | public class UIComponent |
| Inheritance | UIComponent flash.display.Sprite |
| Implements | ILayoutObservable, IUIComponent |
| Subclasses | UIContainer |
IUIComponent dependent to the display-list.
| Property | Defined by | ||
|---|---|---|---|
| bounds : Rectangle [read-only]
Returns a copy of the bounds of the component.
| UIComponent | ||
| constraint : Object
Returns the constraint of the component.
| UIComponent | ||
| desiredHeight : Number
Returns the desired height of the component.
| UIComponent | ||
| desiredPercentHeight : Number [write-only]
Sets the desired height of the component as percent value.
| UIComponent | ||
| desiredPercentWidth : Number [write-only]
Sets the desired width of the component as percent value.
| UIComponent | ||
| desiredWidth : Number
Returns the desired width of the component.
| UIComponent | ||
| hasPercentagedHeight : Boolean [read-only]
Returns true if desired height should be calculated in percentaged values.
| UIComponent | ||
| hasPercentagedWidth : Boolean [read-only]
Returns true if desired width should be calculated in percentaged values.
| UIComponent | ||
| height : Number
Returns the height of the component.
| UIComponent | ||
| horizontalAlignment : int
Returns the horiziontal alignment of the component.
| UIComponent | ||
| isValid : Boolean
Returns true if component is in a valid state.
| UIComponent | ||
| layoutObserverCount : int [read-only]
Returns the total amount of
ILayoutObserver of this ILayoutObservable. | UIComponent | ||
| margin : Margin
Returns the margin of the component.
| UIComponent | ||
| maximumHeight : Number
Returns the maximum height of the component.
| UIComponent | ||
| maximumWidth : Number
Returns the maximum width of the component.
| UIComponent | ||
| measuredDesiredHeight : Number [write-only]
Sets the measured desired height of the component.
| UIComponent | ||
| measuredDesiredWidth : Number [write-only]
Sets the measured desired width of the component.
| UIComponent | ||
| measuredMinimumHeight : Number [write-only]
Sets the measured minimum height of the component.
| UIComponent | ||
| measuredMinimumWidth : Number [write-only]
Sets the measured minimum width of the component.
| UIComponent | ||
| minimumHeight : Number
Returns the minimum height of the component.
| UIComponent | ||
| minimumWidth : Number
Returns the minimum width of the component.
| UIComponent | ||
| padding : Padding
Returns the padding of the component.
| UIComponent | ||
| parentContainer : IUIContainer
Returns the parent
IUIContainer of the component. | UIComponent | ||
| state : int
Returns the state of the component.
| UIComponent | ||
| verticalAlignment : int
Returns the vertical alignment of the component.
| UIComponent | ||
| width : Number
Returns the width of the component.
| UIComponent | ||
| x : Number
Returns the x position of the component.
| UIComponent | ||
| y : Number
Returns the y position of the component.
| UIComponent | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new
UIComponent. | UIComponent | ||
|
addLayoutObserver(o:ILayoutObserver):void
Adds an
ILayoutObserver to the set of observers for this object,
provided that it is not the same as some observer already in the set. | UIComponent | ||
|
dispose():void
free memory for garbage collection.
| UIComponent | ||
|
invalidate():void
Component will be measured and rearranged.
| UIComponent | ||
|
move(x:Number, y:Number):Boolean
Sets the position of the component and returns true if position has changed.
| UIComponent | ||
|
notifyLayoutObservers(type:int):void
Registered
ILayoutObserver will be notified. | UIComponent | ||
|
removeLayoutObserver(o:ILayoutObserver):void
Deletes an
ILayoutObserver from the set of observers of this object. | UIComponent | ||
|
resize(w:Number, h:Number):Boolean
Sets the size of the bounds and the desired size (pixel values)
of the component.
| UIComponent | ||
|
setLayoutSize(w:Number, h:Number):Boolean
This method is used for updating the size of the bounds
within a validation lifecycle (in
arrange process
within a container). | UIComponent | ||
|
toString():String
Returns the string representation of the
UIComponent. | UIComponent | ||
| Method | Defined by | ||
|---|---|---|---|
|
arrange():void
Concrete implementations need to override this method to arrange
and size their components, depending on their bounds.
| UIComponent | ||
|
measure():void
Concrete implemenations need to override this method to set its
sizes (measured desired, measured minimum size).
| UIComponent | ||
| bounds | property |
bounds:Rectangle [read-only]Returns a copy of the bounds of the component.
NOTE: this method returns a new instance of a rectangle object.
Implementation public function get bounds():Rectangle
| constraint | property |
constraint:Object [read-write]Returns the constraint of the component. This constraint specifies a specific layout behaviour.
This object can be very useful for concrete
IUIContainer implementations and their layout behaviour.
public function get constraint():Object
public function set constraint(value:Object):void
| desiredHeight | property |
desiredHeight:Number [read-write]Returns the desired height of the component.
Implementation public function get desiredHeight():Number
public function set desiredHeight(value:Number):void
| desiredPercentHeight | property |
desiredPercentHeight:Number [write-only]Sets the desired height of the component as percent value.
Implementation public function set desiredPercentHeight(value:Number):void
| desiredPercentWidth | property |
desiredPercentWidth:Number [write-only]Sets the desired width of the component as percent value.
Implementation public function set desiredPercentWidth(value:Number):void
| desiredWidth | property |
desiredWidth:Number [read-write]Returns the desired width of the component.
Implementation public function get desiredWidth():Number
public function set desiredWidth(value:Number):void
| hasPercentagedHeight | property |
hasPercentagedHeight:Boolean [read-only]Returns true if desired height should be calculated in percentaged values.
Implementation public function get hasPercentagedHeight():Boolean
| hasPercentagedWidth | property |
hasPercentagedWidth:Boolean [read-only]Returns true if desired width should be calculated in percentaged values.
Implementation public function get hasPercentagedWidth():Boolean
| height | property |
height:Number [read-write]Returns the height of the component.
Implementation public function get height():Number
public function set height(value:Number):void
| horizontalAlignment | property |
horizontalAlignment:int [read-write]Returns the horiziontal alignment of the component.
Implementation public function get horizontalAlignment():int
public function set horizontalAlignment(value:int):void
| isValid | property |
isValid:Boolean [read-write]Returns true if component is in a valid state.
Implementation public function get isValid():Boolean
public function set isValid(value:Boolean):void
| layoutObserverCount | property |
layoutObserverCount:int [read-only]
Returns the total amount of ILayoutObserver of this ILayoutObservable.
public function get layoutObserverCount():int
| margin | property |
margin:Margin [read-write]Returns the margin of the component.
Implementation public function get margin():Margin
public function set margin(value:Margin):void
| maximumHeight | property |
maximumHeight:Number [read-write]Returns the maximum height of the component.
Implementation public function get maximumHeight():Number
public function set maximumHeight(value:Number):void
| maximumWidth | property |
maximumWidth:Number [read-write]Returns the maximum width of the component.
Implementation public function get maximumWidth():Number
public function set maximumWidth(value:Number):void
| measuredDesiredHeight | property |
measuredDesiredHeight:Number [write-only]Sets the measured desired height of the component.
Implementation public function set measuredDesiredHeight(value:Number):void
| measuredDesiredWidth | property |
measuredDesiredWidth:Number [write-only]Sets the measured desired width of the component.
Implementation public function set measuredDesiredWidth(value:Number):void
| measuredMinimumHeight | property |
measuredMinimumHeight:Number [write-only]Sets the measured minimum height of the component.
Implementation public function set measuredMinimumHeight(value:Number):void
| measuredMinimumWidth | property |
measuredMinimumWidth:Number [write-only]Sets the measured minimum width of the component.
Implementation public function set measuredMinimumWidth(value:Number):void
| minimumHeight | property |
minimumHeight:Number [read-write]Returns the minimum height of the component.
Implementation public function get minimumHeight():Number
public function set minimumHeight(value:Number):void
| minimumWidth | property |
minimumWidth:Number [read-write]Returns the minimum width of the component.
Implementation public function get minimumWidth():Number
public function set minimumWidth(value:Number):void
| padding | property |
padding:Padding [read-write]Returns the padding of the component.
Implementation public function get padding():Padding
public function set padding(value:Padding):void
| parentContainer | property |
parentContainer:IUIContainer [read-write]
Returns the parent IUIContainer of the component.
public function get parentContainer():IUIContainer
public function set parentContainer(value:IUIContainer):void
| state | property |
state:int [read-write]Returns the state of the component.
Implementation public function get state():int
public function set state(value:int):void
| verticalAlignment | property |
verticalAlignment:int [read-write]Returns the vertical alignment of the component.
Implementation public function get verticalAlignment():int
public function set verticalAlignment(value:int):void
| width | property |
width:Number [read-write]Returns the width of the component.
Implementation public function get width():Number
public function set width(value:Number):void
| x | property |
x:Number [read-write]Returns the x position of the component.
Implementation public function get x():Number
public function set x(value:Number):void
| y | property |
y:Number [read-write]Returns the y position of the component.
Implementation public function get y():Number
public function set y(value:Number):void
| UIComponent | () | constructor |
public function UIComponent()
Creates a new UIComponent.
| addLayoutObserver | () | method |
public function addLayoutObserver(o:ILayoutObserver):void
Adds an ILayoutObserver to the set of observers for this object,
provided that it is not the same as some observer already in the set.
o:ILayoutObserver — an ILayoutObserver to be added.
|
| arrange | () | method |
protected function arrange():voidConcrete implementations need to override this method to arrange and size their components, depending on their bounds.
| dispose | () | method |
public function dispose():voidfree memory for garbage collection.
| invalidate | () | method |
public function invalidate():voidComponent will be measured and rearranged.
NOTE:dirty parts of the tree will be arranged as well
.| measure | () | method |
protected function measure():voidConcrete implemenations need to override this method to set its sizes (measured desired, measured minimum size).
This offers the possibility for container implementations to adjust their minimum size to the size of its components.
| move | () | method |
public function move(x:Number, y:Number):BooleanSets the position of the component and returns true if position has changed.
Parametersx:Number — x position
|
|
y:Number — y position
|
Boolean — true if position has changed
|
| notifyLayoutObservers | () | method |
public function notifyLayoutObservers(type:int):void
Registered ILayoutObserver will be notified.
type:int — type of event
|
| removeLayoutObserver | () | method |
public function removeLayoutObserver(o:ILayoutObserver):void
Deletes an ILayoutObserver from the set of observers of this object.
o:ILayoutObserver — the ILayoutObserver to be deleted.
|
| resize | () | method |
public function resize(w:Number, h:Number):BooleanSets the size of the bounds and the desired size (pixel values) of the component.
Parametersw:Number — width
|
|
h:Number — height
|
Boolean — true if size has changed
|
| setLayoutSize | () | method |
public function setLayoutSize(w:Number, h:Number):Boolean
This method is used for updating the size of the bounds
within a validation lifecycle (in arrange process
within a container). It does not change
the desired size of the component.
w:Number — width
|
|
h:Number — height
|
Boolean — true if size has changed
|
| toString | () | method |
public override function toString():String
Returns the string representation of the UIComponent.
String — the string representation of the UIComponent
|