Class CachedComponent
- java.lang.Object
-
- com.inductiveautomation.factorypmi.designer.search.CachedComponent
-
public class CachedComponent extends java.lang.Object
Convenience 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 void
changed()
You must call this if you modify this component so the system knows which windows to commit.javax.swing.JComponent
component()
Finds the component for the given path.InstanceCache
getCache()
CachedComponent
getChild(int index)
java.lang.String
getComponentPath()
VisionDesignerInterface
getDesigner()
ResourcePath
getWindowId()
java.lang.String
getWindowPath()
safe to call whether the window is open or not, unlike FPMIWindow.getPath()WindowWorkspace
getWorkspace()
void
locate()
Opens the window in the WindowWorkspace and tries to select the componentTopLevelContainer
window()
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 WindowLockedException
Finds 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()
-
-