| /*=============================================================================# |
| # Copyright (c) 2012, 2021 Edwin Park and others. |
| # |
| # This program and the accompanying materials are made available under the |
| # terms of the Eclipse Public License 2.0 which is available at |
| # https://www.eclipse.org/legal/epl-2.0. |
| # |
| # SPDX-License-Identifier: EPL-2.0 |
| # |
| # Contributors: |
| # Edwin Park - initial API and implementation |
| #=============================================================================*/ |
| |
| package org.eclipse.statet.ecommons.waltable.viewport; |
| |
| import org.eclipse.statet.ecommons.waltable.command.ILayerCommand; |
| import org.eclipse.statet.ecommons.waltable.layer.ILayer; |
| |
| |
| public class ViewportDragCommand implements ILayerCommand { |
| |
| private final long x; |
| private final long y; |
| |
| public ViewportDragCommand(final long x, final long y) { |
| this.x= x; |
| this.y= y; |
| } |
| |
| public long getX() { |
| return this.x; |
| } |
| |
| public long getY() { |
| return this.y; |
| } |
| |
| @Override |
| public boolean convertToTargetLayer(final ILayer targetLayer) { |
| return true; |
| } |
| |
| @Override |
| public ILayerCommand cloneCommand() { |
| return new ViewportDragCommand(this.x, this.y); |
| } |
| |
| } |