# Legato.Control.Legend.Plugin

Abstract base class for all <Legato.Legend.Plugin> subclasses. Defines some common behaviour for all plugins. Controlled and used by <Legato.Control.Legend> class.

Summary

Legato.Control.Legend.Plugin | Abstract base class for all <Legato.Legend.Plugin> subclasses.
Properties |
id {String} |
map {<OpenLayers.Map>} The current map |
layer {<OpenLayers.Layer>} layer associated with the plugin | instance
div {DOMElement} |
displayClass {string} This property is used for CSS related to | the drawing of the Control.
title {string} This property is used for showing a tooltip over | the Control.
renderWithTitle {boolean} This property is used to define whether | the title should be rendered as separate div element.
Functions |
initialize Basic ctor |
afterInitialized | Called after the initialize method.
draw | Draws this legend plugin
setup | Draws this legend plugin by creating a plugin div, calling the update function and afterSetup method.
setRenderWithTitle | Sets renderWithTitle property
create | Creates the plugin div
update Implemented by plugin subclasses. Used to update the | associated plugin div.
afterSetup Optional implemented by plugin subclasses. Basically | used to register some event handlers, like user clicks the legend plugin div and such.
destroy | See Also: <OpenLayer.Control>
beforeDestroyed Optionally implemented by subclasses. Basically | used to remove all event handlers and such.
Configuration Namespaces |
llp |
Namespace Properties |
Namespace URI | http://www.disy.net/legato/legend/plugin
Default prefix | llp
Configurable Components |
llp:Plugin |
Configurable Properties |
supports | {<lp:Predicate>}
displayClass | {String}
title | {String}

### Properties

### id {String}

### map {<OpenLayers.Map>} The current map

### layer {<OpenLayers.Layer>} layer associated with the plugin

instance

### div {DOMElement}

### displayClass {string} This property is used for CSS related to

the drawing of the Control.

### title {string} This property is used for showing a tooltip over

the Control.

### renderWithTitle {boolean} This property is used to define whether

the title should be rendered as separate div element.

### Functions

### initialize Basic ctor

Parameters: layer | {<OpenLayers.Layer>} The layer where this plugin
should be associated with options | {Object} A Hashmap containing option parameters for this control

### afterInitialized

> afterInitialized : function()

Called after the initialize method. Overwrite to validate your custom legend plugin

### draw

> draw : function()

Draws this legend plugin

### setup

> setup : function()

Draws this legend plugin by creating a plugin div, calling the update function and afterSetup method.

### setRenderWithTitle

> setRenderWithTitle : function( | renderWithTitle | )

Sets renderWithTitle property

### create

> create : function()

Creates the plugin div

### update Implemented by plugin subclasses. Used to update the

associated plugin div.

### afterSetup Optional implemented by plugin subclasses. Basically

used to register some event handlers, like user clicks the legend plugin div and such.

### destroy

> destroy : function()

See Also: <OpenLayer.Control>

### beforeDestroyed Optionally implemented by subclasses. Basically

used to remove all event handlers and such.

### Configuration Namespaces

### llp

### Namespace Properties

### Namespace URI

http://www.disy.net/legato/legend/plugin

### Default prefix

llp

### Configurable Components

### llp:Plugin

#### See also

- llp namespace
- {Legato.Control.Legend.Plugin}

### Configurable Properties

### supports

{<lp:Predicate>}

### displayClass

{String}

### title

{String}

> afterInitialized : function()

Called after the initialize method.

> draw : function()

Draws this legend plugin

> setup : function()

Draws this legend plugin by creating a plugin div, calling the update function and afterSetup method.

> setRenderWithTitle : function( | renderWithTitle | )

Sets renderWithTitle property

> create : function()

Creates the plugin div

> destroy : function()

See Also: OpenLayer.Control
Abstract base class for all Legato.Legend.Plugin subclasses.