org.jhotdraw8.draw.handle.AbstractHandle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.jhotdraw8.draw Show documentation
Show all versions of org.jhotdraw8.draw Show documentation
JHotDraw8 Drawing Framework
The newest version!
/*
* @(#)AbstractHandle.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.draw.handle;
import org.jhotdraw8.draw.figure.Figure;
/**
* AbstractHandle.
*
* @author Werner Randelshofer
*/
public abstract class AbstractHandle implements Handle {
// ---
// Fields
// ---
protected final Figure owner;
// ---
// Constructors
// ---
public AbstractHandle(Figure owner) {
this.owner = owner;
}
// ---
// Behavior
// ---
@Override
public final void dispose() {
}
@Override
public Figure getOwner() {
return owner;
}
/**
* Returns true if both handles have the same class.
*/
@Override
public boolean isCompatible(Handle that) {
return that.getClass() == this.getClass();
}
}