Examples of CalculateExpressionEvent


Examples of pl.eternalsh.simplecalc.common.events.CalculateExpressionEvent

        placeButton(label, positionX, positionY, new ActionListener()
        {
            @Override
            public void actionPerformed(final ActionEvent actionEvent)
            {
                blockingQueue.add(new CalculateExpressionEvent(inputExpressionField.getText()));
            }
        });
    }
View Full Code Here

Examples of pl.eternalsh.simplecalc.common.events.CalculateExpressionEvent

     *
     * @param event event sent by the GUI.
     */
    void handle(final ApplicationEvent event)
    {
        CalculateExpressionEvent calculateExprEvent = (CalculateExpressionEvent) event;

        try
        {
            Result result = model.parseExpression(calculateExprEvent.getExpression());
            view.updateResultField(result.toString().concat("=").concat(calculateExprEvent.getExpression()));
            System.out.println(result.toString());
        }
        catch(IllegalInputStringException illegalInputException)
        {
            view.updateResultField("Illegal characters found.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.