Package org.jrebirth.af.showcase.analyzer.ui.editor.ball

Examples of org.jrebirth.af.showcase.analyzer.ui.editor.ball.BallModel


     */
    @Override
    public void perform(final Wave wave) {

        final JRebirthEvent event = wave.get(EditorWaves.EVENT);
        final BallModel targetBallModel = getModel(BallModel.class, event);
        targetBallModel.hide();

        getModel(EditorModel.class).unregisterBall(targetBallModel);
    }
View Full Code Here


     */
    @Override
    public void perform(final Wave wave) {

        final JRebirthEvent event = wave.get(EditorWaves.EVENT);
        final BallModel targetBallModel = getModel(BallModel.class, event);
        targetBallModel.access();

        // getModel(EditorModel.class).unregisterBall(targetBallModel);
    }
View Full Code Here

        LOGGER.trace("Process " + event.getEventType() + " of type " + event.getTarget());

        final EditorModel editorModel = getModel(EditorModel.class);

        final BallModel targetBallModel = getModel(BallModel.class, event);

        editorModel.registerBall(targetBallModel);

        if (editorModel.retrieveBall(targetBallModel.getEventModel().getSource()) == null) {

            // it's the application node, we shall center it !!! minus 70 because it's the globalFacade node that resides in the center
            targetBallModel.getView().getRootNode().layoutXProperty().bind(editorModel.getView().getRootNode().widthProperty().divide(2).subtract(70).subtract(24));
            targetBallModel.getView().getRootNode().layoutYProperty().bind(editorModel.getView().getRootNode().heightProperty().divide(2).subtract(24));

        } else {

            final BallModel sourceBallModel = editorModel.retrieveBall(targetBallModel.getEventModel().getSource());

            // All other nodes shall be positionned relatively to their parent
            /*
             * System.out.println("Create " + targetBallModel.getEventModel().getTarget().getSimpleName() + " From : " + targetBallModel.getEventModel().getSource().getSimpleName() + " x=" +
             * sourceBallModel.getView().getRootNode().getCenterX() + " trX=" + sourceBallModel.getView().getRootNode().getTranslateX() + " y=" + sourceBallModel.getView().getRootNode().getCenterY() +
             * " trY=" + sourceBallModel.getView().getRootNode().getTranslateY());
             */
            targetBallModel.getView().getRootNode()
                    .layoutXProperty().bind(sourceBallModel.getView().getRootNode().layoutXProperty().add(sourceBallModel.getView().getRootNode().translateXProperty()));
            targetBallModel.getView().getRootNode()
                    .layoutYProperty().bind(sourceBallModel.getView().getRootNode().layoutYProperty().add(sourceBallModel.getView().getRootNode().translateYProperty()));

        }

        targetBallModel.show();
    }
View Full Code Here

TOP

Related Classes of org.jrebirth.af.showcase.analyzer.ui.editor.ball.BallModel

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.