Class DocumentNode
java.lang.Object
com.inductiveautomation.ignition.client.jsonedit.DocumentNode
Created by carlg on 5/15/2017.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PropertyChangeSupport
This slightly modified property change support object also forwards each event upwards directly to the model, which is what triggers the model to know when to run the validation routine. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) void
appendChild
(DocumentNode newNode) Adds a new child to this node.Finds the schema object for this node, if anyint
Returns the path of a key that has yet to be committed.getKey()
int
getModel()
getPath()
getType()
getValue()
int
indexOf
(DocumentNode childNode) void
insertChild
(int index, DocumentNode newNode) Inserts a child in a specific location.boolean
isArray()
boolean
isEquivalent
(DocumentNode other) boolean
isNull()
boolean
isObject()
boolean
boolean
isRoot()
boolean
void
removeChild
(DocumentNode node) void
void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) void
reorderBySchema
(JsonPath path, JsonSchema schema) Re-order this node's children, if it is an object with child nodes, according to the schemavoid
replaceChildren
(List<DocumentNode> newChildArray) void
replaceChildren
(Map<String, DocumentNode> newChildMap) void
repositionNode
(DocumentNode child, int newIndex) void
setChild
(int index, DocumentNode newNode) Overwrites the child node at the given index with this node.void
setDirtyKey
(Object newDirtyKey) void
void
setQuality
(QualityCode quality) void
void
Sets the type, with an option to discard any children.void
setValidationErrors
(Collection<ValidationResults.ValidationError> validationErrors) void
void
setValueDocument
(DocumentElement element) void
setValueJson
(com.inductiveautomation.ignition.common.gson.JsonElement element) Sets the value, element is expected to be json null or primitive.void
setVisible
(boolean visible) com.inductiveautomation.ignition.common.gson.JsonElement
toJson()
toString()
-
Field Details
-
change
This slightly modified property change support object also forwards each event upwards directly to the model, which is what triggers the model to know when to run the validation routine.
-
-
Constructor Details
-
DocumentNode
-
DocumentNode
-
-
Method Details
-
isEquivalent
-
getModel
-
findSchema
Finds the schema object for this node, if any -
findChild
-
findNode
-
setType
-
setType
Sets the type, with an option to discard any children. -
getPath
-
getDirtyPath
Returns the path of a key that has yet to be committed. Useful only with value node types. -
setVisible
public void setVisible(boolean visible) -
isVisible
public boolean isVisible() -
toJson
public com.inductiveautomation.ignition.common.gson.JsonElement toJson() -
isRoot
public boolean isRoot() -
getType
-
getKey
-
getKeyAsString
-
getKeyAsIndex
public int getKeyAsIndex() -
setKey
-
getDirtyKey
-
getDirtyKeyAsString
-
setDirtyKey
-
getValue
-
setValue
-
getQuality
-
setQuality
-
isNull
public boolean isNull() -
isObjectOrArray
public boolean isObjectOrArray() -
isObject
public boolean isObject() -
isArray
public boolean isArray() -
getParent
-
getChildCount
public int getChildCount() -
getChildren
-
appendChild
Adds a new child to this node. The node type must be Object or Array. Arrays will automatically set the key of the new node. -
insertChild
Inserts a child in a specific location. If this is an array, the index key will be set automatically. Will throw anIllegalArgumentException
if given a bogus index. -
setChild
Overwrites the child node at the given index with this node. -
indexOf
- Returns:
- the index of the given child, or -1 if the child is not present
-
repositionNode
-
removeChild
-
replaceChildren
-
replaceChildren
-
reorderBySchema
Re-order this node's children, if it is an object with child nodes, according to the schema- Parameters:
path
- Path to this node relative to the given schmea
-
setValueJson
public void setValueJson(@Nonnull com.inductiveautomation.ignition.common.gson.JsonElement element) Sets the value, element is expected to be json null or primitive. -
setValueDocument
-
getValidationErrors
-
setValidationErrors
-
toString
-
addPropertyChangeListener
-
removePropertyChangeListener
-
addPropertyChangeListener
-
removePropertyChangeListener
-