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.PluginAbstract base class for all <Legato.Legend.Plugin> subclasses.
Properties
id {String}
map {<OpenLayers.Map>} The current map
layer {<OpenLayers.Layer>} layer associated with the plugininstance
div {DOMElement}
displayClass {string} This property is used for CSS related tothe drawing of the Control.
title {string} This property is used for showing a tooltip overthe Control.
renderWithTitle {boolean} This property is used to define whetherthe title should be rendered as separate div element.
Functions
initialize Basic ctor
afterInitializedCalled after the initialize method.
drawDraws this legend plugin
setupDraws this legend plugin by creating a plugin div, calling the update function and afterSetup method.
setRenderWithTitleSets renderWithTitle property
createCreates the plugin div
update Implemented by plugin subclasses.  Used to update theassociated plugin div.
afterSetup Optional implemented by plugin subclasses.  Basicallyused to register some event handlers, like user clicks the legend plugin div and such.
destroySee Also: <OpenLayer.Control>
beforeDestroyed Optionally implemented by subclasses.  Basicallyused to remove all event handlers and such.
Configuration Namespaces
llp
Namespace Properties
Namespace URIhttp://www.disy.net/legato/legend/plugin
Default prefixllp
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

Default prefix

llp

Configurable Components

llp: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.