SwatObject
└─SwatUIObject
└─SwatCellRenderer
public abstract class SwatCellRenderer
extends SwatUIObject
| Field Summary | |
|---|---|
| string | A non-visible unique id for this cell renderer, or null. |
| boolean | Sensitive. |
| Fields inherited from Swat.SwatUIObject | |
|---|---|
| classes, html_head_entry_set, parent, visible | |
| Method Summary | |
|---|---|
| array | Gets the base CSS class names for this cell renderer. |
| array | getDataSpecificCSSClassNames() Gets the data specific CSS class names for this cell renderer. |
| SwatHtmlHeadEntrySet | Gets the SwatHtmlHeadEntry objects needed by this cell renderer. |
| final array | Gets the CSS class names of this cell renderer based on the inheritance tree for this cell renderer. |
| string | Gets ths inline JavaScript required by this cell renderer. |
| array | Gathers all messages from this cell renderer. |
| string | getPropertyNameToMap(SwatUIObject object, string name) Get a property name to use for mapping. |
| boolean | Gets whether or not this cell renderer has messages. |
| void | init() Called during the init phase. |
| boolean | isPropertyStatic(string property_name) Checks if a public property is static (can not be data-mapped). |
| protected final void | makePropertyStatic(mixed property_name, $property_name string) Make a public property static. |
| void | process() Called during processing phase. |
| void | render() Renders this cell. |
| Methods inherited from Swat.SwatUIObject | |
|---|---|
| addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible | |
public string $id = null
A non-visible unique id for this cell renderer, or null
public boolean $sensitive = true
Sensitive
Whether this renderer is sensitive. If a renderer is sensitive it reacts to user input. Unsensitive renderers should display "grayed-out" to inform the user they are not sensitive. All renderers that react to user input should respect this property in their display() method.
public array getBaseCSSClassNames()
Gets the base CSS class names for this cell renderer
This is the recommended place for cell-renderer subclasses to add extra hard-coded CSS classes.
public array getDataSpecificCSSClassNames()
Gets the data specific CSS class names for this cell renderer
This is the recommended place for cell-renderer subclasses to add extra hard-coded CSS classes that depend on data-bound properties of this cell-renderer.
public SwatHtmlHeadEntrySet getHtmlHeadEntrySet()
Gets the SwatHtmlHeadEntry objects needed by this cell renderer
If this renderer has never been rendered, an empty set is returned to reduce the number of required HTTP requests.
public final array getInheritanceCSSClassNames()
Gets the CSS class names of this cell renderer based on the inheritance tree for this cell renderer
For example, a class with the following ancestry:
SwatCellRenderer -> SwatTextCellRenderer -> SwatNullTextCellRenderer
will return the following array of class names:
<?php
array(
'swat-cell-renderer',
'swat-text-cell-renderer',
'swat-null-text-cell-renderer',
);
?>
public string getInlineJavaScript()
Gets ths inline JavaScript required by this cell renderer
public array getMessages()
Gathers all messages from this cell renderer
By default, cell renderers do not have messages. Subclasses may override this method to return messages.
public string getPropertyNameToMap(SwatUIObject object, string name)
Get a property name to use for mapping
This method can be overridden by sub-classes that need to modify the name of a property mapping. This allows cell renderers which conatin multiple SwatUIObject object to mangle property names if necessary to avoid conflicts.
object - the object containing the property that is being mapped. Usually this is the cell renderer itself, but not necessarily. It could be a UIObject within the cell renderer.name - the name of the property being mapped.public boolean hasMessage()
Gets whether or not this cell renderer has messages
By default, cell renderers do not have messages. Subclasses may override this method if they have messages.
public void init()
Called during the init phase
Sub-classes can redefine this method to perform any necessary processing.
public boolean isPropertyStatic(string property_name)
Checks if a public property is static (can not be data-mapped)
This method takes a property name and returns a boolean representing weather or not the property has been made static.
property_name - the property name to check.protected final void makePropertyStatic(mixed property_name, $property_name string)
Make a public property static
This method takes a property name and marks it as static, meaning that a user can not data-map this property.
string - the property namepublic void process()
Called during processing phase
Sub-classes can redefine this method to perform any necessary processing.
public void render()
Renders this cell
Renders this cell using the values currently stored in class variables.
Cell renderer subclasses should extend this method to do all output neccessary to display the cell.
Object for rendering a single cell
Subclasses add public class variable to store data they need for rendering.