Package presentacio

Examples of presentacio.Gui


  
    private void iniciarComponents() {

        //així és molt cutre però si ho faig amb for tinc problemes amb el eoid de la gui
        Gui g1 = new Gui(0, this);
        Gui g2 = new Gui(1, this);
        Gui g3 = new Gui(2, this);
        Gui g4 = new Gui(3, this);
        llistaGuis.add(g1);
        llistaGuis.add(g2);
        llistaGuis.add(g3);
        llistaGuis.add(g4);
View Full Code Here


        desActivarBotonsCantar(gui);
        gui.getJbPassar().setEnabled(false);

        //activem els botons de cantar trumfo del company
        int company = (gui.getEoid() + 2) % 4;
        Gui guiCompany = llistaGuis.get(company);
        activarBotonsCantar(guiCompany);

        //deixem d'estar a primer pla i passa a estar-ho el company
        gui.setAlwaysOnTop(false);
        guiCompany.setAlwaysOnTop(true);
        guiCompany.toFront();
    }
View Full Code Here

                g.getJbNovaBasa().setEnabled(false);
                g.setAlwaysOnTop(false);
            }

             //S'ha d'activar el botó de qui repartirà desprès i la seva gui
            Gui g = llistaGuis.get((partida.getQuiReparteix() + 1) % 4);
            g.getJbRepartir().setEnabled(true);
            g.setAlwaysOnTop(true);
            g.toFront();

            //Actualitzo el marcador de la partida
            partida.actualitzaMarcador();
            pintaMarcador(partida.getMarcador());
            System.out.println("Marcador de la partida: " + partida.getMarcador());
View Full Code Here

            a.getJbSIniciarPartida().setEnabled(false);

        }
        int nosecomferquivullquecomenci = 0;
        //Activem el botó de repartir les cartes del quiReparteix (del jugador 0)
        Gui r = llistaGuis.get(nosecomferquivullquecomenci);
        r.getJbRepartir().setEnabled(true);
        //ATENCIO: en comptes del 0 hi hauria d'haver
        // partida.getQuiReparteix() però no em va bé pq quiReparteix està inicialitzat a -1

        //Poso a primer pla la gui del jugador que ha de repartir
        r.setAlwaysOnTop(true);
        r.toFront();
    }
View Full Code Here

        System.out.println("S'ha fet un click al botó repartir.");

        partida.nouDat();
        //Pinto les cartes per cada gui i acciono els botons
        for (int i = 0; i < 4; i++) {
            Gui g = llistaGuis.get(i);
            pintaCartes(g, jugadors.get(i));
            g.getJbCarta1().setEnabled(true);
            g.getJbCarta2().setEnabled(true);
            g.getJbCarta3().setEnabled(true);
            g.getJbCarta4().setEnabled(true);
            g.getJbCarta5().setEnabled(true);
            g.getJbCarta6().setEnabled(true);
            g.getJbCarta7().setEnabled(true);
            g.getJbCarta8().setEnabled(true);
            g.getJbCarta9().setEnabled(true);
            g.getJbCarta10().setEnabled(true);
            g.getJbCarta11().setEnabled(true);
            g.getJbCarta12().setEnabled(true);
        }
        System.out.println("Comencem el dat, reparteix " + partida.getQuiReparteix());

        //desactivar el botó repartir que estava activat
        llistaGuis.get(partida.getQuiReparteix()).getJbRepartir().setEnabled(false);
View Full Code Here

            //activo novaBasa del guanyador i la seva gui
            //(primer desactivo totes les gui)
            for (Gui g : llistaGuis) {
                g.setAlwaysOnTop(false);
            }
            Gui r = llistaGuis.get(partida.getDatActual().getjugadorQueComenca());
            r.getJbNovaBasa().setEnabled(true);
            r.setAlwaysOnTop(true);
            r.toFront();
        }
        //Si no, activo la gui seguent
        else {
            //temporitzador:
            //for (long i = 0L; i < 1000000000L; i++) {
            //}
            gui.setAlwaysOnTop(false);
            Gui r = llistaGuis.get((jugadorQueTira + 1) % 4);
            r.setAlwaysOnTop(true);
            r.toFront();
        }
    }
View Full Code Here

        //activo i desactivo els botons pertinents
        desActivarBotonsCantar(gui);
        gui.getJbPassar().setEnabled(false);

        //Ha de posar-se actiu nomès el botó novaBasa de quiReparteix + 1
        Gui r = llistaGuis.get((partida.getQuiReparteix() + 1) % 4);
        r.getJbNovaBasa().setEnabled(true);

        //Es posa a davant la gui de qui reparteix + 1. Per fer-ho primer les desactivo totes
        for (Gui g : llistaGuis) {
            g.setAlwaysOnTop(false);
        }
        r.setAlwaysOnTop(true);
        r.toFront();

    }
View Full Code Here

        System.out.println("De la llista" + g.getEoid());
        }
         */

        //així és molt cutre però si ho faig amb for tinc problemes amb el eoid de la gui
        Gui g1 = new Gui(0, this);
        Gui g2 = new Gui(1, this);
        Gui g3 = new Gui(2, this);
        Gui g4 = new Gui(3, this);
        llistaGuis.add(g1);
        llistaGuis.add(g2);
        llistaGuis.add(g3);
        llistaGuis.add(g4);

View Full Code Here

        desActivarBotonsCantar(gui);
        gui.getJbPassar().setEnabled(false);

        //activem els botons de cantar trumfo del company
        int company = (gui.getEoid() + 2) % 4;
        Gui guiCompany = llistaGuis.get(company);
        activarBotonsCantar(guiCompany);
    }
View Full Code Here

        System.out.println("De la llista" + g.getEoid());
        }
         */

        //així és molt cutre però si ho faig amb for tinc problemes amb el eoid de la gui
        Gui g1 = new Gui(0, this);
        Gui g2 = new Gui(1, this);
        Gui g3 = new Gui(2, this);
        Gui g4 = new Gui(3, this);
        llistaGuis.add(g1);
        llistaGuis.add(g2);
        llistaGuis.add(g3);
        llistaGuis.add(g4);

View Full Code Here

TOP

Related Classes of presentacio.Gui

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.