home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / un2maiq4 / pjjava / src / pj / awt / paperview.java < prev    next >
Encoding:
Java Source  |  1996-08-14  |  2.9 KB  |  107 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.     @(#)PaperView.java  0.00 07-Jan-96
  15.  
  16.         A view onto one or more sections of a Personal Journal paper.
  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 07-Jan-96  rphall      Initial Creation
  32.         0.01 23-Feb-96  Ted S.      Added return values so you know when 
  33.                                     you have hit the end of the views.
  34.                                     Without that you circle forever.
  35.  
  36. ---------------------------------------------------------------------------*/
  37.  
  38. package pj.awt;
  39.  
  40. import pj.awt.Divider;
  41. import pj.awt.Page;
  42.  
  43. import java.lang.String;
  44.  
  45. import collections.ImplementationError;
  46.  
  47. /**
  48.  * A view onto one or more sections of a Personal Journal paper.
  49.  * <P>
  50.  * Views are maintained in a sequence.  The sequence definition is
  51.  * implementation dependent.
  52.   * <P>
  53.  * A PaperView has a cursor into its sequence of views.  The cursor is
  54.  * called the current view.  The current view is the view which the user
  55.  * sees if an implementation instance is showing.  Moving the current view
  56.  * cursor changes the view that a user sees.  The current view cursor may
  57.  * be moved sequentially through a view stack by first, next, last, and
  58.  * previous operations. The current view cursor may be moved to specific
  59.  * view by the setCurrentPage operation.
  60.  *
  61.  * @version 0.00 07-Jan-96
  62.  * @author  rphall
  63. */
  64. public interface PaperView
  65.     {
  66.  
  67.     // --- Public operations
  68.  
  69.     /**
  70.      * @return The number of views in an implementation instance.
  71.     */
  72.     public int countViews();
  73.  
  74.     
  75.  
  76.     /**
  77.      * Make the first view the current view.
  78.     */
  79.     public void firstView();
  80.  
  81.     /**
  82.      * Make the next view (after the current view) the current view.
  83.      *  a false return means you have hit the end.
  84.     */
  85.     public boolean nextView();
  86.  
  87.     /**
  88.      * Make the last view the current view.
  89.     */
  90.     public void lastView();
  91.  
  92.     /**
  93.      * Make the previous view (before current view) the current view.
  94.      *  a false return means you have hit the end.
  95.     */
  96.     public boolean previousView();
  97.  
  98.     
  99.      
  100.     /**
  101.      * Make a specific view the current view.
  102.      * @param idx The index of the view to display.
  103.     */
  104.     public void view(int idx);
  105.  
  106.     } // PaperView
  107.