Class CachedComponent
- java.lang.Object
-
- com.inductiveautomation.factorypmi.designer.search.CachedComponent
-
public class CachedComponent extends java.lang.ObjectConvenience object that encapsulates proper caching logic for holding onto a Component reference
-
-
Constructor Summary
Constructors Constructor Description CachedComponent(InstanceCache cache, ResourcePath windowId, java.lang.String componentPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchanged()You must call this if you modify this component so the system knows which windows to commit.javax.swing.JComponentcomponent()Finds the component for the given path.InstanceCachegetCache()CachedComponentgetChild(int index)java.lang.StringgetComponentPath()VisionDesignerInterfacegetDesigner()ResourcePathgetWindowId()java.lang.StringgetWindowPath()safe to call whether the window is open or not, unlike FPMIWindow.getPath()WindowWorkspacegetWorkspace()voidlocate()Opens the window in the WindowWorkspace and tries to select the componentTopLevelContainerwindow()Pulls the top level container for the component's parent's resource id out of the cache.
-
-
-
Constructor Detail
-
CachedComponent
public CachedComponent(InstanceCache cache, ResourcePath windowId, java.lang.String componentPath)
-
-
Method Detail
-
component
public javax.swing.JComponent component() throws WindowLockedExceptionFinds the component for the given path.- Throws:
WindowLockedException
-
window
public TopLevelContainer window() throws WindowLockedException
Pulls the top level container for the component's parent's resource id out of the cache.- Throws:
WindowLockedException
-
getDesigner
public VisionDesignerInterface getDesigner()
-
getWorkspace
public WindowWorkspace getWorkspace()
-
changed
public void changed()
You must call this if you modify this component so the system knows which windows to commit.
-
locate
public void locate()
Opens the window in the WindowWorkspace and tries to select the component
-
getChild
public CachedComponent getChild(int index) throws WindowLockedException
- Throws:
WindowLockedException
-
getCache
public InstanceCache getCache()
-
getWindowId
public ResourcePath getWindowId()
-
getWindowPath
public java.lang.String getWindowPath()
safe to call whether the window is open or not, unlike FPMIWindow.getPath()
-
getComponentPath
public java.lang.String getComponentPath()
-
-