home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / prosrc.bin / TvEventHandler.java < prev    next >
Encoding:
Java Source  |  1998-03-18  |  4.7 KB  |  97 lines

  1. /*
  2.  * Copyright (c) 1996 Krumel & Associates, Inc. All Rights Reserved.
  3.  *
  4.  * www.krumel.com - controls@krumel.com
  5.  *
  6.  * Permission is given to the buyer of this package for one software
  7.  * developer to use this software on one CPU (one workstation) and to make
  8.  * one backup copy.  You may uitilize and/or modify this class for use in your
  9.  * projects.  You may distribute or sell any executable which results from
  10.  * using this code in yur application, except a utility or class of similar
  11.  * nature to this product.  You may distribute this product in compiled
  12.  * form only, but soley to be used with your cmpiled executable product
  13.  * for the puposes of dynamic loading. You may NOT redistribute the source
  14.  * code in any form or make it accessible through a network or other
  15.  * distribution media to others. Please refer to the file "copyright.html"
  16.  * for further important copyright and licensing information.
  17.  *
  18.  * The source code is the confidential and proprietary information
  19.  * of Krumel & Associates, Inc. ("Confidential Information").  You shall
  20.  * not disclose such Confidential Information and shall use it only in
  21.  * accordance with the terms of the license agreement you entered into
  22.  * with Krumel & Associates, Inc..
  23.  
  24.  * KRUMEL & ASSOCIATES MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
  25.  * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
  26.  * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  27.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. KRUMEL & ASSOCIATES SHALL NOT
  28.  * BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
  29.  * MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  30.  */
  31.  
  32. package symantec.itools.db.awt;
  33.  
  34. import java.awt.Event;
  35. import symantec.itools.db.awt.event.CellEvent;
  36. import symantec.itools.db.awt.event.TableEvent;
  37.  
  38. /**
  39.  * This interface is implemented by all classes that will serve as event
  40.  * handlers for a TableView. An event handler is an object that receives
  41.  * notification of all events and any exceptions that occur during user
  42.  * interaction with the table view. Events are divided into categories
  43.  * based on what generated the event: cell, row heading, column heading,
  44.  * or toolbar control. Exceptions prevent a unique design challenge for
  45.  * controls.  The table view is designed to run without forcing the
  46.  * developer to register and intercept events; instead,
  47.  */
  48. public interface TvEventHandler extends java.io.Serializable {
  49.     /**
  50.      * Called by the TableView when an event handler is installed.  This
  51.      * method provides the event handler a chance to perform any view
  52.      * initialization and set an instance variable for later use.
  53.      */
  54.     void setupView(TableView v);
  55.     /**
  56.      * Called by the TableView when the user triggers an event that occurs
  57.      * within the context of a normal cell, i.e. not a heading cell.
  58.      * @param e The event object. The source is set to the TableView.
  59.      * @param cell The cell that generated the event.
  60.      */
  61.     void handleCellEvent(CellEvent e, TableCell cell);
  62.     /**
  63.      * Called by the TableView when the user triggers an event that occurs
  64.      * within the context of a column heading.
  65.      * @param e The event object. The source is set to the TableView.
  66.      * @param cell The cell that generated the event.
  67.      */
  68.     void handleColHeadingEvent(CellEvent e, TableCell cell);
  69.     /**
  70.      * Called by the TableView when the user triggers an event that occurs
  71.      * within the context of a row heading heading.
  72.      * @param e The event object. The source is set to the TableView.
  73.      * @param cell The cell that generated the event.
  74.      */
  75.     void handleRowHeadingEvent(CellEvent e, TableCell cell);
  76.     /**
  77.      * Called by the TableView when the user triggers an event that occurs
  78.      * within the context of the corner cell.
  79.      * @param e The event object. The source is set to the TableView.
  80.      * @param cell The cell that generated the event.
  81.      */
  82.     void handleCornerCellEvent(CellEvent e, TableCell cell);
  83.    /**
  84.     * Called by the TableView when the users triggers an event outside
  85.     * the scope of any cell, usually a component located on the toolbar.
  86.     * @param e The unchanged event that was generated.
  87.     */
  88.     void handleTableEvent(TableEvent e);
  89.     /**
  90.      * Called by the TableView when an exception is generated within
  91.      * the TableView framework.  If the exception occured due to some function
  92.      * or event related to a cell, the coordinates of the cell are passed into
  93.      * the method.  This method provides a convinient place to display messages
  94.      * to the user.
  95.      */
  96.     void handleException(Coordinate pos, Exception exc);
  97. }