net.xqhs.graphs.representation
Class RepresentationElement

java.lang.Object
  extended by net.xqhs.util.config.Config
      extended by net.xqhs.graphs.representation.RepresentationElement
All Implemented Interfaces:
net.xqhs.util.config.Configurable
Direct Known Subclasses:
GraphicalRepresentationElement, TextRepresentationElement

public abstract class RepresentationElement
extends net.xqhs.util.config.Config

This abstract class should be extended by any class implementing the representation of a graph component (more precisely of a VisualizableGraphComponent instance.

Each representation relates to the component it represents, as well as to the parent representation.

Author:
Andrei Olaru

Nested Class Summary
 
Nested classes/interfaces inherited from class net.xqhs.util.config.Config
net.xqhs.util.config.Config.ConfigLockedException
 
Field Summary
(package private)  GraphRepresentation parentRepresentation
          The parent representation.
(package private)  VisualizableGraphComponent representedComponent
          The represented graph component.
 
Constructor Summary
RepresentationElement(GraphRepresentation parent, VisualizableGraphComponent component)
          Creates a new representation element, initializing the references to the parent representation and to the represented component.
 
Method Summary
 GraphRepresentation getParentRepresentation()
           
 VisualizableGraphComponent getRepresentedComponent()
           
 GraphRepresentation getRootRepresentation()
          This method gets the root representation of the multi-level representation (if any, otherwise just the parent representation).
 
Methods inherited from class net.xqhs.util.config.Config
build, ensureLocked, lock, locked, lockedEx, makeDefaults
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentRepresentation

GraphRepresentation parentRepresentation
The parent representation.


representedComponent

VisualizableGraphComponent representedComponent
The represented graph component.

Constructor Detail

RepresentationElement

public RepresentationElement(GraphRepresentation parent,
                             VisualizableGraphComponent component)
Creates a new representation element, initializing the references to the parent representation and to the represented component.

Parameters:
parent - : the parent representation.
component - : the represented component.
Method Detail

getParentRepresentation

public GraphRepresentation getParentRepresentation()
Returns:
the parent representation.

getRootRepresentation

public GraphRepresentation getRootRepresentation()
This method gets the root representation of the multi-level representation (if any, otherwise just the parent representation).

Returns:
the root representation.

getRepresentedComponent

public VisualizableGraphComponent getRepresentedComponent()
Returns:
the graph component represented by this element.