Class HoleLattice.Basis
java.lang.Object
|
+--HoleLattice.Basis
- Enclosing class:
- HoleLattice
- protected class HoleLattice.Basis
- extends java.lang.Object
Represents a basis in the lattice, consisting of four holes/electrons
around an atom.
|
Field Summary |
protected boolean[] |
holes
Array indicating which of the states are filled
(true), and which are empty (false). |
|
Constructor Summary |
HoleLattice.Basis()
Creates a new basis, with every state filled. |
|
Method Summary |
java.awt.Point |
getPosition(int pos)
Calculates the position of the specified state, with respect
to the top-left corner of the basis. |
void |
paint(java.awt.Graphics g)
Paints this basis onto the specified Graphics surface. |
void |
paintElectron(java.awt.Graphics g,
int x,
int y,
int w,
int h,
int which)
Paints an electron. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
holes
protected boolean[] holes
- Array indicating which of the states are filled
(
true), and which are empty (false).
HoleLattice.Basis
public HoleLattice.Basis()
- Creates a new basis, with every state filled.
paint
public void paint(java.awt.Graphics g)
- Paints this basis onto the specified Graphics surface.
paintElectron
public void paintElectron(java.awt.Graphics g,
int x,
int y,
int w,
int h,
int which)
- Paints an electron.
- Parameters:
g - The Graphics surface on which to paintx - The x-coordinate (in pixels) at which to painty - The y-coordinate (in pixels) at which to paintw - The width (in pixels) of the electronh - The height (in pixels) of the electronwhich - The state number for the electron/hole
getPosition
public java.awt.Point getPosition(int pos)
- Calculates the position of the specified state, with respect
to the top-left corner of the basis.