|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.pepper.guiutils.SystemTrayObject
public class SystemTrayObject
This object encapsulates information needed to display a button in the SystemTray.
Constructor Summary | |
---|---|
SystemTrayObject(String id,
String displayName)
Creates a new SystemTrayObject instance. |
|
SystemTrayObject(String id,
String displayName,
ImageIcon icon)
Creates a new SystemTrayObject instance. |
|
SystemTrayObject(String id,
String displayName,
JComponent uiComponent)
Creates a new SystemTrayObject instance with a component
to use for the UI |
Method Summary | |
---|---|
Action |
getAction()
Return the action set using setMenuWithAction() |
JButton |
getButton()
Get the button to display in the tray |
ImageIcon |
getDefaultIcon()
Get the default icon for this object |
ImageIcon |
getDisabledIcon()
Get the disabled icon |
String |
getDisplayName()
Get the displayName |
String |
getId()
Get the id of this object |
JPopupMenu |
getMenu()
Return the menu set using setMenu() or setMenuWithAction() |
String |
getTooltipText()
Get the tooltip text |
JComponent |
getUIComponent()
Get the component to display in the tray |
void |
setDisabledIcon(ImageIcon icon)
Set the disabled icon |
void |
setDisplayName(String displayName)
Set the displayName |
void |
setMenu(JPopupMenu theMenu)
Set menu that will be displayed when the icon is selected in the SystemTray |
void |
setMenuWithAction(JPopupMenu theMenu,
Action action)
Set menu that will be displayed when the icon is selected in the SystemTray. |
void |
setParent(SystemTray parent)
|
void |
setTooltipText(String text)
Set the tooltip text. |
void |
showMenu()
Show the menu previously set using setMenu() above the system tray icon |
void |
showMenu(JPopupMenu theMenu,
int secondsToShow)
Show the specified menu above the system tray icon |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemTrayObject(String id, String displayName)
SystemTrayObject
instance.
id
- Unique id of the SystemTrayObjectdisplayName
- Name displayed if no icon is providedpublic SystemTrayObject(String id, String displayName, ImageIcon icon)
SystemTrayObject
instance.
id
- Unique id of the SystemTrayObjectdisplayName
- Name displayed if no icon is providedicon
- Icon to display in SystemTraypublic SystemTrayObject(String id, String displayName, JComponent uiComponent)
SystemTrayObject
instance with a component
to use for the UI
id
- Unique id of the SystemTrayObjectdisplayName
- Name displayed if no icon is provideduiComponent
- Component to display in SystemTrayMethod Detail |
---|
public JButton getButton()
public JComponent getUIComponent()
public String getId()
String
valuepublic String getDisplayName()
String
valuepublic void setDisplayName(String displayName)
displayName
- a String
valuepublic ImageIcon getDefaultIcon()
ImageIcon
valuepublic ImageIcon getDisabledIcon()
ImageIcon
valuepublic void setDisabledIcon(ImageIcon icon)
icon
- an ImageIcon
valuepublic JPopupMenu getMenu()
JPopupMenu
valuepublic Action getAction()
Action
valuepublic void setMenu(JPopupMenu theMenu)
theMenu
- a JPopupMenu
public void showMenu()
public void showMenu(JPopupMenu theMenu, int secondsToShow)
theMenu
- a JPopupMenu
valuepublic void setMenuWithAction(JPopupMenu theMenu, Action action)
theMenu
- a JPopupMenu
public void setTooltipText(String text)
text
- a String
valuepublic String getTooltipText()
String
valuepublic void setParent(SystemTray parent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |