de.sciss.gui
Class FloatingPaletteHandler
java.lang.Object
de.sciss.gui.FloatingPaletteHandler
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
public class FloatingPaletteHandler
- extends java.lang.Object
- implements java.awt.event.ActionListener
Regular windows and floating palettes register themselves with a
a FloatingPaletteHandler
. The handler then takes care
of hiding and showing the palettes when the application becomes
active or inactive (i.e. one of the regular windows has focus or none of them).
The class is closely based on FloatingPaletteHandler14
v2.0 by
Werner Randelshofer (Quaqua project).
- Version:
- 0.13, 19-May-08
- Author:
- Hanns Holger Rutz
- Synchronization:
- all methods must be called in the Swing thread
- Todo:
- selecting an item from the right menu bar
(e.g. clock) causes a palette flicker
Field Summary |
protected java.util.Set |
frames
|
protected javax.swing.Timer |
timer
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
frames
protected final java.util.Set frames
timer
protected final javax.swing.Timer timer
FloatingPaletteHandler
public FloatingPaletteHandler()
getInstance
public static FloatingPaletteHandler getInstance()
getInstance
public static FloatingPaletteHandler getInstance(Application app)
setListening
public void setListening(boolean b)
add
public void add(AbstractWindow w)
- Registers a project window with the FloatingPaletteHandler.
When none of the registered windows has focus, the FloatingPaletteHandler
hides all registered palette windows.
When at least one of the registered windows has focus, the
FloatingPaletteHandler shows all registered palette windows.
addModalDialog
public void addModalDialog()
removeModalDialog
public void removeModalDialog()
remove
public void remove(AbstractWindow w)
- Unregisters a project window with the FloatingPaletteHandler.
getFocussedWindow
public AbstractWindow getFocussedWindow()
- Returns the current applicatin window (the window which was the last to
gain focus). Floating palettes may use this method to determine on which
window they need to act on.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
setFocusedWindow
protected void setFocusedWindow(AbstractWindow w)