public class UiElement<E extends UiElement<E>>
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
|
UiElement()
Creates a new instance.
|
protected |
UiElement(UiElement<?> rOther)
A copy constructor for subclasses.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyPropertiesTo(UiComponent<?,?> rComponent)
Applies the properties of this element to the given component.
|
void |
applyTo(UiComponent<?,?> rComponent)
Applies this element to the given component.
|
protected void |
clearProperties()
Clears all properties in this element.
|
protected void |
copyPropertiesFrom(UiElement<?> rOther,
boolean bReplace)
Copies the properties from another UI element to this instance.
|
int |
get(de.esoco.lib.property.PropertyName<java.lang.Integer> rIntegerProperty,
int nDefault)
Queries an integer property.
|
<T> T |
get(de.esoco.lib.property.PropertyName<T> rPropertyName,
T rDefault)
Queries a certain property.
|
boolean |
hasProperty(de.esoco.lib.property.PropertyName<?> rPropertyName)
Checks whether a certain property has been set.
|
boolean |
isModified()
Checks the modification state of this element.
|
protected E |
set(de.esoco.lib.property.PropertyName<java.lang.Boolean> rFlag)
Sets a boolean property.
|
protected E |
set(de.esoco.lib.property.PropertyName<java.lang.Integer> rProperty,
int nValue)
Sets an integer property.
|
protected <V> E |
set(de.esoco.lib.property.PropertyName<V> rProperty,
V rValue)
Sets a certain property of this element.
|
void |
setModified(boolean bModified)
Set this element's modified state.
|
java.lang.String |
toString() |
public UiElement()
protected UiElement(UiElement<?> rOther)
rOther
- The other element to copy the properties frompublic void applyTo(UiComponent<?,?> rComponent)
rComponent
- The target componentpublic final int get(de.esoco.lib.property.PropertyName<java.lang.Integer> rIntegerProperty, int nDefault)
rIntegerProperty
- The property namenDefault
- The default value to return if the property
doesn't existpublic final <T> T get(de.esoco.lib.property.PropertyName<T> rPropertyName, T rDefault)
rPropertyName
- The property namerDefault
- The default value to return if the property doesn't
existpublic boolean hasProperty(de.esoco.lib.property.PropertyName<?> rPropertyName)
rPropertyName
- The property namepublic final boolean isModified()
public final void setModified(boolean bModified)
applyTo(UiComponent)
.bModified
- The new modified statepublic java.lang.String toString()
toString
in class java.lang.Object
protected void applyPropertiesTo(UiComponent<?,?> rComponent)
rComponent
- The target componentprotected void clearProperties()
protected void copyPropertiesFrom(UiElement<?> rOther, boolean bReplace)
rOther
- The other elementbReplace
- TRUE to replace existing properties in this instanceprotected final E set(de.esoco.lib.property.PropertyName<java.lang.Boolean> rFlag)
set(PropertyName, Object)
protected <V> E set(de.esoco.lib.property.PropertyName<V> rProperty, V rValue)
rProperty
- The property namerValue
- The property valueprotected final E set(de.esoco.lib.property.PropertyName<java.lang.Integer> rProperty, int nValue)
set(PropertyName, Object)