org.jhotdraw8.draw.handle.HandleEvent 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!
/*
* @(#)HandleEvent.java
* Copyright © 2023 The authors and contributors of JHotDraw. MIT License.
*/
package org.jhotdraw8.draw.handle;
import org.jhotdraw8.base.event.Event;
import java.io.Serial;
/**
* HandleEvent.
*
* @author Werner Randelshofer
*/
public class HandleEvent extends Event {
@Serial
private static final long serialVersionUID = 1L;
public enum EventType {
FIGURE_ADDED,
FIGURE_REMOVED,
PROPERTY_CHANGED,
FIGURE_INVALIDATED
}
private final EventType eventType;
public HandleEvent(Handle source, EventType type) {
super(source);
this.eventType = type;
}
public EventType getEventType() {
return eventType;
}
@Override
public String toString() {
return "HandleEvent{" + "type=" + eventType + " handle=" + getSource()
+ '}';
}
}