Changeset 11352 in josm


Ignore:
Timestamp:
2016-11-30T13:50:52+01:00 (7 years ago)
Author:
Don-vip
Message:

javadoc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r11339 r11352  
    465465    private static volatile InitStatusListener initListener;
    466466
     467    /**
     468     * Initialization task listener.
     469     */
    467470    public interface InitStatusListener {
    468471
     472        /**
     473         * Called when an initialization task updates its status.
     474         * @param event task name
     475         * @return new status
     476         */
    469477        Object updateStatus(String event);
    470478
     479        /**
     480         * Called when an initialization task completes.
     481         * @param status final status
     482         */
    471483        void finish(Object status);
    472484    }
    473485
     486    /**
     487     * Sets initialization task listener.
     488     * @param listener initialization task listener
     489     */
    474490    public static void setInitStatusListener(InitStatusListener listener) {
    475491        CheckParameterUtil.ensureParameterNotNull(listener);
     
    654670    }
    655671
     672    /**
     673     * Registers a {@code JosmAction} and its shortcut.
     674     * @param action action defining its own shortcut
     675     */
    656676    public static void registerActionShortcut(JosmAction action) {
    657677        registerActionShortcut(action, action.getShortcut());
    658678    }
    659679
     680    /**
     681     * Registers an action and its shortcut.
     682     * @param action action to register
     683     * @param shortcut shortcut to associate to {@code action}
     684     */
    660685    public static void registerActionShortcut(Action action, Shortcut shortcut) {
    661686        KeyStroke keyStroke = shortcut.getKeyStroke();
     
    673698    }
    674699
     700    /**
     701     * Unregisters a shortcut.
     702     * @param shortcut shortcut to unregister
     703     */
    675704    public static void unregisterShortcut(Shortcut shortcut) {
    676705        contentPanePrivate.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).remove(shortcut.getKeyStroke());
    677706    }
    678707
     708    /**
     709     * Unregisters a {@code JosmAction} and its shortcut.
     710     * @param action action to unregister
     711     */
    679712    public static void unregisterActionShortcut(JosmAction action) {
    680713        unregisterActionShortcut(action, action.getShortcut());
    681714    }
    682715
     716    /**
     717     * Unregisters an action and its shortcut.
     718     * @param action action to unregister
     719     * @param shortcut shortcut to unregister
     720     */
    683721    public static void unregisterActionShortcut(Action action, Shortcut shortcut) {
    684722        unregisterShortcut(shortcut);
Note: See TracChangeset for help on using the changeset viewer.