Class PageList

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.ComboBoxModel, javax.swing.ListModel, javax.swing.MutableComboBoxModel

    public class PageList
    extends javax.swing.DefaultComboBoxModel
    A list of AbstractDialogPage or its subclasses. It is used by MultiplePageDialog and Wizard.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractListModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      PageList()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void append​(AbstractDialogPage page)
      Appends a page to the end of the list.
      void clear()
      Clear the page list.
      AbstractDialogPage getCurrentPage()
      Gets the current selected page.
      AbstractDialogPage getPage​(int i)
      Gets the page at position.
      AbstractDialogPage getPageByFullTitle​(java.lang.String title)
      If you know the full title of any page, use this method to get the actual page from the list.
      int getPageCount()
      Gets the page count in the list.
      int getPageIndexByFullTitle​(java.lang.String title)
      Gets the page index if you know the full title of the page.
      java.util.List<java.lang.String> getPageTitlesAsList()
      Gets the all page titles as vector.
      void insertAfter​(AbstractDialogPage page, java.lang.String title)
      Inserts a page after the page with the specified full title.
      void remove​(AbstractDialogPage page)
      Removes a page from the page list.
      void setCurrentPage​(AbstractDialogPage page)
      Sets the current selected page.
      protected boolean setCurrentPage​(AbstractDialogPage page, java.lang.Object source)  
      • Methods inherited from class javax.swing.DefaultComboBoxModel

        addAll, addAll, addElement, getElementAt, getIndexOf, getSelectedItem, getSize, insertElementAt, removeAllElements, removeElement, removeElementAt, setSelectedItem
      • Methods inherited from class javax.swing.AbstractListModel

        addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.ListModel

        addListDataListener, removeListDataListener
    • Constructor Detail

      • PageList

        public PageList()
    • Method Detail

      • getPageByFullTitle

        public AbstractDialogPage getPageByFullTitle​(java.lang.String title)
        If you know the full title of any page, use this method to get the actual page from the list.
        Parameters:
        title - the full title.
        Returns:
        the page with the title.
      • getPageIndexByFullTitle

        public int getPageIndexByFullTitle​(java.lang.String title)
        Gets the page index if you know the full title of the page.
        Parameters:
        title - the full title.
        Returns:
        the page index.
      • getPageCount

        public int getPageCount()
        Gets the page count in the list.
        Returns:
        the page count in the list.
      • append

        public void append​(AbstractDialogPage page)
        Appends a page to the end of the list.
        Parameters:
        page - the page to be appended.
      • remove

        public void remove​(AbstractDialogPage page)
        Removes a page from the page list.
        Parameters:
        page - page to be removed.
      • clear

        public void clear()
        Clear the page list.
      • insertAfter

        public void insertAfter​(AbstractDialogPage page,
                                java.lang.String title)
        Inserts a page after the page with the specified full title. If we cannot find the page with the specified title, the page will be added to the end as append(page).
        Parameters:
        page - page to be inserted.
        title - the title of the page after when the new page will be inserted.
      • getPage

        public AbstractDialogPage getPage​(int i)
        Gets the page at position.
        Parameters:
        i - the index
        Returns:
        the page.
      • getPageTitlesAsList

        public java.util.List<java.lang.String> getPageTitlesAsList()
        Gets the all page titles as vector.
        Returns:
        the vector which has all the page titles.
      • getCurrentPage

        public AbstractDialogPage getCurrentPage()
        Gets the current selected page.
        Returns:
        the current selected page.
      • setCurrentPage

        public void setCurrentPage​(AbstractDialogPage page)
        Sets the current selected page.
        Parameters:
        page - the dialog page.
      • setCurrentPage

        protected boolean setCurrentPage​(AbstractDialogPage page,
                                         java.lang.Object source)