Interface Enableable<S extends Enableable<S>>
- Type Parameters:
S- the implementation's own type, which the setter returns
- All Known Subinterfaces:
AbsolutePanel, AnchorPanel, Avatar, BusyIndicator, Button, CalendarView, CheckBox, CheckMenuItem, ColorPicker, ComboBox<T>, Component<T>, Container<T>, CycleButton<T>, DatePicker, DateTimePicker, DropDownButton, Expander, Flyout, GridPanel, GridView<T>, Image, InfoBar, Label, ListView<T>, Menu, MenuBar, MenuItem, MessageBox, NavigationItem, NavigationView, PasswordTextBox, ProgressBar, RadioButton, RadioMenuItem, ScrollBar, ScrollPanel, Separator, Slider, Spacer, Spinner, SplitPane, StackPanel, SubmenuItem, Tab, TabBar, TableView<T>, TextArea, TextBox, TimePicker, ToggleButton, ToggleSwitch, TreeView<T>, Window, WrapPanel
- All Known Implementing Classes:
CustomComponent, CustomComposite, CustomContainer
public interface Enableable<S extends Enableable<S>>
Something the user can be kept from using: every
Component, and the entries that controls hold, a
MenuItem, CheckMenuItem,
RadioMenuItem,
SubmenuItem, Tab or
NavigationItem. Code that takes an Enableable<?> turns any
of them on and off without a branch for each.
It has no events and does not extend EventTarget, so entries, which are
not event targets, can have it. Each implementation says what disabled means for it. Binding goes through
Component.ENABLED, since entries do not bind.
Do not implement this interface.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether it is enabled.setEnabled(boolean enabled) Enables or disables it.
-
Method Details
-
isEnabled
boolean isEnabled()Returns whether it is enabled.- Returns:
- true unless disabled with
setEnabled(false); true by default
-
setEnabled
Enables or disables it. A disabled component or entry draws its disabled look and does not respond to the user; code can still change it.- Parameters:
enabled- false to disable- Returns:
- this
-