Class ShortcutsManager

  • All Implemented Interfaces:
    java.lang.Iterable<javax.swing.Action>

    public class ShortcutsManager
    extends java.lang.Object
    implements java.lang.Iterable<javax.swing.Action>
    Manager for shortcuts of all Actions in an ActionBuilder instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      ShortcutsManager​(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<javax.swing.Action> iterator()
      Returns all Actions.
      void loadShortcuts()
      Restores all shortcuts from the preferences.
      void revertAll()
      Reverts all shortcuts to their default values.
      void saveShortcuts()
      Saves all shortcuts to the preferences.
      void showShortcutsDialog​(@NotNull java.awt.Component parentComponent)
      Displays a dialog to edit shortcuts.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • ShortcutsManager

        public ShortcutsManager​(@NotNull
                                @NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder)
        Creates a new instance.
        Parameters:
        actionBuilder - the action builder to manage
    • Method Detail

      • loadShortcuts

        public void loadShortcuts()
        Restores all shortcuts from the preferences.
      • saveShortcuts

        public void saveShortcuts()
        Saves all shortcuts to the preferences.
      • showShortcutsDialog

        public void showShortcutsDialog​(@NotNull
                                        @NotNull java.awt.Component parentComponent)
        Displays a dialog to edit shortcuts.
        Parameters:
        parentComponent - the parent component for the dialog
      • revertAll

        public void revertAll()
        Reverts all shortcuts to their default values.
      • iterator

        public java.util.Iterator<javax.swing.Action> iterator()
        Returns all Actions.
        Specified by:
        iterator in interface java.lang.Iterable<javax.swing.Action>
        Returns:
        an iterator returning the actions