de.heineken.studienarbeit
Class Puffer
JPanel
de.heineken.studienarbeit.Puffer
public class Puffer
extends JPanel
The class Puffer builds up the buffer which later visualizes the solution
Puffer() - Constructor turns the buffer's size to a standard value of 3
|
void | blendeab(int index) - clears the highlighting of an entry
|
void | clear() - Clears the buffer's entries.
|
int | getpuffersize() - Getter Method for the buffer's size
|
void | markiere(int index) - highlights an entry
|
void | rutscherunter(int index) - clears an entry; the rest of entries will drop down and fill the space,
ensuring that the cleared entry is always at the top of the buffer
|
void | setpuffersize(int groesse) - size of the buffer will be shown as a GUI puffer picture
|
private void | setzelabel(int index, String text) - Sets an entry
|
void | setzeneu(int zahl) - New entry can be made
|
int | sucheindex(int zahl) - Searches for the entry's index of an given head position
|
groesse
private int groesse
label
private JLabel[] label
Puffer
public Puffer()
Constructor turns the buffer's size to a standard value of 3
blendeab
public void blendeab(int index)
clears the highlighting of an entry
index
- position of the entry to be highlighted
clear
public void clear()
Clears the buffer's entries.
getpuffersize
public int getpuffersize()
Getter Method for the buffer's size
markiere
public void markiere(int index)
highlights an entry
index
- position of the entry to be highlighted
rutscherunter
public void rutscherunter(int index)
clears an entry; the rest of entries will drop down and fill the space,
ensuring that the cleared entry is always at the top of the buffer
setpuffersize
public void setpuffersize(int groesse)
size of the buffer will be shown as a GUI puffer picture
groesse
- new size of shown buffer
setzelabel
private void setzelabel(int index,
String text)
Sets an entry
setzeneu
public void setzeneu(int zahl)
New entry can be made
zahl
- position entry that should to be overwritten
sucheindex
public int sucheindex(int zahl)
Searches for the entry's index of an given head position
zahl
- head position to be searched for
- in case of an error -1, otherwise
the entry's position is returned to the caller