org.arakhne.afc.ui.actionmode.ActionMode Maven / Gradle / Ivy
/*
* $Id: org/arakhne/afc/ui/actionmode/ActionMode.java v12.0 2015-04-09 01:26:18$
*
* Copyright (C) 2002 Stephane GALLAND, Madhi HANNOUN, Marc BAUMGARTNER.
* Copyright (C) 2012-13 Stephane GALLAND.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* This program is free software; you can redistribute it and/or modify
*/
package org.arakhne.afc.ui.actionmode ;
import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import org.arakhne.afc.math.continous.object2d.Rectangle2f;
import org.arakhne.afc.ui.MouseCursor;
import org.arakhne.afc.ui.ZoomableContext;
import org.arakhne.afc.ui.event.KeyEvent;
import org.arakhne.afc.ui.selection.Selectable;
import org.arakhne.afc.vmutil.locale.Locale;
/** This is the abstract superclass of all editor modes. A Mode is
* responsible for handling most of the events that come to the
* Editor. A Mode defines a context for interperting those events.
* For example, a mouse drag in BaseMode
* will define a selection rectangle, while a mouse drag in
* EdgeCreationMode will drag out a
* rubberband line. Placing the logic for most event handing in
* Modes is key to keeping the Editor source code small and
* managable, and also key for allowing addition of new kinds of user
* interactions without modifying Editor and having to
* integrate these modifications with other contributors
* modifications.
*
* @param is the type of the graphical object supported by this container.
* @param © 2015 - 2025 Weber Informatics LLC | Privacy Policy