public class BasicTagEditController<T extends MutablePropertyValueSource> extends java.lang.Object implements TagEditController<T>
Constructor and Description |
---|
BasicTagEditController(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() |
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.
|
TagProviderMeta |
getProviderMeta() |
java.lang.String |
getSourceName() |
T |
getTarget() |
ExtendedTagType |
getType() |
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() |
void |
merge(PropertySet other)
Merges the values from other collection into this one.
|
void |
remove(Property<?> prop) |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
<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) |
public BasicTagEditController(T target, boolean intersection, boolean inherited, TagProviderMeta provMeta, Flags tagEditingFlags, TagPath relativePath, boolean isNew)
public TagEditResources getEditResources(boolean forceRefresh)
getEditResources
in interface TagEditController<T extends MutablePropertyValueSource>
public void setEditable(boolean value)
TagEditController
setEditable
in interface TagEditController<T extends MutablePropertyValueSource>
public T getTarget()
getTarget
in interface TagEditController<T extends MutablePropertyValueSource>
public ExtendedTagType getType()
getType
in interface TagEditController<T extends MutablePropertyValueSource>
public java.lang.String[] getExpandibles()
TagEditController
getExpandibles
in interface TagEditController<T extends MutablePropertyValueSource>
public void setExpandables(java.lang.String[] values)
public DataType[] getAllowedDataTypes()
getAllowedDataTypes
in interface TagEditController<T extends MutablePropertyValueSource>
public boolean isNewTag()
isNewTag
in interface TagEditController<T extends MutablePropertyValueSource>
public boolean isMulti()
isMulti
in interface TagEditController<T extends MutablePropertyValueSource>
public boolean isInherited()
TagEditController
isInherited
in interface TagEditController<T extends MutablePropertyValueSource>
public Flags getEditingFlags()
TagEditController
TagEditingFlags
getEditingFlags
in interface TagEditController<T extends MutablePropertyValueSource>
public TagPath getPath()
TagEditController
getPath
in interface TagEditController<T extends MutablePropertyValueSource>
public java.lang.String getSourceName()
getSourceName
in interface TagEditController<T extends MutablePropertyValueSource>
public TagProviderMeta getProviderMeta()
getProviderMeta
in interface TagEditController<T extends MutablePropertyValueSource>
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 merge(PropertySet other)
Mergable
merge
in interface Mergable<PropertySet>
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface TagEditController<T extends MutablePropertyValueSource>
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface TagEditController<T extends MutablePropertyValueSource>
protected void fireChange(Property<?> property)
protected void fireChange(java.lang.String propName)
public boolean isModified(Property<?> property)
isModified
in interface MutablePropertyValueSetEdit
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
value
- The value to default to if property isn't present.public boolean isExtended(Property<?> prop)
PropertyValueSource
isExtended
in interface PropertyValueSource
public boolean isInherited(Property<?> prop)
PropertyValueSource
isInherited
in interface PropertyValueSource