Class StyleProperty

Description

This StyleProperty generic class allows one to create a StyleProperty of arbitrary nature from scratch. It has no default StyleComponents attached.

A StyleProperty (SP) is one of the tree building pieces of CSS styles. It stores information about a single CSS style property by storing one or more

  1. StyleComponents
.

The other two CSS styles building pieces are

  1. StyleComponents
and
  1. StyleCollections
. To clarify the relationship between these three building pieces, consider the following example:
 div {
     margin: 20px;
     border: 1px solid #000;
 }
  1. div
is a
  1. StyleCollection
consisting of 2
  1. StyleProperties
:
  1. margin
and
  1. border
. Each of the latter consists of one or more
  1. StyleComponents
. In specific,
  1. margin
consists of one
  1. StyleComponent
with the value
  1. 20px
, and
  1. border
has three
  1. StyleComponents
with values
  1. 1px
,
  1. solid
, and
  1. #000
correspondingly.

  • version: $Id: StyleProperty.class.php,v 1.13 2007/09/04 20:25:21 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/GUIManager/StyleProperty.class.php (line 37)

StylePropertyInterface
   |
   --StyleProperty
Direct descendents
Class Description
BackgroundColorSP The BackgroundColorSP represents the 'background-color' StyleProperty.
BackgroundImageSP The BackgroundImageSP represents the 'background' StyleProperty.
BackgroundSP The BackgroundSP represents the 'background' StyleProperty.
BorderBottomSP The BorderBottomSP represents the 'border-top' StyleProperty.
BorderLeftSP The BorderLeftSP represents the 'border-top' StyleProperty.
BorderRightSP The BorderRightSP represents the 'border-top' StyleProperty.
BorderSP The BorderSP represents the 'border' StyleProperty.
BorderTopSP The BorderTopSP represents the 'border-top' StyleProperty.
BottomSP The BottomSP represents the 'bottom' StyleProperty.
ClearSP The ClearSP represents the 'clear' StyleProperty.
ColorSP The ColorSP represents the 'color' StyleProperty.
CursorSP The CursorSP represents the 'cursor' StyleProperty.
DirectionSP The DirectionSP represents the 'direction' StyleProperty.
DisplaySP The DisplaySP represents the 'display' StyleProperty.
FloatSP The FloatSP represents the 'float' StyleProperty.
FontFamilySP The FontFamilySP represents the 'font-family' StyleProperty.
FontSizeSP The FontSizeSP represents the 'font-size' StyleProperty.
FontSP The FontSP represents the 'font' StyleProperty.
FontWeightSP The FontWeightSP represents the 'font-weight' StyleProperty.
HeightSP The HeightSP represents the 'height' StyleProperty.
LeftSP The LeftSP represents the 'left' StyleProperty.
LetterSpacingSP The LetterSpacingSP represents the 'letter-spacing' StyleProperty.
LineHeightSP The LineHeightSP represents the 'line-height' StyleProperty.
MarginBottomSP The MarginBottomSP represents the 'margin-bottom' StyleProperty.
MarginLeftSP The MarginLeftSP represents the 'margin-left' StyleProperty.
MarginRightSP The MarginRightSP represents the 'margin-right' StyleProperty.
MarginSP The MarginSP represents the 'margin' StyleProperty.
MarginTopSP The MarginTopSP represents the 'margin-top' StyleProperty.
MaxHeightSP The MaxHeightSP represents the 'max-height' StyleProperty.
MaxWidthSP The MaxWidthSP represents the 'max-width' StyleProperty.
MinHeightSP The MaxHeightSP represents the 'min-height' StyleProperty.
MinWidthSP The MaxWidthSP represents the 'min-width' StyleProperty.
OverflowSP The OverflowSP represents the 'overflow' StyleProperty.
PaddingBottomSP The PaddingBottomSP represents the 'padding-bottom' StyleProperty.
PaddingLeftSP The PaddingLeftSP represents the 'padding-left' StyleProperty.
PaddingRightSP The PaddingRightSP represents the 'padding-right' StyleProperty.
PaddingSP The PaddingSP represents the 'padding' StyleProperty.
PaddingTopSP The PaddingTopSP represents the 'padding-top' StyleProperty.
PositionSP The PostionSP represents the 'position' StyleProperty.
RightSP The RightSP represents the 'right' StyleProperty.
TextAlignSP The TextAlign represents the 'text-align' StyleProperty.
TextDecorationSP The TextTransform represents the 'text-decoration' StyleProperty.
TextTransformSP The TextTransform represents the 'text-transform' StyleProperty.
TopSP The TopSP represents the 'top' StyleProperty.
VerticalAlignSP The VerticalAlignSP represents the 'vertical-align' StyleProperty.
VisibilitySP The VisibilitySP represents the 'visibility' StyleProperty.
WhiteSpaceSP The WhiteSpaceSP represents the 'white-space' StyleProperty.
WidthSP The WidthSP represents the 'width' StyleProperty.
WordSpacingSP The WordSpacingSP represents the 'word-spacing' StyleProperty.
ZIndexSP The ZIndexSP represents the 'z-index' StyleProperty.
Variable Summary
string $_description
string $_displayName
string $_name
array $_SCs
Method Summary
StyleProperty StyleProperty (string $name, ref $displayName, string $description, string 3)
void addSC (ref $sc)
string getCSS ()
string getDescription ()
string getDisplayName ()
string getName ()
string getPostHTML (string $tabs)
string getPreHTML (string $tabs)
array getSCList ()
array getSCs ()
ref getStyleComponent (string $class)
void setId (object HarmoniId $id)
Variables
string $_description (line 51)

The description of this StyleProperty.

  • var: _description
  • access: private
string $_displayName (line 44)

The display name of this StyleProperty.

  • var: _displayName
  • access: private
string $_name (line 58)

The name of this StyleProperty.

  • var: _name
  • access: private
array $_SCs (line 65)

An array of the StyleComponents contained by this StyleProperty.

  • var: _SCs
  • access: private
Methods
Constructor StyleProperty (line 76)

The constructor.

  • access: public
StyleProperty StyleProperty (string $name, ref $displayName, string $description, string 3)
  • string 3: description The description of this StyleProperty.
  • string $name: name The name of this StyleProperty.
  • ref $displayName: mixed SCs Either one or an array of a few StyleComponents to be contained by this StyleProperty.
  • string $description: displayName The display name of this StyleProperty.
addSC (line 168)

Adds one StyleComponent to this StyleProperty.

  • access: public
void addSC (ref $sc)
  • ref $sc: object A StyleComponent object.

Redefinition of:
StylePropertyInterface::addSC()
Adds one StyleComponent to this StyleProperty.
getCSS (line 120)

Returns the CSS code for this StyleProperty.

  • return: The CSS code for this StyleProperty.
  • access: public
string getCSS ()

Redefinition of:
StylePropertyInterface::getCSS()
Returns the CSS code for this StyleProperty.
getDescription (line 159)

Returns the description of this StlyeProperty.

  • return: The description of this StlyeProperty.
  • access: public
string getDescription ()

Redefinition of:
StylePropertyInterface::getDescription()
Returns the description of this StlyeProperty.
getDisplayName (line 150)

Returns the display name of this StyleProperty.

  • return: The display name of this StyleProperty.
  • access: public
string getDisplayName ()

Redefinition of:
StylePropertyInterface::getDisplayName()
Returns the display name of this StyleProperty.
getId (line 105)

Answers the id

  • since: 4/26/06
  • access: public
object HarmoniId getId ()
getName (line 141)

Returns the name of this StyleProperty.

  • return: The name of this StyleProperty.
  • access: public
string getName ()

Redefinition of:
StylePropertyInterface::getName()
Returns the name of this StyleProperty.
getPostHTML (line 287)

Return HTML to nested inside of the component's block. This includes things such as corner images.

See the example below:

 	

Hello world! (this is when my component renders itself)

 

  • since: 11/22/05
  • access: public
string getPostHTML (string $tabs)
  • string $tabs
getPreHTML (line 250)

Return HTML to nested inside of the component's block. This includes things such as corner images.

See the example below:

 	

Hello world! (this is when my component renders itself)

 

  • since: 11/22/05
  • access: public
string getPreHTML (string $tabs)
  • string $tabs
getSCList (line 210)

Answers the list of possible SCs for the SP as an array of class names.

  • since: 5/2/06
  • static:
  • access: public
array getSCList ()
getSCs (line 181)

Returns the StyleComponents of this StyleProperty in a suitable for CSS generation order.

  • return: An array of the StyleComponents of this StyleProperty.
array getSCs ()

Redefinition of:
StylePropertyInterface::getSCs()
Returns the StyleComponents of this StyleProperty in a suitable for CSS generation order.
getStyleComponent (line 192)

Returns the StyleComponent with the given class

  • return: object StyleComponent
  • access: public
ref getStyleComponent (string $class)
  • string $class: the class of the StyleComponent
setId (line 92)

Sets the id

  • since: 4/26/06
  • access: public
void setId (object HarmoniId $id)

Inherited Methods

Inherited From StylePropertyInterface

StylePropertyInterface::addSC()
StylePropertyInterface::getCSS()
StylePropertyInterface::getDescription()
StylePropertyInterface::getDisplayName()
StylePropertyInterface::getName()
StylePropertyInterface::getSCs()

Documentation generated on Wed, 19 Sep 2007 10:26:59 -0400 by phpDocumentor 1.3.0RC3