Codota Logo
Geom.grow
Code IndexAdd Codota to your IDE (free)

How to use
grow
method
in
org.jhotdraw.geom.Geom

Best Java code snippets using org.jhotdraw.geom.Geom.grow (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Rectangle2D.Double getFigureDrawingArea() {
  Rectangle2D.Double b = super.getFigureDrawingArea();
  // Grow for connectors
  Geom.grow(b, 10d, 10d);
  return b;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  protected void drawStroke(Graphics2D g) {
    Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
    double grow = AttributeKeys.getPerpendicularDrawGrowth(this);
    Geom.grow(r, grow, grow);

    g.draw(new Line2D.Double(r.x,r.y,r.x+r.width-1,r.y));
  }
}
origin: net.imagej/imagej-ui-swing

@Override
protected void drawStroke(final Graphics2D g) {
  final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone();
  final double grow = AttributeKeys.getPerpendicularDrawGrowth(this);
  Geom.grow(r, grow, grow);
  g.draw(r);
}
origin: net.imagej/imagej-ui-swing

@Override
protected void drawFill(final Graphics2D g) {
  final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone();
  final double grow = AttributeKeys.getPerpendicularFillGrowth(this);
  Geom.grow(r, grow, grow);
  g.fill(r);
}
origin: net.imagej/ij-ui-swing

@Override
protected void drawStroke(final Graphics2D g) {
  final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone();
  final double grow = AttributeKeys.getPerpendicularDrawGrowth(this);
  Geom.grow(r, grow, grow);
  g.draw(r);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
protected void drawFill(Graphics2D g) {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
  double grow = AttributeKeys.getPerpendicularFillGrowth(this);
  Geom.grow(r, grow, grow);
  g.fill(r);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
protected void drawStroke(Graphics2D g) {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
  double grow = AttributeKeys.getPerpendicularDrawGrowth(this);
  Geom.grow(r, grow, grow);
    g.draw(r);
}
// SHAPE AND BOUNDS
origin: net.imagej/ij-ui-swing

@Override
protected void drawFill(final Graphics2D g) {
  final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone();
  final double grow = AttributeKeys.getPerpendicularFillGrowth(this);
  Geom.grow(r, grow, grow);
  g.fill(r);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
protected void drawFill(Graphics2D g) {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
    double grow = AttributeKeys.getPerpendicularFillGrowth(this);
    Geom.grow(r, grow, grow);
  g.fill(r);
}

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
protected void drawStroke(Graphics2D g) {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
  double grow = AttributeKeys.getPerpendicularDrawGrowth(this);
  Geom.grow(r, grow, grow);
  g.draw(r);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Rectangle2D.Double getFigureDrawingArea() {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
  double grow = AttributeKeys.getPerpendicularHitGrowth(this);
  Geom.grow(r, grow, grow);
  return r;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Rectangle2D.Double getDrawingArea() {
  Rectangle2D.Double r = (Rectangle2D.Double) ellipse.getBounds2D();
  double grow = AttributeKeys.getPerpendicularHitGrowth(this);
  Geom.grow(r, grow+1, grow+1);
  return r;
}
origin: net.imagej/imagej-ui-swing

@Override
public Rectangle2D.Double getDrawingArea() {
  final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone();
  final double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d;
  Geom.grow(r, grow, grow);
  return r;
}
origin: net.imagej/ij-ui-swing

@Override
public Rectangle2D.Double getDrawingArea() {
  final Rectangle2D.Double r = (Rectangle2D.Double) bounds.clone();
  final double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d;
  Geom.grow(r, grow, grow);
  return r;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Rectangle2D.Double getDrawingArea() {
  Rectangle2D.Double r = (Rectangle2D.Double) roundrect.getBounds2D();
  double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1;
  Geom.grow(r, grow, grow);
  return r;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override public Rectangle2D.Double getDrawingArea() {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
  double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d;
  Geom.grow(r, grow, grow);
  return r;
}
/**
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

@Override
public Rectangle2D.Double getDrawingArea() {
  Rectangle2D rx = getTransformedShape().getBounds2D();
  Rectangle2D.Double r = (rx instanceof Rectangle2D.Double) ? (Rectangle2D.Double) rx : new Rectangle2D.Double(rx.getX(), rx.getY(), rx.getWidth(), rx.getHeight());
  if (get(TRANSFORM) == null) {
    double g = ODGAttributeKeys.getPerpendicularHitGrowth(this) * 2;
    Geom.grow(r, g, g);
  } else {
    double strokeTotalWidth = AttributeKeys.getStrokeTotalWidth(this);
    double width = strokeTotalWidth / 2d;
    width *= Math.max(get(TRANSFORM).getScaleX(), get(TRANSFORM).getScaleY());
    Geom.grow(r, width, width);
  }
  return r;
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Checks if a Point2D.Double is inside the figure.
 */
@Override
public boolean figureContains(Point2D.Double p) {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
  double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d;
  Geom.grow(r, grow, grow);
  return r.contains(p);
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/**
 * Checks if a Point2D.Double is inside the figure.
 */
@Override
public boolean contains(Point2D.Double p) {
  Rectangle2D.Double r = (Rectangle2D.Double) rectangle.clone();
  double grow = AttributeKeys.getPerpendicularHitGrowth(this) + 1d;
  Geom.grow(r, grow, grow);
  return r.contains(p);
}

origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

public Rectangle2D.Double getFigureDrawBounds() {
  double width = AttributeKeys.getStrokeTotalWidth(this) / 2d;
  if (get(STROKE_JOIN) == BasicStroke.JOIN_MITER) {
    width *= get(STROKE_MITER_LIMIT);
  }
  width++;
  Rectangle2D.Double r = getBounds();
  Geom.grow(r, width, width);
  return r;
}
org.jhotdraw.geomGeomgrow

Javadoc

Resizes the Rectangle2D.Double both horizontally and vertically.

This method modifies the Rectangle2D.Double so that it is h units larger on both the left and right side, and v units larger at both the top and bottom.

The new Rectangle2D.Double has (x - h, y - v) as its top-left corner, a width of width + 2h, and a height of height + 2v.

If negative values are supplied for h and v, the size of the Rectangle2D.Double decreases accordingly. The grow method does not check whether the resulting values of width and height are non-negative.

Popular methods of Geom

  • angle
    Gets the angle of the specified line.
  • angleToPoint
    Gets the point on a rectangle that corresponds to the given angle.
  • cap
    Caps the line defined by p1 and p2 by the number of units specified by radius.
  • center
  • chop
    Returns a point on the edge of the shape which crosses the line from the center of the shape to the
  • contains
    Returns true, if rectangle 1 contains rectangle 2. This method is similar to Rectangle2D.contains, b
  • intersect
  • length
    Gets the distance between to points
  • length2
    Gets the square distance between two points.
  • lineContainsPoint
    Tests if a point is on a line.changed Werner Randelshofer 2003-11-26
  • outcode
    This method computes a binary OR of the appropriate mask values indicating, for each side of Rectang
  • ovalAngleToPoint
    Gets the point on an oval that corresponds to the given angle.
  • outcode,
  • ovalAngleToPoint,
  • pointToAngle,
  • polarToPoint,
  • polarToPoint2D,
  • range

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now