| Package | com.yworks.graph.model |
| Class | public class AbstractModelItem |
| Implements | IModelItem, IMutableLookup |
| Subclasses | AbstractLabeledItem, DefaultBend, DefaultLabel, DefaultPort |
IModelItem
with support for pluggable ILookup implementations.
| Property | Defined by | ||
|---|---|---|---|
| _lookupMap : IMapper | AbstractModelItem | ||
| Method | Defined by | ||
|---|---|---|---|
|
AbstractModelItem(lookup:ILookup = null)
Creates a new item using the given initial lookup implementation, which may be
null. | AbstractModelItem | ||
|
Returns the currently set
ILookup delegate. | AbstractModelItem | ||
|
lookup(type:Class):Object
Simple lookup implementation that tries to find a registered lookup.
| AbstractModelItem | ||
|
registerLookup(type:Class, instance:Object):void
Register an implementation for the given type that should be returned
when
lookup is called with this given type. | AbstractModelItem | ||
|
setLookupImplementation(newLookup:ILookup):void
Sets the
ILookup implementation used for
lookup calls on this instance. | AbstractModelItem | ||
| _lookupMap | property |
protected var _lookupMap:IMapper
| AbstractModelItem | () | constructor |
public function AbstractModelItem(lookup:ILookup = null)
Creates a new item using the given initial lookup implementation, which may be null.
lookup:ILookup (default = null) |
| getLookup | () | method |
public function getLookup():ILookup
Returns the currently set ILookup delegate.
ILookup —
The current lookup delegate
|
See also
| lookup | () | method |
public function lookup(type:Class):Object
Simple lookup implementation that tries to find a registered lookup. If no such lookup is registered,
returns this if this is assignable to the provided type.
This implementation tries to find an implementation of the given type in the following order:
registerLookup.this is returned if it can be casted to the given type.null is returned.type:Class — The query type
|
Object — An implementation of type or null.
|
See also
| registerLookup | () | method |
public function registerLookup(type:Class, instance:Object):void
Register an implementation for the given type that should be returned
when lookup is called with this given type.
type:Class — A type to register an implementation for
|
|
instance:Object — An implementation of type
|
| setLookupImplementation | () | method |
public function setLookupImplementation(newLookup:ILookup):void
Sets the ILookup implementation used for
lookup calls on this instance.
newLookup:ILookup — the new implementation to use
|
See also