Class SystemMap.SystemMapElement
- java.lang.Object
- 
- com.inductiveautomation.ignition.gateway.web.models.SystemMap.SystemMapElement
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<SystemMap.SystemMapElement>
 - Enclosing class:
- SystemMap
 
 public static class SystemMap.SystemMapElement extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<SystemMap.SystemMapElement> The SystemMapElement is a block inside of the system map, representing distinct part of the overall system. It is created with a title, an order (vertical position index, relative to other elements), and a link to the status panel for the element.After creating the element, the module can add StatusItems to it. Several convenience functions are provided for the most common types of status, such as the number of "connected objects". - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSystemMap.SystemMapElement.StatusItemA textual status item to be displayed inside a SystemMapElement.static classSystemMap.SystemMapElement.StatusItemState
 - 
Constructor SummaryConstructors Constructor Description SystemMapElement(int order, java.lang.String titleKey, java.lang.String statusPanelLink)SystemMapElement(int order, java.lang.String titleKey, java.lang.String statusPanelLink, boolean linkExternal)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNumConnectedStatusItem(int numConnected, int total)Adds a status item like: "%d/%d connected" that has a warning state if numConnected is less than total.voidaddNumOpenStatusItem(int numOpen)Adds a status item like: "%d open".voidaddStatusItem(SystemMap.SystemMapElement.StatusItem statusItem)voidaddStatusItem(java.lang.String display, SystemMap.SystemMapElement.StatusItemState state)voidaddStatusItemf(SystemMap.SystemMapElement.StatusItemState state, java.lang.String bundleKey, java.lang.Object... args)intcompareTo(SystemMap.SystemMapElement other)byte[]getActiveIcon()byte[]getInactiveIcon()java.util.List<SystemMap.SystemMapElement.StatusItem>getStatusItems()java.lang.StringgetStatusPanelLink()java.lang.StringgetTitle()booleanisActive()booleanisIconVisible()booleanisLinkExternal()voidsetActive(boolean active)voidsetActiveIcon(byte[] activeIcon)voidsetIcons(java.lang.Class<?> relativeTo, java.lang.String pathPattern)Shortcut for setting the active and inactive icons, assuming they are accessible through the classloader relative to the given class.voidsetIconVisible(boolean iconVisible)voidsetInactiveIcon(byte[] inactiveIcon)
 
- 
- 
- 
Method Detail- 
addNumConnectedStatusItempublic void addNumConnectedStatusItem(int numConnected, int total)Adds a status item like: "%d/%d connected" that has a warning state if numConnected is less than total. Also clears the SystemMapElement.active flag if total==0
 - 
addNumOpenStatusItempublic void addNumOpenStatusItem(int numOpen) Adds a status item like: "%d open". Also clears the SystemMapElement.active flag if numOpen==0
 - 
addStatusItemfpublic void addStatusItemf(SystemMap.SystemMapElement.StatusItemState state, java.lang.String bundleKey, java.lang.Object... args) 
 - 
addStatusItempublic void addStatusItem(java.lang.String display, SystemMap.SystemMapElement.StatusItemState state)
 - 
addStatusItempublic void addStatusItem(SystemMap.SystemMapElement.StatusItem statusItem) 
 - 
getStatusItemspublic java.util.List<SystemMap.SystemMapElement.StatusItem> getStatusItems() 
 - 
compareTopublic int compareTo(SystemMap.SystemMapElement other) - Specified by:
- compareToin interface- java.lang.Comparable<SystemMap.SystemMapElement>
 
 - 
getTitlepublic java.lang.String getTitle() 
 - 
getStatusPanelLinkpublic java.lang.String getStatusPanelLink() 
 - 
isLinkExternalpublic boolean isLinkExternal() 
 - 
isActivepublic boolean isActive() 
 - 
setActivepublic void setActive(boolean active) 
 - 
getActiveIconpublic byte[] getActiveIcon() 
 - 
setActiveIconpublic void setActiveIcon(byte[] activeIcon) 
 - 
getInactiveIconpublic byte[] getInactiveIcon() 
 - 
setInactiveIconpublic void setInactiveIcon(byte[] inactiveIcon) 
 - 
setIconspublic void setIcons(java.lang.Class<?> relativeTo, java.lang.String pathPattern) throws java.io.IOExceptionShortcut for setting the active and inactive icons, assuming they are accessible through the classloader relative to the given class. The path pattern will be used with %s replaced with "active" and "inactive", like so:element.setIcons(getClass(), "images/elmicon_%s.png"); Somewhat cheesy, but effective! - Throws:
- java.io.IOException- when unable to read from the input streams obtained from class.getResourceAsStream()
- java.lang.NullPointerException- if one of the icons is not found.
 
 - 
isIconVisiblepublic boolean isIconVisible() 
 - 
setIconVisiblepublic void setIconVisible(boolean iconVisible) 
 
- 
 
-