C# Class Open.Core.Spacing

Represents a spacing for edges (left, right, top, bottom).
Inheritance: ModelBase
Mostra file Open project: philcockfield/Open.TestHarness.SL Class Usage Examples

Public Methods

Method Description
Change ( int left, int top, int right, int bottom ) : void

Changes all edge values.

CopyValues ( Spacing spacing ) : void

Copies the values from the given Spacing object.

GetOffset ( Plane plane ) : int

Gets the edge offset for the given plane (HorizontalOffset or VerticalOffset).

GetValue ( System.Edge edge ) : int

Gets the value for the specified edge.

PropertyRefFromEdge ( Edge edge ) : PropertyRef

Gets the property-ref for the specified edge.

SetValue ( Edge edge, int value ) : void

Sets the value for the specified edge.

Spacing ( int left, int top, int right, int bottom ) : System

Constructor.

Sync ( jQueryObject inner, SpacingSync onBeforeSync ) : Spacing

Creates a Spacing object that handles keeping an 'inner' object's size synced to its parent by settings it's making position:absolute and keeping it's - left - right - top - bottom CSS properties in sync with this Spacing object.

ToEdge ( string propertyName ) : Edge

Converts the specified property-ref to an edge.

ToString ( ) : string
UpdateLayout ( ) : void

Syncs the bound element (if the element is bound to this Spacing object. See static create methods).

Private Methods

Method Description
Change ( int value ) : void
Change ( int leftRight, int topBottom ) : void
FormatValue ( int value ) : int
InitializeSyncing ( ) : void
Spacing ( ) : System
Spacing ( int uniform ) : System
Sync ( jQueryObject inner ) : Spacing
SyncEdge ( Edge edge ) : void

Method Details

Change() public method

Changes all edge values.
public Change ( int left, int top, int right, int bottom ) : void
left int The left value.
top int The top value.
right int The right value.
bottom int The bottom value.
return void

CopyValues() public method

Copies the values from the given Spacing object.
public CopyValues ( Spacing spacing ) : void
spacing Spacing The object to copy from.
return void

GetOffset() public method

Gets the edge offset for the given plane (HorizontalOffset or VerticalOffset).
public GetOffset ( Plane plane ) : int
plane Plane The X:Y plane to retrieve the offset for.
return int

GetValue() public method

Gets the value for the specified edge.
public GetValue ( System.Edge edge ) : int
edge System.Edge The edge to retrieve the value for.
return int

PropertyRefFromEdge() public method

Gets the property-ref for the specified edge.
public PropertyRefFromEdge ( Edge edge ) : PropertyRef
edge Edge The edge to retrieve the property ref for.
return PropertyRef

SetValue() public method

Sets the value for the specified edge.
public SetValue ( Edge edge, int value ) : void
edge Edge The edge to write the value for.
value int The edge value.
return void

Spacing() public method

Constructor.
public Spacing ( int left, int top, int right, int bottom ) : System
left int The left value.
top int The top value.
right int The right value.
bottom int The botton value.
return System

Sync() public method

Creates a Spacing object that handles keeping an 'inner' object's size synced to its parent by settings it's making position:absolute and keeping it's - left - right - top - bottom CSS properties in sync with this Spacing object.
public Sync ( jQueryObject inner, SpacingSync onBeforeSync ) : Spacing
inner jQueryObject The inner object in the sync relationship.
onBeforeSync SpacingSync Invoked before the inner element is updated (use to alter the spacing values).
return Spacing

ToEdge() public static method

Converts the specified property-ref to an edge.
public static ToEdge ( string propertyName ) : Edge
propertyName string The name of the property.
return Edge

ToString() public method

public ToString ( ) : string
return string

UpdateLayout() public method

Syncs the bound element (if the element is bound to this Spacing object. See static create methods).
public UpdateLayout ( ) : void
return void