if (myEntity == null) {
return menu;
}
if (entityInHex) {
MenuItem item = new MenuItem(Messages.getString("MovementDisplay.butWalk"));
item.setActionCommand(MovementDisplay.MOVE_WALK);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
((MovementDisplay) currentPanel).actionPerformed(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
item = new MenuItem(Messages.getString("MovementDisplay.butBackup"));
item.setActionCommand(MovementDisplay.MOVE_BACK_UP);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
((MovementDisplay) currentPanel).actionPerformed(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
if (myEntity.getJumpMP() > 0) {
item = new MenuItem(Messages.getString("CommonMenuBar.moveJump"));
item.setActionCommand(MovementDisplay.MOVE_JUMP);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
((MovementDisplay) currentPanel).actionPerformed(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
}
if (game.getOptions().booleanOption("tacops_evade")) {
item = new MenuItem(Messages.getString("MovementDisplay.butEvade"));
item.setActionCommand(MovementDisplay.MOVE_EVADE);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
((MovementDisplay) currentPanel).actionPerformed(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
}
if (game.getPlanetaryConditions().isRecklessConditions() && !game.getBoard().inSpace()) {
item = new MenuItem(Messages.getString("MovementDisplay.butReckless"));
item.setActionCommand(MovementDisplay.MOVE_RECKLESS);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
((MovementDisplay) currentPanel).actionPerformed(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
}
} else {
MenuItem item = new MenuItem(Messages.getString("MovementDisplay.butWalk"));
item.setActionCommand(MovementDisplay.MOVE_WALK);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
plotCourse(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
item = new MenuItem(Messages.getString("MovementDisplay.butBackup"));
item.setActionCommand(MovementDisplay.MOVE_BACK_UP);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
plotCourse(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
if (myEntity.getJumpMP() > 0) {
item = new MenuItem(Messages.getString("CommonMenuBar.moveJump"));
item.setActionCommand(MovementDisplay.MOVE_JUMP);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
plotCourse(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
}
if (game.getOptions().booleanOption("tacops_evade")) {
item = new MenuItem(Messages.getString("MovementDisplay.butEvade"));
item.setActionCommand(MovementDisplay.MOVE_EVADE);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
plotCourse(e);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
menu.add(item);
}
if (game.getPlanetaryConditions().isRecklessConditions() && !game.getBoard().inSpace()) {
item = new MenuItem(Messages.getString("MovementDisplay.butReckless"));
item.setActionCommand(MovementDisplay.MOVE_RECKLESS);
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
plotCourse(e);
} catch (Exception ex) {
ex.printStackTrace();