Package de.sciss.gui

Class 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). synchronization: all methods must be called in the Swing thread
    • Field Detail

      • frames

        protected final java.util.Set frames
      • timer

        protected final javax.swing.Timer timer
    • Constructor Detail

      • FloatingPaletteHandler

        public FloatingPaletteHandler()
    • Method Detail

      • 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)