Position() { this.clientName = name().toLowerCase(Locale.ENGLISH).replace('_', '-'); }
/** * Creates {@link Position} from the client side representation property * name * * @param clientName * the client side representation of the property * @return corresponding {@link Position} */ static Position fromClientName(String clientName) { return clientName == null ? null : Position.valueOf(clientName.replace('-', '_') .toUpperCase(Locale.ENGLISH)); } }
/** * Set position of the notification. * <P> * * @param position * the position of the notification. Valid enumerate values are * {@code TOP_STRETCH, TOP_START, TOP_CENTER, TOP_END, MIDDLE, BOTTOM_START, BOTTOM_CENTER, BOTTOM_END, BOTTOM_STRETCH}, * not {@code null} */ public void setPosition(Position position) { setPosition(position.getClientName()); }