|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpt.ua.gboard.Gelem
pt.ua.gboard.OneColorGelem
public abstract class OneColorGelem
Abstract graphical element with a unique color.
Constructor Summary | |
---|---|
OneColorGelem(java.awt.Color color)
Constructs a new OneColorGelem (1x1 cells). |
|
OneColorGelem(java.awt.Color color,
int numberOfLines,
int numberOfColumns)
Constructs a new OneColorGelem. |
Method Summary | |
---|---|
void |
draw(java.awt.Graphics g,
int line,
int column,
int cellWidth,
int cellHeight,
java.awt.Color background)
Draw Gelem in GBoard (it should be exported only to GBoard). |
void |
erase(java.awt.Graphics g,
int line,
int column,
int cellWidth,
int cellHeight,
java.awt.Color background)
Erase Gelem from GBoard (it should be exported only to GBoard). |
Methods inherited from class pt.ua.gboard.Gelem |
---|
height, intersects, isMutable, mutable, numberOfColumns, numberOfLines, width, x, y |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OneColorGelem(java.awt.Color color)
requires: color != null
color
- gelem's colorpublic OneColorGelem(java.awt.Color color, int numberOfLines, int numberOfColumns)
requires: color != null
color
- gelem's colornumberOfLines
- number of linesnumberOfColumns
- number of columnsMethod Detail |
---|
public void draw(java.awt.Graphics g, int line, int column, int cellWidth, int cellHeight, java.awt.Color background)
Gelem
requires: g != null && background != null
(incomplete!)
draw
in class Gelem
g
- Java's Graphics object to use in drawingline
- line in GBoard to draw Gelem.column
- column in GBoard to draw Gelem.cellWidth
- number of horizontal pixels per cellcellHeight
- number of vertical pixels per cellbackground
- background colorpublic void erase(java.awt.Graphics g, int line, int column, int cellWidth, int cellHeight, java.awt.Color background)
Gelem
requires: g != null && background != null
(incomplete!)
erase
in class Gelem
g
- Java's Graphics object to use in drawingline
- line in GBoard to draw Gelem.column
- column in GBoard to draw Gelem.cellWidth
- number of horizontal pixels per cellcellHeight
- number of vertical pixels per cell
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |