Package de.esoco.process.ui
Klasse UiElement<E extends UiElement<E>>
java.lang.Object
de.esoco.process.ui.UiElement<E>
- Bekannte direkte Unterklassen:
UiImageDefinition
,UiLayoutElement
,UiStyle
A common base class for elements in the process UI framework.
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected void
applyPropertiesTo
(UiComponent<?, ?> component) Applies the properties of this element to the given component.void
applyTo
(UiComponent<?, ?> component) Applies this element to the given component.protected void
Clears all properties in this element.protected void
copyPropertiesFrom
(UiElement<?> other, boolean replace) Copies the properties from another UI element to this instance.final int
Queries an integer property.final <T> T
get
(de.esoco.lib.property.PropertyName<T> propertyName, T defaultValue) Queries a certain property.boolean
hasProperty
(de.esoco.lib.property.PropertyName<?> propertyName) Checks whether a certain property has been set.final boolean
Checks the modification state of this element.protected final E
Sets a boolean property.protected final E
Sets an integer property.protected <V> E
set
(de.esoco.lib.property.PropertyName<V> property, V value) Sets a certain property of this element.final void
setModified
(boolean modified) Set this element's modified state.toString()
-
Konstruktordetails
-
UiElement
public UiElement()Creates a new instance. -
UiElement
A copy constructor for subclasses.- Parameter:
other
- The other element to copy the properties from
-
-
Methodendetails
-
applyTo
Applies this element to the given component.- Parameter:
component
- The target component
-
get
Queries an integer property.- Parameter:
integerProperty
- The property namedefaultValue
- The default value to return if the property doesn't exist- Gibt zurück:
- The property value or the default value if it isn't set
-
get
public final <T> T get(de.esoco.lib.property.PropertyName<T> propertyName, T defaultValue) Queries a certain property.- Parameter:
propertyName
- The property namedefaultValue
- The default value to return if the property doesn't exist- Gibt zurück:
- The property value or the default value if it isn't set
-
hasProperty
public boolean hasProperty(de.esoco.lib.property.PropertyName<?> propertyName) Checks whether a certain property has been set.- Parameter:
propertyName
- The property name- Gibt zurück:
- TRUE if the property exists
-
isModified
public final boolean isModified()Checks the modification state of this element.- Gibt zurück:
- TRUE if the element has been modified since it has last been applied to the component
-
setModified
public final void setModified(boolean modified) Set this element's modified state. If TRUE it will be applied to the component on the next call toapplyTo(UiComponent)
.- Parameter:
modified
- The new modified state
-
toString
-
applyPropertiesTo
Applies the properties of this element to the given component. Will only be invoked if the properties have changed.- Parameter:
component
- The target component
-
clearProperties
protected void clearProperties()Clears all properties in this element. -
copyPropertiesFrom
Copies the properties from another UI element to this instance.- Parameter:
other
- The other elementreplace
- TRUE to replace existing properties in this instance
-
set
Sets a boolean property.- Siehe auch:
-
set
Sets a certain property of this element. All other property set methods redirect to this method so that subclasses only need to override this method if they want to intercept property updates.- Parameter:
property
- The property namevalue
- The property value- Gibt zurück:
- This instance for concatenation
-
set
Sets an integer property.- Siehe auch:
-