private static class HubServiceMode.SysTrayWindowConfig extends HubServiceMode.BasicWindowConfig
Modifier and Type | Field and Description |
---|---|
private java.awt.MenuItem |
exitItem_ |
private javax.swing.Action |
hideAct_ |
private java.awt.MenuItem |
hideItem_ |
private java.awt.event.ActionListener |
iconListener_ |
private javax.swing.Action |
showAct_ |
private java.awt.MenuItem |
showItem_ |
private SysTray |
sysTray_ |
private java.lang.Object |
trayIcon_ |
configProfiles_, exitAct_, frame_, hubService_, profileTogglers_, runners_
Constructor and Description |
---|
SysTrayWindowConfig(javax.swing.JFrame frame,
HubProfile[] profiles,
Hub[] runners,
GuiHubService hubService,
SysTray sysTray)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
configureMenus()
Configures menus on the window.
|
void |
configureSysTray()
Performs configuration.
|
void |
configureWindow()
Perform configuration of window.
|
private void |
setWindowVisible(boolean isVis)
Sets visibility for the hub control window, adjusting actions
as appropriate.
|
void |
tidyGui()
Performs any required tidying operations.
|
private java.awt.MenuItem |
toMenuItem(javax.swing.Action act)
Turns an action into an AWT menu item.
|
private final SysTray sysTray_
private final javax.swing.Action showAct_
private final javax.swing.Action hideAct_
private final java.awt.MenuItem showItem_
private final java.awt.MenuItem hideItem_
private final java.awt.MenuItem exitItem_
private final java.awt.event.ActionListener iconListener_
private java.lang.Object trayIcon_
SysTrayWindowConfig(javax.swing.JFrame frame, HubProfile[] profiles, Hub[] runners, GuiHubService hubService, SysTray sysTray)
frame
- hub windowprofiles
- hub profiles to runrunners
- 1-element array which will contain an associated
hub runner object if one existshubService
- object providing hub servicessysTray
- system tray facade objectprotected void configureMenus()
HubServiceMode.BasicWindowConfig
configureMenus
in class HubServiceMode.BasicWindowConfig
public void configureWindow()
HubServiceMode.BasicWindowConfig
configureWindow
in class HubServiceMode.BasicWindowConfig
public void configureSysTray() throws java.awt.AWTException
java.awt.AWTException
public void tidyGui()
HubServiceMode.Tidier
tidyGui
in interface HubServiceMode.Tidier
tidyGui
in class HubServiceMode.BasicWindowConfig
private void setWindowVisible(boolean isVis)
isVis
- true for visible, false for invisibleprivate java.awt.MenuItem toMenuItem(javax.swing.Action act)
act
- action