KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > cheatsheets > ICheatSheetEvent


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.cheatsheets;
12
13 import org.eclipse.ui.cheatsheets.ICheatSheetManager;
14
15 /**
16  * Event in the life cycle of a cheat sheet.
17  * <p>
18  * Events over the life time of a running cheat sheet
19  * follow this pattern:
20  * <pre>
21  * opened { started | restored } { restarted | completed }* closed
22  * </pre>
23  * </p>
24  * <p>
25  * This interface is not intended to be implemented by clients.
26  * </p>
27  *
28  * @see CheatSheetListener
29  * @since 3.0
30  */

31 public interface ICheatSheetEvent {
32     
33     /**
34      * Event type constant (value {@value}) indicating that
35      * the cheat sheet was opened. This is the first event
36      * in the life of a running cheat sheet.
37      */

38     public static final int CHEATSHEET_OPENED = 0;
39     
40     /**
41      * Event type constant (value {@value}) indicating that
42      * the cheat sheet was closed. This is the last event
43      * in the life of a running cheat sheet.
44      */

45     public static final int CHEATSHEET_CLOSED = 1;
46     
47     /**
48      * Event type constant (value {@value}) indicating that
49      * the cheat sheet was started.
50      */

51     public static final int CHEATSHEET_STARTED = 2;
52     
53     /**
54      * Event type constant (value {@value}) indicating that
55      * the cheat sheet was restarted.
56      */

57     public static final int CHEATSHEET_RESTARTED = 3;
58     
59     /**
60      * Event type constant (value {@value}) indicating that
61      * the cheat sheet has been completed.
62      */

63     public static final int CHEATSHEET_COMPLETED = 4;
64
65     /**
66      * Event type constant (value {@value}) indicating that
67      * the cheat sheet has been restored.
68      */

69     public static final int CHEATSHEET_RESTORED = 5;
70
71     /**
72      * Returns the type of this cheat sheet event.
73      *
74      * @return the event type code; one of the event type constants
75      * declared on this class
76      */

77     public int getEventType();
78     
79     /**
80      * Returns the id of the cheat sheet that generated this event.
81      *
82      * @return the cheat sheet id
83      */

84     public String JavaDoc getCheatSheetID();
85     
86     /**
87      * Returns the cheat sheet manager responsible for executing
88      * the cheat sheet.
89      *
90      * @return the cheat sheet manager
91      */

92     public ICheatSheetManager getCheatSheetManager();
93 }
94
Popular Tags