Class Label
- All Implemented Interfaces:
Attachable, ElementAttributeMethods<HTMLElement, Label>, ElementClassListMethods<HTMLElement, Label>, ElementConsumerMethods<HTMLElement, Label>, ElementContainerMethods<HTMLElement, Label>, ElementEventMethods<HTMLElement, Label>, ElementIdMethods<HTMLElement, Label>, ElementQueryMethods<HTMLElement>, ElementTextDelegate<HTMLElement, Label>, ElementTextMethods<HTMLElement, Label>, HTMLElementAttributeMethods<HTMLElement, Label>, HTMLElementDataMethods<HTMLElement, Label>, HTMLElementStyleMethods<HTMLElement, Label>, HTMLElementVisibilityMethods<HTMLElement, Label>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, Label>, Closeable<HTMLElement, Label>, Component, ComponentIcon<HTMLElement, Label>, ComponentIconAndText<HTMLElement, Label>, HasIdentifier<HTMLElement, Label>, HasValue<String>, ComponentContext<HTMLElement, Label>, Modifiers.Compact<HTMLElement, Label>, Modifiers.Disabled<HTMLElement, Label>
public class Label
extends BaseComponent<HTMLElement, Label>
implements Attachable, Closeable<HTMLElement, Label>, Modifiers.Compact<HTMLElement, Label>, ComponentContext<HTMLElement, Label>, ComponentIcon<HTMLElement, Label>, ComponentIconAndText<HTMLElement, Label>, Modifiers.Disabled<HTMLElement, Label>, ElementTextDelegate<HTMLElement, Label>, HasIdentifier<HTMLElement, Label>, HasValue<String>
The label component allows users to add specific element captions for user clarity and convenience.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionariaCloseLabel(String label) voidattach(MutationRecord mutationRecord) clickable(ComponentHandler<Label> clickHandler) closable()closable(CloseHandler<Label> closeHandler) voidvoiddetach(MutationRecord mutationRecord) disabled(boolean disabled) Adds/removes modifier(disabled)editable()editable(LabelEditCancelHandler cancelHandler, LabelEditCompleteHandler completeHandler) booleanfilled()Same as filled(true)filled(boolean filled) Adds/removes modifier(filled)<T> TRetrieves the value associated with the given key from the ComponentContext.booleanDetermines whether a value is stored with the specified key.inthashCode()iconAndText(Element icon, String text, IconPosition iconPosition) Retrieves the identifier associated with this component.static Labelstatic Labelstatic Labelstatic Labelstatic <E extends HTMLElement>
Labellabel(HTMLContainerBuilder<E> builder, String identifier, String text, Color color) onClick(ComponentHandler<Label> clickHandler) onClose(CloseHandler<Label> closeHandler) onEditCancel(LabelEditCancelHandler cancelHandler) onEditComplete(LabelEditCompleteHandler completeHandler) outline()Same as outline(true)outline(boolean outline) Adds/removes modifier(outline)<T> LabelStores a value associated with a key.text()textMaxWidth(String maxWidth) that()value()Methods inherited from class BaseComponent
componentType, element, registerComponentMethods inherited from interface ComponentContext
get, getMethods inherited from interface ComponentIcon
iconMethods inherited from interface ComponentIconAndText
iconAndText, iconAndTextMethods inherited from interface ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface ElementConsumerMethods
apply, runMethods inherited from interface ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface ElementEventMethods
on, on, onMethods inherited from interface ElementIdMethods
id, uniqueIdMethods inherited from interface ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface HTMLElementAttributeMethods
titleMethods inherited from interface HTMLElementDataMethods
data, dataMethods inherited from interface HTMLElementVisibilityMethods
hiddenMethods inherited from interface Modifiers.Compact
compact, compactMethods inherited from interface Modifiers.Disabled
disabled, isDisabled
-
Method Details
-
label
-
label
-
label
-
label
-
label
public static <E extends HTMLElement> Label label(HTMLContainerBuilder<E> builder, String identifier, String text, Color color) -
textDelegate
- Specified by:
textDelegatein interfaceElementTextDelegate<HTMLElement, Label>
-
attach
- Specified by:
attachin interfaceAttachable
-
detach
- Specified by:
detachin interfaceAttachable
-
equals
-
hashCode
-
disabled
Description copied from interface:Modifiers.DisabledAdds/removes modifier(disabled)- Specified by:
disabledin interfaceModifiers.Disabled<HTMLElement, Label>
-
filled
Same as filled(true) -
filled
Adds/removes modifier(filled) -
outline
Same as outline(true) -
outline
Adds/removes modifier(outline) -
closable
-
closable
-
clickable
-
clickable
-
editable
-
editable
public Label editable(LabelEditCancelHandler cancelHandler, LabelEditCompleteHandler completeHandler) -
icon
- Specified by:
iconin interfaceComponentIcon<HTMLElement, Label>
-
removeIcon
- Specified by:
removeIconin interfaceComponentIcon<HTMLElement, Label>
-
iconAndText
- Specified by:
iconAndTextin interfaceComponentIconAndText<HTMLElement, Label>
-
href
-
status
-
text
- Specified by:
textin interfaceElementTextDelegate<HTMLElement, Label>- Specified by:
textin interfaceElementTextMethods<HTMLElement, Label>
-
textMaxWidth
-
store
Description copied from interface:ComponentContextStores a value associated with a key.- Specified by:
storein interfaceComponentContext<HTMLElement, Label>- Type Parameters:
T- the type of the value being stored- Parameters:
key- the key associated with the valuevalue- the value to be stored
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement, Label>
-
ariaCloseLabel
-
onClose
- Specified by:
onClosein interfaceCloseable<HTMLElement, Label>
-
onClick
-
onEditCancel
-
onEditComplete
-
identifier
Description copied from interface:HasIdentifierRetrieves the identifier associated with this component.- Specified by:
identifierin interfaceHasIdentifier<HTMLElement, Label>- Returns:
- the identifier of the component
-
has
Description copied from interface:ComponentContextDetermines whether a value is stored with the specified key.- Specified by:
hasin interfaceComponentContext<HTMLElement, Label>- Parameters:
key- the key to check- Returns:
- true if a value is stored with the specified key, false otherwise
-
get
Description copied from interface:ComponentContextRetrieves the value associated with the given key from the ComponentContext.- Specified by:
getin interfaceComponentContext<HTMLElement, Label>- Type Parameters:
T- the type of the value being retrieved- Parameters:
key- the key associated with the value- Returns:
- the value associated with the key, or null if no value is found
-
value
-
text
- Specified by:
textin interfaceElementTextDelegate<HTMLElement, Label>- Specified by:
textin interfaceElementTextMethods<HTMLElement, Label>
-
close
- Specified by:
closein interfaceCloseable<HTMLElement, Label>
-