Examples of GUI


Examples of presentacio.Gui

        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 desactiven les cartes fins que no s'apreti el nova basa
        desactivarCartes(gui);

        //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

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

Examples of presentacio.Gui

            g.getJldirecte().setText("passat");
        }

        //activem els botons de cantar trumfo del company
        int company = (gui.getEoid() + 2) % 4;
        Gui guiCompany = llistaGuis.get(company);
        activarBotonsCantar(guiCompany);
        //activem les cartes del company
        activarCartes(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

Examples of presentacio.Gui

                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());

            //Si s'acaba la partida, mostrem un alert i sortim
            if (partida.sHaAcabatLaPartida()) {
                System.out.println("S'ha acabat la partida");
                String missatge;
                if (partida.getMarcador().getNos() > partida.getMarcador().getVos()) {
                    missatge = "Ha guanyat la parella 1 (els jugadors 0 - 2)";
                } else {
                    missatge = "Ha guanyat la parella 2 (els jugadors 1 - 3)";
                }
                JOptionPane.showMessageDialog(g, missatge, "S'ha acabat la partida", JOptionPane.OK_OPTION);
                for (Gui r : llistaGuis) {
                    r.dispose();
                }
            }

        }
        //Si no és la última, faig la basa
        else {
            System.out.println("Ha de començar el jugador" + partida.getDatActual().getjugadorQueComenca());
            //Passem a primer pla el taulell que començara
            Gui r = llistaGuis.get(partida.getDatActual().getjugadorQueComenca());
            r.toFront();
            r.setAlwaysOnTop(true);
            //activo les cartes operatives
            activarCartes(r);

            retirarCartesTapet();
View Full Code Here

Examples of presentacio.Gui

            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

Examples of presentacio.Gui

        partida.nouDat();

        //pintem les cartes de totes les gui
        for (int i = 0; i < 4; i++) {
            Gui g = llistaGuis.get(i);
            pintaCartes(g, jugadors.get(i));
        }

        //desactivem les cartes de totes les gui (nomès cal al començar
        for (Gui g: llistaGuis){
View Full Code Here

Examples of presentacio.Gui

        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

Examples of presentacio.Gui

        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

Examples of ru.vagrant_ai.questionmarkgame.obj.GUI

  static Pause pause;
 
    public void init(GameContainer gc, StateBasedGame sbg)
    {
      pause = new Pause();
    gui = new GUI();
    broken_object = new BrokenObject();
    player = new Player();
    player.gun = new Gun();
    hp = new HPBar();
    monster = new MonsterHandler(); //not a single monster, but a class controlling randomly generated monsters
View Full Code Here

Examples of swtgui.GUI

    if (args.length > 0)
      sudoku = new Sudoku(LoadSudoku.getInstance().loadSudoku(args[0]));
    else
      sudoku = new Sudoku(LoadSudoku.getInstance().loadSudoku("sudokus/mostdifficult.txt"));
    new GUI(sudoku);
  }
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.