Class TLcySkinnedToolBar

All Implemented Interfaces:
ILcyActionBar, ILcyToolBar

public class TLcySkinnedToolBar extends TLcyToolBar

Extension of TLcyToolBar that uses icons (for example images) as the button backgrounds, instead of using the global Look and Feel settings. This is especially useful when overlaying a tool bar on a map, as the default Look and Feel can then look a bit out of place.

Lucy by default has an on-map tool bar available that appears when items are configured to be in there, see for example the map centric front-end sample. If you have to overlay another tool bar on the map, see ILcyGenericMapComponent.getMapOverlayPanel() for more information.

The super class can work together with an TLcyAlwaysFitJToolBar to provide a remaining items button when there is not enough screen space, but this skinned tool bar does not support it.

Since:
11.0
  • Constructor Details

    • TLcySkinnedToolBar

      public TLcySkinnedToolBar()
      Creates a new skinned tool bar.
    • TLcySkinnedToolBar

      public TLcySkinnedToolBar(JToolBar aToolBar)
      Creates a new skinned tool bar.
      Parameters:
      aToolBar - The Swing tool bar that is used to represent this ILcyToolBar. All buttons and components will be added to (a sub-menu of) this tool bar. You might want to call setFloatable(false) and setBorder(BorderFactory.createEmptyBorder()) on it.
    • TLcySkinnedToolBar

      public TLcySkinnedToolBar(ILcdIcon aBackground, ILcdIcon aSelectedBackground)
      Creates a new skinned tool bar with the given background and selected background icons. Should you want to use images for the background, you can use TLcdImageIcon to create an ILcdIcon from an image file name.
      Parameters:
      aBackground - The background of a regular button.
      aSelectedBackground - The background of a selected button. A button is selected if its associated ILcyActiveSettable returns true for ILcyActiveSettable.isActive().
    • TLcySkinnedToolBar

      public TLcySkinnedToolBar(JToolBar aToolBar, ILcdIcon aBackground, ILcdIcon aSelectedBackground)
      Creates a new skinned tool bar with the given background and selected background icons. Should you want to use images for the background, you can use TLcdImageIcon to create an ILcdIcon from an image file name.
      Parameters:
      aToolBar - The Swing tool bar that is used to represent this ILcyToolBar. All buttons and components will be added to (a sub-menu of) this tool bar. You might want to call setFloatable(false) and setBorder(BorderFactory.createEmptyBorder()) on it.
      aBackground - The background of a regular button.
      aSelectedBackground - The background of a selected button. A button is selected if its associated ILcyActiveSettable returns true for ILcyActiveSettable.isActive().