com.alee.examples.groups.desktoppane.tetris
Class Figure

java.lang.Object
  extended by com.alee.examples.groups.desktoppane.tetris.Figure

public class Figure
extends java.lang.Object

User: mgarin Date: 02.06.11 Time: 17:09


Constructor Summary
Figure()
           
Figure(FigureType figureType)
           
Figure(FigureType figureType, Block[] blocks)
           
 
Method Summary
 boolean canMoveDown(java.awt.geom.GeneralPath terrain)
           
 java.util.Map<java.awt.Point,Block> getBlocks()
           
 void moveDown()
           
 void moveLeft(java.awt.geom.GeneralPath terrain)
           
 void moveRight(java.awt.geom.GeneralPath terrain)
           
 void paintFigure(java.awt.Graphics2D g2d)
           
 void paintFigurePreview(java.awt.Graphics2D g2d, javax.swing.JComponent component)
           
 void rotate(java.awt.geom.GeneralPath terrain)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Figure

public Figure()

Figure

public Figure(FigureType figureType)

Figure

public Figure(FigureType figureType,
              Block[] blocks)
Method Detail

rotate

public void rotate(java.awt.geom.GeneralPath terrain)

moveLeft

public void moveLeft(java.awt.geom.GeneralPath terrain)

moveRight

public void moveRight(java.awt.geom.GeneralPath terrain)

moveDown

public void moveDown()

canMoveDown

public boolean canMoveDown(java.awt.geom.GeneralPath terrain)

paintFigure

public void paintFigure(java.awt.Graphics2D g2d)

paintFigurePreview

public void paintFigurePreview(java.awt.Graphics2D g2d,
                               javax.swing.JComponent component)

getBlocks

public java.util.Map<java.awt.Point,Block> getBlocks()