Files

42 lines
838 B
Java
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package fr.iut_fbleau.Avalam.ui;
import javax.swing.*;
import java.awt.*;
/**
* La classe <code>TurnView</code> affiche le joueur à qui c'est le tour.
*
* Elle agit comme une simple bannière dinformation,
* mise à jour par la logique du jeu.
*
* @author
* @version 1.0
*/
public class TurnView extends JPanel {
private JLabel text;
/**
* Constructeur.
*
* @param initial message initial à afficher
*/
public TurnView(String initial) {
setBackground(new Color(220,220,220));
text = new JLabel(initial);
text.setFont(new Font("Arial", Font.BOLD, 20));
add(text);
}
/**
* Met à jour le texte affichant le joueur courant.
*
* @param s message à afficher
*/
public void setTurn(String s) {
text.setText(s);
}
}