home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / un2maiq4 / pjjava / src / pj / awt / notebook.java < prev    next >
Encoding:
Java Source  |  1996-08-14  |  4.0 KB  |  132 lines

  1. /*---------------------------------------------------------------------------
  2.  
  3.     Written by the Personal Journal developers of Dow Jones & Company, Inc.
  4.  
  5.     Dow Jones makes no representations or warranties about 
  6.     the suitability of this software, either express or 
  7.     implied, including but not limited to the implied warranties 
  8.     of merchantability, fitness for a particular purpose, 
  9.     or non-infringement.  Dow Jones will not be liable for 
  10.     any damages suffered by a user as a result of using, 
  11.     modifying or distributing this software or its derivatives.
  12.  
  13.  
  14.     @(#)Notebook.java  0.00 01-Jan-96
  15.  
  16.         A UI component that holds and displays pages.
  17.  
  18.  
  19.     Authors:
  20.  
  21.         rphall   Rick Hall
  22.  
  23.  
  24.     Version Ident:
  25.  
  26.         $Header$
  27.  
  28.  
  29.     History:
  30.  
  31.         0.00 01-Jan-96  rphall      Initial Creation
  32.  
  33. ---------------------------------------------------------------------------*/
  34.  
  35. package pj.awt;
  36.  
  37. import pj.awt.Divider;
  38. import pj.awt.Page;
  39.  
  40. import java.lang.String;
  41.  
  42. import collections.ImplementationError;
  43.  
  44. /**
  45.  * A UI component that holds and displays pages and dividers.
  46.  * Pages and dividers are maintained in the sequence that they are
  47.  * added to the notebook.  Pages and dividers may be displayed in sequence
  48.  * by first, next, last, and previous operations.  Pages and dividers may be
  49.  * displayed nonsequentially by using a page name to show a particular
  50.  * page or divider.
  51.  * <P>
  52.  * A notebook is responsible for defining the difference between a divider
  53.  * and a page.  Typically, dividers will be associated with a visual tab
  54.  * whereas pages will be untabbed.
  55.  *
  56.  * @see     pj.awt.Divider    
  57.  * @see     pj.awt.Page
  58.  * @version 0.00 01-Jan-96
  59.  * @author  rphall
  60. */
  61. public interface Notebook
  62.     {
  63.  
  64.     // --- Public operations
  65.  
  66.     /**
  67.      * Append a page as the last page in a notebook.
  68.      * If name specifies a page that is a divider, a notebook should
  69.      * guarentee that the divider will appear as "tabbed" in the
  70.      * notebook.
  71.      *
  72.      * @param page  The page to be added.
  73.     */
  74.     public void appendPage(Page page);
  75.  
  76.     
  77.  
  78.     /**
  79.      * @return The count of pages in this notebook.
  80.     */
  81.     public int countPages();
  82.  
  83.     
  84.  
  85.     /**
  86.      * Make the first page topmost in a stack of pages.
  87.      * If the first page is a divider, a notebook should
  88.      * guarentee that the tab associated with the divider appears selected.
  89.      * If the notebook contains no pages, this operation does nothing.
  90.     */
  91.     public void firstPage();
  92.  
  93.     /**
  94.      * Make the next page (after the currently visible page)
  95.      * topmost in a stack of pages.
  96.      * If the next page is a divider, a notebook should
  97.      * guarentee that the tab associated with the divider appears selected.
  98.      * If the last page is already displayed, this operation does nothing.
  99.     */
  100.     public void nextPage();
  101.  
  102.     /**
  103.      * Make the last page topmost in a stack of pages.
  104.      * If last page is a divider, a notebook should
  105.      * guarentee that the tab associated with the divider appears selected.
  106.      * If the notebook contains no pages, this operation does nothing.
  107.     */
  108.     public void lastPage();
  109.  
  110.     /**
  111.      * Make the previous page (before the currently visible page)
  112.      * topmost in a stack of pages.
  113.      * If the previous page is a divider, a notebook should
  114.      * guarentee that the tab associated with the divider appears selected.
  115.      * If the first page is already displayed, this operation does nothing.
  116.     */
  117.     public void previousPage();
  118.  
  119.     
  120.      
  121.     /**
  122.      * Display a page as topmost in a stack of other pages.
  123.      * If name specifies a page that is a divider, a notebook should
  124.      * guarentee that the tab associated with the divider appears selected.
  125.      * If no page exists with the specified name, this operation
  126.      * does nothing.
  127.      * @param name The name of the page to display.
  128.     */
  129.     public void page(String name);
  130.  
  131.     } // Notebook
  132.