diva.graphx
Interface AttributeProxy


public interface AttributeProxy

An attribute proxy is an object that is used to allow finer-grained manipulation of attributes of graph elements. If an application does not wish to provide attribute proxies, then it can simply return null from the AttributeAdapter.getAttributeProxy() method, and Diva will do its best with the AttributeAdapter methods. If it does provide AttributeProxies, then manipulation of your graph elements works a little better.

Version:
$Revision: 1.1 $
Author:
John Reekie (johnr@eecs.berkeley.edu)

Method Summary
 String getName()
          Get the attribute name.
 Class getType()
          Get the class of the attribute.
 Object getValue()
          Get the attribute value.
 boolean isValid(Object value)
          Return true if the value of the given attribute is acceptable.
 boolean isVisible()
          Return true if this attribute is "visible." This tells attribute editors and so on whether or not to display this attribute.
 boolean isWritable()
          Return true if this attribute is writable.
 void setValue(Object value)
          Set the attribute value.
 

Method Detail

getName

String getName()
Get the attribute name.


getType

Class getType()
Get the class of the attribute. This is used by attribute editors to correctly set up interactive editors. Any value that is subsequently returned by getValue() must be a subclass of the returned class. Note: be careful not to confuse this method with the getClass() method.


getValue

Object getValue()
Get the attribute value. This method should return the same result as AttributeAdapter.attributeValue().


isValid

boolean isValid(Object value)
Return true if the value of the given attribute is acceptable. Property editors and the like can use this to provide feedback in a UI as to why an attempted attribute change did not work.


isVisible

boolean isVisible()
Return true if this attribute is "visible." This tells attribute editors and so on whether or not to display this attribute.


isWritable

boolean isWritable()
Return true if this attribute is writable. This is used by property editors and so on to test whether certain attributes should be made editable.


setValue

void setValue(Object value)
Set the attribute value.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.