Class BasicTagEditController<T extends PropertySet>
java.lang.Object
com.inductiveautomation.ignition.designer.sqltags.config.adapters.BasicTagEditController<T>
- All Implemented Interfaces:
Countable
,Extendable<PropertySet>
,Mergable<PropertySet>
,MutablePropertyValueSource
,PropertySet
,PropertySetEdit
,PropertyValueSource
,TagEditController<T>
,Serializable
,Iterable<PropertyValue>
public class BasicTagEditController<T extends PropertySet>
extends Object
implements TagEditController<T>
- See Also:
-
Field Summary
Fields inherited from interface com.inductiveautomation.ignition.common.config.PropertySet
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionBasicTagEditController
(DesignerContext context, T target, boolean intersection, boolean inherited, TagProviderMeta provMeta, Flags tagEditingFlags, TagPath relativePath, boolean isNew) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) boolean
protected void
fireChange
(Property<?> property) protected void
fireChange
(String propName) <T> T
Retrieves the value of the property, or null if this set doesn't contain that property.DataType[]
int
getCount()
Flags that provide information about tag editing, such as which features are supported.getEditResources
(boolean forceRefresh) String[]
Returns that values for the current edit context that can be referenced for property expansion.<T> T
getOrDefault
(Property<T> prop) <T> T
Get the value for a givenProperty
, or else fall back to value if it's not present.getPath()
The path to use for relative referencing.Collection<Property<?>>
Deprecated.getType()
Returns the opaque PropertyValue objects.boolean
isExtended
(Property<?> prop) Returns whether this property set contains a value for the prop, and the prop was actually inherited.boolean
Returns whether the edit object extends from a different object.boolean
isInherited
(Property<?> prop) Indicates whether the property was inherited from a parent type.boolean
isModified
(Property<?> property) boolean
isMulti()
boolean
isNewTag()
iterator()
void
merge
(PropertySet other, boolean localOnly) Merges the values from other collection into this one.void
void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) void
<T> void
void
set
(PropertyValue propValue) void
setEditable
(boolean value) If false, edits will be ignored.void
setExpandables
(String[] values) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.inductiveautomation.ignition.common.config.PropertySet
extend, getExtension, newDefaultInstance, newExtension
Methods inherited from interface com.inductiveautomation.ignition.common.config.PropertyValueSource
getNonNull, getNonNull
-
Constructor Details
-
BasicTagEditController
public BasicTagEditController(DesignerContext context, T target, boolean intersection, boolean inherited, TagProviderMeta provMeta, Flags tagEditingFlags, TagPath relativePath, boolean isNew)
-
-
Method Details
-
getContext
- Specified by:
getContext
in interfaceTagEditController<T extends PropertySet>
-
getEditResources
- Specified by:
getEditResources
in interfaceTagEditController<T extends PropertySet>
-
setEditable
public void setEditable(boolean value) Description copied from interface:TagEditController
If false, edits will be ignored. This is mostly useful during initialization of UIs to prevent unexpected edits.- Specified by:
setEditable
in interfaceTagEditController<T extends PropertySet>
-
getTarget
- Specified by:
getTarget
in interfaceTagEditController<T extends PropertySet>
-
getType
- Specified by:
getType
in interfaceTagEditController<T extends PropertySet>
-
getExpandibles
Description copied from interface:TagEditController
Returns that values for the current edit context that can be referenced for property expansion. If expansion is not available for the tag, should return null.- Specified by:
getExpandibles
in interfaceTagEditController<T extends PropertySet>
-
setExpandables
-
getAllowedDataTypes
- Specified by:
getAllowedDataTypes
in interfaceTagEditController<T extends PropertySet>
-
isNewTag
public boolean isNewTag()- Specified by:
isNewTag
in interfaceTagEditController<T extends PropertySet>
-
isMulti
public boolean isMulti()- Specified by:
isMulti
in interfaceTagEditController<T extends PropertySet>
-
isInherited
public boolean isInherited()Description copied from interface:TagEditController
Returns whether the edit object extends from a different object. In other words, should override controls be shown?- Specified by:
isInherited
in interfaceTagEditController<T extends PropertySet>
-
getEditingFlags
Description copied from interface:TagEditController
Flags that provide information about tag editing, such as which features are supported. The values are defined inTagEditingFlags
- Specified by:
getEditingFlags
in interfaceTagEditController<T extends PropertySet>
-
getPath
Description copied from interface:TagEditController
The path to use for relative referencing.- Specified by:
getPath
in interfaceTagEditController<T extends PropertySet>
-
getSourceName
- Specified by:
getSourceName
in interfaceTagEditController<T extends PropertySet>
-
getProviderMeta
Deprecated.- Specified by:
getProviderMeta
in interfaceTagEditController<T extends PropertySet>
-
set
- Specified by:
set
in interfaceMutablePropertyValueSource
-
set
- Specified by:
set
in interfaceMutablePropertyValueSource
-
remove
- Specified by:
remove
in interfaceMutablePropertyValueSource
-
revert
- Specified by:
revert
in interfacePropertySetEdit
-
merge
Description copied from interface:Mergable
Merges the values from other collection into this one. Replaces any currently existing value with those from the other set.- Specified by:
merge
in interfaceMergable<T extends PropertySet>
- Specified by:
merge
in interfaceMutablePropertyValueSource
-
addPropertyChangeListener
- Specified by:
addPropertyChangeListener
in interfaceTagEditController<T extends PropertySet>
-
removePropertyChangeListener
- Specified by:
removePropertyChangeListener
in interfaceTagEditController<T extends PropertySet>
-
fireChange
-
fireChange
-
isModified
- Specified by:
isModified
in interfacePropertySetEdit
-
getProperties
- Specified by:
getProperties
in interfacePropertyValueSource
-
get
Description copied from interface:PropertyValueSource
Retrieves the value of the property, or null if this set doesn't contain that property.- Specified by:
get
in interfacePropertyValueSource
-
contains
- Specified by:
contains
in interfacePropertyValueSource
- Returns:
- True if the source contains a value for prop.
-
getOrDefault
- Specified by:
getOrDefault
in interfacePropertyValueSource
- Returns:
- The value for prop or
Property.getDefaultValue()
if not present. Can return null if the value is null.
-
getOrElse
Description copied from interface:PropertyValueSource
Get the value for a givenProperty
, or else fall back to value if it's not present.- Specified by:
getOrElse
in interfacePropertyValueSource
- Parameters:
prop
- TheProperty
for which a value is to be retrieved.value
- The value to default to if property isn't present.- Returns:
- The value of property if present, value if not. Can return null if the value is null.
-
isExtended
Description copied from interface:PropertySet
Returns whether this property set contains a value for the prop, and the prop was actually inherited. In other words, this is true if the property is inherited, and an override value is present.- Specified by:
isExtended
in interfacePropertySet
-
isInherited
Description copied from interface:PropertySet
Indicates whether the property was inherited from a parent type.- Specified by:
isInherited
in interfacePropertySet
-
getValues
Description copied from interface:PropertyValueSource
Returns the opaque PropertyValue objects. This can be useful when you want to avoid the strict type checking of the value, and it's important to note that if the property is bound, the value will be a BoundValue. Be very careful about overriding, and make sure to maintain the methodology of using getProperties to iterate and get (or getOrDefault), to get the value, because those are all handled differently by BoundPropertySets, ExtendedPropertySets, etc.- Specified by:
getValues
in interfacePropertyValueSource
-
iterator
- Specified by:
iterator
in interfaceIterable<T extends PropertySet>
-
getCount
public int getCount()
-