Package 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.ActionListenerRegular windows and floating palettes register themselves with a aFloatingPaletteHandler. 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 onFloatingPaletteHandler14v2.0 by Werner Randelshofer (Quaqua project). synchronization: all methods must be called in the Swing thread
-
-
Constructor Summary
Constructors Constructor Description FloatingPaletteHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)voidadd(AbstractWindow w)Registers a project window with the FloatingPaletteHandler.voidaddModalDialog()AbstractWindowgetFocussedWindow()Returns the current applicatin window (the window which was the last to gain focus).static FloatingPaletteHandlergetInstance()static FloatingPaletteHandlergetInstance(Application app)voidremove(AbstractWindow w)Unregisters a project window with the FloatingPaletteHandler.voidremoveModalDialog()protected voidsetFocusedWindow(AbstractWindow w)voidsetListening(boolean b)
-
-
-
Method Detail
-
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:
actionPerformedin interfacejava.awt.event.ActionListener
-
setFocusedWindow
protected void setFocusedWindow(AbstractWindow w)
-
-