Class JxBrowserUtil
- java.lang.Object
 - 
- com.inductiveautomation.ignition.client.util.JxBrowserUtil
 
 
- 
public final class JxBrowserUtil extends java.lang.ObjectThis class should only be called if JX Browser libs are on the class path. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCHROMIUM_DIRSystem flag used to specify alternative location for the binaries/assets used by the JxBrowser chromium engine.static java.lang.StringDEBUG_PORTSystem flag used to declare alternative debug port exposed by Chromiumstatic intDEFAULT_DEBUG_PORTDefault port exposed by chromium for the purposes of attaching chromium dev-tools.static java.lang.StringDEFAULT_JXBROWSER_DIRDefault name of the folder containing chromium's runtime binaries/assets.static java.lang.StringJX_BROWSER_VERSIONstatic java.lang.StringJXBROWSER_LICENSEOverride the JxBrowser license used to create anEngineinstance.static java.lang.StringUSER_DATA_DIRECTORYThe directory where user data is stored for an instance of the JxBrowser Engine. 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Optional<com.teamdev.jxbrowser.engine.Engine>getOrCreateEngine(LaunchContext launchContext, com.teamdev.jxbrowser.engine.RenderingMode renderingMode, java.lang.String jxbLicense)static java.util.Optional<com.teamdev.jxbrowser.engine.Engine>getOrCreateEngine(java.nio.file.Path resourceDir, com.teamdev.jxbrowser.engine.EngineOptions options)static booleanhasModifiers(com.teamdev.jxbrowser.ui.KeyModifiers modifiers)static voidinitNavLifecycleObserverLogging(com.teamdev.jxbrowser.browser.Browser browser, javax.swing.JTextField urlField)static java.lang.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 Detail
- 
CHROMIUM_DIR
public static final java.lang.String CHROMIUM_DIR
System flag used to specify alternative location for the binaries/assets used by the JxBrowser chromium engine. Defaults to<designer cache directory>/.ignition
.- See Also:
 - Constant Field Values
 
 
- 
DEBUG_PORT
public static final java.lang.String DEBUG_PORT
System flag used to declare alternative debug port exposed by Chromium- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_DEBUG_PORT
public static final int DEFAULT_DEBUG_PORT
Default 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:
 - Constant Field Values
 
 
- 
USER_DATA_DIRECTORY
public static final java.lang.String USER_DATA_DIRECTORY
The directory where user data is stored for an instance of the JxBrowser Engine. Default is to the designer cache directory/.jxbrowser/<ignition_username>- See Also:
 - Constant Field Values
 
 
- 
JXBROWSER_LICENSE
public static final java.lang.String JXBROWSER_LICENSE
Override 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:
 - Constant Field Values
 
 
- 
DEFAULT_JXBROWSER_DIR
public static final java.lang.String DEFAULT_JXBROWSER_DIR
Default name of the folder containing chromium's runtime binaries/assets.- See Also:
 - Constant Field Values
 
 
- 
JX_BROWSER_VERSION
public static final java.lang.String JX_BROWSER_VERSION
 
 - 
 
- 
Method Detail
- 
verifyCertificate
public static com.teamdev.jxbrowser.net.callback.VerifyCertificateCallback.Response verifyCertificate(com.teamdev.jxbrowser.net.callback.VerifyCertificateCallback.Params params)
 
- 
shutdown
public 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
public static java.util.Optional<com.teamdev.jxbrowser.engine.Engine> getOrCreateEngine(@Nonnull java.nio.file.Path resourceDir, @Nonnull com.teamdev.jxbrowser.engine.EngineOptions options) 
- 
hasModifiers
public static boolean hasModifiers(com.teamdev.jxbrowser.ui.KeyModifiers modifiers)
 
- 
getOrCreateEngine
public static java.util.Optional<com.teamdev.jxbrowser.engine.Engine> getOrCreateEngine(@Nonnull LaunchContext launchContext, @Nonnull com.teamdev.jxbrowser.engine.RenderingMode renderingMode, @Nonnull java.lang.String jxbLicense) 
- 
zoomPercentFromMouseWheelEvent
public 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 zoompreviousZoom- the level that is the basis of the new zoom- Returns:
 - integer representing the percent of zoom for the new value
 
 
- 
initNavLifecycleObserverLogging
public static void initNavLifecycleObserverLogging(@Nonnull com.teamdev.jxbrowser.browser.Browser browser, @Nullable javax.swing.JTextField urlField) 
- 
prettyPrintEngineOptions
public static java.lang.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.
 
 
 - 
 
 -