Module io.github.mmm.ui.spi.core
Package io.github.mmm.ui.spi.widget
Class AbstractUiNativeWidgetWrapper<W>
- java.lang.Object
-
- io.github.mmm.ui.api.widget.AbstractUiWidget
-
- io.github.mmm.ui.spi.widget.AbstractUiNativeWidget
-
- io.github.mmm.ui.spi.widget.AbstractUiNativeWidgetWrapper<W>
-
- Type Parameters:
W
- type of thewidget
.
- All Implemented Interfaces:
EventSource<UiEvent,UiEventListener>
,AttributeReadEnabled
,AttributeReadId
,AttributeReadValid
,AttributeReadVisible
,AttributeWriteEnabled
,AttributeWriteId
,AttributeWriteReadOnly
,AttributeWriteTooltip
,AttributeWriteValidationFailure
,AttributeWriteVisible
,UiNativeWidget
,UiWidget
,UiNativeWidgetWrapper<W>
- Direct Known Subclasses:
FxWidget
,TestWidget
,TvmWidget
public abstract class AbstractUiNativeWidgetWrapper<W> extends AbstractUiNativeWidget implements UiNativeWidgetWrapper<W>
Abstract base implementation ofUiNativeWidget
implementinggetStyles()
.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
STYLE_INVALID
-
-
Constructor Summary
Constructors Constructor Description AbstractUiNativeWidgetWrapper()
The constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected UiStyles
createDefaultStyles()
protected UiStyles
createStyles()
String
getId()
This method gets the unique identifier of this object.UiStyles
getStyles()
String
getTooltip()
protected void
onStylesChanged(String newStyles)
void
setId(String id)
Use this method to give the object a meaningful identifier after creation.protected abstract void
setIdNative(String id)
void
setTooltip(String tooltip)
protected abstract void
setTooltipNative(String newTooltip)
-
Methods inherited from class io.github.mmm.ui.spi.widget.AbstractUiNativeWidget
addListener, dispose, doDispose, doGetEnabledState, doGetVisibleState, doSetEnabledState, doSetEnabledState, doSetValidationFailure, doSetVisibleState, doSetVisibleState, ensureHandlers, fireEvent, getEventAdapter, getParent, getProgrammaticEventType, getReadOnlyFixed, getValidationFailure, hasListeners, isDisposed, isEnabled, isInitiallyVisible, isReadOnly, isValid, isVisible, isVisibleWithoutRoot, registerHandlers, removeListener, requireNotDisposed, setEnabled, setEnabledNative, setParent, setProgrammaticEventType, setReadOnly, setReadOnlyFixed, setReadOnlyNative, setValidationFailure, setVisible, setVisibleNative, unwrap, validateDown
-
Methods inherited from class io.github.mmm.ui.api.widget.AbstractUiWidget
isEmpty, setParent, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.mmm.ui.api.attribute.AttributeWriteValidationFailure
setValidationFailure
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Methods inherited from interface io.github.mmm.ui.spi.widget.UiNativeWidgetWrapper
getTopWidget, getWidget
-
Methods inherited from interface io.github.mmm.ui.api.widget.UiWidget
cast, dispose, getModificationTimestamp, getParent, getReadOnlyFixed, isDisposed, isEnabled, isEnabled, isFocused, isModified, isReadOnly, isValid, isVisible, isVisible, reset, setEnabled, setEnabled, setFocused, setReadOnly, setReadOnlyFixed, setVisible, setVisible, validate, validate, validate, validateDown, validateUp
-
-
-
-
Method Detail
-
getStyles
public UiStyles getStyles()
-
createStyles
protected UiStyles createStyles()
- Returns:
- the
UiStyles
implementation used bygetStyles()
.
-
createDefaultStyles
protected final UiStyles createDefaultStyles()
- Returns:
- the
UiStyles
implementation used bygetStyles()
.
-
onStylesChanged
protected void onStylesChanged(String newStyles)
- Parameters:
newStyles
- the new styles.
-
getTooltip
public final String getTooltip()
- Specified by:
getTooltip
in interfaceAttributeWriteTooltip
- Returns:
- the text of this object. It is a brief description that explains this object to the end-user. Will be the
empty
String
if no tooltip is specified.
-
setTooltip
public final void setTooltip(String tooltip)
- Specified by:
setTooltip
in interfaceAttributeWriteTooltip
- Parameters:
tooltip
- is the new value ofAttributeWriteTooltip.getTooltip()
.
-
setTooltipNative
protected abstract void setTooltipNative(String newTooltip)
- Parameters:
newTooltip
- the new tooltip to apply.
-
getId
public String getId()
Description copied from interface:AttributeReadId
This method gets the unique identifier of this object.
ATTENTION:
In order to be compliant with all possible UI toolkit implementations, a valid ID has to fulfill ECMA-262, Section 7.6. It is recommended to use IDs of the form[a-zA-Z][a-zA-Z0-9_$]*
. Invalid IDs (e.g. containing colon, hash or period) will cause complications with CSS selectors.- Specified by:
getId
in interfaceAttributeReadId
- Returns:
- the ID of this object.
-
setId
public void setId(String id)
Description copied from interface:AttributeWriteId
Use this method to give the object a meaningful identifier after creation.
ATTENTION:
See JavaDoc ofAttributeReadId.getId()
for the syntax constraints of IDs.- Specified by:
setId
in interfaceAttributeWriteId
- Parameters:
id
- is the newID
for the object.- See Also:
AttributeReadId.getId()
-
-