
public class SwingUI extends DevModeUI
| Modifier and Type | Class and Description |
|---|---|
protected class |
SwingUI.SwingModuleHandle
Module handle for Swing UI.
|
protected static interface |
SwingUI.TabPanelCollection
Interface to group activities related to adding and deleting tabs.
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PACKAGE_PATH |
| Constructor and Description |
|---|
SwingUI(DevModeBase.HostedModeBaseOptions options)
Create a Swing UI instance.
|
| Modifier and Type | Method and Description |
|---|---|
ModuleHandle |
getModuleLogger(String userAgent,
String remoteSocket,
String url,
String tabKey,
String moduleName,
String sessionKey,
String agentTag,
byte[] agentIcon,
TreeLogger.Type logLevel)
Show that a module is loaded in the UI.
|
protected int |
getNextSessionCounter(File logdir) |
TreeLogger |
getTopLogger()
Create a top-level logger for messages which are not associated with the
web server or any module.
|
TreeLogger |
getWebServerLogger(String serverName,
byte[] serverIcon)
Create the web server portion of the UI if not already created, and
return its TreeLogger instance.
|
void |
initialize(TreeLogger.Type logLevel)
Initialize the UI - must be called exactly once and before any other method
on this class.
|
void |
moduleLoadComplete(boolean success)
Indicates that all modules have been loaded (loading the XML, not
completing onModuleLoad), and that URLs previously specified in
DevModeUI.setStartupUrls(Map) may be launched if successful. |
void |
setStartupUrls(Map<String,URL> urls)
Set the URLs that should be available to start.
|
void |
setWebServerSecure(TreeLogger serverLogger)
Show in the UI that the web server, identified by the logger returned from
DevModeUI.getWebServerLogger(String, byte[]), is operating in a secure
fashion. |
getCallback, getConsoleLogger, getLogLevel, hasCallback, setCallbackprotected static final String PACKAGE_PATH
public SwingUI(DevModeBase.HostedModeBaseOptions options)
options - parsed command-line optionspublic ModuleHandle getModuleLogger(String userAgent, String remoteSocket, String url, String tabKey, String moduleName, String sessionKey, String agentTag, byte[] agentIcon, TreeLogger.Type logLevel)
DevModeUINote that the CloseModuleEvent should already have a callback
registered when this is called if needed -- the UI is not required to
change the UI if it is registered later.
getModuleLogger in class DevModeUIuserAgent - full user agent nameremoteSocket - name of remote socket endpoint in host:port formaturl - URL of top-level windowtabKey - stable browser tab identifier, or the empty string if no
such identifier is availablemoduleName - the name of the module loadedsessionKey - a unique session keyagentTag - short-form user agent identifier, suitable for use in
a label for this connectionagentIcon - icon to use for the user agent (fits inside 24x24) or
null if unavailablelogLevel - logging detail requestedpublic TreeLogger getTopLogger()
DevModeUIgetTopLogger in class DevModeUIpublic TreeLogger getWebServerLogger(String serverName, byte[] serverIcon)
DevModeUINote that the RestartServerEvent should already have a callback
registered when this is called -- the UI is not required to change the
UI if it is registered later.
getWebServerLogger in class DevModeUIserverName - short name of the web server or null if only the icon
should be usedserverIcon - byte array containing an icon (fitting into 24x24) to
use for the server, or null if only the name should be usedpublic void initialize(TreeLogger.Type logLevel)
DevModeUISubclasses should call super.initialize(logLevel).
initialize in class DevModeUIlogLevel - log level for all loggingpublic void moduleLoadComplete(boolean success)
DevModeUIDevModeUI.setStartupUrls(Map) may be launched if successful.moduleLoadComplete in class DevModeUIsuccess - true if all modules were successfully loadedpublic void setStartupUrls(Map<String,URL> urls)
DevModeUIsetStartupUrls in class DevModeUIurls - map of URLs -- the key is the name supplied with -startupUrls,
and the value is the mapped URL with all parameters includedpublic void setWebServerSecure(TreeLogger serverLogger)
DevModeUIDevModeUI.getWebServerLogger(String, byte[]), is operating in a secure
fashion.setWebServerSecure in class DevModeUIprotected int getNextSessionCounter(File logdir)
Copyright © 2018. All rights reserved.