< prev index next >

src/java.desktop/share/classes/java/awt/peer/TaskbarPeer.java

Print this page




  32 import java.awt.Taskbar.State;
  33 import java.awt.Window;
  34 
  35 
  36 /**
  37  * The {@code TaskbarPeer} interface provides methods for interacting with
  38  * system task area.
  39  */
  40 public interface TaskbarPeer {
  41 
  42     /**
  43      * Requests user attention to this application.
  44      *
  45      * @param enabled disables this request if false
  46      * @param critical if this is an important request
  47      * @see Taskbar#requestUserAttention
  48      */
  49     default void requestUserAttention(boolean enabled, final boolean critical) {}
  50 
  51     /**
  52      * Requests user attention to the specified window until it is activated.
  53      *
  54      * On an already active window requesting attention does nothing.
  55      *
  56      * @param w window
  57      */
  58     default void requestWindowUserAttention(Window w) {}
  59 
  60     /**
  61      * Attaches the contents of the provided PopupMenu to the application icon
  62      * in system task area.
  63      *
  64      * @param menu the PopupMenu to attach to this application
  65      */
  66     default void setMenu(final PopupMenu menu) {}
  67 
  68     /**
  69      * Gets PopupMenu used to add items to this application's icon in system task area.
  70      *
  71      * @return the PopupMenu
  72      */
  73     default PopupMenu getMenu() { return null; }
  74 




  32 import java.awt.Taskbar.State;
  33 import java.awt.Window;
  34 
  35 
  36 /**
  37  * The {@code TaskbarPeer} interface provides methods for interacting with
  38  * system task area.
  39  */
  40 public interface TaskbarPeer {
  41 
  42     /**
  43      * Requests user attention to this application.
  44      *
  45      * @param enabled disables this request if false
  46      * @param critical if this is an important request
  47      * @see Taskbar#requestUserAttention
  48      */
  49     default void requestUserAttention(boolean enabled, final boolean critical) {}
  50 
  51     /**
  52      * Requests user attention to the specified window.


  53      *
  54      * @param w window
  55      */
  56     default void requestWindowUserAttention(Window w) {}
  57 
  58     /**
  59      * Attaches the contents of the provided PopupMenu to the application icon
  60      * in system task area.
  61      *
  62      * @param menu the PopupMenu to attach to this application
  63      */
  64     default void setMenu(final PopupMenu menu) {}
  65 
  66     /**
  67      * Gets PopupMenu used to add items to this application's icon in system task area.
  68      *
  69      * @return the PopupMenu
  70      */
  71     default PopupMenu getMenu() { return null; }
  72 


< prev index next >