com.tensegrity.graph.layout
Interface Layoutable

All Known Subinterfaces:
LayoutableEdge, LayoutableNode, VisualEdge, VisualGraphObject, VisualNode, VisualSubgraph

public interface Layoutable

This is the general interface for any graph element visualization that can and will be arranged by a Layout class and satisfies its configuration requirements.

The first of these requirements mandates that an object which implements the Layoutable interface must be able to set a context name that identifies a layouter with a particular configuration. This is the layouter which arranges this graph element.

Some layouters require that nodes or edges be configured because these graph objects necessitate special treatment. For this reason it is possible to set these attributes for a node or edge directly.

This interface consolidates the common methods that would have been duplicated in interfaces LayoutableNode and LayoutEdge.

Version:
$Id: Layoutable.java,v 1.28 2005/04/28 15:40:37 KevinCVS Exp $
Author:
Sharokh Khani

Method Summary
 java.lang.String getEdgeLayoutContext()
          Returns a String identifier which is used to note a specified edge layout context for this Object, which may be used to link this object with a specific EdgeLayout and configuration.
 AttributeSet getLayoutAttributeSet()
          Returns an AttributeSet which contains the specified Layout attributes for the graph object.
 java.lang.String getLayoutContext()
          Deprecated. This method is about to be removed in future releases. Please use setNodeLayoutContext(String) and setEdgeLayoutContext(String) instead.
 java.lang.String getNodeLayoutContext()
          Returns a String identifier which is used to denote a specified node layout context for this Object, which may be used to link this object with a specific NodeLayout and configuration.
 long getUniqueID()
          Returns the identifier of this object.
 void setEdgeLayoutContext(java.lang.String layoutcontext)
          Sets the edge layout context for this object.
 void setLayoutAttributes(AttributeSet attributes)
          This method allows client code to configure a Layoutable object with an AttributeSet that contains all necessary Layout attributes.
 void setLayoutContext(java.lang.String layoutcontext)
          Deprecated. This method is about to be removed in future releases. Please use setNodeLayoutContext(String) and setEdgeLayoutContext(String) instead.
 void setNodeLayoutContext(java.lang.String layoutcontext)
          Sets the layout context for this object.
 

Method Detail

getUniqueID

public long getUniqueID()
Returns the identifier of this object. This must be unique.

Returns:
The identifier of the object.

Find more information in the class documentation


getLayoutContext

public java.lang.String getLayoutContext()
Deprecated. This method is about to be removed in future releases. Please use setNodeLayoutContext(String) and setEdgeLayoutContext(String) instead.

Returns a String identifier used to denote a specified node layout context for this Object. A layout context may be used to link this object with a specific Layout and configuration which will be used to arrange this object whenever a Layout process is performed.

Returns:
the according layout context.

setLayoutContext

public void setLayoutContext(java.lang.String layoutcontext)
Deprecated. This method is about to be removed in future releases. Please use setNodeLayoutContext(String) and setEdgeLayoutContext(String) instead.

Sets the layout context for this object. A layout context is a String identifier which is used to specify a Layout and configuration that should be used to arrange this object whenever a Layout process is performed.

Parameters:
layoutcontext - The according layout context.

setNodeLayoutContext

public void setNodeLayoutContext(java.lang.String layoutcontext)
Sets the layout context for this object. A node layout contex is a String identifier which is used to specify a NodeLayout and configuration that should be used to arrange this object whenever a Layout process is performed.

Parameters:
layoutcontext - The according layout context.

Find more information in the class documentation


getNodeLayoutContext

public java.lang.String getNodeLayoutContext()
Returns a String identifier which is used to denote a specified node layout context for this Object, which may be used to link this object with a specific NodeLayout and configuration. The resulting configured node layout context will be used to arrange this object whenever a NodeLayout process is performed.

Returns:
The according node layout context.

getEdgeLayoutContext

public java.lang.String getEdgeLayoutContext()
Returns a String identifier which is used to note a specified edge layout context for this Object, which may be used to link this object with a specific EdgeLayout and configuration. The configured edge layout context will be used to arrange this object whenever an EdgeLayout process is performed.

Returns:
The according node layout context.

setEdgeLayoutContext

public void setEdgeLayoutContext(java.lang.String layoutcontext)
Sets the edge layout context for this object. An edge layout context is a String identifier which is used to specify the EdgeLayout and its configuration, which is then responsible for arranging this Object.

Parameters:
layoutcontext - The according edge layout context.

Find more information in the class documentation


setLayoutAttributes

public void setLayoutAttributes(AttributeSet attributes)
This method allows client code to configure a Layoutable object with an AttributeSet that contains all necessary Layout attributes.
This AttributeSet is usually provided by an associated Layout object to allow for special treatment of different graph objects.
A implementation class of this interface should be able to store the given attribute set and provide it whenever the method getLayoutAttributeSet() is invoked.

Parameters:
attributes - the new layout attributes.

Find more information in the class documentation


getLayoutAttributeSet

public AttributeSet getLayoutAttributeSet()
Returns an AttributeSet which contains the specified Layout attributes for the graph object. This AttributeSet is usually provided by an associated Layout object to allow for special treatment of different graph objects.

Returns:
the Layout attribute set if any, or null.

Find more information in the class documentation



Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.