C# Класс MapAround.UI.LegendBase

Base class for legend classes.

Contains common methods for managing elements.

Показать файл Открыть проект

Открытые методы

Метод Описание
AddElement ( LegendElement element ) : void

Adds an element to this legend.

AddElementsForLayer ( LayerBase layer, int imagesWidth, int imagesHeight ) : void

Creates legend elements for the specified layer and adds it to this legend.

BuildLegendForMap ( Map map, int imagesWidth, int imagesHeight ) : void

Builds a legend for a layers of a map.

ClearElements ( ) : void

Removes all elements from this legend.

InsertElement ( LegendElement element, int index ) : void

Interts an element to this legend.

Защищенные методы

Метод Описание
CheckCaption ( string caption ) : void

Checks a legend caption.

Implementations should throw an exception if a caption value is impossible.

CheckNewElement ( LegendElement element ) : void

Checks an element.

Implementations should throw an exception if an element may not be added.

Описание методов

AddElement() публичный Метод

Adds an element to this legend.
public AddElement ( LegendElement element ) : void
element LegendElement An element to add
Результат void

AddElementsForLayer() публичный Метод

Creates legend elements for the specified layer and adds it to this legend.
public AddElementsForLayer ( LayerBase layer, int imagesWidth, int imagesHeight ) : void
layer LayerBase A layer which is used to generate elements
imagesWidth int A value specifying a width of images of the elements
imagesHeight int A value specifying a height of images of the elements
Результат void

BuildLegendForMap() публичный Метод

Builds a legend for a layers of a map.
public BuildLegendForMap ( Map map, int imagesWidth, int imagesHeight ) : void
map Map
imagesWidth int
imagesHeight int
Результат void

CheckCaption() защищенный абстрактный Метод

Checks a legend caption.

Implementations should throw an exception if a caption value is impossible.

protected abstract CheckCaption ( string caption ) : void
caption string A caption value to check
Результат void

CheckNewElement() защищенный абстрактный Метод

Checks an element.

Implementations should throw an exception if an element may not be added.

protected abstract CheckNewElement ( LegendElement element ) : void
element LegendElement An element to check
Результат void

ClearElements() публичный Метод

Removes all elements from this legend.
public ClearElements ( ) : void
Результат void

InsertElement() публичный Метод

Interts an element to this legend.
public InsertElement ( LegendElement element, int index ) : void
element LegendElement An element to insert
index int A zero-based index at which insert the element
Результат void