📄 piece.java
字号:
package com.xmu.typot.domain;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
public class Piece {
private Square location;
private BufferedImage bf;
public Piece(Square location, BufferedImage bf)
{
this.location=location;
this.bf = bf;
}
public Square getLocation()
{
return location;
}
public void setLocation(Square location)
{
this.location=location;
}
public void draw(Graphics2D g2d)
{
g2d.drawImage(bf,this.getLocation().getStartX(),this.getLocation().getStartY(),null);
}
public BufferedImage getBf() {
return bf;
}
public void setBf(BufferedImage bf) {
this.bf = bf;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -