package data.graph;
import java.util.*;
import data.*;
import data.graph.*;
import data.geom.plain.*;
public abstract class Shape implements Refreshable, Resizable {
public Shape() {
cornerPointSet = new HashSet();
}
public Shape(Shape o) {
setCornerPointSet(o.getCornerPointSet());
setAnchorPoint(o.getAnchorPoint());
}
public Shape(Set cornerPointSet, Point anchorPoint) {
setCornerPointSet(cornerPointSet);
setAnchorPoint(anchorPoint);
}
public void setData(Shape o) {
setAnchorPoint(o.getAnchorPoint());
}
public abstract Point[] place(Point p);
protected Set cornerPointSet;
public Set getCornerPointSet() {
return cornerPointSet;
}
public void setCornerPointSet(Set cornerPointSet) {
this.cornerPointSet = cornerPointSet;
}
public void addCornerPoint(Point cornerPoint) {
cornerPointSet.add(cornerPoint);
}
protected Point anchorPoint;
public Point getAnchorPoint() {
return anchorPoint;
}
public void setAnchorPoint(Point anchorPoint) {
this.anchorPoint = anchorPoint;
}
public String toString() {
StringBuffer sb = new StringBuffer(super.toString());
sb.append("[");
sb.append("]");
return sb.toString();
}
public String toDisplayString() {
StringBuffer sb = new StringBuffer();
return sb.toString();
}
public boolean equals(Object other) {
if (this == other) return true;
if (!(other instanceof Shape)) return false;
if(!super.equals(other)) return false;
final Shape o = (Shape) other;
return true;
}
public int hashCode() {
int res = 0;
return res;
}
}