private DragBounds makeDragBounds() { final double width = dragBoundsWidthSupplier.get(); final double height = dragBoundsHeightSupplier.get(); return new DragBounds(0, GeneralRectangleDimensionsSet.DEFAULT_HEIGHT, width, height - GeneralRectangleDimensionsSet.DEFAULT_HEIGHT); } }
@Override public final void startDrag(final DragContext dragContext) { final Attributes attr = dragContext.getNode().asNode().getAttributes(); m_constraint = attr.getDragConstraint(); m_bounds = attr.getDragBounds(); if (null != m_bounds) { final double x = attr.getX(); final double y = attr.getY(); if (m_bounds.isX1()) { m_dx1 = m_bounds.getX1() - x; } if (m_bounds.isX2()) { m_dx2 = m_bounds.getX2() - x; } if (m_bounds.isY1()) { m_dy1 = m_bounds.getY1() - y; } if (m_bounds.isY2()) { m_dy2 = m_bounds.getY2() - y; } } }
public final void setDragBounds(final DragBounds bounds) { if (null != bounds) { put(Attribute.DRAG_BOUNDS.getProperty(), bounds.getJSO()); } else { remove(Attribute.DRAG_BOUNDS.getProperty()); } }
public final void setDragBounds(final DragBounds bounds) { if (null != bounds) { put(Attribute.DRAG_BOUNDS.getProperty(), bounds.getJSO()); } else { remove(Attribute.DRAG_BOUNDS.getProperty()); } }
@Override public final void startDrag(final DragContext dragContext) { final Attributes attr = dragContext.getNode().asNode().getAttributes(); m_constraint = attr.getDragConstraint(); m_bounds = attr.getDragBounds(); if (null != m_bounds) { final double x = attr.getX(); final double y = attr.getY(); if (m_bounds.isX1()) { m_dx1 = m_bounds.getX1() - x; } if (m_bounds.isX2()) { m_dx2 = m_bounds.getX2() - x; } if (m_bounds.isY1()) { m_dy1 = m_bounds.getY1() - y; } if (m_bounds.isY2()) { m_dy2 = m_bounds.getY2() - y; } } }
public final DragBounds getDragBounds() { final JavaScriptObject bounds = getObject(Attribute.DRAG_BOUNDS.getProperty()); if (null != bounds) { final DragBoundsJSO djso = bounds.cast(); return new DragBounds(djso); } return null; }
public final void setDragBounds(final DragBounds bounds) { if (null != bounds) { put(Attribute.DRAG_BOUNDS.getProperty(), bounds.getJSO()); } else { remove(Attribute.DRAG_BOUNDS.getProperty()); } }
@Override public final void startDrag(final DragContext dragContext) { final Attributes attr = dragContext.getNode().asNode().getAttributes(); m_constraint = attr.getDragConstraint(); m_bounds = attr.getDragBounds(); if (null != m_bounds) { final double x = attr.getX(); final double y = attr.getY(); if (m_bounds.isX1()) { m_dx1 = m_bounds.getX1() - x; } if (m_bounds.isX2()) { m_dx2 = m_bounds.getX2() - x; } if (m_bounds.isY1()) { m_dy1 = m_bounds.getY1() - y; } if (m_bounds.isY2()) { m_dy2 = m_bounds.getY2() - y; } } }
public final DragBounds getDragBounds() { JavaScriptObject bounds = getObject(Attribute.DRAG_BOUNDS.getProperty()); if (null != bounds) { DragBoundsJSO djso = bounds.cast(); return new DragBounds(djso); } return null; }
public final void setDragBounds(DragBounds bounds) { if (null != bounds) { put(Attribute.DRAG_BOUNDS.getProperty(), bounds.getJSO()); } else { delete(Attribute.DRAG_BOUNDS.getProperty()); } }
@Override public final void startDrag(final DragContext dragContext) { final Attributes attr = dragContext.getNode().asNode().getAttributes(); m_constraint = attr.getDragConstraint(); m_bounds = attr.getDragBounds(); if (null != m_bounds) { final double x = attr.getX(); final double y = attr.getY(); if (m_bounds.isX1()) { m_dx1 = m_bounds.getX1() - x; } if (m_bounds.isX2()) { m_dx2 = m_bounds.getX2() - x; } if (m_bounds.isY1()) { m_dy1 = m_bounds.getY1() - y; } if (m_bounds.isY2()) { m_dy2 = m_bounds.getY2() - y; } } }
public final DragBounds getDragBounds() { final JavaScriptObject bounds = getObject(Attribute.DRAG_BOUNDS.getProperty()); if (null != bounds) { final DragBoundsJSO djso = bounds.cast(); return new DragBounds(djso); } return null; }
public final void setDragBounds(final DragBounds bounds) { if (null != bounds) { put(Attribute.DRAG_BOUNDS.getProperty(), bounds.getJSO()); } else { remove(Attribute.DRAG_BOUNDS.getProperty()); } }
public final DragBounds getDragBounds() { final JavaScriptObject bounds = getObject(Attribute.DRAG_BOUNDS.getProperty()); if (null != bounds) { final DragBounds.DragBoundsJSO djso = bounds.cast(); return new DragBounds(djso); } return null; }
public final void setDragBounds(final DragBounds bounds) { if (null != bounds) { put(Attribute.DRAG_BOUNDS.getProperty(), bounds.getJSO()); } else { remove(Attribute.DRAG_BOUNDS.getProperty()); } }
public final DragBounds getDragBounds() { final JavaScriptObject bounds = getObject(Attribute.DRAG_BOUNDS.getProperty()); if (null != bounds) { final DragBounds.DragBoundsJSO djso = bounds.cast(); return new DragBounds(djso); } return null; }