[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> TMultiView.php (sommaire)

TMultiView and TView class file.

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TMultiView.php 1397 2006-09-07 07:55:53Z wei $
Poids: 379 lignes (11 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 3 classes

TMultiView:: (14 méthodes):
  addParsedObject()
  createControlCollection()
  getActiveViewIndex()
  setActiveViewIndex()
  getActiveView()
  setActiveView()
  activateView()
  getViews()
  ignoreBubbleEvents()
  onInit()
  onActiveViewChanged()
  bubbleEvent()
  loadState()
  render()

TViewCollection:: (1 méthode):
  insertAt()

TView:: (6 méthodes):
  onActivate()
  onDeactivate()
  getActive()
  setActive()
  getVisible()
  setVisible()


Classe: TMultiView  - X-Ref

TMultiView class

TMultiView serves as a container for a group of {@link TView} controls.
The view collection can be retrieved by {@link getViews Views}.
Each view contains child controls. TMultiView determines which view and its
child controls are visible. At any time, at most one view is visible (called
active). To make a view active, set {@link setActiveView ActiveView} or
{@link setActiveViewIndex ActiveViewIndex}.

TMultiView also responds to specific command events raised from button controls
contained in current active view. A command event with name 'NextView'
will cause TMultiView to make the next available view active.
Other command names recognized by TMultiView include
- PreviousView : switch to previous view
- SwitchViewID : switch to a view by its ID path
- SwitchViewIndex : switch to a view by its index in the {@link getViews Views} collection.

TMultiView raises {@link OnActiveViewChanged OnActiveViewChanged} event
when its active view is changed during a postback.

addParsedObject($object)   X-Ref
Processes an object that is created during parsing template.
This method overrides the parent implementation by adding only {@link TView}
controls as children.

param: string|TComponent text string or component parsed and instantiated in template

createControlCollection()   X-Ref
Creates a control collection object that is to be used to hold child controls

return: TViewCollection control collection

getActiveViewIndex()   X-Ref

return: integer the zero-based index of the current view in the view collection. -1 if no active view. Default is -1.

setActiveViewIndex($value)   X-Ref

param: integer the zero-based index of the current view in the view collection. -1 if no active view.

getActiveView()   X-Ref

return: TView the currently active view, null if no active view

setActiveView($view)   X-Ref

param: TView the view to be activated

activateView($view,$triggerViewChangedEvent=true)   X-Ref
Activates the specified view.
If there is any view currently active, it will be deactivated.

param: TView the view to be activated
param: boolean whether to trigger OnActiveViewChanged event.

getViews()   X-Ref

return: TViewCollection the view collection

ignoreBubbleEvents()   X-Ref
Makes the multiview ignore all bubbled events.
This is method is used internally by framework and control
developers.


onInit($param)   X-Ref
Initializes the active view if any.
This method overrides the parent implementation.

param: TEventParameter event parameter

onActiveViewChanged($param)   X-Ref
Raises <b>OnActiveViewChanged</b> event.
The event is raised when the currently active view is changed to a new one

param: TEventParameter event parameter

bubbleEvent($sender,$param)   X-Ref
Processes the events bubbled from child controls.
The method handles view-related command events.

param: TControl sender of the event
param: mixed event parameter
return: boolean whether this event is handled

loadState()   X-Ref
Loads state into the wizard.
This method is invoked by the framework when the control state is being saved.


render($writer)   X-Ref
Renders the currently active view.

param: THtmlWriter the writer for the rendering purpose.

Classe: TViewCollection  - X-Ref

TViewCollection class.
TViewCollection represents a collection that only takes {@link TView} instances
as collection elements.

insertAt($index,$item)   X-Ref
Inserts an item at the specified position.
This overrides the parent implementation by ensuring only {@link TView}
controls be added into the collection.

param: integer the speicified position.
param: mixed new item

Classe: TView  - X-Ref

TView class

TView is a container for a group of controls. TView must be contained
within a {@link TMultiView} control in which only one view can be active
at one time.

To activate a view, set {@link setActive Active} to true.
When a view is activated, it raises {@link onActivate OnActivate} event;
and when a view is deactivated, it raises {@link onDeactivate OnDeactivate}.

onActivate($param)   X-Ref
Raises <b>OnActivate</b> event.

param: TEventParameter event parameter

onDeactivate($param)   X-Ref
Raises <b>OnDeactivate</b> event.

param: TEventParameter event parameter

getActive()   X-Ref

return: boolean whether this view is active. Defaults to false.

setActive($value)   X-Ref

param: boolean whether this view is active.

getVisible($checkParents=true)   X-Ref

param: boolean whether the parents should also be checked if visible
return: boolean whether this view is visible.

setVisible($value)   X-Ref

param: boolean



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7