/** * Checks that the place manager is not locked and that the user allows the application to navigate (see {@link * #confirmLeaveState()}. If the application is allowed to navigate, this method locks navigation. * * @return true if the place manager can get the lock false otherwise. */ private boolean getLock() { if (locked) { return false; } if (!confirmLeaveState()) { return false; } lock(); return true; }