Class StyleCollectionInterface

Description

A StyleCollection is one of the tree building pieces of CSS styles. As the name suggests it handles a collection of StyleProperties.

The other two CSS styles building pieces are

  1. StylePropertiy
and
  1. StyleComponent
. 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: StyleCollection.interface.php,v 1.8 2007/09/04 20:25:21 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/GUIManager/StyleCollection.interface.php (line 32)


	
			
Direct descendents
Class Description
StyleCollection A StyleCollection is one of the tree building pieces of CSS styles. As the name suggests it handles a collection of StyleProperties.
Method Summary
ref addSP (ref $sp)
boolean canBeApplied ()
string getClassSelector ()
string getCSS ([string $tabs = ""])
string getDescription ()
string getDisplayName ()
string getSelector ()
array getSPs ()
ref removeSP (ref $sp)
Methods
addSP (line 99)

Adds one StyleProperty to this StyleCollection.

  • return: object The style property that was just added.
  • access: public
ref addSP (ref $sp)
  • ref $sp: object sc A StyleProperty object.

Redefined in descendants as:
canBeApplied (line 62)

Determines whether this

  1. StyleCollection
can be applied to
  1. Components
.

  • return:
    1. TRUE
    if this
    1. StyleCollection
    can be applied to
    1. Components
    .
  • access: public
boolean canBeApplied ()

Redefined in descendants as:
getClassSelector (line 53)

Returns the class selector of this style collection. A class selector is the string that would be included in the 'class' attribute of HTML tags. One can use this method in order to apply the style collection to an arbitrary component.

  • return: The class name of this style collection.
  • access: public
string getClassSelector ()

Redefined in descendants as:
  • StyleCollection::getClassSelector() : Returns the class selector of this style collection. A class selector is the string that would be included in the 'class' attribute of HTML tags. One can use this method in order to apply the style collection to an arbitrary component.
getCSS (line 42)

Returns the CSS code for this StyleCollection.

  • return: The CSS code for this StyleCollection.
  • access: public
string getCSS ([string $tabs = ""])
  • string $tabs: tabs This is a string (normally a bunch of tabs) that will be prepended to each text line. This argument is optional but its usage is highly recommended in order to produce a nicely formatted HTML output.

Redefined in descendants as:
getDescription (line 89)

Returns the description of this StyleCollection.

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

Redefined in descendants as:
getDisplayName (line 80)

Returns the display name of this StyleCollection.

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

Redefined in descendants as:
getSelector (line 71)

Returns the selector of this StyleCollection.

  • return: The selector of this StyleCollection.
  • access: public
string getSelector ()

Redefined in descendants as:
getSPs (line 109)

Returns the StyleProperties of this StyleCollection in a suitable for CSS generation order.

  • return: An array of the StyleProperties of this StyleCollection.
  • access: public
array getSPs ()

Redefined in descendants as:
removeSP (line 120)

Remove the given StyleProperty from this Style Collection.

  • return: object The style property that was removed.
    1. NULL
    if it could not be found.
  • access: public
ref removeSP (ref $sp)
  • ref $sp: object The style property to remove.

Redefined in descendants as:

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