Package net.i2p.router.web
Class NavHelper
java.lang.Object
net.i2p.router.web.NavHelper
- All Implemented Interfaces:
ClientApp
,NavService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Retrieve binary icon for a pluginTranslated string is loaded by PluginStarterFor HomeHelper.The display name of the ClientApp, used in user interfaces.static NavHelper
static NavHelper
getInstance
(I2PAppContext ctx) getName()
The generic name of the ClientApp, used for registration, e.g.getState()
The current state of the ClientApp.void
To register a new client application so that it shows up on the router console's nav bar, it should be registered with this singleton.void
Store binary icon for a pluginvoid
Do not take a long time.void
startup()
Do not take a long time.void
unregisterApp
(String name)
-
Constructor Details
-
NavHelper
public NavHelper()
-
-
Method Details
-
registerApp
public void registerApp(String appName, String displayName, String path, String tooltip, String iconpath) To register a new client application so that it shows up on the router console's nav bar, it should be registered with this singleton.- Specified by:
registerApp
in interfaceNavService
- Parameters:
appName
- standard name for the app (plugin)displayName
- translated name the app will be called in the link warning, this is the display name aka ConsoleLinkName, not the plugin namepath
- full path pointing to the application's root (e.g. /i2ptunnel/index.jsp), non-nulltooltip
- HTML escaped text or nulliconpath
- path-only URL starting with /, HTML escaped, or null- Since:
- 0.9.20 added iconpath parameter
-
unregisterApp
- Specified by:
unregisterApp
in interfaceNavService
- Parameters:
name
- standard name for the app
-
getBinary
Retrieve binary icon for a plugin- Parameters:
name
- plugin name- Returns:
- null if not found
- Since:
- 0.9.25
-
setBinary
Store binary icon for a plugin- Parameters:
name
- plugin name- Since:
- 0.9.25
-
getClientAppLinks
Translated string is loaded by PluginStarter- Returns:
- map of translated name to HTML string, or null if none
-
getClientApps
For HomeHelper. 32x32 icon paths.- Parameters:
ctx
- unused- Returns:
- non-null, possibly empty, unsorted
- Since:
- 0.9, public since 0.9.33, was package private
-
getInstance
- Since:
- 0.9.56
-
getInstance
- Since:
- 0.9.56
-
startup
public void startup()Description copied from interface:ClientApp
Do not take a long time. Do not block. Start threads here if necessary. Client must call ClientAppManager.notify() at least once within this method to change the state from INITIALIZED to something else. Will not be called multiple times on the same object. -
shutdown
Description copied from interface:ClientApp
Do not take a long time. Do not block. Use a thread if necessary. If previously running, client must call ClientAppManager.notify() at least once within this method to change the state to STOPPING or STOPPED. May be called multiple times on the same object, in any state. -
getState
Description copied from interface:ClientApp
The current state of the ClientApp. -
getName
Description copied from interface:ClientApp
The generic name of the ClientApp, used for registration, e.g. "console". Do not translate. -
getDisplayName
Description copied from interface:ClientApp
The display name of the ClientApp, used in user interfaces. The app must translate.- Specified by:
getDisplayName
in interfaceClientApp
- Returns:
- non-null
- Since:
- 0.9.56
-