initialSelectPoint = new Point2D.Double(position.getX()- offset.getWidth(), position.getY()- offset.getHeight()); Point2D dummy = new Point2D.Double(initialSelectPoint.getX(), initialSelectPoint.getY()); initialViewPoint = e.getCamera().viewToLocal(dummy); currentSelectPoint = e.getCamera().viewToLocal(position);
selectionNode = new PNode(); selectionNode.setPaint(new Color(153,153,192,128)); selectionAnchorPoint = position; selectionNode.setBounds(position.getX(),position.getY(), offset.getWidth(),offset.getHeight()); getLayer().addChild(selectionNode);
        public void respondStartDrag(PInputEvent e)        {            Point2D position = e.getPosition();            Dimension2D offset = e.getDelta();            initialSelectPoint = new Point2D.Double(position.getX()-                                                    offset.getWidth(),                                                    position.getY()-                                                    offset.getHeight());            Point2D dummy = new Point2D.Double(initialSelectPoint.getX(),                                               initialSelectPoint.getY());            initialViewPoint = e.getCamera().viewToLocal(dummy);            currentSelectPoint = e.getCamera().viewToLocal(position);                                                                int modifier = PiccoloModifiers.getModifier(e);            if(modifier != PiccoloModifiers.MOUSE_INDIV_SELECT &&               modifier != PiccoloModifiers.SHIFT_DOWN)            {                browserModel.deselectAllThumbnails();            }            browserModel.setCurrentMode(BrowserModel.SELECT_MODE_NAME,                                        BrowserMode.SELECTING_MODE);        }