@Override
public void actionPerformed(ActionEvent ev) {
if (ev.getSource() == btGenerateBlocks) {
for (int i = 0; i < (Integer)spIterationNumber.getValue(); i++) {
Scheme newScheme = BlocksGenerator.generateBlocks(currentScheme.start);
newScheme.appendMoves(currentScheme);currentScheme = newScheme;
newScheme = MixGenerator.generatePrevious(
(Double)spPreviouPbb.getValue(), currentScheme);
newScheme.appendMoves(currentScheme); currentScheme = newScheme;
newScheme = MixGenerator.generateEquivalent(
(Double)spEquivalentPbb.getValue(), currentScheme);
newScheme.appendMoves(currentScheme); currentScheme = newScheme;
}
currentScheme.optimizeMoves();
dialogResult(currentScheme);
} else
if (ev.getSource() == btGenerateEquivalent) {
Scheme mixedScheme = MixGenerator.generateEquivalent(
(Double)spEquivalentPbb.getValue(), currentScheme);
mixedScheme.appendMoves(currentScheme);
currentScheme = mixedScheme;
dialogResult(currentScheme);
} else
if (ev.getSource() == btGeneratePrevious) {
Scheme mixedScheme = MixGenerator.generatePrevious(
(Double)spPreviouPbb.getValue(), currentScheme);
mixedScheme.appendMoves(currentScheme);
currentScheme = mixedScheme;
dialogResult(currentScheme);
} else
if (ev.getSource() == btOriginalScheme) {
currentScheme = originalScheme;