| alpha--util--graphs

# Class: AlphaGraphNode Source Location: /util/graphs/AlphaGraphNode.inc ## Class AlphaGraphNode Class Overview
Maintains the geometry for a tree node Located in /util/graphs/AlphaGraphNode.inc [line 50]
Author(s): John Collins <dev@alphaframework.org> Information Tags:
Version: | $Id: AlphaGraphNode.inc 1454 2011-12-04 15:14:05Z johnc $
Copyright: | Copyright (c) 2011, John Collins (founder of Alpha Framework). All rights reserved.
     Redistribution and use in source and binary forms, with or
     without modification, are permitted provided that the
     following conditions are met:

     * Redistributions of source code must retain the above
       copyright notice, this list of conditions and the
       following disclaimer.
     * Redistributions in binary form must reproduce the above
       copyright notice, this list of conditions and the
       following disclaimer in the documentation and/or other
       materials provided with the distribution.
     * Neither the name of the Alpha Framework nor the names
       of its contributors may be used to endorse or promote
       products derived from this software without specific
       prior written permission.

     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
     CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
     CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
     OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Since: | 1.0
License: | The BSD License
| Methods __construct addChild childCount getChildAt getChildren getChildrenCenter getHeight getLeftSibling getLinks getMessage getModifier getNodeColour getOffset getParentNode getRightSibling getURL getWidth getX getY setLeftSibling setMessage setModifier setNodeColour setOffset setParentNode setRightSibling setUpLinks setURL setX setY
[ Top ] Method Summary
AlphaGraphNode | __construct() | Constructor
void | addChild() | Add a new node to the children array of this node
integer | childCount() | Get the number of child nodes attached to this node
mixed | getChildAt() | Gets the child node at the index provided, or returns false if none is found
array | getChildren() | Returns the array of child AlphaGraphNode objects
integer | getChildrenCenter() | Calculates and returns the midpoint X coordinate of the children of this node
integer | getHeight() | Returns the node height
AlphaGraphNode | getLeftSibling() | Get the node to the left of this one (if any)
array | getLinks() | Returns the links array
string | getMessage() | Get the node text message
integer | getModifier() | Get the node modifier
array | getNodeColour() | Get the node colour array
string | getOffset() | Get the node offset
AlphaGraphNode | getParentNode() | Get the parent node of this node (if any)
AlphaGraphNode | getRightSibling() | Get the node to the right of this one (if any)
string | getURL() | Get the node URL
integer | getWidth() | Returns the node width
integer | getX() | Returns the node X-coordinate
integer | getY() | Returns the node Y-coordinate
void | setLeftSibling() | Sets the node to the left of this node
void | setMessage() | Set the node text message
void | setModifier() | Set the node modifier
void | setNodeColour() | Set the node colour array
void | setOffset() | Set the node offset
void | setParentNode() | Set the parent node
void | setRightSibling() | Sets the node to the right of this node
void | setUpLinks() | Sets up the array of connector endpoints
void | setURL() | Set the node ULR
void | setX() | Sets the node X-coordinate
void | setY() | Sets the node Y-coordinate
[ Top ] Methods Constructor __construct [line 181]
`AlphaGraphNode __construct( integer $id, integer $width, integer $height, [string $message = ''], [array $nodeColour = null], [string $URL = null] )`
Constructor Parameters:
integer | $id: |
integer | $width: |
integer | $height: |
string | $message: |
array | $nodeColour: |
string | $URL: |
API Tags:
Access: | public
[ Top ] addChild [line 428]
`void addChild( AlphaGraphNode $node )`
Add a new node to the children array of this node Parameters:
AlphaGraphNode | $node: |
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Since: | 1.0
[ Top ] childCount [line 300]
`integer childCount( )`
Get the number of child nodes attached to this node API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getChildAt [line 391]
`mixed getChildAt( integer $i )`
Gets the child node at the index provided, or returns false if none is found Parameters:
integer | $i: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getChildren [line 417]
`array getChildren( )`
Returns the array of child AlphaGraphNode objects API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getChildrenCenter [line 405]
`integer getChildrenCenter( )`
Calculates and returns the midpoint X coordinate of the children of this node API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getHeight [line 477]
`integer getHeight( )`
Returns the node height API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getLeftSibling [line 334]
`AlphaGraphNode getLeftSibling( )`
Get the node to the left of this one (if any) API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getLinks [line 441]
`array getLinks( )`
Returns the links array API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getMessage [line 240]
`string getMessage( )`
Get the node text message API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getModifier [line 280]
`integer getModifier( )`
Get the node modifier API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getNodeColour [line 196]
`array getNodeColour( )`
Get the node colour array API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getOffset [line 260]
`string getOffset( )`
Get the node offset API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getParentNode [line 310]
`AlphaGraphNode getParentNode( )`
Get the parent node of this node (if any) API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getRightSibling [line 362]
`AlphaGraphNode getRightSibling( )`
Get the node to the right of this one (if any) API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getURL [line 220]
`string getURL( )`
Get the node URL API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getWidth [line 487]
`integer getWidth( )`
Returns the node width API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getX [line 497]
`integer getX( )`
Returns the node X-coordinate API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getY [line 507]
`integer getY( )`
Returns the node Y-coordinate API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setLeftSibling [line 349]
`void setLeftSibling( AlphaGraphNode $node )`
Sets the node to the left of this node Parameters:
AlphaGraphNode | $node: |
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Since: | 1.0
[ Top ] setMessage [line 250]
`void setMessage( string $message )`
Set the node text message Parameters:
string | $message: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setModifier [line 290]
`void setModifier( integer $modifier )`
Set the node modifier Parameters:
integer | $modifier: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setNodeColour [line 207]
`void setNodeColour( array $nodeColour )`
Set the node colour array Parameters:
array | $nodeColour: |
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Since: | 1.0
[ Top ] setOffset [line 270]
`void setOffset( integer $offset )`
Set the node offset Parameters:
integer | $offset: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setParentNode [line 321]
`void setParentNode( AlphaGraphNode $node )`
Set the parent node Parameters:
AlphaGraphNode | $node: |
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Since: | 1.0
[ Top ] setRightSibling [line 377]
`void setRightSibling( AlphaGraphNode $node )`
Sets the node to the right of this node Parameters:
AlphaGraphNode | $node: |
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Since: | 1.0
[ Top ] setUpLinks [line 450]
`void setUpLinks( )`
Sets up the array of connector endpoints API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setURL [line 230]
`void setURL( string $URL )`
Set the node ULR Parameters:
string | $URL: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setX [line 517]
`void setX( integer $x )`
Sets the node X-coordinate Parameters:
integer | $x: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setY [line 527]
`void setY( integer $y )`
Sets the node Y-coordinate Parameters:
integer | $y: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] Documentation generated on Tue, 13 Dec 2011 20:26:08 +0000 by phpDocumentor 1.4.3