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

Examples of org.jrebirth.af.showcase.analyzer.ui.editor.EditorModel


        final JRebirthEvent event = wave.get(EditorWaves.EVENT);

        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() +
View Full Code Here

TOP

Related Classes of org.jrebirth.af.showcase.analyzer.ui.editor.EditorModel

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.