public class ValidateableDialogDecorator extends AbstractDialogDecorator<HeaderDialog> implements ValidateableDialogDecorator
| Constructor and Description |
|---|
ValidateableDialogDecorator(HeaderDialog dialog)
Creates a new decorator, which allows to modify the view hierarchy of a dialog, which is
designed according to Android 5's Material design guidelines even on pre-Lollipop devices and
can be validated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAllValidators(java.util.Collection<DialogValidator> validators)
Adds all validators, which are contained by a specific collection and should be executed when
the positive button of the dialog is clicked.
|
void |
addValidator(DialogValidator validator)
Adds a new validator, which should be executed when the positive button of the dialog is
clicked.
|
java.util.Set<DialogValidator> |
getValidators()
Returns a set, which contains the validators, which are executed when the positive button of
the dialog is clicked.
|
protected void |
onAttach(android.view.View view)
The method, which is invoked, when the decorator is attached to the view hierarchy.
|
protected void |
onDetach()
The method, which is invoked, when the decorator is detached from the view hierarchy.
|
void |
onRestoreInstanceState(android.os.Bundle savedInstanceState)
The method, which is invoked in order to restore the state, which has previously stored
within a bundle.
|
void |
onSaveInstanceState(android.os.Bundle outState)
The method, which is invoked in order to stores the decorator's state.
|
void |
removeAllValidators(java.util.Collection<DialogValidator> validators)
Removes all validators, which are contained by a specific collection and should not be
executed, when the positive button of the dialog is clicked, anymore.
|
void |
removeValidator(DialogValidator validator)
Removes a specific validator, which should not be executed, when the positive button of the
dialog is clicked, anymore.
|
attach, detach, getContext, getDialog, getViewclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContextpublic ValidateableDialogDecorator(HeaderDialog dialog)
dialog - The dialog, whose view hierarchy should be modified by the decorator, as an instance
of the type HeaderDialog. The dialog may not be nullpublic final java.util.Set<DialogValidator> getValidators()
ValidateableDialogDecoratorgetValidators in interface ValidateableDialogDecoratorSet or an empty set, if no
validators are executedpublic final void addValidator(DialogValidator validator)
ValidateableDialogDecoratoraddValidator in interface ValidateableDialogDecoratorvalidator - The validator, which should be added, as an instance of the type DialogValidator. The validator may not be nullpublic final void addAllValidators(java.util.Collection<DialogValidator> validators)
ValidateableDialogDecoratoraddAllValidators in interface ValidateableDialogDecoratorvalidators - A collection, which contains all validators, which should be added, as an instance of
the type Collection or an empty collection, if no validators should be addedpublic final void removeValidator(DialogValidator validator)
ValidateableDialogDecoratorremoveValidator in interface ValidateableDialogDecoratorvalidator - The validator, which should be removed, as an instance of the type DialogValidator. The validator may not be nullpublic final void removeAllValidators(java.util.Collection<DialogValidator> validators)
ValidateableDialogDecoratorremoveAllValidators in interface ValidateableDialogDecoratorvalidators - A collection, which contains the validators, which should be removed, as an instance
of the type Collection or an empty collection, if no validators should be
removedpublic final void onSaveInstanceState(android.os.Bundle outState)
DialogDecoratoronSaveInstanceState in interface DialogDecoratoroutState - The bundle, the decorator's state should be stored within, as an instance of the
class Bundle. The bundle may not be nullpublic final void onRestoreInstanceState(android.os.Bundle savedInstanceState)
DialogDecoratoronRestoreInstanceState in interface DialogDecoratorsavedInstanceState - The bundle, which has been used to store the state, as an instance of the class
Bundle. The bundle may not be nullprotected final void onAttach(android.view.View view)
AbstractDialogDecoratoronAttach in class AbstractDialogDecorator<HeaderDialog>view - The root view of the dialog, which is modified by the decorator, as an instance of
the class View. The view may not be nullprotected final void onDetach()
AbstractDialogDecoratoronDetach in class AbstractDialogDecorator<HeaderDialog>