GraphLab Project

graphlab.graph.atributeset
Class GraphAttrSet

java.lang.Object
  extended by graphlab.graph.atributeset.GraphAttrSet
All Implemented Interfaces:
AttributeSet

public class GraphAttrSet
extends java.lang.Object
implements AttributeSet

this class provides a way to have a Graph object as a NotifiableAttributeSet this is usefull whenever some one wants to work blindly with graph attributes for example on saving graph to a gml xml file it is important to have all attributes saved, the meaning of values of attributes is not important, or when a property editor wants to show and edit the attributes of graph to the user, at that time it can use a XAttribute to have better looks see GraphPropertyEditor class as an example.

An other usage of this class is whenever some one wants to listen to changes of a user defined or a rare attribute which normally has no listening capability, for example when you want to change the program according to Graph ID whenever it changes. ID attribute on graph has not a formal listening way, so this class is usefull at that time.

Author:
Azin Azadi
See Also:
AttributeSetView, NotifiableAttributeSetView, GraphPropertyEditor

Field Summary
static java.lang.String DIRECTED
           
static java.lang.String DRAW_EDGE_LABELS
           
static java.lang.String DRAW_VERTEX_LABELS
           
static java.lang.String EDGEDEFAULT
           
static java.lang.String EDGEDEFAULT_DIRECTED
           
static java.lang.String EDGEDEFAULT_UNDIRECTED
           
static java.lang.String FONT
           
static java.lang.String IS_EDGES_CURVED
           
static java.lang.String LABEL
           
static java.lang.String name
           
static java.lang.String ZOOM
           
 
Constructor Summary
GraphAttrSet(GraphModel g)
           
 
Method Summary
 java.lang.Object get(java.lang.String atrName)
           
 java.util.Map<java.lang.String,java.lang.Object> getAttrs()
           
 void put(java.lang.String atrName, java.lang.Object val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDGEDEFAULT

public static final java.lang.String EDGEDEFAULT
See Also:
Constant Field Values

EDGEDEFAULT_DIRECTED

public static final java.lang.String EDGEDEFAULT_DIRECTED
See Also:
Constant Field Values

EDGEDEFAULT_UNDIRECTED

public static final java.lang.String EDGEDEFAULT_UNDIRECTED
See Also:
Constant Field Values

DIRECTED

public static final java.lang.String DIRECTED
See Also:
Constant Field Values

LABEL

public static final java.lang.String LABEL
See Also:
Constant Field Values

ZOOM

public static final java.lang.String ZOOM
See Also:
Constant Field Values

FONT

public static final java.lang.String FONT
See Also:
Constant Field Values

DRAW_VERTEX_LABELS

public static final java.lang.String DRAW_VERTEX_LABELS
See Also:
Constant Field Values

DRAW_EDGE_LABELS

public static final java.lang.String DRAW_EDGE_LABELS
See Also:
Constant Field Values

IS_EDGES_CURVED

public static final java.lang.String IS_EDGES_CURVED
See Also:
Constant Field Values

name

public static final java.lang.String name
See Also:
Constant Field Values
Constructor Detail

GraphAttrSet

public GraphAttrSet(GraphModel g)
Method Detail

getAttrs

public java.util.Map<java.lang.String,java.lang.Object> getAttrs()
Specified by:
getAttrs in interface AttributeSet
Returns:
a unmodifiable copy of attributes in this object

put

public void put(java.lang.String atrName,
                java.lang.Object val)
Specified by:
put in interface AttributeSet

get

public java.lang.Object get(java.lang.String atrName)
Specified by:
get in interface AttributeSet

GraphLab Project