import java.awt.*; class DrgItmInfo extends ItmInfo{ boolean drg; public DrgItmInfo(Component cmp){ super(cmp); drg = false; } public boolean mouseDrag(Event e, int x, int y){ if(sel==null) return false; if(!(sel instanceof DrgItm)) return false; DrgItm sel = (DrgItm)this.sel; Point p = new Point(x,y); if(!drg){ drg = true; sel.drgSta(p); }else{ sel.drg(p); } return true; } public boolean mouseUp(Event e, int x, int y){ if(!drg) return false; if(!(sel instanceof DrgItm)) return false; DrgItm sel = (DrgItm)this.sel; Point p = new Point(x,y); sel.drgEnd(p); drg = false; return true; } } // EOF