Class ComponentSelection
- java.lang.Object
-
- com.inductiveautomation.ignition.common.util.AbstractChangeable
-
- com.inductiveautomation.perspective.designer.workspace.ComponentSelection
-
- All Implemented Interfaces:
Changeable
public class ComponentSelection extends AbstractChangeable
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.ignition.common.util.AbstractChangeable
changeEvent, listenerList
-
-
Constructor Summary
Constructors Constructor Description ComponentSelection(ComponentRegistry registry)
ComponentSelection(DesignAdapter support, java.util.List<ComponentDetails> details, ComponentRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsRootContainer()
java.util.Optional<EventConfig>
getAnchorEventConfig()
java.util.Optional<java.lang.String>
getAnchorPath()
java.util.Optional<PropertyConfigCollection>
getAnchorPropertyConfigCollection()
java.util.Optional<ScriptConfig>
getAnchorScriptConfig()
java.util.Optional<java.lang.String>
getAnchorType()
java.util.List<ComponentDetails>
getComponentDetails()
java.util.Optional<DeepSelection>
getDeepSelection()
java.util.Optional<ComponentDesignDelegate>
getDesignDelegate()
java.util.List<java.lang.String>
getPaths()
JsonSchema
getPositionSchema(DeepSelection deep)
JsonSchema
getPropsSchema()
com.inductiveautomation.ignition.common.gson.JsonObject
getScope(PropertyType scope)
int
getSelectionCount()
boolean
isComponents()
boolean
isEmpty()
boolean
isSession()
boolean
isSiblings()
boolean
isView()
void
removeChildPropertyConfigs(PropertyType scope, java.lang.String propertyPath)
void
removeProperty(PropertyType scope, java.lang.String pathToParent, int index)
void
removeProperty(PropertyType scope, java.lang.String pathToParent, java.lang.String name)
void
renameProperty(PropertyType scope, java.lang.String pathToParent, java.lang.String oldName, java.lang.String newName)
void
updateConfigs(java.util.List<ComponentDetails> newDetails)
void
write(PropertyType scope, java.lang.String propertyPath, java.lang.String valueAsJson)
Write the same value to each component in the selection.-
Methods inherited from class com.inductiveautomation.ignition.common.util.AbstractChangeable
addChangeListener, fireStateChanged, getChangeListeners, removeChangeListener
-
-
-
-
Constructor Detail
-
ComponentSelection
public ComponentSelection(@Nonnull ComponentRegistry registry)
-
ComponentSelection
public ComponentSelection(@Nullable DesignAdapter support, @Nullable java.util.List<ComponentDetails> details, @Nonnull ComponentRegistry registry)
-
-
Method Detail
-
updateConfigs
public void updateConfigs(java.util.List<ComponentDetails> newDetails)
-
getDeepSelection
public java.util.Optional<DeepSelection> getDeepSelection()
-
getAnchorEventConfig
public java.util.Optional<EventConfig> getAnchorEventConfig()
-
getAnchorScriptConfig
public java.util.Optional<ScriptConfig> getAnchorScriptConfig()
-
getAnchorPropertyConfigCollection
public java.util.Optional<PropertyConfigCollection> getAnchorPropertyConfigCollection()
-
getPaths
public java.util.List<java.lang.String> getPaths()
-
getComponentDetails
public java.util.List<ComponentDetails> getComponentDetails()
-
write
public void write(PropertyType scope, java.lang.String propertyPath, java.lang.String valueAsJson)
Write the same value to each component in the selection.
-
renameProperty
public void renameProperty(PropertyType scope, java.lang.String pathToParent, java.lang.String oldName, java.lang.String newName)
-
removeProperty
public void removeProperty(PropertyType scope, java.lang.String pathToParent, java.lang.String name)
-
removeProperty
public void removeProperty(PropertyType scope, java.lang.String pathToParent, int index)
-
removeChildPropertyConfigs
public void removeChildPropertyConfigs(PropertyType scope, java.lang.String propertyPath)
-
getAnchorPath
public java.util.Optional<java.lang.String> getAnchorPath()
- Returns:
- The index path of the first component path in the selection
-
getAnchorType
public java.util.Optional<java.lang.String> getAnchorType()
- Returns:
- The component type of the first component in the selection
-
getScope
public com.inductiveautomation.ignition.common.gson.JsonObject getScope(PropertyType scope)
-
isEmpty
public boolean isEmpty()
-
getSelectionCount
public int getSelectionCount()
-
isSession
public boolean isSession()
-
isView
public boolean isView()
-
isComponents
public boolean isComponents()
-
isSiblings
public boolean isSiblings()
- Returns:
- true if the current selection represents non-view components that are siblings. Note that a view is not considered a component in this sense.
-
containsRootContainer
public boolean containsRootContainer()
-
getPropsSchema
@Nullable public JsonSchema getPropsSchema()
-
getPositionSchema
@Nullable public JsonSchema getPositionSchema(DeepSelection deep)
-
getDesignDelegate
public java.util.Optional<ComponentDesignDelegate> getDesignDelegate()
-
-