Class AttachDetachException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.google.web.bindery.event.shared.UmbrellaException
-
- com.google.gwt.event.shared.UmbrellaException
-
- com.google.gwt.user.client.ui.AttachDetachException
-
- All Implemented Interfaces:
java.io.Serializable
public class AttachDetachException extends UmbrellaException
An exception that is thrown when the panel fails to attach or detach its children.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AttachDetachException.Command
The command to execute when iterating through child widgets.
-
Field Summary
Fields Modifier and Type Field Description (package private) static AttachDetachException.Command
attachCommand
The singleton command used to attach widgets.(package private) static AttachDetachException.Command
detachCommand
The singleton command used to detach widgets.
-
Constructor Summary
Constructors Constructor Description AttachDetachException(java.util.Set<java.lang.Throwable> causes)
Construct a newAttachDetachException
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
tryCommand(AttachDetachException.Command c, IsWidget... widgets)
Iterator through all child widgets, trying to perform the specifiedAttachDetachException.Command
for each.static void
tryCommand(java.lang.Iterable<Widget> hasWidgets, AttachDetachException.Command c)
Iterator through all child widgets, trying to perform the specifiedAttachDetachException.Command
for each.-
Methods inherited from class com.google.web.bindery.event.shared.UmbrellaException
getCauses, makeCause, makeMessage
-
-
-
-
Field Detail
-
attachCommand
static final AttachDetachException.Command attachCommand
The singleton command used to attach widgets.
-
detachCommand
static final AttachDetachException.Command detachCommand
The singleton command used to detach widgets.
-
-
Constructor Detail
-
AttachDetachException
public AttachDetachException(java.util.Set<java.lang.Throwable> causes)
Construct a newAttachDetachException
.- Parameters:
causes
- the causes of the exception
-
-
Method Detail
-
tryCommand
public static void tryCommand(java.lang.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 singleAttachDetachException
.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.
- Parameters:
hasWidgets
- children to iteratec
- theAttachDetachException.Command
to try on all children
-
tryCommand
public 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 singleAttachDetachException
.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.
- Parameters:
c
- theAttachDetachException.Command
to try on all childrenwidgets
- children to iterate, null children are ignored
-
-