Overview

Packages

  • alpha::controller
  • alpha::controller::front
  • alpha::exceptions
  • alpha::model
  • alpha::model::types
  • alpha::tasks
  • alpha::tests
  • alpha::util
  • alpha::util::cache
  • alpha::util::codehighlight
  • alpha::util::convertors
  • alpha::util::feeds
  • alpha::util::filters
  • alpha::util::graphs
  • alpha::util::helpers
  • alpha::util::metrics
  • alpha::view
  • alpha::view::renderers
  • alpha::view::widgets

Classes

  • AlphaGraphNode
  • AlphaTreeGraph
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class AlphaGraphNode

Maintains the geometry for a tree node

Package: alpha::util::graphs
Copyright: Copyright (c) 2012, 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.

License: The BSD License
Author: John Collins <dev@alphaframework.org>
Version: $Id: AlphaGraphNode.inc 1496 2012-02-12 20:32:21Z alphadev $
Since: 1.0
Located at util/graphs/AlphaGraphNode.inc
Methods summary
public
# __construct( integer $id, integer $width, integer $height, string $message = '', array $nodeColour = null, string $URL = null )

Constructor

Constructor

Parameters

$id
integer
$id
$width
integer
$width
$height
integer
$height
$message
string
$message
$nodeColour
array
$nodeColour
$URL
string
$URL
public array
# getNodeColour( )

Get the node colour array

Get the node colour array

Returns

array

Since

1.0
public
# setNodeColour( array $nodeColour )

Set the node colour array

Set the node colour array

Parameters

$nodeColour
array
$nodeColour

Throws

IllegalArguementException

Since

1.0
public string
# getURL( )

Get the node URL

Get the node URL

Returns

string

Since

1.0
public
# setURL( string $URL )

Set the node ULR

Set the node ULR

Parameters

$URL
string
$URL

Since

1.0
public string
# getMessage( )

Get the node text message

Get the node text message

Returns

string

Since

1.0
public
# setMessage( string $message )

Set the node text message

Set the node text message

Parameters

$message
string
$message

Since

1.0
public string
# getOffset( )

Get the node offset

Get the node offset

Returns

string

Since

1.0
public
# setOffset( integer $offset )

Set the node offset

Set the node offset

Parameters

$offset
integer
$offset

Since

1.0
public integer
# getModifier( )

Get the node modifier

Get the node modifier

Returns

integer

Since

1.0
public
# setModifier( integer $modifier )

Set the node modifier

Set the node modifier

Parameters

$modifier
integer
$modifier

Since

1.0
public integer
# childCount( )

Get the number of child nodes attached to this node

Get the number of child nodes attached to this node

Returns

integer

Since

1.0
public AlphaGraphNode
# getParentNode( )

Get the parent node of this node (if any)

Get the parent node of this node (if any)

Returns

AlphaGraphNode

Since

1.0
public
# setParentNode( AlphaGraphNode $node )

Set the parent node

Set the parent node

Parameters

$node
AlphaGraphNode
$node

Throws

IllegalArguementException

Since

1.0
public AlphaGraphNode
# getLeftSibling( )

Get the node to the left of this one (if any)

Get the node to the left of this one (if any)

Returns

AlphaGraphNode

Since

1.0
public
# setLeftSibling( AlphaGraphNode $node )

Sets the node to the left of this node

Sets the node to the left of this node

Parameters

$node
AlphaGraphNode
$node

Throws

IllegalArguementException

Since

1.0
public AlphaGraphNode
# getRightSibling( )

Get the node to the right of this one (if any)

Get the node to the right of this one (if any)

Returns

AlphaGraphNode

Since

1.0
public
# setRightSibling( AlphaGraphNode $node )

Sets the node to the right of this node

Sets the node to the right of this node

Parameters

$node
AlphaGraphNode
$node

Throws

IllegalArguementException

Since

1.0
public mixed
# getChildAt( integer $i )

Gets the child node at the index provided, or returns false if none is found

Gets the child node at the index provided, or returns false if none is found

Parameters

$i
integer
$i

Returns

mixed

Since

1.0
public integer
# getChildrenCenter( )

Calculates and returns the midpoint X coordinate of the children of this node

Calculates and returns the midpoint X coordinate of the children of this node

Returns

integer

Since

1.0
public array
# getChildren( )

Returns the array of child AlphaGraphNode objects

Returns the array of child AlphaGraphNode objects

Returns

array

Since

1.0
public
# addChild( AlphaGraphNode $node )

Add a new node to the children array of this node

Add a new node to the children array of this node

Parameters

$node
AlphaGraphNode
$node

Throws

IllegalArguementException

Since

1.0
public array
# getLinks( )

Returns the links array

Returns the links array

Returns

array

Since

1.0
public
# setUpLinks( )

Sets up the array of connector endpoints

Sets up the array of connector endpoints

Since

1.0
public integer
# getHeight( )

Returns the node height

Returns the node height

Returns

integer

Since

1.0
public integer
# getWidth( )

Returns the node width

Returns the node width

Returns

integer

Since

1.0
public integer
# getX( )

Returns the node X-coordinate

Returns the node X-coordinate

Returns

integer

Since

1.0
public integer
# getY( )

Returns the node Y-coordinate

Returns the node Y-coordinate

Returns

integer

Since

1.0
public
# setX( integer $x )

Sets the node X-coordinate

Sets the node X-coordinate

Parameters

$x
integer
$x

Since

1.0
public
# setY( integer $y )

Sets the node Y-coordinate

Sets the node Y-coordinate

Parameters

$y
integer
$y

Since

1.0
Properties summary
private integer $id 0
#

The id of the node

The id of the node

Since

1.0
private integer $height 0
#

The height of the node

The height of the node

Since

1.0
private integer $width 0
#

The width of the node

The width of the node

Since

1.0
private integer $x 0
#

The x position of the node

The x position of the node

Since

1.0
private integer $y 0
#

The y position of the node

The y position of the node

Since

1.0
private AlphaGraphNode $leftNode
#

The node to the left of this one

The node to the left of this one

Since

1.0
private AlphaGraphNode $rightNode
#

The node to the right of this one

The node to the right of this one

Since

1.0
private array $children array()
#

An array of child nodes of this node

An array of child nodes of this node

Since

1.0
private integer $offset 0
#

The margin offset of the current node

The margin offset of the current node

Since

1.0
private integer $modifier 0
#

Optional positional modifier

Optional positional modifier

Since

1.0
private AlphaGraphNode $parentNode
#

Parent node of this node (if any)

Parent node of this node (if any)

Since

1.0
private string $message
#

The text message to display on the node

The text message to display on the node

Since

1.0
private array $links array()
#

A 2D array of the coordinates of the endpoints for connectots on this node

A 2D array of the coordinates of the endpoints for connectots on this node

Since

1.0
private array $nodeColour
#

An array containing the R,G,B values for the colour of this node

An array containing the R,G,B values for the colour of this node

Since

1.0
private string $URL
#

If the node is clickable in an image map, use this property to hold the target URL

If the node is clickable in an image map, use this property to hold the target URL

Since

1.0
Alpha Framework ${alpha.version.new} API Documentation API documentation generated by ApiGen 2.8.0