|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface represents the aspects common to all visual graph
elements, including a VisualNode, VisualEdge
and VisualSubgraph. The first of these aspects includes the
identifiable nature of these elements. Every VisualGraphObject
has both an identifier unique to its context as well as a global identifier
that is unique within a hierarchy of VisualGraph objects.
Methods to access both of these identifiers are available.
VisualGraphObject instances are created using factory objects
that return specialized, concrete VisualGraphObject types.
Each VisualGraphObject implementation is constructed with an initial
identifier of -1. When a VisualGraphObject is added to a
GraphObjectContainer, the identifier is
changed internally by the container to a value that becomes unique within
that container context. The container may nest other containers recursively,
which might have the same identifier assigned to one of their managed objects.
Identifiers, therefore, are unique within the scope of a single
GraphObjectContainer only.
When a VisualGraphObject is removed from a
GraphObjectContainer, the identifier is
reset to -1.
Each VisualGraphObject can only be stored in one dedicated
VisualGraphObjectContainer at a time.
The identifiers that are internally assigned to a VisualGraphObject
corresponds with the identifier of the associated model object. In this way, a
mapping from model to view objects is possible. You can create multiple
VisualGraphObject instances that all reference the same model object.
VisualGraphObject instances that are removed from their
containers and dereferenced will be garbage collected.
VisualGraphObject interface extends the
AttributableOnSet interface an instance of it notifies a
registered listener about changes in the supported Attributes.
As explained in the AttributableOnSet interface notification
can be turned on and off by using the corresponding methods.
VisualGraphObject the attribute change notification of the
underlying BaseComposite is also turned on or off.
VisualGraphObject extends the AttributableOnSet
interface, which allows clients to associate attributes with them.
VisualNode,
VisualEdge,
VisualGraphObjectContainer,
VisualGraph,
VisualSubgraph,
RuleRegistry,
Layoutable| Field Summary |
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Method Summary | |
VisualGraphObject |
deepCopy()
Returns a deep independent copy of this instance. |
BaseComposite |
getBaseComposite()
Returns the instance of the BaseComposite that is associated
to the VisualGraphObject instance. |
GraphObject |
getGraphObject()
Returns the instance of the GraphObject that corresponds
to the VisualGraphObject instance. |
long |
getID()
Returns the id of this VisualGraph object. |
VisualGraphObjectContainer |
getParentContainer()
This method returns the VisualGraphObjectContainer this
VisualGraphObject instance currently resides in. |
VisualGraphObjectContainer |
getRootContainer()
VisualGraphObjectContainer instances can be nested
inside of each other by means of the
VisualSubgraph class. |
java.lang.String |
getRule()
Gets the rule associated with this object. |
RuleRegistry |
getRuleRegistry()
Retrieves the active RuleRegistry
for this VisualGraphObject instance. |
long |
getUniqueID()
Returns the global id of this VisualGraphObject instance.
|
boolean |
isPinned()
Return a boolean that indicates whether
this VisualGraphObject is pinned. |
void |
registerVetoableVisualEventMediator(VetoableVisualGraphEventMediator vmediator)
Registers the VetoableVisualGraphEventMediator object given
by vmediator to the VisualGraphObject.
|
void |
registerVisualEventMediator(VisualGraphEventMediator mediator)
Registers the VisualGraphEventMediator object given by
mediator to the VisualGraphObject. |
void |
setPinned(boolean pinned)
Marks this VisualGraphObject as pinned. |
void |
setRule(java.lang.String rule)
Sets the rule name associated with this object. |
void |
setRuleRegistry(RuleRegistry ruleregistry)
Stores the active RuleRegistry of the
rule in the visualgraphobject, so that it can be traced back. |
| Methods inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
addAttributableOnSetListener, areAttributableEventsEnabled, disableAttributableEvents, enableAttributableEvents, getAttributes, getAttributesTree, removeAttributableOnSetListener, setAttributes, setAttributesTree |
| Methods inherited from interface com.tensegrity.generic.attribute.Attributable |
getAttribute, getAttributeType, getAttributeValue, setAttribute, setAttributeValue |
| Methods inherited from interface com.tensegrity.graph.layout.Layoutable |
getEdgeLayoutContext, getLayoutAttributeSet, getLayoutContext, getNodeLayoutContext, setEdgeLayoutContext, setLayoutAttributes, setLayoutContext, setNodeLayoutContext |
| Method Detail |
public long getID()
VisualGraph object. The id is local
to the VisualGraph and exists as well in the associated
graph-model objects. The id however is unique in the scope of
VisualGraphObjects of a single VisualGraph.
VisualGraphObject.public long getUniqueID()
VisualGraphObject instance.
The returned id is unique within the complete graph hierarchy and is the
same as the unique id of the associated GraphObject.
getUniqueID in interface LayoutableVisualGraphObject.public java.lang.String getRule()
public void setRule(java.lang.String rule)
rule - the rule label associated with this object.public RuleRegistry getRuleRegistry()
RuleRegistry
for this VisualGraphObject instance.
RuleRegistry for this
rule or null.public void setRuleRegistry(RuleRegistry ruleregistry)
RuleRegistry of the
rule in the visualgraphobject, so that it can be traced back.
ruleregistry - the RuleRegistry
we are working with.public BaseComposite getBaseComposite()
BaseComposite that is associated
to the VisualGraphObject instance.
BaseComposite instancepublic GraphObject getGraphObject()
GraphObject that corresponds
to the VisualGraphObject instance.
GraphObject instance.public VisualGraphObjectContainer getParentContainer()
VisualGraphObjectContainer this
VisualGraphObject instance currently resides in. In case
this VisualGraphObject instance is not added to a
VisualGraphObjectContainer this method returns
null.
VisualGraphObject instance or null.public VisualGraphObjectContainer getRootContainer()
VisualGraphObjectContainer instances can be nested
inside of each other by means of the
VisualSubgraph class. This method returns the root
component of the nesting hierarchy, or the this
pointer if this instance is the root of the hierarchy.
In case this instance is not added to a parent
VisualGraphObjectContainer null is returned.
this.public void registerVisualEventMediator(VisualGraphEventMediator mediator)
VisualGraphEventMediator object given by
mediator to the VisualGraphObject. Subsequently
the mediator will be informed about all events that occurs
at the VisualGraphObject.
mediator - the ViusalGraphEventMediator to registerpublic void registerVetoableVisualEventMediator(VetoableVisualGraphEventMediator vmediator)
VetoableVisualGraphEventMediator object given
by vmediator to the VisualGraphObject.
Subsequently the vmediator will be informed about all
vetoable events that occurs at the VisualGraphObject.
vmediator - the VetoableViusalGraphEventMediator to
registerpublic VisualGraphObject deepCopy()
public boolean isPinned()
boolean that indicates whether
this VisualGraphObject is pinned.
true if this the VisualGraphObject is
pinned; otherwise false.public void setPinned(boolean pinned)
VisualGraphObject as pinned.
pinned - a flag that indicates whether the VisualGraphObject
is pinned.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||