Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/input/RoutedCommand.java')
-rw-r--r--plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/input/RoutedCommand.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/input/RoutedCommand.java b/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/input/RoutedCommand.java
new file mode 100644
index 00000000000..92d52665286
--- /dev/null
+++ b/plugins/xwt/org.eclipse.papyrus.xwt/src/org/eclipse/papyrus/xwt/input/RoutedCommand.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Soyatec - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.xwt.input;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeSupport;
+
+/**
+ *
+ * @author yyang (yves.yang@soyatec.com)
+ */
+public class RoutedCommand implements ICommand {
+
+ protected PropertyChangeSupport canExecuteSupport = new PropertyChangeSupport(this);
+
+ public boolean canExecute() {
+ return true;
+ }
+
+ public void execute(Object parameter) {
+ }
+
+ public void addCanExecuteChangedListener(CanExecuteChangedListener listener) {
+ canExecuteSupport.addPropertyChangeListener(listener);
+ }
+
+ public void removeCanExecuteChangedListener(CanExecuteChangedListener listener) {
+ canExecuteSupport.removePropertyChangeListener(listener);
+ }
+
+ public void fireCanExecuteChangedListener(PropertyChangeEvent args) {
+ canExecuteSupport.firePropertyChange(args);
+ }
+}

Back to the top