|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.gui.monitor.TrayIcon
public class TrayIcon
TrayIcon is intended as a wrapper class for EggTrayIcon, and provides some useful functionalities such as facilitating popup menus and opening/minimizing windows
Field Summary | |
---|---|
static int |
BUTTON_1
|
static int |
BUTTON_2
|
static int |
BUTTON_3
|
static int |
NO_BUTTON
|
Constructor Summary | |
---|---|
TrayIcon(String tooltip,
boolean active)
Creates a new TrayIcon |
Method Summary | |
---|---|
void |
addPopupWindow(org.gnu.gtk.Window popup)
Adds a new window to be triggered when the appropriate mouse button is pressed |
void |
clearPopups()
Clears the popup windows and the popup menu |
int |
getMenuButton()
Returns the button that is currently set to display the popup menu |
int |
getWindowButton()
Returns the button that is currently set to display the popup window(s) |
boolean |
isActive()
|
void |
load(Preferences prefs)
|
void |
save(Preferences prefs)
|
void |
setActive(boolean active,
String tooltip)
|
void |
setMenuButton(int button)
Sets the button that can be used to open the popup menu. |
void |
setPopupMenu(org.gnu.gtk.Menu popup)
Adds a popup menu to be shown when the user clicks the given mouse button |
void |
setPopupWindows(List popups)
Sets the windows to be displayed to be exactly the contents of popups. |
void |
setWindowButton(int button)
Sets the button that can be used to open the windows associated with the icon. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int NO_BUTTON
public static int BUTTON_1
public static int BUTTON_2
public static int BUTTON_3
Constructor Detail |
---|
public TrayIcon(String tooltip, boolean active)
tooltip
- the tooltip to display when you hover over the iconactive
- whether the icon should be animated or notMethod Detail |
---|
public void setPopupMenu(org.gnu.gtk.Menu popup)
popup
- The menu to be shownpublic void addPopupWindow(org.gnu.gtk.Window popup)
popup
- The window to be addedpublic void setPopupWindows(List popups)
popups
- The popups to be displayedpublic void setMenuButton(int button) throws IllegalArgumentException
button
- The button to trigger the menu
IllegalArgumentException
- If button is not one of BUTTON_1, BUTTON_2, BUTTON_3, or NO_BUTTONpublic void setWindowButton(int button) throws IllegalArgumentException
button
- The button to trigger showing the window
IllegalArgumentException
- If button is not one of BUTTON_1, BUTTON_2, BUTTON_3, or NO_BUTTONpublic int getWindowButton()
public int getMenuButton()
public void clearPopups()
public void save(Preferences prefs)
save
in interface Saveable
public void load(Preferences prefs)
load
in interface Saveable
public boolean isActive()
public void setActive(boolean active, String tooltip)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |