Class TStyle

Description

TStyle class

TStyle encapsulates the CSS style applied to a control.

Located in /Web/UI/WebControls/TStyle.php (line 28)

TComponent
   |
   --TStyle
Direct descendents
Class Description
TPanelStyle TPanelStyle class.
TTableStyle TTableStyle class.
TTableItemStyle TTableItemStyle class.
TWizardNavigationButtonStyle TWizardNavigationButtonStyle class.
Method Summary
TStyle __construct ([TStyle $style = null])
void clearStyleField (string $name)
void copyFrom (TStyle $style)
string getBackColor ()
string getBorderColor ()
string getBorderStyle ()
string getBorderWidth ()
string getCssClass ()
string getCustomStyle ()
string getForeColor ()
string getHeight ()
string getStyleField (mixed $name)
string getWidth ()
boolean hasStyleField (mixed $name)
void mergeWith (TStyle $style)
void reset ()
void setBackColor (string $value)
void setBorderColor (string $value)
void setBorderStyle (string $value)
void setBorderWidth (string $value)
void setCssClass (string $value)
void setCustomStyle (string $value)
void setForeColor (string $value)
void setHeight (string $value)
void setStyleField (string $name, string $value)
void setWidth (string $value)
Methods
Constructor __construct (line 51)

Constructor.

  • access: public
TStyle __construct ([TStyle $style = null])
  • TStyle $style: style to copy from
addAttributesToRender (line 323)

Adds attributes related to CSS styles to renderer.

  • access: public
void addAttributesToRender (THtmlWriter $writer)
  • THtmlWriter $writer: the writer used for the rendering purpose

Redefined in descendants as:
clearStyleField (line 239)

Clears a single style field value;

  • access: public
void clearStyleField (string $name)
  • string $name: style field name
copyFrom (line 285)

Copies the fields in a new style to this style.

If a style field is set in the new style, the corresponding field in this style will be overwritten.

  • access: public
void copyFrom (TStyle $style)
  • TStyle $style: the new style

Redefined in descendants as:
getBackColor (line 60)
  • return: the background color of the control
  • access: public
string getBackColor ()
getBorderColor (line 79)
  • return: the border color of the control
  • access: public
string getBorderColor ()
getBorderStyle (line 98)
  • return: the border style of the control
  • access: public
string getBorderStyle ()
getBorderWidth (line 118)
  • return: the border width of the control
  • access: public
string getBorderWidth ()
getCssClass (line 137)
  • return: the CSS class of the control
  • access: public
string getCssClass ()
getCustomStyle (line 201)
  • return: the custom style of the control
  • access: public
string getCustomStyle ()
getFont (line 153)
  • return: the font of the control
  • access: public
TFont getFont ()
getForeColor (line 163)
  • return: the foreground color of the control
  • access: public
string getForeColor ()
getHeight (line 182)
  • return: the height of the control
  • access: public
string getHeight ()
getStyleField (line 219)
  • return: a single style field value set via setStyleField. Defaults to empty string.
  • access: public
string getStyleField (mixed $name)
getWidth (line 255)
  • return: the width of the control
  • access: public
string getWidth ()
hasStyleField (line 247)
  • return: whether a style field has been defined by setStyleField
  • access: public
boolean hasStyleField (mixed $name)
mergeWith (line 305)

Merges the style with a new one.

If a style field is not set in this style, it will be overwritten by the new one.

  • access: public
void mergeWith (TStyle $style)
  • TStyle $style: the new style

Redefined in descendants as:
reset (line 271)

Resets the style to the original empty state.

  • access: public
void reset ()

Redefined in descendants as:
setBackColor (line 68)
  • access: public
void setBackColor (string $value)
  • string $value: the background color of the control
setBorderColor (line 87)
  • access: public
void setBorderColor (string $value)
  • string $value: the border color of the control
setBorderStyle (line 107)

Sets the border style of the control.

  • access: public
void setBorderStyle (string $value)
  • string $value: the border style of the control
setBorderWidth (line 126)
  • access: public
void setBorderWidth (string $value)
  • string $value: the border width of the control
setCssClass (line 145)
  • access: public
void setCssClass (string $value)
  • string $value: the name of the CSS class of the control
setCustomStyle (line 211)

Sets custom style fields from a string.

Custom style fields will be overwritten by style fields explicitly defined.

  • access: public
void setCustomStyle (string $value)
  • string $value: the custom style of the control
setForeColor (line 171)
  • access: public
void setForeColor (string $value)
  • string $value: the foreground color of the control
setHeight (line 190)
  • access: public
void setHeight (string $value)
  • string $value: the height of the control
setStyleField (line 230)

Sets a single style field value.

Style fields set by this method will overwrite those set by setCustomStyle.

  • access: public
void setStyleField (string $name, string $value)
  • string $name: style field name
  • string $value: style field value
setWidth (line 263)
  • access: public
void setWidth (string $value)
  • string $value: the width of the control

Inherited Methods

Inherited From TComponent

TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()

Documentation generated on Sun, 04 Jun 2006 19:00:20 -0400 by phpDocumentor 1.3.0RC4