Skip to content
Last updated

API / geotoolkit / controls / toolbar / ButtonRegistry / ButtonRegistry

Class: ButtonRegistry

toolbar.ButtonRegistry.ButtonRegistry

This class provides registry of toolbar buttons

Table of contents

Constructors
  • [new ButtonRegistry()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.controls.toolbar.buttonregistry.buttonregistry.md#new buttonregistry())
Methods

Contents

Constructors

new ButtonRegistry()

• new ButtonRegistry()

Methods

getButton

▸ getButton(id): Button

Returns button clone by its string identifier or null, if no such button registered

Parameters

Name Type Description
idstringbutton string identifier

Returns

Button


getClassName

▸ getClassName(): string

Returns

string


getIds

▸ getIds(): string[]

Returns registered button identifiers list

Returns

string[]


register

▸ register(id, button): ButtonRegistry

Registers button with the provided id. When registered, it can be used in toolbar by a single string identifier.

Parameters

Name Type Description
idstringstring button identifier for later use in toolbar
buttonButton | Optionsbutton to register or its options object

Returns

ButtonRegistry


getClassName

▸ Static getClassName(): string

Returns

string


getInstance

▸ Static getInstance(): ButtonRegistry

Returns singleton instance of the button registry

Returns

ButtonRegistry