class DraggableButton extends Statics {
public DraggableButton(Point2Bvr initPt2) {
NumberBvr halfDimNum = toBvr(2*mm);
ColorBvr cClr = ColorBvr.newUninitBvr();
ImageBvr blockImg = solidColorImage(cClr).
crop(point2(neg(halfDimNum), neg(halfDimNum)), point2(halfDimNum, halfDimNum));
_dragImg = new DraggableImage(blockImg, initPt2);
cClr.init(until(red, _dragImg.getGrabEvent(),
until(green, _dragImg.getReleaseEvent(), cClr)));
}
public ImageBvr getImageBvr() { return _dragImg.getImageBvr(); }
public Point2Bvr getPointBvr() { return _dragImg.getPointBvr(); }
DraggableImage _dragImg;
}