コード例 #1
0
  public KeyBindingsScreen(final Display display) {

    super("Key Bindings", IMPLICIT);

    this.display = display;

    keyBindings = KeyBindings.getInstance();

    screenKeyBinder = new KeyBinderScreen(this);

    addCommand(CMD_RESET);
    setCommandListener(this);

    for (int i = 0; i < KeyBindings.actionNames.length; i++) append("", null);
    updateList();

    alertKeyConflict = new Alert("Key already in use!");
    alertKeyConflict.setType(AlertType.WARNING);
    alertKeyConflict.setTimeout(Alert.FOREVER);
    alertKeyConflict.addCommand(CMD.NO);
    alertKeyConflict.addCommand(CMD.YES);
    alertKeyConflict.setCommandListener(this);

    alertReset = new Alert("Please confirm:");
    alertReset.setString("Reset to default key bindings?");
    alertReset.setType(AlertType.WARNING);
    alertReset.addCommand(CMD.NO);
    alertReset.addCommand(CMD.YES);
    alertReset.setCommandListener(this);
  }