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.
49 lines (34 sloc)
1016 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 rent, price; | |
public TileButton(String name, int TileOnBoard, GameBoard board) { | |
super(name); | |
tile = board.getTile(TileOnBoard); | |
// this.setOpaque(false); | |
this.setContentAreaFilled(false); | |
// this.setBorderPainted(false); | |
this.setInts(); | |
this.setVisible(true); | |
Handler hand = new Handler(price, rent, tile, TileOnBoard, | |
board); | |
this.addActionListener(hand); | |
} | |
public void setInts() { | |
if (this.tile instanceof Tile) { | |
/* | |
* i dont actually really like this method | |
* but i think it should be like that iterator in cash flow | |
* that determines moving over the tiles and if it's landed on | |
* the gui should be brought up already in the handler method | |
*/ | |
} | |
} | |
public void paint(Graphics g) { // Do nothing here } | |
} | |
} |