public class SystemTrayIconManager extends Object
Modifier and Type | Field and Description |
---|---|
static int |
mouseLeftClick
Defines the mouse left click
|
static int |
mouseLeftDoubleClick
Defines the mouse double left click
|
static int |
mouseRightClick
Defines the mouse right click
|
static int |
mouseRightDoubleClick
Defines the mouse double right click
|
Constructor and Description |
---|
SystemTrayIconManager(int image,
String tooltip)
The class doesn't have a default constructor because the need for the icon.
|
Modifier and Type | Method and Description |
---|---|
void |
addSystemTrayIconListener(SystemTrayIconListener obj)
Add sys tray icon listener
|
void |
finalize()
finaalize method
|
static void |
freeImage(int image)
Free the memore ocupied by the icon image
|
void |
hide()
Deprecated.
replace by the new setVisible(false)
|
static boolean |
initializeSystemDependent()
Should be called only once sice this method loads the dll.
|
static int |
loadImage(String filename)
This static methos is used to load an icon in the
native code and returns an identifier of this image
|
static int |
loadImageFromResource(int resourceNo)
Load an image form resource
|
void |
removeLeftClickView()
Removes the actual component (if any) that shows when left click
|
void |
removeRightClickView()
Removes the actual component (if any) that shows when right click
|
void |
removeSystemTrayIconListener(SystemTrayIconListener obj)
Remove sys tray icon listener
|
void |
setLeftClickView(Component component)
Set the Component to be prompted when mouse left click
|
void |
setRightClickView(Component component)
Set the Component to be prompted when mouse right click
|
void |
setVisible(boolean status)
The new method used to show or hide the icon
|
void |
show()
Deprecated.
replace by the new setVisible(true)
|
void |
update(int image,
String tooltip)
Change the icon and tooltip
|
public static final int mouseLeftClick
public static final int mouseRightClick
public static final int mouseLeftDoubleClick
public static final int mouseRightDoubleClick
public SystemTrayIconManager(int image, String tooltip)
image
- an int that represent the icon resourcetooltip
- the tooltip stringpublic void addSystemTrayIconListener(SystemTrayIconListener obj)
obj
- the listener to be addedpublic void removeSystemTrayIconListener(SystemTrayIconListener obj)
obj
- the listener to be removedpublic static boolean initializeSystemDependent()
public static int loadImage(String filename)
filename
- the file that contains the icon (in ico file usualy)public static int loadImageFromResource(int resourceNo)
resourceNo
- rsource numberpublic static void freeImage(int image)
image
- the image ot me removedpublic void hide()
public void show()
public void update(int image, String tooltip)
image
- the new imagetooltip
- thenew tooltippublic void setVisible(boolean status)
status
- true - show iconpublic void setRightClickView(Component component)
component
- the component to be shownpublic void removeRightClickView()
public void setLeftClickView(Component component)
component
- the component to be shownpublic void removeLeftClickView()
TV-Browser 2.2.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)