Package org.jboss.hal.ballroom.form
Class ReadOnlyAppearance<T>
- java.lang.Object
-
- org.jboss.hal.ballroom.form.ReadOnlyAppearance<T>
-
- All Implemented Interfaces:
com.google.gwt.user.client.ui.Focusable,org.jboss.elemento.IsElement,Attachable
public abstract class ReadOnlyAppearance<T> extends Object
Abstract read-only appearance which builds the following DOM tree:<div class="form-group"> <label class="control-label hal-form-label"></label> <div class="hal-form-input"> <value-element class="form-control-static"></p> </div> </div>Unless you override
safeApply(Decoration, Object)orsafeUnapply(Decoration)the following decorations are not supported by this read-only appearance:
-
-
Field Summary
Fields Modifier and Type Field Description static StringFORM_ITEM_GROUPUsed as adata-attribute in the root element of the appearances.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description default voidapply(Decoration decoration)<C> voidapply(Decoration decoration, C context)CallssafeApply(Decoration, Object)if the decoration is supported and has not been applied yet.default StringasString(T value)voidattach()voidclearValue()elemental2.dom.HTMLElementelement()StringgetId()intgetTabIndex()voidsetAccessKey(char key)voidsetFocus(boolean focused)voidsetId(String id)voidsetLabel(String label)voidsetName(String name)voidsetTabIndex(int index)voidshowExpression(String expression)voidshowValue(T value)voidunapply(Decoration decoration)CallssafeUnapply(Decoration)if the decoration is supported and has been applied.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.hal.ballroom.Attachable
detach
-
-
-
-
Field Detail
-
FORM_ITEM_GROUP
public static final String FORM_ITEM_GROUP
Used as adata-attribute in the root element of the appearances.- See Also:
- Constant Field Values
-
-
Method Detail
-
element
public elemental2.dom.HTMLElement element()
-
attach
public void attach()
-
showValue
public void showValue(T value)
-
clearValue
public void clearValue()
-
showExpression
public void showExpression(String expression)
-
setId
public void setId(String id)
-
setName
public void setName(String name)
-
getTabIndex
public int getTabIndex()
-
setAccessKey
public void setAccessKey(char key)
-
setFocus
public void setFocus(boolean focused)
-
setTabIndex
public void setTabIndex(int index)
-
apply
public final <C> void apply(Decoration decoration, C context)
CallssafeApply(Decoration, Object)if the decoration is supported and has not been applied yet.
-
unapply
public final void unapply(Decoration decoration)
CallssafeUnapply(Decoration)if the decoration is supported and has been applied.
-
getId
public String getId()
-
setLabel
public void setLabel(String label)
-
asString
public default String asString(T value)
-
apply
public default void apply(Decoration decoration)
-
-