// $Id: StructureDocumentEvent.java,v 1.4 2006/10/21 17:52:15 Sasha Buzko Exp $ // // Copyright (c) 2000-2002 San Diego Supercomputer Center (SDSC), // a facility operated jointly by the University of California, // San Diego (UCSD) and General Atomics, San Diego, California, USA. // // Users and possessors of this source code are hereby granted a // nonexclusive, royalty-free copyright and design patent license to // use this code in individual software. License is not granted for // commercial resale, in whole or in part, without prior written // permission from SDSC. This source is provided "AS IS" without express // or implied warranty of any kind. // // For further information, please see: http://mbt.sdsc.edu // // History: // $Log: StructureDocumentEvent.java,v $ // Revision 1.4 2006/10/21 17:52:15 Sasha Buzko // Refactored the project to move all new code to edu.sdsc.sirius package. // // Revision 1.3 2006/08/09 22:38:00 Sasha Buzko // *** empty log message *** // // Revision 1.2 2006/07/02 17:53:31 Sasha Buzko // *** empty log message *** // // Revision 1.1 2006/05/20 17:02:02 Sasha Buzko // Updated version // // Revision 1.2 2006/05/17 07:06:17 Sasha Buzko // *** empty log message *** // // Revision 1.1 2006/04/30 20:13:58 Sasha Buzko // New version of the app // // Revision 1.1 2006/04/15 19:42:20 Sasha Buzko // Initial commit // // Revision 1.1 2005/11/13 04:35:11 Administrator // *** empty log message *** // // Revision 1.4 2003/05/14 01:13:21 moreland // Fixed CHANGE_REMOVED value so it is not the same as CHANGE_ADDED (cut and paste bug!) // // Revision 1.3 2003/04/24 00:22:09 moreland // Corrected Viewer SEE reference. // // Revision 1.2 2003/04/23 23:23:13 moreland // Generarally implemented the code that was previously stubbed out. // // Revision 1.1 2002/11/14 18:33:20 moreland // First implementation/check-in. // // Revision 1.1.1.1 2002/07/16 18:00:19 moreland // Imported sources // package edu.sdsc.mbt.viewables; // MBT import edu.sdsc.sirius.io.*; import edu.sdsc.sirius.viewers.*; /** * An event generated when structural changes are made to a StructureDocument. * This event class is used when Viewer or Structure objects are * added or removed from a StructureDocument. But, this event type is NOT * used when the internal state of any of those objects change (see the * StructureEvent, StructureMapEvent, and StructureStyleEvent classes). *
* Example:
* When a Viewer is added to a StructureDocument, the event sent to the
* Viewer is: type=TYPE_VIEWER, change=CHANGE_ADDED
* and the Viewer object should use the structureDocument reference
* to process/display each Structure object in the document.
*
* Example:
* When a Structure is removed from a StructureDocument, the event sent to the
* Viewer is: type=TYPE_STRUCTURE, change=CHANGE_REMOVED
* and the Viewer object should remove all viewable objects associated with the
* Structure from its display.
*
* @see edu.sdsc.mbt.viewables.StructureDocument * @see edu.sdsc.sirius.viewers.Viewer * @see edu.sdsc.mbt.Structure *
* @author John L. Moreland */ public class StructureDocumentEvent implements java.io.Serializable { /** * The StructureDocument object for which the state changed * (once a Viewer is added to a StructureDocument this value shouldn't * change since each Viewer instance only views one document at a time). */ public StructureDocument structureDocument; /** * The Structure object that was effected in the StructureDocument. * (for a TYPE_VIEWER add/remove event, this may be null since a Viewer * should examine ALL structures in a StructureDocument). */ public Entry entry; /** * The Viewer object that was effected in the StructureDocument. */ public Viewer viewer; /** * The type of object that was added/removed in the StructureDocument. */ public int type; /** * A Viewer object was added/removed in the StructureDocument. */ public static final int TYPE_VIEWER = 0; /** * A Structure object was added/removed in the StructureDocument. */ public static final int TYPE_DATA = 1; public static final int TYPE_GLOBAL = 2; /** * The kind of change that occured in the StructureDocument. */ public int change; /** * Objects were added. */ public static final int CHANGE_ADDED = 0; /** * Objects were removed. */ public static final int CHANGE_REMOVED = 1; public static final int CHANGE_RENAMED = 2; public static final int CHANGE_RELOAD = 3; }