public interface HasEnabled extends HasElement
Element may be implicitly or explicitly disabled.
An implicitly disabled element becomes enabled automatically if its disabled ascendant becomes enabled.
Element may be explicitly disabled being in a disabled parent. Such element remains disabled when its parent becomes enabled.
Note that an element may change its enabled state if it's inside disabled parent and it becomes detached from it. In this case if it has not been explicitly disabled then it becomes enabled until it's attached. If the new parent is enabled then the element remains enabled. Otherwise it becomes disabled again.
|Modifier and Type||Method and Description|
Returns whether the object is enabled or disabled.
Sets the UI object explicitly disabled or enabled.
default void setEnabled(boolean enabled)
falsethen explicitly disables the object, if
truethen enables the object so that its state depends on parent
default boolean isEnabled()
Object may be enabled by itself by but if its ascendant is disabled then it's considered as (implicitly) disabled.
Copyright © 2018. All rights reserved.