private String asString(JsOption... options) { String showOptionsString = "{"; for (JsOption option : options) { showOptionsString = showOptionsString + "," + option.toString(); } showOptionsString = showOptionsString.replaceFirst(",", "").concat("}"); return showOptionsString; }
/** * Sets the 'cursorAt' property for this draggable. Please consult the * jQuery documentation for a detailled description of this property. * @param position1 a {@link CssPosition} * @param offset1 the offset from {@code position1} * @param position2 a {@link CssPosition} * @param offset2 the offset from {@code position2} * @return this object */ public DraggableBehavior setCursorAt(final CssPosition position1, final int offset1, final CssPosition position2, final int offset2) { if (position1 == null || position2 == null) options.remove("cursorAt"); else options.put("cursorAt", new JsOption(position1.getName(), offset1), new JsOption(position2.getName(), offset2)); return this; } public DraggableBehavior setCursorAt(final AjaxRequestTarget target, final CssPosition position1, final int offset1, final CssPosition position2, final int offset2) {
/** * Sets the 'cursorAt' property for this draggable. Please consult the * jQuery documentation for a detailled description of this property. * * @param position1 a {@link CssPosition} * @param offset1 the offset from {@code position1} * @param position2 a {@link CssPosition} * @param offset2 the offset from {@code position2} * @return this object */ public DraggableBehavior setCursorAt(final CssPosition position1, final int offset1, final CssPosition position2, final int offset2) { if (position1 == null || position2 == null) { this.options.remove("cursorAt"); } else { this.options.put("cursorAt", new JsOption(position1.getName(), offset1), new JsOption(position2.getName(), offset2)); } return this; }
/** * Sets the 'cursorAt' property for this draggable. Please consult the * jQuery documentation for a detailled description of this property. * * @param position a {@link CssPosition} * @return this object */ public DraggableBehavior setCursorAt(final CssPosition position, final int offset) { if (position == null) { this.options.remove("cursorAt"); } else { this.options.put("cursorAt", new JsOption(position.getName(), offset)); } return this; }
/** * Sets the 'cursorAt' property for this draggable. Please consult the * jQuery documentation for a detailled description of this property. * @param position a {@link CssPosition} * @return this object */ public DraggableBehavior setCursorAt(final CssPosition position, final int offset) { if (position == null) options.remove("cursorAt"); else options.put("cursorAt", new JsOption(position.getName(), offset)); return this; } public DraggableBehavior setCursorAt(final AjaxRequestTarget target, final CssPosition position, final int offset) {