Package foxtrot

Examples of foxtrot.Job


        add( BorderLayout.EAST,
             createControlPanel( ) );
        nextGenerationButton.addActionListener( new ActionListener( ) {
            public void actionPerformed(ActionEvent e)
            {
                Worker.post( new Job( ) {
                    public Object run()
                    {
                        grid.nextGeneration( );
                        return null;
                    }
                } );
                canvas.repaint( );
            }
        } );
        clearButton.addActionListener( new ActionListener( ) {
            public void actionPerformed(ActionEvent e)
            {
                Worker.post( new Job( ) {
                    public Object run()
                    {
                        grid.killAll( );
                        return null;
                    }
                } );
                canvas.repaint( );
            }
        } );

        ActionListener timerAction = new ActionListener( ) {
            public void actionPerformed(ActionEvent ae)
            {
                Worker.post( new Job( ) {
                    public Object run()
                    {
                        if ( !grid.nextGeneration( ) )
                        {
                            stopTimer( );
View Full Code Here


             panel );
        add( BorderLayout.EAST,
             createControlPanel() );
        this.nextGenerationButton.addActionListener( new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
                Worker.post( new Job() {
                    public Object run() {
                        grid.nextGeneration();
                        return null;
                    }
                } );
                canvas.repaint();
            }
        } );
        this.clearButton.addActionListener( new ActionListener() {
            public void actionPerformed(final ActionEvent e) {
                Worker.post( new Job() {
                    public Object run() {
                        grid.killAll();
                        return null;
                    }
                } );
                canvas.repaint();
            }
        } );

        final ActionListener timerAction = new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                Worker.post( new Job() {
                    public Object run() {
                        if ( !grid.nextGeneration() ) {
                            stopTimer();
                        }
                        return null;
View Full Code Here

TOP

Related Classes of foxtrot.Job

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.