private double[] getChildRelativeCoordinates(final BoundingBox bb) { final double bbx = bb.getX(); final double bby = bb.getY(); final double bbw = bb.getWidth(); final double bbh = bb.getHeight(); final double x = -bbx - (bbw / 2); final double y = -bby - (bbh / 2); return new double[] { x, y }; }
private double[] getChildRelativeCoordinates(final BoundingBox bb) { final double bbx = bb.getX(); final double bby = bb.getY(); final double bbw = bb.getWidth(); final double bbh = bb.getHeight(); final double x = -bbx - (bbw / 2); final double y = -bby - (bbh / 2); return new double[] { x, y }; }
private double[] getChildRelativeCoordinates(final BoundingBox bb) { final double bbx = bb.getX(); final double bby = bb.getY(); final double bbw = bb.getWidth(); final double bbh = bb.getHeight(); final double x = -bbx - (bbw / 2); final double y = -bby - (bbh / 2); return new double[] { x, y }; }
@Override public final boolean equals(final Object other) { if ((other == null) || (false == (other instanceof BoundingBox))) { return false; } if (this == other) { return true; } final BoundingBox that = ((BoundingBox) other); return ((that.getX() == getX()) && (that.getY() == getY()) && (that.getWidth() == getWidth()) && (that.getHeight() == getHeight())); }
@Override public final boolean equals(final Object other) { if ((other == null) || (false == (other instanceof BoundingBox))) { return false; } if (this == other) { return true; } final BoundingBox that = ((BoundingBox) other); return ((that.getX() == getX()) && (that.getY() == getY()) && (that.getWidth() == getWidth()) && (that.getHeight() == getHeight())); }
@Override public boolean equals(Object other) { if ((other == null) || (false == (other instanceof BoundingBox))) { return false; } if (this == other) { return true; } BoundingBox that = ((BoundingBox) other); return ((that.getX() == getX()) && (that.getY() == getY()) && (that.getWidth() == getWidth()) && (that.getHeight() == getHeight())); }
public static Point2D findCenter(final BoundingBox box) { return new Point2D(box.getX() + (box.getWidth() / 2), box.getY() + (box.getHeight() / 2)); }
public static Point2D findCenter(final BoundingBox box) { return new Point2D(box.getX() + (box.getWidth() / 2), box.getY() + (box.getHeight() / 2)); }
public static Point2D findCenter(final BoundingBox box) { return new Point2D(box.getX() + (box.getWidth() / 2), box.getY() + (box.getHeight() / 2)); }
@Override protected final boolean apply(final Context2D context) { context.beginPath(); context.rect(m_bbox.getX(), m_bbox.getY(), m_bbox.getWidth(), m_bbox.getHeight()); context.clip(); return true; } }
@Override protected final boolean apply(final Context2D context) { context.beginPath(); context.rect(m_bbox.getX(), m_bbox.getY(), m_bbox.getWidth(), m_bbox.getHeight()); context.clip(); return true; } }
@Override protected final boolean apply(final Context2D context) { context.beginPath(); context.rect(m_bbox.getX(), m_bbox.getY(), m_bbox.getWidth(), m_bbox.getHeight()); context.clip(); return true; } }
public BoundingPoints(BoundingBox bbox) { double x = bbox.getX(); double y = bbox.getY(); double w = bbox.getWidth(); double h = bbox.getHeight(); m_array.push(new Point2D(x + 0, y + 0)); m_array.push(new Point2D(x + w, y + 0)); m_array.push(new Point2D(x + w, y + h)); m_array.push(new Point2D(x + 0, y + h)); }
public final String toJSONString() { final JSONObject object = new JSONObject(); object.put("x", new JSONNumber(getX())); object.put("y", new JSONNumber(getY())); object.put("width", new JSONNumber(getWidth())); object.put("height", new JSONNumber(getHeight())); return object.toString(); }
public WiresShape(final MultiPath path, final LayoutContainer layoutContainer) { super(layoutContainer.getGroup()); m_path = path; m_ctrls = null; m_resizable = true; m_innerLayoutContainer = layoutContainer; m_innerLayoutContainer.getGroup().setEventPropagationMode(EventPropagationMode.FIRST_ANCESTOR); m_innerLayoutContainer.add(m_path); final BoundingBox box = m_path.refresh().getBoundingBox(); m_innerLayoutContainer.setOffset(new Point2D(box.getX(), box.getY())).setSize(box.getWidth(), box.getHeight()).execute(); }
public final String toJSONString() { JSONObject object = new JSONObject(); object.put("x", new JSONNumber(getX())); object.put("y", new JSONNumber(getY())); object.put("width", new JSONNumber(getWidth())); object.put("height", new JSONNumber(getHeight())); return object.toString(); }
public final String toJSONString() { final JSONObject object = new JSONObject(); object.put("x", new JSONNumber(getX())); object.put("y", new JSONNumber(getY())); object.put("width", new JSONNumber(getWidth())); object.put("height", new JSONNumber(getHeight())); return object.toString(); }
public WiresShape(final MultiPath path, final LayoutContainer layoutContainer) { super(layoutContainer.getGroup()); m_path = path; m_ctrls = null; m_resizable = true; m_innerLayoutContainer = layoutContainer; m_innerLayoutContainer.getGroup().setEventPropagationMode(EventPropagationMode.FIRST_ANCESTOR); m_innerLayoutContainer.add(m_path); final BoundingBox box = m_path.refresh().getBoundingBox(); m_innerLayoutContainer.setOffset(new Point2D(box.getX(), box.getY())).setSize(box.getWidth(), box.getHeight()).execute(); }
public WiresShape(final MultiPath path, final LayoutContainer layoutContainer) { super(layoutContainer.getGroup()); m_path = path; m_ctrls = null; m_resizable = true; m_innerLayoutContainer = layoutContainer; m_innerLayoutContainer.getGroup().setEventPropagationMode(EventPropagationMode.FIRST_ANCESTOR); m_innerLayoutContainer.add(m_path); final BoundingBox box = m_path.refresh().getBoundingBox(); m_innerLayoutContainer.setOffset(new Point2D(box.getX(), box.getY())).setSize(box.getWidth(), box.getHeight()).execute(); }
public final String toJSONString() { final JSONObject object = new JSONObject(); object.put("x", new JSONNumber(getX())); object.put("y", new JSONNumber(getY())); object.put("width", new JSONNumber(getWidth())); object.put("height", new JSONNumber(getHeight())); return object.toString(); }