public class BasicTagEditController<T extends PropertySet> extends java.lang.Object implements TagEditController<T>
EMPTY
Constructor and Description |
---|
BasicTagEditController(DesignerContext context,
T target,
boolean intersection,
boolean inherited,
TagProviderMeta provMeta,
Flags tagEditingFlags,
TagPath relativePath,
boolean isNew) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
boolean |
contains(Property<?> prop) |
protected void |
fireChange(Property<?> property) |
protected void |
fireChange(java.lang.String propName) |
<T> T |
get(Property<T> prop)
Retrieves the value of the property, or null if this set doesn't contain that property.
|
DataType[] |
getAllowedDataTypes() |
DesignerContext |
getContext() |
int |
getCount() |
Flags |
getEditingFlags()
Flags that provide information about tag editing, such as which features are supported.
|
TagEditResources |
getEditResources(boolean forceRefresh) |
java.lang.String[] |
getExpandibles()
Returns that values for the current edit context that can be referenced for property expansion.
|
<T> T |
getOrDefault(Property<T> prop) |
<T> T |
getOrElse(Property<T> prop,
T value)
Get the value for a given
Property , or else fall back to value if it's not present. |
TagPath |
getPath()
The path to use for relative referencing.
|
java.util.Collection<Property<?>> |
getProperties() |
TagProviderMeta |
getProviderMeta()
Deprecated.
|
java.lang.String |
getSourceName() |
T |
getTarget() |
ExtendedTagType |
getType() |
java.util.List<PropertyValue> |
getValues() |
boolean |
isExtended(Property<?> prop)
Returns whether this property set contains a value for the prop, and the prop was actually inherited.
|
boolean |
isInherited()
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() |
java.util.Iterator<PropertyValue> |
iterator() |
void |
merge(PropertySet other,
boolean localOnly)
Merges the values from other collection into this one.
|
void |
remove(Property<?> prop) |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
void |
revert(Property<?> prop) |
<T> void |
set(Property<T> prop,
T value) |
void |
set(PropertyValue propValue) |
void |
setEditable(boolean value)
If false, edits will be ignored.
|
void |
setExpandables(java.lang.String[] values) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
builder, extend, getExtension, newDefaultInstance, newExtension
public BasicTagEditController(DesignerContext context, T target, boolean intersection, boolean inherited, TagProviderMeta provMeta, Flags tagEditingFlags, TagPath relativePath, boolean isNew)
public DesignerContext getContext()
getContext
in interface TagEditController<T extends PropertySet>
public TagEditResources getEditResources(boolean forceRefresh)
getEditResources
in interface TagEditController<T extends PropertySet>
public void setEditable(boolean value)
TagEditController
setEditable
in interface TagEditController<T extends PropertySet>
public T getTarget()
getTarget
in interface TagEditController<T extends PropertySet>
public ExtendedTagType getType()
getType
in interface TagEditController<T extends PropertySet>
public java.lang.String[] getExpandibles()
TagEditController
getExpandibles
in interface TagEditController<T extends PropertySet>
public void setExpandables(java.lang.String[] values)
public DataType[] getAllowedDataTypes()
getAllowedDataTypes
in interface TagEditController<T extends PropertySet>
public boolean isNewTag()
isNewTag
in interface TagEditController<T extends PropertySet>
public boolean isMulti()
isMulti
in interface TagEditController<T extends PropertySet>
public boolean isInherited()
TagEditController
isInherited
in interface TagEditController<T extends PropertySet>
public Flags getEditingFlags()
TagEditController
TagEditingFlags
getEditingFlags
in interface TagEditController<T extends PropertySet>
public TagPath getPath()
TagEditController
getPath
in interface TagEditController<T extends PropertySet>
public java.lang.String getSourceName()
getSourceName
in interface TagEditController<T extends PropertySet>
@Deprecated public TagProviderMeta getProviderMeta()
getProviderMeta
in interface TagEditController<T extends PropertySet>
public <T> void set(Property<T> prop, T value)
set
in interface MutablePropertyValueSource
public void set(PropertyValue propValue)
set
in interface MutablePropertyValueSource
public void remove(Property<?> prop)
remove
in interface MutablePropertyValueSource
public void revert(Property<?> prop)
revert
in interface PropertySetEdit
public void merge(PropertySet other, boolean localOnly)
Mergable
merge
in interface Mergable<PropertySet>
merge
in interface MutablePropertyValueSource
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface TagEditController<T extends PropertySet>
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface TagEditController<T extends PropertySet>
protected void fireChange(Property<?> property)
protected void fireChange(java.lang.String propName)
public boolean isModified(Property<?> property)
isModified
in interface PropertySetEdit
public java.util.Collection<Property<?>> getProperties()
getProperties
in interface PropertyValueSource
public <T> T get(Property<T> prop)
PropertyValueSource
get
in interface PropertyValueSource
public boolean contains(Property<?> prop)
contains
in interface PropertyValueSource
public <T> T getOrDefault(Property<T> prop)
getOrDefault
in interface PropertyValueSource
Property.getDefaultValue()
if not present.public <T> T getOrElse(Property<T> prop, T value)
PropertyValueSource
Property
, or else fall back to value if it's not present.getOrElse
in interface PropertyValueSource
prop
- The Property
for which a value is to be retrieved.value
- The value to default to if property isn't present.public boolean isExtended(Property<?> prop)
PropertySet
isExtended
in interface PropertySet
public boolean isInherited(Property<?> prop)
PropertySet
isInherited
in interface PropertySet
public java.util.List<PropertyValue> getValues()
getValues
in interface PropertyValueSource
public java.util.Iterator<PropertyValue> iterator()
iterator
in interface java.lang.Iterable<PropertyValue>