Class TPanel

Description

TPanel class

TPanel represents a component that acts as a container for other component. It is especially useful when you want to generate components programmatically or hide/show a group of components.

By default, TPanel displays a <div> element on a page. Children of TPanel are displayed as the body content of the element. The property Wrap can be used to set whether the body content should wrap or not. HorizontalAlign governs how the content is aligned horizontally, and Direction indicates the content direction (left to right or right to left). You can set BackImageUrl to give a background image to the panel, and you can ste GroupingText so that the panel is displayed as a field set with a legend text. Finally, you can specify a default button to be fired when users press 'return' key within the panel by setting the DefaultButton property.

  • author: Qiang Xue <qiang.xue@gmail.com>
  • version: $Id: TPanel.php 3088 2011-12-23 11:29:03Z ctrlaltca@gmail.com $
  • since: 3.0

Located in /Web/UI/WebControls/TPanel.php (line 42)

TComponent
   |
   --TApplicationComponent
      |
      --TControl
         |
         --TWebControl
            |
            --TPanel
Direct descendents
Class Description
TActivePanel TActivePanel is the TPanel active control counterpart.
TDraggable TDraggable is a control which can be dragged
TDropContainer TDropContainer is a panel where TDraggable controls can be dropped.
TDataGridPager TDataGridPager class.
Method Summary
string getBackImageUrl ()
string getDefaultButton ()
string getDirection ()
string getGroupingText ()
string getHorizontalAlign ()
string getScrollBars ()
string getTagName ()
boolean getWrap ()
void render ( $writer)
void renderBeginTag (THtmlWriter $writer)
void renderEndTag (THtmlWriter $writer)
void setBackImageUrl (string $value)
void setDefaultButton (string $value)
void setDirection (string $value)
void setGroupingText (string $value)
void setHorizontalAlign (string $value)
void setScrollBars (string $value)
void setWrap (boolean $value)
Variables

Inherited Variables

Inherited from TWebControl

TWebControl::$_decorator
Methods
addAttributesToRender (line 72)

Adds attributes to renderer.

  • throws: TInvalidDataValueException if default button is not right.
  • access: protected
void addAttributesToRender (THtmlWriter $writer)

Redefinition of:
TWebControl::addAttributesToRender()
Adds attribute name-value pairs to renderer.

Redefined in descendants as:
createStyle (line 62)

Creates a style object to be used by the control.

This method overrides the parent impementation by creating a TPanelStyle object.

  • return: the style used by TPanel.
  • access: protected
TPanelStyle createStyle ()

Redefinition of:
TWebControl::createStyle()
Creates a style object to be used by the control.
getBackImageUrl (line 117)
  • return: the URL of the background image for the panel component.
  • access: public
string getBackImageUrl ()
getDefaultButton (line 151)
  • return: the ID path to the default button. Defaults to empty.
  • access: public
string getDefaultButton ()
getDirection (line 134)
  • return: alignment of the content in the panel. Defaults to 'NotSet'.
  • access: public
string getDirection ()
getGroupingText (line 171)
  • return: the legend text when the panel is used as a fieldset. Defaults to empty.
  • access: public
string getGroupingText ()
getHorizontalAlign (line 99)
  • return: the horizontal alignment of the contents within the panel, defaults to 'NotSet'.
  • access: public
string getHorizontalAlign ()
getScrollBars (line 187)
  • return: the visibility and position of scroll bars in a panel control, defaults to None.
  • access: public
string getScrollBars ()
getTagName (line 52)
  • return: tag name of the panel
  • access: protected
string getTagName ()

Redefinition of:
TWebControl::getTagName()
Returns the tag name used for this control.
getWrap (line 82)
  • return: whether the content wraps within the panel. Defaults to true.
  • access: public
boolean getWrap ()
render (line 228)
  • access: public
void render ( $writer)
  • $writer

Redefinition of:
TWebControl::render()
Renders the control.

Redefined in descendants as:
renderBeginTag (line 205)

Renders the openning tag for the control (including attributes)

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

Redefinition of:
TWebControl::renderBeginTag()
Renders the openning tag for the control (including attributes)
renderEndTag (line 221)

Renders the closing tag for the control

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

Redefinition of:
TWebControl::renderEndTag()
Renders the closing tag for the control
setBackImageUrl (line 126)

Sets the URL of the background image for the panel component.

  • access: public
void setBackImageUrl (string $value)
  • string $value: the URL
setDefaultButton (line 163)

Specifies the default button for the panel.

The default button will be fired (clicked) whenever a user enters 'return' key within the panel. The button must be locatable via the function call TControl::findControl.

  • access: public
void setDefaultButton (string $value)
  • string $value: the ID path to the default button.
setDirection (line 143)
  • access: public
void setDirection (string $value)
  • string $value: alignment of the content in the panel. Valid values include 'NotSet', 'LeftToRight', 'RightToLeft'.
setGroupingText (line 179)
  • access: public
void setGroupingText (string $value)
  • string $value: the legend text. If this value is not empty, the panel will be rendered as a fieldset.
setHorizontalAlign (line 109)

Sets the horizontal alignment of the contents within the panel.

Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'

  • access: public
void setHorizontalAlign (string $value)
  • string $value: the horizontal alignment
setScrollBars (line 196)
  • access: public
void setScrollBars (string $value)
  • string $value: the visibility and position of scroll bars in a panel control. Valid values include None, Auto, Both, Horizontal and Vertical.
setWrap (line 91)

Sets the value indicating whether the content wraps within the panel.

  • access: public
void setWrap (boolean $value)
  • boolean $value: whether the content wraps within the panel.

Inherited Methods

Inherited From TWebControl

TWebControl::addAttributesToRender()
TWebControl::clearStyle()
TWebControl::copyBaseAttributes()
TWebControl::createStyle()
TWebControl::getAccessKey()
TWebControl::getBackColor()
TWebControl::getBorderColor()
TWebControl::getBorderStyle()
TWebControl::getBorderWidth()
TWebControl::getCssClass()
TWebControl::getDecorator()
TWebControl::getDisplay()
TWebControl::getEnsureId()
TWebControl::getFont()
TWebControl::getForeColor()
TWebControl::getHasStyle()
TWebControl::getHeight()
TWebControl::getStyle()
TWebControl::getTabIndex()
TWebControl::getTagName()
TWebControl::getToolTip()
TWebControl::getWidth()
TWebControl::onPreRender()
TWebControl::render()
TWebControl::renderBeginTag()
TWebControl::renderContents()
TWebControl::renderEndTag()
TWebControl::setAccessKey()
TWebControl::setBackColor()
TWebControl::setBorderColor()
TWebControl::setBorderStyle()
TWebControl::setBorderWidth()
TWebControl::setCssClass()
TWebControl::setDisplay()
TWebControl::setEnsureId()
TWebControl::setForeColor()
TWebControl::setHeight()
TWebControl::setStyle()
TWebControl::setTabIndex()
TWebControl::setToolTip()
TWebControl::setWidth()

Inherited From TControl

TControl::__construct()
TControl::addedControl()
TControl::addParsedObject()
TControl::addToPostDataLoader()
TControl::applyStyleSheetSkin()
TControl::autoBindProperty()
TControl::autoDataBindProperties()
TControl::bindProperty()
TControl::broadcastEvent()
TControl::bubbleEvent()
TControl::clearChildState()
TControl::clearControlState()
TControl::clearNamingContainer()
TControl::clearViewState()
TControl::convertUniqueIdToClientId()
TControl::createChildControls()
TControl::createControlCollection()
TControl::dataBind()
TControl::dataBindChildren()
TControl::dataBindProperties()
TControl::ensureChildControls()
TControl::findControl()
TControl::findControlsByID()
TControl::findControlsByType()
TControl::focus()
TControl::getAdapter()
TControl::getAllowChildControls()
TControl::getAttribute()
TControl::getAttributes()
TControl::getChildControlsCreated()
TControl::getClientID()
TControl::getControls()
TControl::getControlStage()
TControl::getControlState()
TControl::getCustomData()
TControl::getEnabled()
TControl::getEnableTheming()
TControl::getEnableViewState()
TControl::getHasAdapter()
TControl::getHasAttributes()
TControl::getHasChildInitialized()
TControl::getHasControls()
TControl::getHasInitialized()
TControl::getHasLoaded()
TControl::getHasLoadedPostData()
TControl::getHasPreRendered()
TControl::getID()
TControl::getIsSkinApplied()
TControl::getNamingContainer()
TControl::getPage()
TControl::getParent()
TControl::getRegisteredObject()
TControl::getSkinID()
TControl::getSourceTemplateControl()
TControl::getTemplateControl()
TControl::getUniqueID()
TControl::getViewState()
TControl::getVisible()
TControl::hasAttribute()
TControl::initRecursive()
TControl::isDescendentOf()
TControl::isObjectRegistered()
TControl::loadRecursive()
TControl::loadState()
TControl::loadStateRecursive()
TControl::onDataBinding()
TControl::onInit()
TControl::onLoad()
TControl::onPreRender()
TControl::onUnload()
TControl::preRenderRecursive()
TControl::raiseBubbleEvent()
TControl::registerObject()
TControl::removeAttribute()
TControl::removedControl()
TControl::render()
TControl::renderChildren()
TControl::renderControl()
TControl::saveState()
TControl::saveStateRecursive()
TControl::setAdapter()
TControl::setAttribute()
TControl::setChildControlsCreated()
TControl::setControlStage()
TControl::setControlState()
TControl::setCustomData()
TControl::setEnabled()
TControl::setEnableTheming()
TControl::setEnableViewState()
TControl::setID()
TControl::setPage()
TControl::setSkinID()
TControl::setTemplateControl()
TControl::setViewState()
TControl::setVisible()
TControl::trackViewState()
TControl::traverseChildControls()
TControl::unbindProperty()
TControl::unloadRecursive()
TControl::unregisterObject()
TControl::__get()

Inherited From TApplicationComponent

TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()

Inherited From TComponent

TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()
Class Constants

Documentation generated on Mon, 25 Jun 2012 14:38:51 +0200 by phpDocumentor 1.4.3