Class ViewResourceEditor

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ViewResourceEditor extends ResourceEditor<DesignerViewConfig>
PerspectiveEditor is used as the editor when the Perspective Workspace is active and editing a Perspective Project Resource.
Since:
8.0.0
See Also:
  • Constructor Details

  • Method Details

    • getEngine

      public com.teamdev.jxbrowser.engine.Engine getEngine()
    • isOptimizeCommits

      protected boolean isOptimizeCommits()
      Description copied from class: ResourceEditor
      Override this and return true if you want commits to use equality on the resource objects to avoid un-necessary commits.
      Overrides:
      isOptimizeCommits in class ResourceEditor<DesignerViewConfig>
    • getAdapter

      public DesignAdapter getAdapter()
    • getEventBus

      public com.google.common.eventbus.EventBus getEventBus()
    • getBrowserPane

      public BrowserPanel getBrowserPane()
    • getContext

      public DesignerContext getContext()
    • getBridge

      public JavaJsBridge getBridge()
    • deserialize

      protected DesignerViewConfig deserialize(ProjectResource resource)
      Description copied from class: ResourceEditor
      Deserialize a project resource into the editing object type for this editor. Default implementation simply calls this.deserialize(resource.getData()). Override this method if your resource does not use the default data.bin file.
      Overrides:
      deserialize in class ResourceEditor<DesignerViewConfig>
    • serializeResource

      protected void serializeResource(ProjectResourceBuilder builder, DesignerViewConfig designerViewConfig)
      Description copied from class: ResourceEditor
      Serialize the object and put the serialized file(s) and attribute(s) into the project resource builder. Default implementation is:
      builder.putData(serialize(object));
      Implementations don't need to bother setting the project's resourcePath, projectName, or applicationScope; those will be set automatically.
      Overrides:
      serializeResource in class ResourceEditor<DesignerViewConfig>
    • getStructure

      public ViewStructure getStructure()
    • setStructure

      public void setStructure(ViewStructure structure)
      Called by the bridge whenever the structure of components changes. Powered by a MobX reaction inside DesignerStore#initWorkspaceSync()
      Parameters:
      structure - A lightweight representation of the component hierarchy
    • isPipeSelected

      public boolean isPipeSelected()
    • arePipesSiblings

      public boolean arePipesSiblings()
    • getSelection

      public ComponentSelection getSelection()
    • setSelection

      public void setSelection(List<String> selection)
    • getDeepSelection

      public DeepSelection getDeepSelection()
    • setDeepSelection

      public void setDeepSelection(String path)
    • getWorkspace

      public ViewWorkspace getWorkspace()
    • debugFrame

      public Optional<WebDebugFrame> debugFrame()
    • getViewConfig

      public ViewConfig getViewConfig()
    • init

      protected void init(DesignerViewConfig designerViewConfig)
      Specified by:
      init in class ResourceEditor<DesignerViewConfig>
    • getObjectForSave

      public DesignerViewConfig getObjectForSave() throws Exception
      Description copied from class: ResourceEditor
      Return the object that should be saved to represent this resource in the ProjectResource. Will be serialized using an XMLSerializer. Override save() to serialize in a different manner.
      Specified by:
      getObjectForSave in class ResourceEditor<DesignerViewConfig>
      Throws:
      Exception
    • onCommitFailed

      protected void onCommitFailed(Exception ex)
      Overrides:
      onCommitFailed in class ResourceEditor<DesignerViewConfig>
    • getViewAsJson

      public com.inductiveautomation.ignition.common.gson.JsonElement getViewAsJson() throws Exception
      Throws:
      Exception
    • getResourcePath

      public ResourcePath getResourcePath()
      Overrides:
      getResourcePath in class ResourceEditor<DesignerViewConfig>
    • setPreview

      public void setPreview(boolean preview)
    • setPipeMode

      public void setPipeMode(String pipingMode)
    • refresh

      public void refresh()
    • notifyActivated

      public void notifyActivated()
    • notifyDeactivated

      public void notifyDeactivated()
    • getEditActionHandler

      public EditActionHandler getEditActionHandler()