| Package | com.cyntaxic.cynmvc.view |
| Class | public class CynView |
| Inheritance | CynView flash.display.Sprite |
| Implements | ICynView |
| Subclasses | CynComponent, CynComposite, CynViewProxy |
CynView is the abstract base class for CynComposite and CynComponent.
It should be an extended by either a CynComposite or a CynComponent class.
If there is an attempt to extend CynView with any other class a CynError is thrown.
| Property | Defined By | ||
|---|---|---|---|
| cynController : CynController
A reference to the CynController. | CynView | ||
| cynModel : CynModel
A reference to the CynModel. | CynView | ||
| describeProperties : Array
List of properties to describe on the view when using describe. | CynView | ||
| suppressDebug : Boolean = false
Flag to set whether debugging is suppressed for this CynView. | CynView | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance of CynView. | CynView | ||
addListener(type:String, listener:Function, props:Object = null):void
Shorthand method for addEventListener. | CynView | ||
addWeakListener(type:String, listener:Function):void
Shorthand method for addEventListener using weak reference. | CynView | ||
describe(compact:Boolean = true):String
Returns a valid JSON string describing some commonly used display properties. | CynView | ||
describeListeners(compact:Boolean = true):String
Returns a valid JSON string describing the listeners. | CynView | ||
getListeners():Array
Returns a copy of the listeners on the CynView. | CynView | ||
Optionally initialize a view. | CynView | ||
removeAllChildren():Array
Removes all children of the DisplayObject from the display list. | CynView | ||
removeAllListeners():void
Removes all the listeners added. | CynView | ||
removeListener(type:String):void
Shorthand method for removeEventListener. | CynView | ||
Invoked when Event.RESIZE event is fired. | CynView | ||
| Method | Defined By | ||
|---|---|---|---|
debug(message:Object):void
Traces out a debugging message. | CynView | ||
| cynController | property |
protected var cynController:CynController
A reference to the CynController.
| cynModel | property |
protected var cynModel:CynModel
A reference to the CynModel.
| describeProperties | property |
protected var describeProperties:Array
List of properties to describe on the view when using describe.
See also
| suppressDebug | property |
protected var suppressDebug:Boolean = false
Flag to set whether debugging is suppressed for this CynView.
| CynView | () | Constructor |
public function CynView(self:CynView)
Creates a new instance of CynView.
self:CynView — Reference to itself to enforce it as an abstract class.
|
CynError — If attempted to be extended without super(this) or by a class that is not CynComposite or CynComponent.
|
| addListener | () | method |
public function addListener(type:String, listener:Function, props:Object = null):void
Shorthand method for addEventListener. The first arguments are the
same, but the last few are passed in with an object. Named the same as addEventListener.
Parameters
type:String — The type of the event listener.
| |
listener:Function — The listener function.
| |
props:Object (default = null) — An object containing any or all of the properties useCapture, priority, and useWeakReference.
|
| addWeakListener | () | method |
public function addWeakListener(type:String, listener:Function):void
Shorthand method for addEventListener using weak reference. The parameters
useCapture and priority are set to the default for addEventListener.
To change these use addListener.
Parameters
type:String — The type of the event listener.
| |
listener:Function — The listener function.
|
See also
| debug | () | method |
protected function debug(message:Object):voidTraces out a debugging message.
Parameters
message:Object — The message to be traced out.
|
| describe | () | method |
public function describe(compact:Boolean = true):String
Returns a valid JSON string describing some commonly used display properties.
To change the properties being described add or remove from describeProperties.
Parameters
compact:Boolean (default = true) — If false the string is not compacted.
|
String — A valid JSON string.
|
See also
| describeListeners | () | method |
public function describeListeners(compact:Boolean = true):StringReturns a valid JSON string describing the listeners.
Parameters
compact:Boolean (default = true) — If false the string is not compacted.
|
String — A valid JSON string.
|
| getListeners | () | method |
public function getListeners():Array
Returns a copy of the listeners on the CynView.
Array — An array of the listeners on the CynView.
|
| init | () | method |
public function init(vo:CyntaxicVO):CynViewOptionally initialize a view. This is useful when extending a graphical objects from a Flash library where the constructor is not available.
Parameters
vo:CyntaxicVO — The value object to pass parameters.
|
CynView — The CynView for chainability.
|
| removeAllChildren | () | method |
public function removeAllChildren():Array
Removes all children of the DisplayObject from the display list.
On completion an array of the objects removed is returned.
Array — An array of the objects removed.
|
| removeAllListeners | () | method |
public function removeAllListeners():voidRemoves all the listeners added.
| removeListener | () | method |
public function removeListener(type:String):void
Shorthand method for removeEventListener. This function differs
as the function name does not need to be passed in. It looks for the first
event that matches the type and removes it. If there is more than
one by the same name, it only removes the first one.
Parameters
type:String — The type of the event listener.
|
| resize | () | method |
public function resize(vo:ResizeVO):void
Invoked when Event.RESIZE event is fired. A ResizeVO is passed
in containing stage.stageWidth and stage.stageHeight properties.
Parameters
vo:ResizeVO — A ResizeVO containing stage.stageWidth and stage.stageHeight properties.
|