001: /*
002: * The contents of this file are subject to the
003: * Mozilla Public License Version 1.1 (the "License");
004: * you may not use this file except in compliance with the License.
005: * You may obtain a copy of the License at http://www.mozilla.org/MPL/
006: *
007: * Software distributed under the License is distributed on an "AS IS"
008: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
009: * See the License for the specific language governing rights and
010: * limitations under the License.
011: *
012: * The Initial Developer of the Original Code is Simulacra Media Ltd.
013: * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
014: *
015: * All Rights Reserved.
016: *
017: * Contributor(s):
018: */
019:
020: package org.openharmonise.vfs.context;
021:
022: /**
023: * Class to descibe context types, follows static enumeration pattern.
024: *
025: * @author Matthew Large
026: * @version $Revision: 1.1 $
027: *
028: */
029: public class ContextType {
030:
031: /**
032: * Context name.
033: */
034: private final String m_sName;
035:
036: /**
037: * Context type for all contexts.
038: */
039: public static final ContextType CONTEXT_ALL = new ContextType("ALL");
040:
041: /**
042: * Context type for outlook bar tab changes.
043: */
044: public static final ContextType CONTEXT_TABS = new ContextType(
045: "TABS");
046:
047: /**
048: * Context type for collection changes.
049: */
050: public static final ContextType CONTEXT_DIRS = new ContextType(
051: "DIRS");
052:
053: /**
054: * Context type for virtual file selections.
055: */
056: public static final ContextType CONTEXT_FILES = new ContextType(
057: "FILES");
058:
059: /**
060: * Context type for application shutdown.
061: */
062: public static final ContextType CONTEXT_SHUTDOWN = new ContextType(
063: "SHUTDOWN");
064:
065: /**
066: * Context type for {@link StateHandler} wait events.
067: */
068: public static final ContextType CONTEXT_WAIT = new ContextType(
069: "WAIT");
070:
071: /**
072: * Context type for application focus events.
073: */
074: public static final ContextType CONTEXT_APP_FOCUS = new ContextType(
075: "APP_FOCUS");
076:
077: /**
078: * Context type for metadata panel clear events.
079: */
080: public static final ContextType CONTEXT_CLEAR_METADATA = new ContextType(
081: "CLEAR_METADATA");
082:
083: /**
084: * Context type for resource name display mode events, switching between filename and display name.
085: */
086: public static final ContextType CONTEXT_FILENAME_DISPLAY = new ContextType(
087: "FILENAME_DISPLAY");
088:
089: /**
090: * Context type for system property changes, context event message will contain the name of the property changed.
091: */
092: public static final ContextType CONTEXT_SYSTEM_PROP_CHANGED = new ContextType(
093: "SYSTEM_PROP_CHANGED");
094:
095: /**
096: * Context type for events that should affect the {@link org.openharmonise.him.window.session.SessionWindow}.
097: */
098: public static final ContextType CONTEXT_SESSION_EVENT = new ContextType(
099: "SESSION_EVENT");
100:
101: /**
102: * Context type for requesting that all files should be synchronised.
103: */
104: public static final ContextType CONTEXT_SYNC_ALL_FILES_AND_SHUTDOWN = new ContextType(
105: "SYNC_ALL_FILES_AND_SHUTDOWN");
106:
107: /**
108: * Context type for stating that a metadata definition has changed.
109: */
110: public static final ContextType CONTEXT_METADATA_DEFINITION_CHANGED = new ContextType(
111: "CONTEXT_METADATA_DEFINITION_CHANGED");
112:
113: /**
114: * Constructs a new context type.
115: *
116: * @param sName Context name
117: */
118: protected ContextType(String sName) {
119: super ();
120: this .m_sName = sName;
121: }
122:
123: /* (non-Javadoc)
124: * @see java.lang.Object#toString()
125: */
126: public String toString() {
127: return this.m_sName;
128: }
129:
130: }
|