public interface SwingToolbarService
Defines an API required for defining and adding to PolyScope a toolbar.
Note: Toolbar contributions are not supported on CB3 robots.Modifier and Type | Method and Description |
---|---|
void |
configureContribution(ToolbarConfiguration configuration)
This method is called once after this service is registered.
|
SwingToolbarContribution |
createToolbar(ToolbarContext context)
Creates a new toolbar instance.
|
Icon |
getIcon() |
Icon getIcon()
NullPointerException
- in case this methods returns null
.void configureContribution(ToolbarConfiguration configuration)
This method is called once after this service is registered. Modify the configuration parameter to configure your contribution. The configuration object will already have default values for its properties matching most use cases.
The values of the ToolbarConfiguration object will be read once immediately after this method call. Changing values at a later stage will have no effect, so do not store a reference to the configuration object.
If the default values are appropriate, leave this method empty.configuration
- a modifiable ToolbarConfiguration
instance with default values.SwingToolbarContribution createToolbar(ToolbarContext context)
context
- Provides access to services and APIs relevant for the toolbar.Copyright © 2023. All rights reserved.