Class ToggleSwitchEditor
- java.lang.Object
-
- org.dashbuilder.common.client.editor.ToggleSwitchEditor
-
- All Implemented Interfaces:
com.google.gwt.editor.client.Editor<Boolean>,com.google.gwt.editor.client.HasEditorErrors<Boolean>,com.google.gwt.editor.client.LeafValueEditor<Boolean>,com.google.gwt.user.client.TakesValue<Boolean>,com.google.gwt.user.client.ui.IsWidget,LeafAttributeEditor<Boolean>
@Dependent public class ToggleSwitchEditor extends Object implements com.google.gwt.user.client.ui.IsWidget, LeafAttributeEditor<Boolean>
Provides an editor for Boolean values using a toggle switch for the view.
It displays the editor errors using a bootstrap tooltip.
- Since:
- 0.4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceToggleSwitchEditor.View
-
Field Summary
Fields Modifier and Type Field Description ToggleSwitchEditor.Viewview
-
Constructor Summary
Constructors Constructor Description ToggleSwitchEditor(ToggleSwitchEditor.View view, javax.enterprise.event.Event<ValueChangeEvent<Boolean>> valueChangeEvent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gwt.user.client.ui.WidgetasWidget()BooleangetValue()voidinit()voidsetEnabled(boolean isEnabled)voidsetValue(Boolean value)voidshowErrors(List<com.google.gwt.editor.client.EditorError> errors)
-
-
-
Field Detail
-
view
public ToggleSwitchEditor.View view
-
-
Constructor Detail
-
ToggleSwitchEditor
@Inject public ToggleSwitchEditor(ToggleSwitchEditor.View view, javax.enterprise.event.Event<ValueChangeEvent<Boolean>> valueChangeEvent)
-
-
Method Detail
-
init
@PostConstruct public void init()
-
setEnabled
public void setEnabled(boolean isEnabled)
-
showErrors
public void showErrors(List<com.google.gwt.editor.client.EditorError> errors)
- Specified by:
showErrorsin interfacecom.google.gwt.editor.client.HasEditorErrors<Boolean>
-
asWidget
public com.google.gwt.user.client.ui.Widget asWidget()
- Specified by:
asWidgetin interfacecom.google.gwt.user.client.ui.IsWidget
-
setValue
public void setValue(Boolean value)
- Specified by:
setValuein interfacecom.google.gwt.user.client.TakesValue<Boolean>
-
-