blob: 75ef483e359136214b5fa48a79ee8834bd92f2b1 [file] [log] [blame]
/*=============================================================================#
# 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);
}
}