KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > swing > decorator > PipelineEvent


1 /*
2  * $Id: PipelineEvent.java,v 1.1.1.1 2004/06/16 01:43:39 davidson1 Exp $
3  *
4  * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5  * Santa Clara, California 95054, U.S.A. All rights reserved.
6  */

7
8 package org.jdesktop.swing.decorator;
9
10 import java.util.EventObject JavaDoc;
11
12
13 /**
14  * Defines an event that encapsulates changes to a pipeline.
15  *
16  * @author Ramesh Gupta
17  */

18 public class PipelineEvent extends EventObject JavaDoc
19 {
20     /** Identifies one or more changes in the pipeline. */
21     public static final int CONTENTS_CHANGED = 0;
22
23     private int type;
24
25     /**
26      * Returns the event type. The possible values are:
27      * <ul>
28      * <li> {@link #CONTENTS_CHANGED}
29      * </ul>
30      *
31      * @return an int representing the type value
32      */

33     public int getType() { return type; }
34
35     /**
36      * Constructs a PipelineEvent object.
37      *
38      * @param source the source Object (typically <code>this</code>)
39      * @param type an int specifying the event type
40      */

41     public PipelineEvent(Object JavaDoc source, int type) {
42         super(source);
43         this.type = type;
44     }
45
46     /**
47      * Returns a string representation of this event. This method
48      * is intended to be used only for debugging purposes, and the
49      * content and format of the returned string may vary between
50      * implementations. The returned string may be empty but may not
51      * be <code>null</code>.
52      *
53      * @return a string representation of this event.
54      */

55     public String JavaDoc toString() {
56         return getClass().getName() + "[type=" + type + "]";
57     }
58 }
59
60
61
62
Popular Tags