Skip to content

Commit

Permalink
[494322] Ensured all policies extend AbstractFXInteractionPolicy.
Browse files Browse the repository at this point in the history
- Changed superclass of FXDeleteSelectedOnTypePolicy, FXPanOnTypePolicy,
FXPanOrZoomOnScrollPolicy, and FXRotateSelectedOnRotatePolicy from
AbstractInteractionPolicy to AbstractFXInteractionPolicy.
  • Loading branch information
nyssen committed May 23, 2016
1 parent 8001e1b commit f067b86
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.eclipse.gef4.mvc.fx.tools.FXClickDragTool;
import org.eclipse.gef4.mvc.models.SelectionModel;
import org.eclipse.gef4.mvc.parts.IContentPart;
import org.eclipse.gef4.mvc.policies.AbstractInteractionPolicy;
import org.eclipse.gef4.mvc.policies.DeletionPolicy;
import org.eclipse.gef4.mvc.viewer.IViewer;

Expand All @@ -34,8 +33,8 @@
* @author mwienand
*
*/
public class FXDeleteSelectedOnTypePolicy
extends AbstractInteractionPolicy<Node> implements IFXOnTypePolicy {
public class FXDeleteSelectedOnTypePolicy extends AbstractFXInteractionPolicy
implements IFXOnTypePolicy {

/**
* Returns <code>true</code> if the given {@link KeyEvent} is a "delete"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
package org.eclipse.gef4.mvc.fx.policies;

import org.eclipse.gef4.fx.nodes.InfiniteCanvas;
import org.eclipse.gef4.mvc.policies.AbstractInteractionPolicy;

import javafx.animation.AnimationTimer;
import javafx.scene.Node;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;

Expand All @@ -26,7 +24,7 @@
* @author mwienand
*
*/
public class FXPanOnTypePolicy extends AbstractInteractionPolicy<Node>
public class FXPanOnTypePolicy extends AbstractFXInteractionPolicy
implements IFXOnTypePolicy {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
import org.eclipse.gef4.fx.nodes.InfiniteCanvas;
import org.eclipse.gef4.geometry.planar.Dimension;
import org.eclipse.gef4.mvc.fx.viewer.FXViewer;
import org.eclipse.gef4.mvc.policies.AbstractInteractionPolicy;

import javafx.geometry.Bounds;
import javafx.scene.Node;
import javafx.scene.input.ScrollEvent;

/**
Expand All @@ -29,7 +27,7 @@
* @author mwienand
*
*/
public class FXPanOrZoomOnScrollPolicy extends AbstractInteractionPolicy<Node>
public class FXPanOrZoomOnScrollPolicy extends AbstractFXInteractionPolicy
implements IFXOnScrollPolicy {

private boolean stopped = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.eclipse.gef4.mvc.models.SelectionModel;
import org.eclipse.gef4.mvc.parts.IContentPart;
import org.eclipse.gef4.mvc.parts.IVisualPart;
import org.eclipse.gef4.mvc.policies.AbstractInteractionPolicy;

import com.google.common.reflect.TypeToken;

Expand All @@ -38,8 +37,8 @@
* @author anyssen
*
*/
public class FXRotateSelectedOnRotatePolicy
extends AbstractInteractionPolicy<Node> implements IFXOnRotatePolicy {
public class FXRotateSelectedOnRotatePolicy extends AbstractFXInteractionPolicy
implements IFXOnRotatePolicy {

private Point pivotInScene;
private Map<IContentPart<Node, ? extends Node>, Integer> rotationIndices = new HashMap<>();
Expand Down

0 comments on commit f067b86

Please sign in to comment.