Package provided.owlMaps.cefUtils
Interface ICefUtils
- All Known Implementing Classes:
CefUtils
public interface ICefUtils
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS INTERFACE DIRECTLY! ***
Utilities for communicating with the JavaScript side of CEF.
Utilities for communicating with the JavaScript side of CEF.
- Author:
- swong
-
Field Summary
Fields Modifier and Type Field Description static long
DEV_TOOLS_DELAY_DEFAULT
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS FIELD DIRECTLY! ***
Default delay to start the dev tools window in millisec Needed to overcome race conditions on connecting the dev tools to the main frame.static int
DEV_TOOLS_PORT_DEFAULT
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS FIELD DIRECTLY! ***
Default port for the dev tools window to run on.static boolean
MAKE_DEV_TOOLS_DEFAULT
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS FIELD DIRECTLY! ***
Default value to control whether or not the dev tools window is shown.static boolean
USE_OFF_SCREEN_RENDERING_DEFAULT
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS FIELD DIRECTLY! ***
Default value for whether or not to use Off-Screen Rendering (OSR). -
Method Summary
Modifier and Type Method Description <T> java.util.concurrent.Future<T>
call(java.lang.String fnName, java.lang.reflect.Type returnType, java.lang.Object... params)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Call the specified Javascript functuion with the given parameters and return the result as a Futurevoid
callVoid(java.lang.String fnName, java.lang.Object... params)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
A call to the given Javascript function that is a void return<T> T
convertJsonMap(T x, java.lang.reflect.Type resultType)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Converts an object of an unspecified type into a specified type.ICefObject
getCefMapObj()
Get the ICefObject that wraps the Javascript map entitydouble
getSysLengthPerMeter()
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Get the conversion factor from the length units currently being used by the system into meters.static ICefUtils
make(java.lang.String googleMapsApiKey, ISystemInfo sysInfo)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Factory to instantiate an ICefUtils instanceICefObject
makeCefObj(java.lang.String jsClassname, java.lang.Object... params)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Instantiate the given class on the JavaScript side with the given parametersjava.util.UUID
registerConsumerCallback(java.util.function.Consumer<?> callback)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Register the given Consumer in the system so that it can be used for callbacks.java.util.UUID
registerPendingReturnValCallback(java.util.function.Consumer<?> callback)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Register the given Consumer in the system so that it can be used for return values of function calls.java.util.UUID
registerRunnableCallback(java.lang.Runnable callback)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Register the given Runnable in the system so that it can be used for callbacks.void
setDevToolsDelay(long delay)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Sets the delay to wait before opening the dev tools window.void
setDevToolsPort(int port)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Set the port used by the dev tools windowvoid
setMakeDevTools(boolean makeDevTools)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Enables the display of the browser dev console windowvoid
setUseOSR(boolean useOSR)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Sets whether or not the system uses the Off-Screen Rendering (OSR).javax.swing.JComponent
start(java.lang.String startURL, provided.mixedData.IMixedDataDictionary mapOptionsDict, java.lang.Runnable onMapLoad)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Start the Map on the Javascript side
-
Field Details
-
DEV_TOOLS_DELAY_DEFAULT
static final long DEV_TOOLS_DELAY_DEFAULT*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS FIELD DIRECTLY! ***
Default delay to start the dev tools window in millisec Needed to overcome race conditions on connecting the dev tools to the main frame.- See Also:
- Constant Field Values
-
USE_OFF_SCREEN_RENDERING_DEFAULT
static final boolean USE_OFF_SCREEN_RENDERING_DEFAULT*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS FIELD DIRECTLY! ***
Default value for whether or not to use Off-Screen Rendering (OSR). If true, use off screen rendering which requires that the appropriate Java Open GL (JOGL) drivers be installed.- See Also:
- Constant Field Values
-
DEV_TOOLS_PORT_DEFAULT
static final int DEV_TOOLS_PORT_DEFAULT*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS FIELD DIRECTLY! ***
Default port for the dev tools window to run on.- See Also:
- Constant Field Values
-
MAKE_DEV_TOOLS_DEFAULT
static final boolean MAKE_DEV_TOOLS_DEFAULT*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS FIELD DIRECTLY! ***
Default value to control whether or not the dev tools window is shown. If true, construct and display the dev tools window.- See Also:
- Constant Field Values
-
-
Method Details
-
start
javax.swing.JComponent start(java.lang.String startURL, provided.mixedData.IMixedDataDictionary mapOptionsDict, java.lang.Runnable onMapLoad)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Start the Map on the Javascript side- Parameters:
startURL
- The URL with which to open the mapmapOptionsDict
- A dictionary of IMapOptions optionsonMapLoad
- Callback to run after the map is loaded- Returns:
- A JComponent that can be displayed on the view.
-
getCefMapObj
ICefObject getCefMapObj()Get the ICefObject that wraps the Javascript map entity- Returns:
- The ICefObject for the map
-
setDevToolsDelay
void setDevToolsDelay(long delay)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Sets the delay to wait before opening the dev tools window. The dev tools window needs to be delayed so that it can show what's happening in the map.- Parameters:
delay
- The number of milliseconds to delay
-
setUseOSR
void setUseOSR(boolean useOSR)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Sets whether or not the system uses the Off-Screen Rendering (OSR).- Parameters:
useOSR
- If true, use OSR
-
setDevToolsPort
void setDevToolsPort(int port)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Set the port used by the dev tools window- Parameters:
port
- A valid port number not being used by any other app.
-
setMakeDevTools
void setMakeDevTools(boolean makeDevTools)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Enables the display of the browser dev console window- Parameters:
makeDevTools
- If true, show the dev console window
-
callVoid
void callVoid(java.lang.String fnName, java.lang.Object... params)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
A call to the given Javascript function that is a void return- Parameters:
fnName
- The name of the Javascript function to invokeparams
- A vararg of parameters to pass to the function
-
call
<T> java.util.concurrent.Future<T> call(java.lang.String fnName, java.lang.reflect.Type returnType, java.lang.Object... params)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Call the specified Javascript functuion with the given parameters and return the result as a Future- Type Parameters:
T
- The type of the return value- Parameters:
fnName
- The Javascript function to callreturnType
- TODOparams
- Vararg of parameters with which to invoke the function- Returns:
- The return value of the function, available when ready.
-
registerRunnableCallback
java.util.UUID registerRunnableCallback(java.lang.Runnable callback)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Register the given Runnable in the system so that it can be used for callbacks.- Parameters:
callback
- The Runnable to register- Returns:
- A unique ID associated with the given Runnable.
-
registerConsumerCallback
java.util.UUID registerConsumerCallback(java.util.function.Consumer<?> callback)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Register the given Consumer in the system so that it can be used for callbacks. The callback is assumed to be persistent and used multiple times.- Parameters:
callback
- The Consumer to register- Returns:
- A unique ID associated with the given Consumer
-
registerPendingReturnValCallback
java.util.UUID registerPendingReturnValCallback(java.util.function.Consumer<?> callback)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Register the given Consumer in the system so that it can be used for return values of function calls. The callback is assumed to be single use and must be removed from the mapping when executed.- Parameters:
callback
- The Consumer to register- Returns:
- A unique ID associated with the given Consumer
-
convertJsonMap
<T> T convertJsonMap(T x, java.lang.reflect.Type resultType)*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Converts an object of an unspecified type into a specified type. Not all information from the given object will necessarily be transferred to the result. Typically used to convert a generic received object into a specific instance type.- Type Parameters:
T
- The type of the original object- Parameters:
x
- The original objectresultType
- The desired type of the result- Returns:
- An object of the desired type, not usually the same instance as the given object
-
getSysLengthPerMeter
double getSysLengthPerMeter()*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Get the conversion factor from the length units currently being used by the system into meters.- Returns:
- A length conversion factor of system_units/meter
-
makeCefObj
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Instantiate the given class on the JavaScript side with the given parameters- Parameters:
jsClassname
- The name of the class to instantiateparams
- The class's constructor parameters- Returns:
- An ICefObject representing the instantiated JavaScript object. The object is NOT to be considered viable until it is able to return a valid ID value.
-
make
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD DIRECTLY! ***
Factory to instantiate an ICefUtils instance- Parameters:
googleMapsApiKey
- The Google Maps API key to usesysInfo
- A supplier of dynamic system information- Returns:
- An ICefUtils instance
-