|
@@ -1,5 +1,6 @@
|
|
|
package ui.view;
|
|
|
|
|
|
+import java.awt.Color;
|
|
|
import java.awt.event.ActionEvent;
|
|
|
import java.awt.event.ActionListener;
|
|
|
import java.io.BufferedReader;
|
|
@@ -95,6 +96,10 @@ public class AlgorithmMenu extends JMenu {
|
|
|
|
|
|
@Override
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
+ for (int i = 0; i < mnSelectAlgorithm.getItemCount(); i++) {
|
|
|
+ mnSelectAlgorithm.getItem(i).setForeground(null);
|
|
|
+ }
|
|
|
+ tempItem.setForeground(Color.BLUE);
|
|
|
setAlgorithm(algosHash.get(tempItem.getText()), tempItem.getText());
|
|
|
}
|
|
|
});
|
|
@@ -111,9 +116,14 @@ public class AlgorithmMenu extends JMenu {
|
|
|
this.add(algoFolderButton);
|
|
|
this.add(mnSelectAlgorithm);
|
|
|
mnSelectAlgorithm.add(noneItem);
|
|
|
+ noneItem.setForeground(Color.BLUE);
|
|
|
noneItem.addActionListener(new ActionListener() {
|
|
|
@Override
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
+ for (int i = 0; i < mnSelectAlgorithm.getItemCount(); i++) {
|
|
|
+ mnSelectAlgorithm.getItem(i).setForeground(null);
|
|
|
+ }
|
|
|
+ noneItem.setForeground(Color.BLUE);
|
|
|
controller.setAlgorithm(null);
|
|
|
}
|
|
|
});
|