Class InteractiveSvgIcon
- All Implemented Interfaces:
InteractiveIcon
,Icon
-
Field Summary
Fields inherited from class com.inductiveautomation.ignition.client.icons.SvgIconUtil.AbstractSvgIcon
height, node, swapColor, width
-
Constructor Summary
ConstructorsConstructorDescriptionInteractiveSvgIcon
(Class relativeClass, String path) InteractiveSvgIcon
(Class relativeClass, String path, boolean useDisabledIcon) InteractiveSvgIcon
(Class relativeClass, String path, boolean generateAllIcons, boolean createDisabledIcon) InteractiveSvgIcon
(Class relativeClass, String path, boolean generateAllIcons, int width, int height, boolean createDisabledIcon) -
Method Summary
Modifier and TypeMethodDescriptionstatic InteractiveSvgIcon
createIcon
(Class relativeClass, String path) static InteractiveSvgIcon
createIcon
(Class relativeClass, String path, boolean createDisabledIcon) static InteractiveSvgIcon
createIcon
(String path) static InteractiveSvgIcon
createIconAll
(Class relativeClass, String path) Will generate 3 additional variants from a single svg file: selected, inherited, and disabledstatic InteractiveSvgIcon
createIconAll
(Class relativeClass, String path, boolean createDisabledIcon) Will generate up to 3 additional variants from a single svg file: selected, inherited, and disabled.static InteractiveSvgIcon
createIconAll
(Class relativeClass, String path, int width, int height, boolean createDisabledIcon) static InteractiveSvgIcon
createIconAll
(String path) This variant ofcreateIconAll(Class, String)
looks for icons relative to theInteractiveSvgIcon
class.static InteractiveSvgIcon
createIconAll
(String path, boolean createDisabledIcon) This variant ofcreateIconAll(Class, String, boolean)
looks for icons relative to theInteractiveSvgIcon
class.static InteractiveSvgIcon
createIconAll
(String path, int width, int height) static String
disabledFileName
(String path) static boolean
isValidFile
(String path) static String
selectedFileName
(String path) Methods inherited from class com.inductiveautomation.ignition.client.icons.SvgIconUtil.AbstractSvgIcon
createImage, getIconHeight, getIconWidth, paintIcon
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.client.icons.InteractiveIcon
getIcon
-
Constructor Details
-
InteractiveSvgIcon
-
InteractiveSvgIcon
-
InteractiveSvgIcon
public InteractiveSvgIcon(Class relativeClass, String path, boolean generateAllIcons, boolean createDisabledIcon) - Parameters:
generateAllIcons
-For a single svg file, if this is set to true, up to 3 additional icon variants will be produced off that single file: selected, inherited, disabled. The disable icon can be excluded from generation via the #userDisabledIcon parameter.
If this is set to false, variants for the following 2 states must be provided: selected, disabled (if createDisabledIcon is set to true).
The selected variant must have the same file name specified in the path, but with "-selected" inserted before the file extension.
The disabled variant must have the same file name specified in the path, but with "-disabled" inserted before the file extension.
createDisabledIcon
- If false will not look for or generate a disabled variant.
-
InteractiveSvgIcon
-
-
Method Details
-
getSelected
- Specified by:
getSelected
in interfaceInteractiveIcon
-
getFocused
- Specified by:
getFocused
in interfaceInteractiveIcon
-
getDisabled
- Specified by:
getDisabled
in interfaceInteractiveIcon
-
getInherited
- Specified by:
getInherited
in interfaceInteractiveIcon
-
createIcon
-
createIcon
-
createIcon
public static InteractiveSvgIcon createIcon(Class relativeClass, String path, boolean createDisabledIcon) -
createIconAll
This variant ofcreateIconAll(Class, String)
looks for icons relative to theInteractiveSvgIcon
class. -
createIconAll
-
createIconAll
This variant ofcreateIconAll(Class, String, boolean)
looks for icons relative to theInteractiveSvgIcon
class. -
createIconAll
Will generate 3 additional variants from a single svg file: selected, inherited, and disabled -
createIconAll
public static InteractiveSvgIcon createIconAll(Class relativeClass, String path, boolean createDisabledIcon) Will generate up to 3 additional variants from a single svg file: selected, inherited, and disabled. Set createDisabledIcon to false if the disabled icon is not needed- Parameters:
createDisabledIcon
- when false will not generate an icon for the disabled state.
-
createIconAll
public static InteractiveSvgIcon createIconAll(Class relativeClass, String path, int width, int height, boolean createDisabledIcon) -
selectedFileName
-
disabledFileName
-
isValidFile
-