Package org.opencms.ui.util
Class CmsComponentField<T extends com.vaadin.ui.Component>
- java.lang.Object
-
- org.opencms.ui.util.CmsComponentField<T>
-
- Type Parameters:
T
- the tpye of the wrapped component
public class CmsComponentField<T extends com.vaadin.ui.Component> extends java.lang.Object
Container wrapping a single UI component.This seemingly useless class is used as a typesafe way to add component-valued fields to component classes which use the Vaadin declarative UI mechanism when you don't want them to be bound automatically to something in the declarative UI HTML file. We could just use arrays of size 1 instead, but using a custom class is probably easier to understand.
-
-
Constructor Summary
Constructors Constructor Description CmsComponentField()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get()
Gets the wrapped component.static <U extends com.vaadin.ui.Component>
CmsComponentField<U>newInstance()
Convenience method for creating a new instance.void
set(T value)
Sets the wrapped component.
-
-
-
Constructor Detail
-
CmsComponentField
public CmsComponentField()
-
-
Method Detail
-
newInstance
public static <U extends com.vaadin.ui.Component> CmsComponentField<U> newInstance()
Convenience method for creating a new instance.- Returns:
- the new instance
-
-