Package ca.nengo.ui.lib.objects.activities

Examples of ca.nengo.ui.lib.objects.activities.TransientMessage


    public synchronized void showPopupMessage(String msg) {
        if (getWorld() != null) {

            Util.debugMsg("UI Popup Msg: " + msg);

            TransientMessage msgObject = new TransientMessage(msg);

            double offsetX = -(msgObject.getWidth() - myPNode.getWidth()) / 2d;

            Point2D position = objectToSky(new Point2D.Double(offsetX, -5));

            msgObject.setOffset(position);
            getWorld().getSky().addChild(msgObject);

            long currentTime = System.currentTimeMillis();
            long delay = TIME_BETWEEN_POPUPS - (currentTime - lastPopupTime);

            if (delay < 0) {
                delay = 0;
            }

            msgObject.popup(delay);

            lastPopupTime = currentTime + delay;
        }
    }
View Full Code Here

TOP

Related Classes of ca.nengo.ui.lib.objects.activities.TransientMessage

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.