Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jvnet.substance.utils
Class TabCloseListenerManager

    java.lang.Object
      org.jvnet.substance.utils.TabCloseListenerManager

    public class TabCloseListenerManager

extends java.lang.Object

Manages the listeners registered on tab-close events. This class is for internal use only.

Author:
  Kirill Grouchnikov

Constructor Summary
`TabCloseListenerManager()` Simple constructor.

Method Summary
`static TabCloseListenerManager` | `getInstance()` Returns the single instance of `this` class.
`java.util.Set<BaseTabCloseListener>` | `getListeners()` Returns the set of all listeners registered on tab-close events on all tabbed panes.
`java.util.Set<BaseTabCloseListener>` | `getListeners(javax.swing.JTabbedPane tabbedPane)` Returns the set of all listeners registered on tab-close events on the specified tabbed pane.
`void` | `registerListener(BaseTabCloseListener listener)` Registers the specified listener on tab-close events on all tabbed panes.
`void` | `registerListener(javax.swing.JTabbedPane tabbedPane, BaseTabCloseListener listener)` Registers the specified listener on tab-close events on the specified tabbed pane.
`void` | `unregisterListener(BaseTabCloseListener listener)` Unregisters the specified listener on tab-close events on all tabbed panes.
`void` | `unregisterListener(javax.swing.JTabbedPane tabbedPane, BaseTabCloseListener listener)` Unregisters the specified listener on tab-close events on the specified tabbed pane.
`void` | `unregisterTabbedPane(javax.swing.JTabbedPane tabbedPane)` Unregisters the specified tabbed pane.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TabCloseListenerManager

    public TabCloseListenerManager()

  Simple constructor.

Method Detail

### getInstance

    public static TabCloseListenerManager getInstance()

  Returns the single instance of `this` class.

  Returns:
    The single instance of `this` class.

### unregisterTabbedPane

    public void unregisterTabbedPane(javax.swing.JTabbedPane tabbedPane)

  Unregisters the specified tabbed pane.

  Parameters:
    `tabbedPane` - Tabbed pane to unregister.

### registerListener

    public void registerListener(BaseTabCloseListener listener)

  Registers the specified listener on tab-close events on all tabbed panes.

  Parameters:
    `listener` - Listener to register.

### unregisterListener

    public void unregisterListener(BaseTabCloseListener listener)

  Unregisters the specified listener on tab-close events on all tabbed panes.

  Parameters:
    `listener` - Listener to unregister.

### getListeners

    public java.util.Set<BaseTabCloseListener> getListeners()

  Returns the set of all listeners registered on tab-close events on all tabbed panes.

  Returns:
    Set of all listeners registered on tab-close events on all tabbed panes.

### registerListener

    public void registerListener(javax.swing.JTabbedPane tabbedPane,
                                 BaseTabCloseListener listener)

  Registers the specified listener on tab-close events on the specified tabbed pane.

  Parameters:
    `tabbedPane` - Tabbed pane. If `null`, the tab close listener is registered globally (for all tabbed panes).
    `listener` - Listener to register.

### unregisterListener

    public void unregisterListener(javax.swing.JTabbedPane tabbedPane,
                                   BaseTabCloseListener listener)

  Unregisters the specified listener on tab-close events on the specified tabbed pane.

  Parameters:
    `tabbedPane` - Tabbed pane. If `null`, the tab close listener is unregistered globally (for all tabbed panes).
    `listener` - Listener to unregister.

### getListeners

    public java.util.Set<BaseTabCloseListener> getListeners(javax.swing.JTabbedPane tabbedPane)

  Returns the set of all listeners registered on tab-close events on the specified tabbed pane.

  Parameters:
    `tabbedPane` - Tabbed pane. If `null`, all globally registered tab close listeners are returned.
  Returns:
    The set of all listeners registered on tab-close events on the specified tabbed pane.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD