Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
2102-Group-Project-Spring-2017/src/view/TileButton.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
58 lines (31 sloc)
782 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package view; | |
import model.*; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import javax.swing.JButton; | |
public class TileButton extends JButton { | |
private static final long serialVersionUID = 1L; | |
private Tile tile; | |
private int tileNumber; | |
public TileButton(String name, int TileOnBoard, GameBoard board) { | |
super(name); | |
this.setContentAreaFilled(false); | |
setTileNumber(TileOnBoard); | |
// this.setBorderPainted(false); | |
this.setVisible(true); | |
} | |
public void paint(Graphics g) { // Do nothing here } | |
} | |
public Tile getTile() { | |
return tile; | |
} | |
public void setTile(Tile tile) { | |
this.tile = tile; | |
} | |
public int getTileNumber() { | |
return tileNumber; | |
} | |
public void setTileNumber(int tileNumber) { | |
this.tileNumber = tileNumber; | |
} | |
} |