org.lyra.Interface
Class LyraTrayIcon

java.lang.Object
  extended by java.awt.TrayIcon
      extended by org.lyra.Interface.LyraTrayIcon

public class LyraTrayIcon
extends java.awt.TrayIcon

Class which will create a self-sustained TrayIcon component which can be used to have basic control and display information on Lyra when minimised. This class has no visual editor mode due to the lack of visual editors which supports this feature.

Since:
1.0.2
Version:
1.0.5, %Revision, 174%, %LastChangedDate, 27/10/12 3:33PM%
Author:
Martin Foster

Nested Class Summary
private  class LyraTrayIcon.Interact
          The code separation from the user interface.
private  class LyraTrayIcon.PopupLyra
          Creates the popup menu structure necessary to display along with the system tray icon.
 
Nested classes/interfaces inherited from class java.awt.TrayIcon
java.awt.TrayIcon.MessageType
 
Field Summary
private  java.awt.Window Compact
           
private  Playback Control
           
private  Status Information
           
private  LyraTrayIcon.Interact Interface
           
private  java.util.Map<java.lang.String,java.lang.String> Lang
           
private static LyraTrayIcon myTray
           
private  java.awt.Window Organiser
           
private  LyraTrayIcon.PopupLyra Popup
           
 
Constructor Summary
private LyraTrayIcon(java.awt.Image image, Status information, Playback control, Updater watcher, java.util.Map<java.lang.String,java.lang.String> lang, java.awt.Window organiser)
          Creates an instance TrayIcon with the specified image.
 
Method Summary
static LyraTrayIcon getTrayIcon(java.awt.Image image, Status information, Playback control, Updater watcher, java.util.Map<java.lang.String,java.lang.String> lang, java.awt.Window organiser)
          Creates a TrayIcon with the specified image.
static boolean isInstanced()
          Do we have an instance created?
static void setCompact(java.awt.Window compact)
          Permit the application to track both windows.
 
Methods inherited from class java.awt.TrayIcon
addActionListener, addMouseListener, addMouseMotionListener, displayMessage, getActionCommand, getActionListeners, getImage, getMouseListeners, getMouseMotionListeners, getPopupMenu, getSize, getToolTip, isImageAutoSize, removeActionListener, removeMouseListener, removeMouseMotionListener, setActionCommand, setImage, setImageAutoSize, setPopupMenu, setToolTip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myTray

private static LyraTrayIcon myTray

Information

private Status Information

Control

private Playback Control

Lang

private java.util.Map<java.lang.String,java.lang.String> Lang

Organiser

private java.awt.Window Organiser

Compact

private java.awt.Window Compact

Interface

private LyraTrayIcon.Interact Interface

Popup

private LyraTrayIcon.PopupLyra Popup
Constructor Detail

LyraTrayIcon

private LyraTrayIcon(java.awt.Image image,
                     Status information,
                     Playback control,
                     Updater watcher,
                     java.util.Map<java.lang.String,java.lang.String> lang,
                     java.awt.Window organiser)
Creates an instance TrayIcon with the specified image.

Parameters:
image - The Image to be used.
information - State and status information for playback and modes.
control - Playback control instance.
watcher - Updater instance to receive changes in player state.
lang - Language elements.
organiser - Window to revert to when going back to the player/organiser panel.
Method Detail

getTrayIcon

public static LyraTrayIcon getTrayIcon(java.awt.Image image,
                                       Status information,
                                       Playback control,
                                       Updater watcher,
                                       java.util.Map<java.lang.String,java.lang.String> lang,
                                       java.awt.Window organiser)
Creates a TrayIcon with the specified image.

Parameters:
image - The Image to be used.
information - State and status information for playback and modes.
control - Playback control instance.
watcher - Updater instance to receive changes in player state.
lang - Language elements.
organiser - Window to revert to when going back to the player/organiser panel.
Returns:
LyraTrayIcon instance.

setCompact

public static void setCompact(java.awt.Window compact)
Permit the application to track both windows.

Parameters:
compact - Compact window instance.

isInstanced

public static boolean isInstanced()
Do we have an instance created?

Returns:
boolean on instance existence.