クラス  Block
java.lang.Object
  |
  +--Model
        |
        +--Movable
              |
              +--Block
- すべての実装インタフェース: 
- java.lang.Cloneable
- public class Block- extends Movable- implements java.lang.Cloneable
ブロック単体を表すクラス。
- 作成者:
- 新田直也
| フィールドの概要 | 
| (パッケージプライベート)  java.awt.Color | col
 | 
| private  int | x
 | 
| private  int | y
 | 
 
| コンストラクタの概要 | 
| Block(int px,
      int py,
      java.awt.Color pc)
 | 
 
| メソッドの概要 | 
| (パッケージプライベート)  void | clear(java.awt.Graphics gr)画面上で消す。
 | 
| (パッケージプライベート)  void | clear(java.awt.Graphics gr,
      int ofsX,
      int ofsY)
 | 
| (パッケージプライベート)  void | draw(java.awt.Graphics gr)描画する。
 | 
| (パッケージプライベート)  int | getX()
 | 
| (パッケージプライベート)  int | getY()
 | 
| (パッケージプライベート)  void | move(int mx,
     int my)ゲームの世界上で移動する。
 | 
| private  void | paint(java.awt.Graphics gr,
      java.awt.Color c1,
      java.awt.Color c2)
 | 
| private  void | paint(java.awt.Graphics gr,
      java.awt.Color c1,
      java.awt.Color c2,
      int ofsX,
      int ofsY)
 | 
| (パッケージプライベート)  void | setX(int x)
 | 
| (パッケージプライベート)  void | setY(int y)
 | 
| (パッケージプライベート)  void | view(java.awt.Graphics gr,
     int ofsX,
     int ofsY)
 | 
 
 
| クラス java.lang.Object から継承したメソッド | 
| equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
x
private int x
y
private int y
col
java.awt.Color col
Block
public Block(int px,
             int py,
             java.awt.Color pc)
setX
void setX(int x)
- 
 
- 
 
getX
int getX()
- 
 
- 
 
setY
void setY(int y)
- 
 
- 
 
getY
int getY()
- 
 
- 
 
paint
private void paint(java.awt.Graphics gr,
                   java.awt.Color c1,
                   java.awt.Color c2,
                   int ofsX,
                   int ofsY)
- 
 
- 
 
paint
private void paint(java.awt.Graphics gr,
                   java.awt.Color c1,
                   java.awt.Color c2)
- 
 
- 
 
draw
final void draw(java.awt.Graphics gr)
- クラス Modelの記述:
- 描画する。
 
- 
- 定義:
- クラス Model内のdraw
 
- 
- パラメータ: 
- gr- 描画対象
 
view
final void view(java.awt.Graphics gr,
                int ofsX,
                int ofsY)
- 
 
- 
 
clear
final void clear(java.awt.Graphics gr)
- クラス Modelの記述:
- 画面上で消す。
 
- 
- 定義:
- クラス Model内のclear
 
- 
- パラメータ: 
- gr- 描画対象
 
clear
final void clear(java.awt.Graphics gr,
                 int ofsX,
                 int ofsY)
- 
 
- 
 
move
void move(int mx,
          int my)
- クラス Movableの記述:
- ゲームの世界上で移動する。
 
- 
- 定義:
- クラス Movable内のmove
 
- 
- パラメータ: 
- mx- x方向の移動量
- my- y方向の移動量