Package org.jdesktop.wonderland.modules.appbase.client.view

Examples of org.jdesktop.wonderland.modules.appbase.client.view.View2DEntity


    public void toggleOrtho() {
        ortho = !ortho;

        // Get first view, should be the cell view
        Iterator<View2D> it = getViews();
        View2DEntity view = (View2DEntity) it.next();

        if (ortho) {

            // In this test, the view in the ortho plane is at a fixed location.
            view.setLocationOrtho(new Vector2f(500f, 300f), false);

            // Test
            //view.setPixelScaleOrtho(2.0f, 2.0f);
            //view.setPixelScaleOrtho(0.5f, 0.5f);

            // Move the window view into the ortho plane
            logger.warning("Move view into ortho " + view);
            view.setOrtho(true, false);

        } else {

            // Move the window view into the cell
            logger.warning("Move view out of ortho " + view);
            view.setOrtho(false, false);
        }

        // Now make it all happen
        view.update();
        view.updateFrame();
    }


            }

            dragging = true;

            // Remember: the move occurs in parent coords
            View2DEntity parentView = (View2DEntity) view.getParent();
            if (parentView == null) {           
                // Note: we don't yet support dragging of primaries
                LOGGER.warning("Drag secondary operation can't get parent of secondary");
                return;
            }

            dragStartScreen = new Point(hookInfo.eventX, hookInfo.eventY);
            dragStartWorld = hookInfo.pointWorld;
            dragStartLocal = parentView.getNode().worldToLocal(dragStartWorld, new Vector3f());

            App2D.invokeLater(new Runnable() {
                public void run () {
                    if (view != null) {
                        view.userMovePlanarStart();

    /**
     * {@inheritDoc}
     */
    protected Entity getParentEntity() {
        View2DEntity parentView = (View2DEntity) getParent();
        if (parentView == null) {
            return null;
        }
        return parentView.getEntity();
    }

TOP

Related Classes of org.jdesktop.wonderland.modules.appbase.client.view.View2DEntity

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.