Class WindowInfo
- java.lang.Object
- 
- com.inductiveautomation.factorypmi.application.model.TopLevelContainerInfoBase
- 
- com.inductiveautomation.factorypmi.application.model.WindowInfo
 
 
- 
 public class WindowInfo extends TopLevelContainerInfoBase WindowInfo is a wrapper type that contains an FPMIWindow. The serialized bytes inside a "window" project resource are actually a serialized WindowInfo, not a direct FPMIWindow. In this way, the client app can deserialize all of the WindowInfos upon startup, and know information about them (such as their thumbnail, whether they should open on startup, etc) without incurring the cost of deserializing the whole window. They also hold a reference to the FPMIWindow itself when it is open or cached.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringABOUT_WINDOW_KEYstatic intCURRENT_XML_FORMAT_VERSIONstatic java.lang.StringOPEN_ON_START_KEYstatic java.lang.StringPARAMETER_NAMES_KEYstatic java.lang.StringPERMISSIONS_KEYstatic ResourceTypeRESOURCE_TYPEstatic java.lang.StringWINDOW_BINARY_KEYstatic java.lang.StringXML_FORMAT_VERSION_KEY- 
Fields inherited from class com.inductiveautomation.factorypmi.application.model.TopLevelContainerInfoBasePROJECT_RESOURCE_8_VERSION, PROJECT_RESOURCE_LEGACY_VERSION, THUMBNAIL_KEY, windowThumbnail, windowThumbnailBytes
 
- 
 - 
Constructor SummaryConstructors Constructor Description WindowInfo()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FPMIWindow_getWindow()Retrieves the FPMIWindow for this WindowInfo.WindowInfoduplicate()Creates a duplicate of this Window Info, but not the currently opened window (if any).java.lang.String[]getParameters()ComponentPermissionsgetPermissions()ResourcePathgetResourcePath()byte[]getSerializedCode()java.util.List<FPMIWindow>getWindowInstances()Returns any window instances that are currently open.java.lang.StringgetWindowName()intgetXmlFormatVersion()booleanisAboutWindow()booleanisOpenOnStart()booleanisWindowOpen()voidnotifyWindowClosed(FPMIWindow window)voidnotifyWindowOpened(FPMIWindow window)Adds this window to the list of opened windows, and clears any cached copy of the window.voidsetAboutWindow(boolean aboutWindow)voidsetOpenOnStart(boolean b)voidsetParameters(java.lang.String[] parameters)voidsetPermissions(ComponentPermissions permissions)voidsetResourcePath(ResourcePath resourcePath)voidsetSecuritySettings(SecuritySettings settings)voidsetSerializedBase64(java.lang.String base64)Deprecated.voidsetSerializedCode(byte[] compressedXml)Sets the code of this window to 'code', which is a GZipped version of the xml string which will recreate this window.voidsetWindow(FPMIWindow window)Deprecated.voidsetWindowName(java.lang.String string)voidsetWindowThumbnailBase64(java.lang.String windowThumbnailBase64)Deprecated.voidsetXmlFormatVersion(int xmlFormatVersion)- 
Methods inherited from class com.inductiveautomation.factorypmi.application.model.TopLevelContainerInfoBasegetWindowThumbnail, getWindowThumbnailBytes, setWindowThumbnail, setWindowThumbnailBytes
 
- 
 
- 
- 
- 
Field Detail- 
RESOURCE_TYPEpublic static final ResourceType RESOURCE_TYPE 
 - 
CURRENT_XML_FORMAT_VERSIONpublic static final int CURRENT_XML_FORMAT_VERSION - See Also:
- Constant Field Values
 
 - 
OPEN_ON_START_KEYpublic static final java.lang.String OPEN_ON_START_KEY - See Also:
- Constant Field Values
 
 - 
ABOUT_WINDOW_KEYpublic static final java.lang.String ABOUT_WINDOW_KEY - See Also:
- Constant Field Values
 
 - 
XML_FORMAT_VERSION_KEYpublic static final java.lang.String XML_FORMAT_VERSION_KEY - See Also:
- Constant Field Values
 
 - 
PARAMETER_NAMES_KEYpublic static final java.lang.String PARAMETER_NAMES_KEY - See Also:
- Constant Field Values
 
 - 
WINDOW_BINARY_KEYpublic static final java.lang.String WINDOW_BINARY_KEY - See Also:
- Constant Field Values
 
 - 
PERMISSIONS_KEYpublic static final java.lang.String PERMISSIONS_KEY - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
duplicatepublic WindowInfo duplicate() Creates a duplicate of this Window Info, but not the currently opened window (if any). Relies on the commited values. Sets modified=false and newWindow=true
 - 
isOpenOnStartpublic boolean isOpenOnStart() 
 - 
setOpenOnStartpublic void setOpenOnStart(boolean b) 
 - 
setSerializedCodepublic void setSerializedCode(byte[] compressedXml) Sets the code of this window to 'code', which is a GZipped version of the xml string which will recreate this window. This just BASE64s the bytes. This is the method that should be used to save a window.
 - 
getSerializedCodepublic byte[] getSerializedCode() 
 - 
setSerializedBase64@Deprecated public void setSerializedBase64(java.lang.String base64) Deprecated.
 - 
notifyWindowOpenedpublic void notifyWindowOpened(FPMIWindow window) Adds this window to the list of opened windows, and clears any cached copy of the window.
 - 
notifyWindowClosedpublic void notifyWindowClosed(FPMIWindow window) 
 - 
_getWindowpublic FPMIWindow _getWindow() Retrieves the FPMIWindow for this WindowInfo. If the window is open, this will return it directly. If the window is in the cache, it will return the cached (but closed) window.
 - 
isWindowOpenpublic boolean isWindowOpen() 
 - 
getWindowInstancespublic java.util.List<FPMIWindow> getWindowInstances() Returns any window instances that are currently open.
 - 
setWindow@Deprecated public void setWindow(FPMIWindow window) Deprecated.Old function name now renamed to _setWindow() to avoid serializing the live window instance.
 - 
setSecuritySettingspublic void setSecuritySettings(SecuritySettings settings) 
 - 
getPermissionspublic ComponentPermissions getPermissions() 
 - 
setPermissionspublic void setPermissions(ComponentPermissions permissions) 
 - 
getWindowNamepublic java.lang.String getWindowName() 
 - 
setWindowNamepublic void setWindowName(java.lang.String string) 
 - 
getParameterspublic java.lang.String[] getParameters() 
 - 
setParameterspublic void setParameters(java.lang.String[] parameters) 
 - 
isAboutWindowpublic boolean isAboutWindow() - Returns:
- Returns the aboutWindow.
 
 - 
setAboutWindowpublic void setAboutWindow(boolean aboutWindow) - Parameters:
- aboutWindow- The aboutWindow to set.
 
 - 
getXmlFormatVersionpublic int getXmlFormatVersion() 
 - 
setXmlFormatVersionpublic void setXmlFormatVersion(int xmlFormatVersion) 
 - 
getResourcePathpublic ResourcePath getResourcePath() 
 - 
setResourcePathpublic void setResourcePath(ResourcePath resourcePath) 
 - 
setWindowThumbnailBase64@Deprecated public void setWindowThumbnailBase64(java.lang.String windowThumbnailBase64) Deprecated.
 
- 
 
-