Class IntensityPresetsMenu

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, MenuElement, SwingConstants

public class IntensityPresetsMenu extends JMenu
A JMenu containing a list of IntensityPresets and allied operations.

When a user creates a new IntensityPreset, each instance of IntensityPresetsMenu is updated with the new items. When an IntensityPresetsMenu is no longer needed, it is up to the programmer to call the deregister() method to notify this class that it no longer needs to be updated.

See Also:
  • Constructor Details

    • IntensityPresetsMenu

      public IntensityPresetsMenu(com.xinapse.util.ChangeableContrast changeableContrast)
      Creates a new IntensityPresetsMenu.
      Parameters:
      changeableContrast - the ChangeableContrast whose contrast will be set when the a preset is selected.
  • Method Details

    • deregister

      public void deregister()
      Deregister this IntensityPresetsMenu so that it will no longer be updated when the list of user-defined presets changes.
    • getSelectedIntensityPreset

      public IntensityPreset getSelectedIntensityPreset()
      Return the current selected IntensityPreset in the menu.
      Returns:
      the current selected IntensityPreset in the menu.