The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

yEd::PropertyBasedObject - common methods for property based yEd Objects (e.g. Nodes,Edges,Labels)

DESCRIPTION

This module is just a collection of commonly used subroutines for handling property access.

All properties can be accessed by using the property name as a funktion. Without any parameters they will act as a getter and as a setter if a value is provided. An exception will be thrown if the value is invalid. All properties will have very similar default values to yEd.

For a list of available properties for each Object have a look at the documentation for

and its subclasses.

EXAMPLE

    $node->x(3.5);
    $node->fillColor('#cccccc');
    # which is equivalent to:
    $node->setProperties('x' => 3.5, 'fillColor' => '#cccccc');

    my $text = $label->text();

SUBROUTINES/METHODS

setProperties

Takes arguments of the form 'property1 => value, property2 => value2, ...' and sets the provided properties accordingly for the element in whichs context this funktion is called.

Properties not provided will be left unchanged.

EXAMPLE

    $node->setProperties('fillColor' => '#ffffff', 'borderColor' => 'none'));

getProperties

Returns a hash of the properties and their current values for the element in whichs context this funktion is called.

EXAMPLE

    my %properties = $node->getProperties();

hasProperties

Takes arguments of the form 'property1 => value, property2 => value2, ...'.

Returns true if the element in whichs context this funktion is called has all provided properties set to the provided values.

Returns false otherwise or if an invalid property is provided.

EXAMPLE

    if ($node->hasProperties('fillColor' => '#ffffff', 'borderColor' => 'none')) { ...

SEE ALSO

yEd::Document for further informations about the whole package

yEd::Node for information about Node elements

yEd::Edge for information about Edge elements

yEd::Label for information about Label elements