Commit 39e79fcb authored by Nico Mack's avatar Nico Mack

Implemented clone interface for Marker

Added method to Bounds2D class
parent fc01bb9b
......@@ -23,7 +23,7 @@ import java.util.Objects;
// * Class Definition and Members *
// ***************************************************************************
public abstract class Marker implements Positionable {
public abstract class Marker implements Positionable, Cloneable {
/** The name given to this marker. */
protected String name;
......@@ -345,4 +345,8 @@ public abstract class Marker implements Positionable {
return comparison;
}
// ---------------------------------------------------------------------------
@Override
public abstract Marker clone();
}
......@@ -281,6 +281,12 @@ public class ModalMarker extends TetherableMarker {
return coronaBundles.get(bundle);
}
// ---------------------------------------------------------------------------
public ModalMarker clone() {
return new ModalMarker(this);
}
// ---------------------------------------------------------------------------
// ***************************************************************************
// * End of Class *
......
......@@ -47,6 +47,10 @@ public class Bounds2D {
}
public boolean includes(Point candidate) {
return includes(candidate.x, candidate.y);
}
public Bounds2D translate(double x, double y) {
double tx1 = x1 + x;
double tx2 = x2 + x;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment