| /***************************************************************************** |
| * Copyright (c) 2019 CEA LIST. |
| * |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Xavier Le Pallec (for CEA LIST) xlepallec@lilo.org - Bug 558456 |
| * |
| *****************************************************************************/ |
| |
| package org.eclipse.papyrus.uml.diagram.clazz.lf.autosizeableclasses.statemachine; |
| |
| /** |
| * This class only defines a set of event code used by the state machine (see |
| * {@link org.eclipse.papyrus.uml.diagram.clazz.lf.autosizeableclasses.statemachine.StateMachine}). |
| * |
| */ |
| public class Events { |
| /** |
| * When the mouse starts to hover elements after the user click on the palette |
| * to create a property, operation or a class. |
| */ |
| public static final int NEW_CREATE_REQUEST = 1; |
| /** |
| * When the mouse starts to hover elements after the user drag and drop a |
| * property, operation or a class from somewhere (like the model explorer) |
| */ |
| public static final int NEW_DROP_REQUEST = 2; |
| /** |
| * When the mouse hovers a class or its components |
| */ |
| public static final int HOVERING_A_CLASS = 3; |
| /** |
| * When the mouse hovers another class or its components just after hovering a |
| * class |
| */ |
| public static final int HOVERING_ANOTHER_CLASS = 4; |
| /** |
| * When the mouse hovers something except a class or its components |
| */ |
| public static final int HOVERING_SOMETHING_BUT_A_CLASS = 5; |
| /** |
| * When the user clicks on the icon of the palette, or presses ESC or doing |
| * something that stops the previous process. |
| */ |
| public static final int ACTIVE_TOOL_CHANGED = 6; |
| /** |
| * When the user finishes their drag-n-drop. |
| */ |
| public static final int OBJECT_DROPPED = 7; |
| /** |
| * When the request has been ended (processed or not). |
| */ |
| public static final int END_OF_REQUEST = 8; |
| |
| /** |
| * Labels are used for debugging concerns (put a name on a event code / integer value). |
| */ |
| public static final String labels[] = { "", "NEW_CREATE_REQUEST", "NEW_DROP_REQUES", "HOVERING_A_CLASS", |
| "HOVERING_ANOTHER_CLASS", "HOVERING_SOMETHING_BUT_A_CLASS", "ACTIVE_TOOL_CHANGED", "OBJECT_DROPPED", |
| "END_OF_REQUEST" }; |
| } |