Home Reference Source
public class | source

RendererCache

Extends:

TypedObject → RendererCache

Class to keep renderers around...

Each Cell in the grid, is a container UI component, and the actual renderer UI component The _dict object here holds a bucket for each container type/renderer type combination The _rendererFactories holds a map of each cell and the corresponding bucket key (FactoryKey) that was used to generate it, so we are able to put it back into the bucket that it came from.

The idea is, there should always be only just as many things in memory as are currently visibule plus a little outside so we scroll smoothly...

Constructor Summary

Public Constructor
public

constructor(grid: *)

Member Summary

Public Members
public

dict: *

public
public

grid: *

public

Method Summary

Public Methods
public
public

getFactoryKey(factory: flexiciousNmsp.ClassFactory, subFactory: flexiciousNmsp.ClassFactory): flexiciousNmsp.FactoryKey

public

kill()

public

popInstance(factory: *, subFactory: *): *

Returns an instance of the specified factory/subfactory combination from the cache, if once exists.

public

pushInstance(instance: *)

Returns a previously created renderer into the bucket for reuse later.

Inherited Summary

From class TypedObject
public

typeCache: {}

public
public

Returns a list of strings that represent the object hierarchy for this object.

public

Returns true if the class name to check is in the list of class names defined for this class.

Public Constructors

public constructor(grid: *) source

Override:

TypedObject#constructor

Params:

NameTypeAttributeDescription
grid *

Public Members

public dict: * source

public factoryKeys: *[] source

public grid: * source

public rendererFactories: * source

Public Methods

public getClassNames(): string source

Returns a list of strings that represent the object hierarchy for this object.

Override:

TypedObject#getClassNames

Return:

string

public getFactoryKey(factory: flexiciousNmsp.ClassFactory, subFactory: flexiciousNmsp.ClassFactory): flexiciousNmsp.FactoryKey source

Params:

NameTypeAttributeDescription
factory flexiciousNmsp.ClassFactory
subFactory flexiciousNmsp.ClassFactory

Return:

flexiciousNmsp.FactoryKey

public kill() source

public popInstance(factory: *, subFactory: *): * source

Returns an instance of the specified factory/subfactory combination from the cache, if once exists. Else, instantiates a new instance, and stores the factory key that was used to create it.

Params:

NameTypeAttributeDescription
factory *
subFactory *

Return:

*

public pushInstance(instance: *) source

Returns a previously created renderer into the bucket for reuse later.

Params:

NameTypeAttributeDescription
instance *