Class CornersStyleCollection

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: CornersStyleCollection.class.php,v 1.3 2005/12/12 16:06:14 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/GUIManager/CornersStyleCollection.class.php (line 33)

StyleCollectionInterface
   |
   --StyleCollection
      |
      --CornersStyleCollection
Variable Summary
array $_positions
array $_urls
Method Summary
CornersStyleCollection CornersStyleCollection (string $selector, string $classSelector, string $displayName, string $description)
void getBorderUrl (string $position)
string getCSS ([string $tabs = ""])
string getPostHTML (string $tabs)
string getPreHTML (string $tabs)
void setBorderUrl (string $position, string $url, [optional $height = 15], [optional $width = 15])
Variables
array $_positions (line 49)
  • since: 11/28/05
  • access: private
array $_urls (line 42)
  • since: 11/28/05
  • access: private

Inherited Variables

Inherited from StyleCollection

StyleCollection::$_classSelector
StyleCollection::$_description
StyleCollection::$_displayName
StyleCollection::$_id
StyleCollection::$_postHTML
StyleCollection::$_preHTML
StyleCollection::$_selector
StyleCollection::$_SPs
Methods
Constructor CornersStyleCollection (line 61)

The constructor.

  • access: public
CornersStyleCollection CornersStyleCollection (string $selector, string $classSelector, string $displayName, string $description)
  • string $selector: selector The selector of this StyleCollection.
  • string $classSelector: classSelector The class selector of this style collection. If
    1. null
    , it will be ignored, but the collection will not be able to be applied to components.
  • string $displayName: displayName The display name of this StyleCollection.
  • string $description: description The description of this StyleCollection.
getBorderUrl (line 96)

Set the url of the corner image

  • since: 11/28/05
  • access: public
void getBorderUrl (string $position)
  • string $position
getCSS (line 111)

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.

Redefinition of:
StyleCollection::getCSS()
Returns the CSS code for this StyleCollection.
getPostHTML (line 301)

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

Redefinition of:
StyleCollection::getPostHTML()
Return HTML to nested inside of the component's block. This includes things such as corner images.
getPreHTML (line 257)

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

Redefinition of:
StyleCollection::getPreHTML()
Return HTML to nested inside of the component's block. This includes things such as corner images.
setBorderUrl (line 78)

Set the url of the corner image

  • since: 11/28/05
  • access: public
void setBorderUrl (string $position, string $url, [optional $height = 15], [optional $width = 15])
  • string $position
  • string $url
  • optional $height: int $height
  • optional $width: int $width

Inherited Methods

Inherited From StyleCollection

StyleCollection::StyleCollection()
StyleCollection::addSP()
StyleCollection::canBeApplied()
StyleCollection::getClassSelector()
StyleCollection::getComponent()
StyleCollection::getCSS()
StyleCollection::getDescription()
StyleCollection::getDisplayName()
StyleCollection::getId()
StyleCollection::getIndex()
StyleCollection::getPostHTML()
StyleCollection::getPreHTML()
StyleCollection::getSelector()
StyleCollection::getSPs()
StyleCollection::getStyleProperty()
StyleCollection::removeSP()
StyleCollection::setComponent()
StyleCollection::setId()
StyleCollection::setIndex()

Inherited From StyleCollectionInterface

StyleCollectionInterface::addSP()
StyleCollectionInterface::canBeApplied()
StyleCollectionInterface::getClassSelector()
StyleCollectionInterface::getCSS()
StyleCollectionInterface::getDescription()
StyleCollectionInterface::getDisplayName()
StyleCollectionInterface::getSelector()
StyleCollectionInterface::getSPs()
StyleCollectionInterface::removeSP()

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