Overview

Namespaces

  • Alpha
    • Controller
      • Front
    • Exception
    • Model
      • Type
    • Task
    • Util
      • Backup
      • Cache
      • Code
        • Highlight
        • Metric
      • Config
      • Convertor
      • Email
      • Extension
      • Feed
      • File
      • Graph
      • Helper
      • Http
        • Filter
        • Session
      • Image
      • Logging
      • Search
      • Security
    • View
      • Renderer
        • Html
        • Json
      • Widget

Classes

  • GraphNode
  • TreeGraph
  • Overview
  • Namespace
  • Class
  • Tree

Class GraphNode

Maintains the geometry for a tree node.

Namespace: Alpha\Util\Graph
Copyright: Copyright (c) 2015, John Collins (founder of Alpha Framework). All rights reserved. <pre> 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. </pre>
License: The BSD License
Author: John Collins <dev@alphaframework.org>
Since: 1.0
Located at Util/Graph/GraphNode.php
Methods summary
public
# __construct( integer $id, integer $width, integer $height, string $message = '', array $nodeColour = null, string $URL = null )

Constructor.

Constructor.

Parameters

$id
int $id
$width
int $width
$height
int $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
array

Since

1.0
public
# setNodeColour( array $nodeColour )

Set the node colour array.

Set the node colour array.

Parameters

$nodeColour
array $nodeColour

Throws

Alpha\Exception\IllegalArguementException
Alpha\Exception\IllegalArguementException

Since

1.0
public string
# getURL( )

Get the node URL.

Get the node URL.

Returns

string
string

Since

1.0
public
# setURL( string $URL )

Set the node URL.

Set the node URL.

Parameters

$URL
string $URL

Since

1.0
public string
# getMessage( )

Get the node text message.

Get the node text message.

Returns

string
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
string

Since

1.0
public
# setOffset( integer $offset )

Set the node offset.

Set the node offset.

Parameters

$offset
int $offset

Since

1.0
public integer
# getModifier( )

Get the node modifier.

Get the node modifier.

Returns

integer
int

Since

1.0
public
# setModifier( integer $modifier )

Set the node modifier.

Set the node modifier.

Parameters

$modifier
int $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
int

Since

1.0
public Alpha\Util\Graph\GraphNode
# getParentNode( )

Get the parent node of this node (if any).

Get the parent node of this node (if any).

Returns

Alpha\Util\Graph\GraphNode
Alpha\Util\Graph\GraphNode

Since

1.0
public
# setParentNode( Alpha\Util\Graph\GraphNode $node )

Set the parent node.

Set the parent node.

Parameters

$node
Alpha\Util\Graph\GraphNode $node

Throws

Alpha\Exception\IllegalArguementException
Alpha\Exception\IllegalArguementException

Since

1.0
public Alpha\Util\Graph\GraphNode
# getLeftSibling( )

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

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

Returns

Alpha\Util\Graph\GraphNode
Alpha\Util\Graph\GraphNode

Since

1.0
public
# setLeftSibling( Alpha\Util\Graph\GraphNode $node )

Sets the node to the left of this node.

Sets the node to the left of this node.

Parameters

$node
Alpha\Util\Graph\GraphNode $node

Throws

Alpha\Exception\IllegalArguementException
Alpha\Exception\IllegalArguementException

Since

1.0
public Alpha\Util\Graph\GraphNode
# getRightSibling( )

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

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

Returns

Alpha\Util\Graph\GraphNode
Alpha\Util\Graph\GraphNode

Since

1.0
public
# setRightSibling( Alpha\Util\Graph\GraphNode $node )

Sets the node to the right of this node.

Sets the node to the right of this node.

Parameters

$node
Alpha\Util\Graph\GraphNode $node

Throws

Alpha\Exception\IllegalArguementException
Alpha\Exception\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
int $i

Returns

mixed
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
int

Since

1.0
public array
# getChildren( )

Returns the array of child GraphNode objects.

Returns the array of child GraphNode objects.

Returns

array
array

Since

1.0
public
# addChild( Alpha\Util\Graph\GraphNode $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
Alpha\Util\Graph\GraphNode $node

Throws

ALpha\Exception\IllegalArguementException
ALpha\Exception\IllegalArguementException

Since

1.0
public array
# getLinks( )

Returns the links array.

Returns the links array.

Returns

array
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
int

Since

1.0
public integer
# getWidth( )

Returns the node width.

Returns the node width.

Returns

integer
int

Since

1.0
public integer
# getX( )

Returns the node X-coordinate.

Returns the node X-coordinate.

Returns

integer
int

Since

1.0
public integer
# getY( )

Returns the node Y-coordinate.

Returns the node Y-coordinate.

Returns

integer
int

Since

1.0
public
# setX( integer $x )

Sets the node X-coordinate.

Sets the node X-coordinate.

Parameters

$x
int $x

Since

1.0
public
# setY( integer $y )

Sets the node Y-coordinate.

Sets the node Y-coordinate.

Parameters

$y
int $y

Since

1.0
Alpha Framework 2.0.4 API Documentation API documentation generated by ApiGen 2.8.0