Class VectorIcons
Represents 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".
"name" is a string, the name/key of the icon. "paths" is an array of one or more strings. The strings must conform to the "d" attribute rules of an SVG path, see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d for reference.
This class also contains static accessors for a static instance of VectorIcons for all of the icons that are part of the Ignition platform itself.
-
Method Summary
Modifier and TypeMethodDescriptionstatic VectorIcons
createFromJson
(Reader json) Create a new instance of VectorIcons from a reader.static VectorIcon
Fetch an icon of the given name from the built-in icon source.static VectorIcon
Fetch an icon of the given name from the built-in icon source.static InteractiveVectorIcon
getInteractive
(String name) Fetch an icon from the built-in icon source, and return it as anInteractiveIcon
static InteractiveVectorIcon
getInteractive
(String name, Color primary) static InteractiveVectorIcon
static InteractiveVectorIcon
getInteractive
(String name, Color primary, Color selected, Color disabled, Color focused, Color inherited) getInteractiveIcon
(String name) getInteractiveIcon
(String name, Color primary, Color selected, Color disabled, Color focused, Color inherited) static void
-
Method Details
-
createFromJson
Create a new instance of VectorIcons from a reader. Once created, usegetIcon(String)
orgetInteractive(String)
to retrieve a specific icon from the supplied JSON.Supply an icon named
error
to use a custom fallback icon (should an invalid name be provided) - if no error icon is provided, a default will be used. -
get
Fetch an icon of the given name from the built-in icon source. Color will beIgnitionLookAndFeel.Colors.IconDefault
-
get
Fetch an icon of the given name from the built-in icon source.- Parameters:
name
- Name of the iconcolor
- Color to use as fill
-
getIcon
-
getIcon
-
getInteractive
Fetch an icon from the built-in icon source, and return it as anInteractiveIcon
-
getInteractive
-
getInteractive
-
getInteractive
-
getInteractiveIcon
-
getInteractiveIcon
-
getInteractiveIcon
-
main
-