Class AttachDetachException

All Implemented Interfaces:
Serializable

public class AttachDetachException extends UmbrellaException
An exception that is thrown when the panel fails to attach or detach its children.
See Also:
  • Field Details

  • Constructor Details

    • AttachDetachException

      public AttachDetachException(Set<Throwable> causes)
      Construct a new AttachDetachException.
      Parameters:
      causes - the causes of the exception
  • Method Details

    • tryCommand

      public 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.

      Parameters:
      hasWidgets - children to iterate
      c - the AttachDetachException.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 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.

      Parameters:
      c - the AttachDetachException.Command to try on all children
      widgets - children to iterate, null children are ignored