int (final int resizeMask) { if (resizeMask == (WEST_MASK | NORTH_MASK)) { return Cursor.NW_RESIZE_CURSOR; } else if (resizeMask == NORTH_MASK) { return Cursor.N_RESIZE_CURSOR; } else if (resizeMask == (EAST_MASK | NORTH_MASK)) { return Cursor.NE_RESIZE_CURSOR; } else if (resizeMask == WEST_MASK) { return Cursor.W_RESIZE_CURSOR; } else if (resizeMask == EAST_MASK) { return Cursor.E_RESIZE_CURSOR; } else if (resizeMask == (WEST_MASK | SOUTH_MASK)) { return Cursor.SW_RESIZE_CURSOR; } else if (resizeMask == SOUTH_MASK) { return Cursor.S_RESIZE_CURSOR; } else if (resizeMask == (EAST_MASK | SOUTH_MASK)) { return Cursor.SE_RESIZE_CURSOR; } else { throw new IllegalArgumentException("unknown resizeMask: " + resizeMask); } }