Class ComponentModelScriptWrapper.SafetyWrapper

java.lang.Object
com.inductiveautomation.perspective.gateway.script.ComponentModelScriptWrapper.SafetyWrapper
All Implemented Interfaces:
PropertyTreeOwner
Enclosing class:
ComponentModelScriptWrapper

public static class ComponentModelScriptWrapper.SafetyWrapper extends Object
Delegates to the actual component, this prevents the scripting system from being able to call everything on ComponentModel, like startup(), shutdown, etc.

Also gives us a good place to implement methods that make sense for script authors, that don't belong on the the model object, like more user friendly versions of getChild, findSibling, etc.

  • Field Details

  • Method Details

    • getChild

      public PerspectiveElement getChild(String name)
    • getSibling

      public PerspectiveElement getSibling(String name)
    • getChildren

      public Collection<Component> getChildren()
    • refreshBinding

      public boolean refreshBinding(String propertyStr) throws Throwable
      Throws:
      Throwable
    • focus

      public void focus()
    • requestTooltip

      public void requestTooltip()
    • removeTooltip

      public void removeTooltip()
    • requestContextMenu

      public void requestContextMenu()
    • removeContextMenu

      public void removeContextMenu()
    • requestPrint

      public void requestPrint(org.python.core.PyObject[] pyArgs, String[] keywords)
    • getParent

      @Nullable public Component getParent()
    • getPropertyTreeOf

      @Nullable public PropertyTree getPropertyTreeOf(@Nullable PropertyType propertyType)
      Description copied from interface: PropertyTreeOwner
      Fetch the PropertyTree associated with the given PropertyType
      Specified by:
      getPropertyTreeOf in interface PropertyTreeOwner
      Parameters:
      propertyType - The PropertyType of the PropertyTree we want to fetch
      Returns:
      The PropertyTree or null if this PropertyTreeOwner does not manage a PropertyTree for the given PropertyType or if a null PropertyType is given
    • print

      public void print(String message)
    • getView

      public View getView()
    • getSession

      public Session getSession()
    • getPage

      public Page getPage()
    • getName

      public String getName()