Class JxBrowserUtil
java.lang.Object
com.inductiveautomation.ignition.client.util.JxBrowserUtil
This class should only be called if JX Browser libs are on the class path.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringSystem flag used to specify alternative location for the binaries/assets used by the JxBrowser chromium engine.static final StringSystem flag used to declare alternative debug port exposed by Chromiumstatic final intDefault port exposed by chromium for the purposes of attaching chromium dev-tools.static final StringDefault name of the folder containing chromium's runtime binaries/assets.static final Stringstatic final StringOverride the JxBrowser license used to create anEngineinstance.
- 
Method SummaryModifier and TypeMethodDescriptionstatic Optional<com.teamdev.jxbrowser.engine.Engine>getOrCreateEngine(LaunchContext launchContext, com.teamdev.jxbrowser.engine.RenderingMode renderingMode, String jxbLicense) static Optional<com.teamdev.jxbrowser.engine.Engine>getOrCreateEngine(LaunchContext launchContext, com.teamdev.jxbrowser.engine.RenderingMode renderingMode, String jxbLicense, String userDataDir) static Optional<com.teamdev.jxbrowser.engine.Engine>getOrCreateEngine(Path resourceDir, com.teamdev.jxbrowser.engine.EngineOptions options) static booleanhasModifiers(com.teamdev.jxbrowser.ui.KeyModifiers modifiers) static voidinitNavLifecycleObserverLogging(com.teamdev.jxbrowser.browser.Browser browser, JTextField urlField) static voidneverAskToSavePasswords(com.teamdev.jxbrowser.browser.Browser browser) static StringprettyPrintEngineOptions(com.teamdev.jxbrowser.engine.EngineOptions options) Simple utility method that takes anEngineOptionsobject and returns a human readable string showing the options that are configured.static voidshutdown(com.teamdev.jxbrowser.engine.EngineOptions options) Shuts down the engine that was created using the specified chromium directory.static com.teamdev.jxbrowser.net.callback.VerifyCertificateCallback.ResponseverifyCertificate(com.teamdev.jxbrowser.net.callback.VerifyCertificateCallback.Params params) static intzoomPercentFromMouseWheelEvent(com.teamdev.jxbrowser.ui.event.MouseWheel mouseEvent, com.teamdev.jxbrowser.zoom.ZoomLevel previousZoom) 
- 
Field Details- 
CHROMIUM_DIRSystem flag used to specify alternative location for the binaries/assets used by the JxBrowser chromium engine. Defaults to<designer cache directory>/.ignition .- See Also:
 
- 
DEBUG_PORTSystem flag used to declare alternative debug port exposed by Chromium- See Also:
 
- 
DEFAULT_DEBUG_PORTpublic static final int DEFAULT_DEBUG_PORTDefault port exposed by chromium for the purposes of attaching chromium dev-tools. Overridden by providing the specifying theDEBUG_PORTas a System (jvm) flag (e.g., ignition.conf jvm params).- See Also:
 
- 
JXBROWSER_LICENSEOverride the JxBrowser license used to create anEngineinstance. Not intended for public use due to restrictions requiring a license specific to Ignition, but may be useful in updating the license on systems which are unable to otherwise update to a newer version of Ignition, yet need to apply a more recent license.- See Also:
 
- 
DEFAULT_JXBROWSER_DIRDefault name of the folder containing chromium's runtime binaries/assets.- See Also:
 
- 
JX_BROWSER_VERSION
 
- 
- 
Method Details- 
verifyCertificatepublic static com.teamdev.jxbrowser.net.callback.VerifyCertificateCallback.Response verifyCertificate(com.teamdev.jxbrowser.net.callback.VerifyCertificateCallback.Params params) 
- 
shutdownpublic static void shutdown(@Nullable com.teamdev.jxbrowser.engine.EngineOptions options) Shuts down the engine that was created using the specified chromium directory.- Parameters:
- options- the engine options for the engine being closed (may get by calling engine.options())
 
- 
getOrCreateEngine
- 
hasModifierspublic static boolean hasModifiers(com.teamdev.jxbrowser.ui.KeyModifiers modifiers) 
- 
getOrCreateEnginepublic static Optional<com.teamdev.jxbrowser.engine.Engine> getOrCreateEngine(@Nonnull LaunchContext launchContext, @Nonnull com.teamdev.jxbrowser.engine.RenderingMode renderingMode, @Nonnull String jxbLicense) 
- 
getOrCreateEnginepublic static Optional<com.teamdev.jxbrowser.engine.Engine> getOrCreateEngine(@Nonnull LaunchContext launchContext, @Nonnull com.teamdev.jxbrowser.engine.RenderingMode renderingMode, @Nonnull String jxbLicense, @Nullable String userDataDir) 
- 
zoomPercentFromMouseWheelEventpublic static int zoomPercentFromMouseWheelEvent(com.teamdev.jxbrowser.ui.event.MouseWheel mouseEvent, com.teamdev.jxbrowser.zoom.ZoomLevel previousZoom) - Parameters:
- mouseEvent- the raw mouse event that triggered the change in zoom
- previousZoom- the level that is the basis of the new zoom
- Returns:
- integer representing the percent of zoom for the new value
 
- 
neverAskToSavePasswordspublic static void neverAskToSavePasswords(@Nonnull com.teamdev.jxbrowser.browser.Browser browser) 
- 
prettyPrintEngineOptionspublic static String prettyPrintEngineOptions(@Nullable com.teamdev.jxbrowser.engine.EngineOptions options) Simple utility method that takes anEngineOptionsobject and returns a human readable string showing the options that are configured.- Returns:
- human readable string of the options, or "null" of the options object was null.
 
 
-