Logo Search packages:      
Sourcecode: javamorph version File versions  Download package

void javamorph::CPolygonDecorator::mouseMoved ( MouseEvent  e  )  [inline]

Detect the current edit able polygon point before & during moving.

Definition at line 143 of file CPolygonDecorator.java.

References getIndex(), javamorph::CFrame::getParent(), index, parent, pos, and javamorph::CFrame::scalePoint().

                                        {
        pos = new Point(e.getX(), e.getY());
        parent.scalePoint(pos);
        /* Branch when moving or removing points. */
        if(CConfig.EDIT_POLYGON_OFF == CConfig.edit_state ||
            CConfig.EDIT_POLYGON_SUB == CConfig.edit_state){
            int ni = getIndex(pos);
            /* Branch & update index when changed. */
            if((index != ni)){
                index = ni;
                this.parent.getParent().repaint();
            }
        }
        /* Branch when adding points. */
        if(CConfig.EDIT_POLYGON_ADD == CConfig.edit_state){
            this.parent.getParent().repaint();
        }
    }


Generated by  Doxygen 1.6.0   Back to index