public class TLcyFormatBarAddOn extends ALcyPreferencesAddOn
This add-on provides one menu/tool bar item that enables/disables the presence of a container
for ALcyFormatBar
s, located at the bottom
of the ILcyGenericMapComponent
(location is configurable). Layer selection on the
map component is monitored, and the format
bar that matches with the format of the selected layer is displayed in the container.
ALcyFormatBar
s have a (Swing) component that can be anything, and are created by
an ALcyFormatBarFactory
that is
retrieved from the ILcyLucyEnv
. A typical use is to have a drawing tool bar below
the map, that has buttons to start drawing new domain objects into (the model of) the layer.
Please refer to TLcyDrawingAddOn
for an
example of an add-on that registers a drawing bar.
The add-on also provides support for a menu/tool bar item that can be used to create new
layers. The behaviour of this item is identical to that of
ALcyCreateLayersAction
. This class is typically used in the AddOn that registers
a ALcyFormatBar
. Note that if the action is to be shown in a menu (as is the case in
the default Lucy installation), it should be registered as a reaction to a map that is being added
to the Lucy map manager. If it is registered in the ALcyFormatBar
itself, it will not appear
in the menu until the format bar has been made visible.
This add-on currently supports GXY and Lsp map components.
Constructor and Description |
---|
TLcyFormatBarAddOn()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
ILcyActiveSettable |
getFormatBarActiveSettableForMap(ILcyGenericMapComponent<?,?> aMapComponent)
Returns the
ILcyActiveSettable which can be used to show or hide the format bar on the specified map. |
void |
plugInto(ILcyLucyEnv aLucyEnv)
Creates and plugs in the add-on's preferences tool.
|
createPreferencesTool, getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix, unplugFrom
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
public void plugInto(ILcyLucyEnv aLucyEnv)
ALcyPreferencesAddOn
plugInto
in class ALcyPreferencesAddOn
aLucyEnv
- the Lucy environment to plug intoALcyAddOn.unplugFrom(com.luciad.lucy.ILcyLucyEnv)
public final ILcyActiveSettable getFormatBarActiveSettableForMap(ILcyGenericMapComponent<?,?> aMapComponent)
Returns the ILcyActiveSettable
which can be used to show or hide the format bar on the specified map.
aMapComponent
- The map componentILcyActiveSettable
which can be used to show or hide the format bar on aMapComponent
,
or null
when no such active settable is available (for example when the map has already been closed).