public class AttachDetachException extends UmbrellaException
Modifier and Type | Class and Description |
---|---|
static interface |
AttachDetachException.Command
The command to execute when iterating through child widgets.
|
Constructor and Description |
---|
AttachDetachException(Set<Throwable> causes)
Construct a new
AttachDetachException . |
Modifier and Type | Method and Description |
---|---|
static void |
tryCommand(AttachDetachException.Command c,
IsWidget... widgets)
Iterator through all child widgets, trying to perform the specified
AttachDetachException.Command for each. |
static void |
tryCommand(Iterable<Widget> hasWidgets,
AttachDetachException.Command c)
Iterator through all child widgets, trying to perform the specified
AttachDetachException.Command for each. |
getCauses, makeCause, makeMessage
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace, toString
public AttachDetachException(Set<Throwable> causes)
AttachDetachException
.causes
- the causes of the exceptionpublic static void tryCommand(Iterable<Widget> hasWidgets, AttachDetachException.Command c)
Iterator through all child widgets, trying to perform the specified
AttachDetachException.Command
for each. All widgets will be visited even if the Command
throws an exception. If one or more exceptions occur, they will be combined
and thrown as a single AttachDetachException
.
Use this method when attaching or detaching a widget with children to ensure that the logical and physical state of all children match the logical and physical state of the parent.
hasWidgets
- children to iteratec
- the AttachDetachException.Command
to try on all childrenpublic static void tryCommand(AttachDetachException.Command c, IsWidget... widgets)
Iterator through all child widgets, trying to perform the specified
AttachDetachException.Command
for each. All widgets will be visited even if the Command
throws an exception. If one or more exceptions occur, they will be combined
and thrown as a single AttachDetachException
.
Use this method when attaching or detaching a widget with children to ensure that the logical and physical state of all children match the logical and physical state of the parent.
c
- the AttachDetachException.Command
to try on all childrenwidgets
- children to iterate, null children are ignoredCopyright © 2018. All rights reserved.