Package com.allen_sauer.gwt.dnd.client.util

Examples of com.allen_sauer.gwt.dnd.client.util.CoordinateArea


        int cxmin = dropTargetParent.getElement().getAbsoluteLeft();
        int cymin = dropTargetParent.getElement().getAbsoluteTop();
        int cxmax = dropTargetParent.getElement().getAbsoluteRight();
        int cymax = dropTargetParent.getElement().getAbsoluteBottom();

        final CoordinateArea ca = new CoordinateArea( cxmin,
                                                      cymin,
                                                      cxmax,
                                                      cymax );

        //Display Compass if not already visible
        if ( !isAttached() ) {
            setPopupPositionAndShow( new PositionCallback() {

                @Override
                public void setPosition( int offsetWidth,
                                         int offsetHeight ) {
                    setPopupPosition( ca.getCenter().getLeft() - ( offsetWidth / 2 ),
                                      ca.getCenter().getTop() - ( offsetHeight / 2 ) );
                }

            } );

        } else {
            setPopupPosition( ca.getCenter().getLeft() - ( getOffsetWidth() / 2 ),
                              ca.getCenter().getTop() - ( getOffsetHeight() / 2 ) );
        }

    }
View Full Code Here

TOP

Related Classes of com.allen_sauer.gwt.dnd.client.util.CoordinateArea

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.