Skip to main content
Version: 8.3

Useful Utility Classes

Designer API

ClassDescription
EDTUtilProvides convenience functions for working with the EDT, and a useful coalescingInvokeLater() function that can be used to group multiple calls into a single event.
ErrorUtilProvides many functions for displaying errors, but also other dialogs such as info messages, warning messages, and prompts.
IconUtilRetrieves icons provided with Ignition.
LaterContains helpful functions for queueing actions to run later. Every function included wraps it's logic into a runnable submitted to EventQueue.invokeLater(Runnable).
VectorIconsRepresents a source of VectorIcon instances. This class is made to be used with a JSON source file which stores the source of the vector icons. The JSON format is expected to be an array of objects, each object containing name and paths. Default icons used in Ignition can also be retrieved by name with the static methods on this class.
SvgIconUtilLoads SVG files from the classpath of the Designer or your module as Swing icons.

Resource API

ClassDescription
ResourceUtilProvides various functions for retrieving specific details of a resource.
ProjectEncoderProvides a collection of utility methods to encode and decode resource collection and related objects to/from JSON. Note that the methods on this class use the project encoding style.
ConfigModeEncoderCollection of utility methods to encode and decode resource collection and related objects to/from JSON. Note that the methods on this class use the configuration mode encoding style.
ImmutableBytesProvides useful instance methods to pass to existing APIs, and it can also be constructed from a variety of static factory methods. The ImmutableBytes class is used throughout the configuration and project resource systems.

General API

ClassDescription
TypeUtilitiesProvides various functions to perform type conversions.
FormatUtilProvides convenience functions for working with various data type formatting.
JsonUtilitiesProvides many functions for working with JSON data.

Scripting API

ClassDescription
PyUtilitiesProvides various functions for working with Python objects.
PyArgParserConverts Jython's keyword argument signature PyObject[], String[] into more useful Java base classes. Argument names specified in camelCase in Java code will be accepted in either camelCase or snake_case from Jython.
AbstractJythonSequenceSimulates a Jython "sequence" (Pythonic list). If you don't want to implement a method, you can leave it a no-op, and add PyIgnoreMethodTag to the throws declaration to prevent it from being exposed to Jython.
AbstractJythonMapSimulates a Python map (dictionary) for easy implementation. If you don't want to implement a method, you can leave it a no-op, and add PyIgnoreMethodTag to the throws declaration to prevent it from being exposed to Jython.