Class NotificationOptionDialogFrame

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, com.globalmentor.model.MutableValued<Notification.Option>, com.globalmentor.model.Valued<Notification.Option>, io.clogr.Clogged, Component, CompositeComponent, ContentComponent, Control, DialogFrame<Notification.Option>, Frame, InputFocusableComponent, InputFocusGroupComponent, ModalComponent<Frame.Mode>, OptionDialogFrame<Notification.Option>, ValueControl<Notification.Option>, ValuedComponent<Notification.Option>, Displayable, Enableable, InfoModel, LabelModel, Model, PresentationModel, ValueModel<Notification.Option>, DepictedObject
Direct Known Subclasses:
MessageOptionDialogFrame

public class NotificationOptionDialogFrame extends AbstractOptionDialogFrame<Notification.Option>
Default implementation of a frame for communication of an option such as "OK" or "Cancel". An option frame defaults to a single composite child panel with a row of options along the bottom. The contents of an option dialog frame should be accessed by AbstractOptionDialogFrame.getOptionContent() and AbstractOptionDialogFrame.setOptionContent(Component).

This class binds the command ProcessCommand.CONTINUE to the button for the first non-fatal option.

Author:
Garret Wilson
  • Constructor Details

    • NotificationOptionDialogFrame

      public NotificationOptionDialogFrame(Notification.Option... options)
      Options constructor. Duplicate options are ignored.
      Parameters:
      options - The available options.
      Throws:
      NullPointerException - if the given options is null.
    • NotificationOptionDialogFrame

      public NotificationOptionDialogFrame(Notification notification)
      Notification constructor. Duplicate options are ignored.
      Parameters:
      notification - The notification that specifies the message and options.
      Throws:
      NullPointerException - if the given notification is null. #see TextBox
    • NotificationOptionDialogFrame

      public NotificationOptionDialogFrame(String text, Notification.Option... options)
      Text constructor with a default Text.PLAIN_MEDIA_TYPE content type. Duplicate options are ignored.
      Parameters:
      text - The text, which may include a resource reference, or null if there is no text.
      options - The available options.
      Throws:
      NullPointerException - if the given options is null. #see TextBox
    • NotificationOptionDialogFrame

      public NotificationOptionDialogFrame(String text, com.globalmentor.net.MediaType textContentType, Notification.Option... options)
      Text and content type constructor Duplicate options are ignored.
      Parameters:
      text - The text, which may include a resource reference, or null if there is no text.
      textContentType - The content type of the text.
      options - The available options.
      Throws:
      NullPointerException - if the given content type and/or options is null.
      IllegalArgumentException - if the given content type is not a text content type. #see TextBox
    • NotificationOptionDialogFrame

      public NotificationOptionDialogFrame(Component component, Notification.Option... options)
      Component and options constructor. Duplicate options are ignored.
      Parameters:
      component - The single child component, or null if this frame should have no child component.
      options - The available options.
      Throws:
      NullPointerException - if the given options is null.
    • NotificationOptionDialogFrame

      public NotificationOptionDialogFrame(ValueModel<Notification.Option> valueModel, Notification.Option... options)
      Value model, and options constructor. Duplicate options are ignored.
      Parameters:
      valueModel - The frame value model.
      options - The available options.
      Throws:
      NullPointerException - if the given value model and or options is null.
    • NotificationOptionDialogFrame

      public NotificationOptionDialogFrame(ValueModel<Notification.Option> valueModel, Component component, Notification.Option... options)
      Value model, component, and options constructor. Duplicate options are ignored.
      Parameters:
      valueModel - The frame value model.
      component - The component representing the content of the option dialog frame, or null if there is no content component.
      options - The available options.
      Throws:
      NullPointerException - if the given value model and/or options is null.
  • Method Details