KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > vfs > context > ContextType


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19
20 package org.openharmonise.vfs.context;
21
22 /**
23  * Class to descibe context types, follows static enumeration pattern.
24  *
25  * @author Matthew Large
26  * @version $Revision: 1.1 $
27  *
28  */

29 public class ContextType {
30
31     /**
32      * Context name.
33      */

34     private final String JavaDoc m_sName;
35
36     /**
37      * Context type for all contexts.
38      */

39     public static final ContextType CONTEXT_ALL = new ContextType("ALL");
40
41     /**
42      * Context type for outlook bar tab changes.
43      */

44     public static final ContextType CONTEXT_TABS = new ContextType("TABS");
45
46     /**
47      * Context type for collection changes.
48      */

49     public static final ContextType CONTEXT_DIRS = new ContextType("DIRS");
50
51     /**
52      * Context type for virtual file selections.
53      */

54     public static final ContextType CONTEXT_FILES = new ContextType("FILES");
55
56     /**
57      * Context type for application shutdown.
58      */

59     public static final ContextType CONTEXT_SHUTDOWN = new ContextType("SHUTDOWN");
60
61     /**
62      * Context type for {@link StateHandler} wait events.
63      */

64     public static final ContextType CONTEXT_WAIT = new ContextType("WAIT");
65
66     /**
67      * Context type for application focus events.
68      */

69     public static final ContextType CONTEXT_APP_FOCUS = new ContextType("APP_FOCUS");
70
71     /**
72      * Context type for metadata panel clear events.
73      */

74     public static final ContextType CONTEXT_CLEAR_METADATA = new ContextType("CLEAR_METADATA");
75
76     /**
77      * Context type for resource name display mode events, switching between filename and display name.
78      */

79     public static final ContextType CONTEXT_FILENAME_DISPLAY = new ContextType("FILENAME_DISPLAY");
80
81     /**
82      * Context type for system property changes, context event message will contain the name of the property changed.
83      */

84     public static final ContextType CONTEXT_SYSTEM_PROP_CHANGED = new ContextType("SYSTEM_PROP_CHANGED");
85
86     /**
87      * Context type for events that should affect the {@link org.openharmonise.him.window.session.SessionWindow}.
88      */

89     public static final ContextType CONTEXT_SESSION_EVENT = new ContextType("SESSION_EVENT");
90
91     /**
92      * Context type for requesting that all files should be synchronised.
93      */

94     public static final ContextType CONTEXT_SYNC_ALL_FILES_AND_SHUTDOWN = new ContextType("SYNC_ALL_FILES_AND_SHUTDOWN");
95
96     /**
97      * Context type for stating that a metadata definition has changed.
98      */

99     public static final ContextType CONTEXT_METADATA_DEFINITION_CHANGED = new ContextType("CONTEXT_METADATA_DEFINITION_CHANGED");
100
101     /**
102      * Constructs a new context type.
103      *
104      * @param sName Context name
105      */

106     protected ContextType(String JavaDoc sName) {
107         super();
108         this.m_sName = sName;
109     }
110     
111     /* (non-Javadoc)
112      * @see java.lang.Object#toString()
113      */

114     public String JavaDoc toString() {
115         return this.m_sName;
116     }
117
118 }
119
Popular Tags