private void updateCursor(MouseEvent e) {
final boolean cursorOutsideOfSelectionRectangle =
!rectangleMap.get(DEFAULT).contains(e.getPoint()) &&
worldMapPane.getCursor() != cursorMap.get(DEFAULT);
if (cursorOutsideOfSelectionRectangle) {
worldMapPane.setCursor(cursorMap.get(DEFAULT));
} else {
final String[] regionIdentifiers = {
MOVE,
NORTH,
SOUTH,
WEST,
EAST,
NORTH_WEST,
NORTH_EAST,
SOUTH_WEST,
SOUTH_EAST
};
for (String region : regionIdentifiers) {
boolean cursorIsSet = setCursorWhenContained(cursorMap.get(region), rectangleMap.get(region), e.getPoint());
if (cursorIsSet) {
break;
}
}
}
}