public void removeElement(GraphElement ge) {
        if (GraphLine.class.isInstance(ge)) {
            removeLine((GraphLine) ge);
        } else if (GraphPoint.class.isInstance(ge)) {
            removePoint((GraphPoint)ge);
        }
    }