Class AbstractDialogPage

All Implemented Interfaces:
Laziness, ImageObserver, MenuContainer, Serializable, Accessible

public abstract class AbstractDialogPage extends AbstractPage
AbstractDialogPage is an abstract base class extends AbstractPage. In addition to AbstractPage, this class has some new properties so that it can be used in dialog.
For example, it can support ButtonEvent which is used by ButtonPanel. In addition, it has title, icon, description and parent attribute.
See Also:
  • Field Details

  • Constructor Details

    • AbstractDialogPage

      protected AbstractDialogPage()
      Creates an AbstractDialogPage.
    • AbstractDialogPage

      public AbstractDialogPage(String title)
      Creates an AbstractDialogPage with title.
      Parameters:
      title - the title of the page
    • AbstractDialogPage

      public AbstractDialogPage(String title, String description)
      Creates an AbstractDialogPage with title and icon.
      Parameters:
      title - the title of the page
      description - the description for the page
    • AbstractDialogPage

      public AbstractDialogPage(String title, Icon icon)
      Creates an AbstractDialogPage with title and icon.
      Parameters:
      title - the title of the page
      icon - the icon of the page
    • AbstractDialogPage

      public AbstractDialogPage(String title, String description, Icon icon)
      Creates an AbstractDialogPage with title, icon and description.
      Parameters:
      title - the title of the page
      icon - the icon of the page
      description - the description for the page
    • AbstractDialogPage

      public AbstractDialogPage(String title, String description, Icon icon, AbstractDialogPage parentPage)
      /** Creates an AbstractDialogPage with title, icon, description and its parent.
      Parameters:
      title - the title of the page
      icon - the icon of the page
      description - the description for the page
      parentPage - the parent of the page
  • Method Details

    • addButtonListener

      public void addButtonListener(ButtonListener l)
      Adds a ButtonListener to the page.
      Parameters:
      l - the ButtonListener to be added
    • removeButtonListener

      public void removeButtonListener(ButtonListener l)
      Removes a ButtonListener from the page.
      Parameters:
      l - the ButtonListener to be removed
    • getButtonListeners

      public ButtonListener[] getButtonListeners()
      Returns an array of all the ButtonListeners added to this Page with ButtonListener.
      Returns:
      all of the ButtonListeners added, or an empty array if no listeners have been added
      Since:
      1.4
    • fireButtonEvent

      public void fireButtonEvent(int id)
      Fire button event with id. The only event that doesn't take a button name as parameter is the ButtonEvent.CLEAR_DEFAULT_BUTTON event.
      Parameters:
      id -
    • fireButtonEvent

      public void fireButtonEvent(int id, String buttonName)
      Fire button event with id and button name.
      Parameters:
      id -
      buttonName -
    • fireButtonEvent

      public void fireButtonEvent(int id, String buttonName, String userObject)
      Fire button event with id, button name and user object if needed.
      Parameters:
      id -
      buttonName -
      userObject -
    • getTitle

      public String getTitle()
      Gets the title of the page.
      Returns:
      the title
    • setTitle

      public void setTitle(String title)
      Sets the title of the page.
      Parameters:
      title - the new title
    • getIcon

      public Icon getIcon()
      Gets the icon of the page.
      Returns:
      the icon of the page.
    • setIcon

      public void setIcon(Icon icon)
      Sets the icon of the page.
      Parameters:
      icon - the new icon
    • isPageEnabled

      public boolean isPageEnabled()
      Checks if the page is enabled.
      Returns:
      true if the page is enabled. Otherwise false.
    • setPageEnabled

      public void setPageEnabled(boolean pageEnabled)
      Sets page enabled or disabled. The only place this flag is used right now is in MultiplePageDialog ICON_STYLE and TAB_STYLE. Disabled page will have a disabled icon or tab as indicator.
      Parameters:
      pageEnabled -
    • getDescription

      public String getDescription()
      Gets the description of the page.
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Sets the description of the page.
      Parameters:
      description - the new description
    • getParentPage

      public AbstractDialogPage getParentPage()
      Gets the parent page.
      Returns:
      the parent page
    • setParentPage

      public void setParentPage(AbstractDialogPage parentPage)
      Sets the parent page.
      Parameters:
      parentPage - the parent page
    • getFullTitle

      public String getFullTitle()
      Gets the full title. It is basically a concat of the titles of all its parent with "." in between.
      Returns:
      the full qualified title
    • getDefaultFocusComponent

      public Component getDefaultFocusComponent()
      Gets the default focus component. The default focus component will gain focus when page is shown.
      Returns:
      the default focus component.
    • setDefaultFocusComponent

      public void setDefaultFocusComponent(Component defaultFocusComponent)
      Sets the default focus component. The default focus component will gain focus when page is shown.
      Parameters:
      defaultFocusComponent - a component inside the page.
    • focusDefaultFocusComponent

      public void focusDefaultFocusComponent()
      Focus the default focus component if not null.