Class StyleComponentInterface

Description

The

  1. StyleComponent
(SC) is the most basic of the three building pieces

of CSS styles. It combines a CSS property value with a ValidatorRule to ensure that the value follows a certain format.

The other two CSS styles building pieces are

  1. StyleProperties
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: StyleComponent.interface.php,v 1.6 2005/02/07 21:38:13 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/GUIManager/StyleComponent.interface.php (line 31)


	
			
Direct descendents
Class Description
StyleComponent This
  1. StyleComponent
generic class is the base for all the other
  1. StyleComponents
. It is up to the user to provide all the necessary data (display name, description, the ValidatorRule, the value of the SC, etc.)
Method Summary
string getDescription ()
string getDisplayName ()
array getOptions ()
string getValue ()
boolean hasOptions ()
boolean isLimitedToOptions ()
void setValue (string $value)
Methods
getDescription (line 47)

Returns the description of this StlyeProperty.

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

Redefined in descendants as:
getDisplayName (line 38)

Returns the display name of this SC.

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

Redefined in descendants as:
getOptions (line 100)

Returns the list of options (list of allowed values) of this SC.

  • return: An array containing the list of options (list of allowed values) of this SC.
  • access: public
array getOptions ()

Redefined in descendants as:
getValue (line 56)

Get the value of this SC.

  • return: The value of this SC.
  • access: public
string getValue ()

Redefined in descendants as:
hasOptions (line 77)

Determines whether this SC has a list of options. If there is a list of options, then the ValidatorRule of this SC would be a ChoiceValidatorRule.

If not, the ValidatorRule could be any ValidatorRule.

  • return: True if the SC has a list of options. FALSE if the SC can take any value.
  • access: public
boolean hasOptions ()

Redefined in descendants as:
  • StyleComponent::hasOptions() : Determines whether this SC has a list of options. If there is a list of options, then the ValidatorRule of this SC would be a ChoiceValidatorRule.
isLimitedToOptions (line 90)

This function will return

  1. TRUE
if the value of this SC is restricted only to the list of options. It will return
  1. FALSE
, if not.

  • return:
    1. TRUE
    if the value of this SC is restricted only to the list of options.
    1. FALSE
    , if not.
  • access: public
boolean isLimitedToOptions ()

Redefined in descendants as:
setValue (line 65)

Sets the value of this SC and validates it using the attached

  1. ValidatorRule
.

  • access: public
void setValue (string $value)
  • string $value: value The new value.

Redefined in descendants as:

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