Last updated

API / geotoolkit / renderer / IFilter / IFilter

Class: IFilter

renderer.IFilter.IFilter

Define an interface that controls whether or not to render a particular nodes

Interface

Implemented by

Table of contents

Constructors
Methods

Contents

Constructors

new IFilter()

new IFilter()

Methods

begin

Abstract begin(context?): IFilter

Begin filtering. If a filter should be applied to children nodes it needs to be added to context and removed in the method end

Example

// Implementation of the filter to be applied for children
begin (context?: RenderingContext) {
context.addFilter(this);
}

Parameters

Name Type Description
Optional contextRenderingContextrendering context

Returns

IFilter

this


end

Abstract end(context?): IFilter

End filtering. If a filter should be applied to children nodes it needs to be added to context and removed in the method end

Example

// Implementation of the filter to be applied for children
end (context?: RenderingContext) {
context.removeFilter(this);
}

Parameters

Name Type Description
Optional contextRenderingContextrendering context

Returns

IFilter

this


filter

Abstract filter(node, context?): boolean

Checks if the node should be drawn.

All children nodes will be given the chance to render or not to render.

Parameters

Name Type Description
nodeNodenode to check
Optional contextRenderingContextrendering context

Returns

boolean

flag filter flag ("true" to render node; "false" otherwise)


getClassName

getClassName(): string

Returns

string


getClassName

Static getClassName(): string

Returns

string