FileDocCategorySizeDatePackage
OverallStatusPane.javaAPI DocExample1752Tue Dec 12 18:58:44 GMT 2000bingo.shared

OverallStatusPane

public class OverallStatusPane extends JPanel implements BallListener

Fields Summary
GameStatusLabel
gameStatusLabel
LightBoardPane
lightBoardPane
PlayerInfoPane
playerInfoPane
Constructors Summary
public OverallStatusPane()

	super(false);

        // Do the layout.
	setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
	Dimension pad = new Dimension(0, 5);

        // first row
	gameStatusLabel =  new GameStatusLabel();
	gameStatusLabel.setAlignmentX(0.0f); //left align
	add(gameStatusLabel);
	add(Box.createVerticalStrut(5));

	// second row
	lightBoardPane = new LightBoardPane(0);
	lightBoardPane.setAlignmentX(0.0f); //left align
	add(lightBoardPane);
	add(Box.createVerticalStrut(5));

	// third row
	playerInfoPane = new PlayerInfoPane();
	//playerInfoPane.setPreferredSize(new Dimension(300, 100));
	playerInfoPane.setMaximumSize(new Dimension(Short.MAX_VALUE,
						    Short.MAX_VALUE));
	playerInfoPane.setAlignmentX(0.0f);
	add(playerInfoPane);

        try {
            new BallListenerThread(this).start();
        } catch (java.io.IOException e) {
            System.err.println("IOException when creating/starting BallListenerThread.");
        }
    
Methods Summary
public voidballCalled(BingoBall b)

	final BingoBall ball = b; //cache so inner class can use it.
	SwingUtilities.invokeLater(new Runnable() {
		public void run() {
		    lightBoardPane.displayNewBall(ball);
		}
	    });
    
public voidnoMoreBalls()

	SwingUtilities.invokeLater(new Runnable() {
		public void run() {
	            playerInfoPane.clear();
	            lightBoardPane.clear();
		}
	    });