Packagecom.yworks.graph.model
Classpublic class DefaultNodeLookup
InheritanceDefaultNodeLookup Inheritance DefaultItemLookup

This is the default implementation for lookup queries on INode instances.



Protected Properties
 PropertyDefined by
 Inheriteditem : IModelItem
Gets the context item.
DefaultItemLookup
Public Methods
 MethodDefined by
  
Create a new instance with the given node as context.
DefaultNodeLookup
 Inherited
lookup(type:Class):Object
Returns an instance that implements the given type or null.
DefaultItemLookup
 Inherited
lookupForItem(item:Object, type:Class):Object
Tries to create or retrieve an implementation of the given type for a given item.
DefaultItemLookup
  
setItem(item:IModelItem):void
Set the node that will be used as the lookup context.
DefaultNodeLookup
 Inherited
This method is called by the framework to register the fallback lookup implementation that should be used during a call to IContextLookup#Lookup/.
DefaultItemLookup
Protected Methods
 MethodDefined by
  
itemLookup(item:IModelItem, type:Class, nextLookup:ILookup, lastLookup:ILookup):Object
Provides several default implementations for the various aspects of an INode.
DefaultNodeLookup
Constructor detail
DefaultNodeLookup()constructor
public function DefaultNodeLookup(item:IModelItem = null)

Create a new instance with the given node as context.

Parameters
item:IModelItem (default = null)

Throws
— If the given item is not an INode.
Method detail
itemLookup()method
protected override function itemLookup(item:IModelItem, type:Class, nextLookup:ILookup, lastLookup:ILookup):Object

Provides several default implementations for the various aspects of an INode.

Parameters
item:IModelItem — The node to find an implementation for.
 
type:Class — The type of the implementation to find.
 
nextLookup:ILookup — The lookup to use for another type.
 
lastLookup:ILookup — The lookup to use as a fallback for the type.

Returns
Object — an implementation of type.
setItem()method 
public override function setItem(item:IModelItem):void

Set the node that will be used as the lookup context.

Parameters
item:IModelItem — The node to be set.

Throws
— If the given item is not an INode.