Search in sources :

Example 1 with KeyProject

use of sw_emulator.swing.main.KeyProject in project jc64 by ice00.

the class JDisassemblerFrame method undo.

/**
 * Popolate menus
 */
private void undo() {
    KeyProject obj;
    Iterator<KeyProject> iter = undo.getAll();
    int i = 0;
    while (iter.hasNext()) {
        obj = iter.next();
        switch(i) {
            case 0:
                jMenuItemUndo1.setText(obj.key);
                jMenuItemUndo1.setEnabled(true);
                break;
            case 1:
                jMenuItemUndo2.setText(obj.key);
                jMenuItemUndo2.setEnabled(true);
                break;
            case 2:
                jMenuItemUndo3.setText(obj.key);
                jMenuItemUndo3.setEnabled(true);
                break;
            case 3:
                jMenuItemUndo4.setText(obj.key);
                jMenuItemUndo4.setEnabled(true);
                break;
            case 4:
                jMenuItemUndo5.setText(obj.key);
                jMenuItemUndo5.setEnabled(true);
                break;
            case 5:
                jMenuItemUndo6.setText(obj.key);
                jMenuItemUndo6.setEnabled(true);
                break;
            case 6:
                jMenuItemUndo7.setText(obj.key);
                jMenuItemUndo7.setEnabled(true);
                break;
            case 7:
                jMenuItemUndo8.setText(obj.key);
                jMenuItemUndo8.setEnabled(true);
                break;
            case 8:
                jMenuItemUndo9.setText(obj.key);
                jMenuItemUndo9.setEnabled(true);
                break;
        }
        i++;
    }
}
Also used : KeyProject(sw_emulator.swing.main.KeyProject)

Aggregations

KeyProject (sw_emulator.swing.main.KeyProject)1