Class WindowCache
- java.lang.Object
-
- com.inductiveautomation.factorypmi.application.model.WindowCache
-
public class WindowCache extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description WindowCache(ClientContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.List<java.lang.Object>
_legacyDeserialize(java.io.InputStream is, java.lang.Object owner)
void
applyDiff(java.util.List<? extends ChangeOperation> changes, ProgressListener listener)
void
clear()
Clears the entire cache.void
clear(ResourcePath path)
Removes the id from the cachevoid
clearCache()
Clears the actual window references from any loaded WindowInfosvoid
closeWindow(FPMIWindow window)
ResourcePath
getAboutWindow()
java.util.List<java.lang.String>
getStartupWindows()
Looks up the ids to all windows that are specified as startup windowsint
getWindowCompressedSize(ProjectResourceId id)
Deprecated.usegetWindowSize(ProjectResourceId)
insteadint
getWindowCount()
SerializationEncoding
getWindowEncoding(ProjectResourceId id)
WindowInfo
getWindowInfo(ResourcePath path)
Returns the WindowInfo for the window specified by the given resource id.WindowInfo
getWindowInfo(java.lang.String path)
Returns the WindowInfo for the window located at the given path.java.util.List<java.lang.String>
getWindowNamesAlphabetical()
Returns a flattened list of all window pathsint
getWindowSize(ProjectResourceId id)
java.awt.Dimension
getWindowSize(java.lang.String path)
Returns a windows' size.java.awt.image.BufferedImage
getWindowThumbnail(ResourcePath path)
Returns a thumbnail image for the named window, possibly nullboolean
isWindowPresent(java.lang.String path)
FPMIWindow
openWindow(java.lang.String path, java.util.List<java.lang.String> credentials, boolean openAdditional)
Returns the FPMIWindow object reference for the given window name.void
setRootPaneContainer(javax.swing.RootPaneContainer rootPaneContainer)
void
shutdown()
-
-
-
Constructor Detail
-
WindowCache
public WindowCache(ClientContext context)
-
-
Method Detail
-
shutdown
public void shutdown()
-
applyDiff
public void applyDiff(java.util.List<? extends ChangeOperation> changes, ProgressListener listener)
-
getWindowInfo
public WindowInfo getWindowInfo(java.lang.String path)
Returns the WindowInfo for the window located at the given path. If the window doesn't exist, null is returned.- Parameters:
path
- Path to resource- Returns:
- WindowInfo of resource or null if resource not found or window info not found.
-
setRootPaneContainer
public void setRootPaneContainer(javax.swing.RootPaneContainer rootPaneContainer)
-
getWindowInfo
public WindowInfo getWindowInfo(ResourcePath path)
Returns the WindowInfo for the window specified by the given resource id. If the window doesn't exist, null is returned.
-
openWindow
public FPMIWindow openWindow(java.lang.String path, java.util.List<java.lang.String> credentials, boolean openAdditional)
Returns the FPMIWindow object reference for the given window name. If necessary (window is not already open), the window will be deserialized.
-
_legacyDeserialize
public static java.util.List<java.lang.Object> _legacyDeserialize(java.io.InputStream is, java.lang.Object owner) throws SerializationException
- Throws:
SerializationException
-
clear
public void clear()
Clears the entire cache.
-
clear
public void clear(ResourcePath path)
Removes the id from the cache
-
clearCache
public void clearCache()
Clears the actual window references from any loaded WindowInfos
-
getWindowCompressedSize
@Deprecated(since="8.1.24") public int getWindowCompressedSize(ProjectResourceId id)
Deprecated.usegetWindowSize(ProjectResourceId)
instead
-
getWindowSize
public int getWindowSize(ProjectResourceId id)
-
getWindowEncoding
public SerializationEncoding getWindowEncoding(ProjectResourceId id)
-
getWindowCount
public int getWindowCount()
-
getWindowSize
public java.awt.Dimension getWindowSize(java.lang.String path)
Returns a windows' size. The window is deserialized if necessary, but then immediately closed. No locks are obtained.
-
isWindowPresent
public boolean isWindowPresent(java.lang.String path)
-
getStartupWindows
public java.util.List<java.lang.String> getStartupWindows()
Looks up the ids to all windows that are specified as startup windows
-
getAboutWindow
public ResourcePath getAboutWindow()
- Returns:
- Returns the id to the window to use as an about window in the runtime or null if not found
-
closeWindow
public void closeWindow(FPMIWindow window)
-
getWindowThumbnail
public java.awt.image.BufferedImage getWindowThumbnail(ResourcePath path)
Returns a thumbnail image for the named window, possibly null
-
getWindowNamesAlphabetical
public java.util.List<java.lang.String> getWindowNamesAlphabetical()
Returns a flattened list of all window paths
-
-