Package de.esoco.process.ui
Klasse UiComponent<T,C extends UiComponent<T,C>>
java.lang.Object
org.obrel.core.RelatedObject
de.esoco.process.param.ParameterWrapper<T,C>
de.esoco.process.ui.UiComponent<T,C>
- Alle implementierten Schnittstellen:
org.obrel.core.Relatable
- Bekannte direkte Unterklassen:
UiContainer
,UiControl
,UiIcon
,UiImage
,UiProgressBar
,UiTextComponent
,UiWebView
The base class for all process UI components.
-
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungprotected
UiComponent
(UiContainer<?> parent, InteractionFragment fragment, org.obrel.core.RelationType<T> paramType) Creates a new instance for a certain parameter relation type.protected
UiComponent
(UiContainer<?> parent, Class<? super T> datatype) Creates a new instance for a certain datatype. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected void
Will be invoked to apply all properties of this component to the corresponding process parameter before it is rendered.protected void
attachTo
(UiContainer<?> parent) Attaches this component to it's parent container.final UiLayout.Cell
cell()
Returns theUiLayout
cell in which this component has been placed.final <C extends UiLayout.Cell>
CReturns the layout cell in which this component has been placed, cast to a specific sub-type of theUiLayout.Cell
class.protected String
Returns the style name for this component.protected UiImageDefinition
<?> getImage()
Returns the image of this component if set.final UiContainer
<?> Returns the parent container.Returns the root view of this component's hierarchy.protected final T
Internal method to return the value of this component's parameter.UiView
<?> getView()
Returns the parent view of this component.Sets the height of this component.protected C
icon
(UiIconSupplier iconSupplier) Sets an icon for this component.protected C
image
(UiImageDefinition<?> image) Sets an image for this component.Sets a label for this component.placeBefore
(UiComponent<?, ?> beforeComponent) Places this component before another component in the same parent container.Sets a resource ID for this instance by setting the UI propertyContentProperties.RESOURCE_ID
.protected final C
setValueImpl
(T value) Internal method to set the value of this component's parameter.Sets the size of this component.style()
Returns the style object of this component which provides methods to modify the component's appearance.Sets the style of this component to a copy of an existing style definition.Shortcut to set the style name in thestyle()
object.Sets the tooltip to be displayed for this component.toString()
protected void
update()
Will be invoked byapplyProperties()
on each UI update.visibleOn
(de.esoco.lib.property.LayoutVisibility visibilty) Sets the visibility in responsive layouts.Sets the width of this component.Von Klasse geerbte Methoden de.esoco.process.param.ParameterWrapper
clear, disable, enable, fragment, get, getParam, has, hide, id, initiateDownload, isEnabled, isVisible, remove, set, set, set, setEnabled, setFragment, setParam, setParameterEventHandler, setParameterType, setVisible, show, type
Von Klasse geerbte Methoden org.obrel.core.RelatedObject
deleteRelation, get, getRelation, getRelations, notifyRelationListeners, readRelations, relationsEqual, relationsHashCode, relationsString, set, set, transform, writeRelations
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden org.obrel.core.Relatable
deleteRelation, deleteRelations, getAll, getOption, getRelationCount, getRelations, hasFlag, hasRelation, hasRelations, init, set, set, set, setOption, streamRelations
-
Konstruktordetails
-
UiComponent
Creates a new instance for a certain datatype.- Parameter:
parent
- The parent containerdatatype
- The datatype of the component value
-
UiComponent
protected UiComponent(UiContainer<?> parent, InteractionFragment fragment, org.obrel.core.RelationType<T> paramType) Creates a new instance for a certain parameter relation type.- Parameter:
parent
- The parent containerfragment
- The fragment this component belongs toparamType
- The parameter relation type
-
-
Methodendetails
-
cell
Returns theUiLayout
cell in which this component has been placed. If the parent container has a layout that creates subclasses of theUiLayout.Cell
class which provide layout-specific methods the sub-type cells can be queried withcell(Class)
.- Gibt zurück:
- The layout cell
-
cell
Returns the layout cell in which this component has been placed, cast to a specific sub-type of theUiLayout.Cell
class. The application must make sure that the given type is actually used by the parent container's layout or else an exception will occur.- Parameter:
cellType
- A sub-type ofUiLayout.Cell
that must match the actual cell type- Gibt zurück:
- The layout cell, cast to the given type
-
getParent
Returns the parent container.- Gibt zurück:
- The parent
-
getRootView
Returns the root view of this component's hierarchy.- Gibt zurück:
- The root view
-
getView
Returns the parent view of this component.- Gibt zurück:
- The parent view
-
height
Sets the height of this component.- Parameter:
height
- The height valueunit
- The height unit- Gibt zurück:
- This instance for concatenation
-
label
Sets a label for this component. How exactly the label is rendered and where it is placed dependend on the parent container and it's layout.- Parameter:
label
- The label text or NULL for none- Gibt zurück:
- This instance for concatenation
-
placeBefore
Places this component before another component in the same parent container.- Parameter:
beforeComponent
- The component to place this component before- Gibt zurück:
- This instance for concatenation
- Löst aus:
IllegalArgumentException
- If the given component is not found in the parent container
-
resid
Sets a resource ID for this instance by setting the UI propertyContentProperties.RESOURCE_ID
.- Setzt außer Kraft:
resid
in KlasseParameterWrapper<T,
C extends UiComponent<T, C>> - Parameter:
resourceId
- The resource ID string- Gibt zurück:
- This instance for concatenation
-
size
Sets the size of this component.- Parameter:
width
- The widthheight
- The heightunit
- The unit of the size values- Gibt zurück:
- This instance for concatenation
-
style
Returns the style object of this component which provides methods to modify the component's appearance.- Gibt zurück:
- The component style
-
style
Sets the style of this component to a copy of an existing style definition.- Parameter:
style
- The style object to apply- Gibt zurück:
- The component style to allow subsequent modifications
-
styleName
Shortcut to set the style name in thestyle()
object.- Parameter:
styleName
- the new style name- Gibt zurück:
- This instance
-
toString
- Setzt außer Kraft:
toString
in Klasseorg.obrel.core.RelatedObject
-
tooltip
Sets the tooltip to be displayed for this component.- Parameter:
tooltip
- The tooltip text or NULL for none- Gibt zurück:
- This instance
-
visibleOn
Sets the visibility in responsive layouts.- Parameter:
visibilty
- The visibility- Gibt zurück:
- This instance for concatenation
-
width
Sets the width of this component.- Parameter:
width
- The width valueunit
- The width unit- Gibt zurück:
- This instance for concatenation
-
applyProperties
protected void applyProperties()Will be invoked to apply all properties of this component to the corresponding process parameter before it is rendered. -
attachTo
Attaches this component to it's parent container. This will be invoked just after the construction of a component instance.- Parameter:
parent
- The parent container
-
getComponentStyleName
Returns the style name for this component. By default this is the simple class name of this component. Subclasses should override this if the class name is ambiguous and needs further specification. This is typically the case for non-static inner classes of composites which often have names that start without the 'Ui' prefix.- Gibt zurück:
- The component style name
-
getImage
Returns the image of this component if set.- Gibt zurück:
- The component image or NULL for none
-
getValueImpl
Internal method to return the value of this component's parameter. This is intended to be used by subclasses only which should provide a type-specific public method (like String getText()).- Gibt zurück:
- The current value
-
icon
Sets an icon for this component. This method is protected to provide the icon handling functionality for all subclasses. Subclasses that support the setting of icon should override this method as public.- Parameter:
iconSupplier
- The component icon (NULL for none)- Gibt zurück:
- This instance so that this method can be used for fluent implementations
-
image
Sets an image for this component. This method is protected to provide the image handling functionality for all subclasses. Subclasses that support the setting of images should override this method as public.- Parameter:
image
- The component image- Gibt zurück:
- This instance so that this method can be used for fluent implementations
-
setValueImpl
Internal method to set the value of this component's parameter. This is intended to be used by subclasses which should provide a type-specific public method (like setText(String)).- Parameter:
value
- The new value- Gibt zurück:
- This instance so that this method can be used for fluent implementations
-
update
protected void update()Will be invoked byapplyProperties()
on each UI update. The default implementation does nothing:
-