Search in sources :

Example 66 with Polygon

use of java.awt.Polygon in project airavata by apache.

the class EndForEachNodeGUI method calculatePositions.

private void calculatePositions() {
    this.polygon = new Polygon();
    Point position = getPosition();
    this.polygon.addPoint(position.x, position.y);
    this.polygon.addPoint(position.x, position.y + this.dimension.height + this.headHeight / 2);
    this.polygon.addPoint(position.x + this.dimension.width, position.y + this.dimension.height);
    this.polygon.addPoint(position.x + this.dimension.width, position.y + this.headHeight / 2);
    DrawUtils.setupRoundedGeneralPath(polygon, getComponentShape());
}
Also used : Point(java.awt.Point) Polygon(java.awt.Polygon)

Example 67 with Polygon

use of java.awt.Polygon in project airavata by apache.

the class EndForEachNodeGUI method createHeader.

private Polygon createHeader(Point position) {
    Polygon head = new Polygon();
    head.addPoint(position.x, position.y);
    head.addPoint(position.x, position.y + this.headHeight);
    head.addPoint(position.x + this.dimension.width, position.y + this.headHeight);
    head.addPoint(position.x + this.dimension.width, position.y + this.headHeight / 2);
    return head;
}
Also used : Polygon(java.awt.Polygon)

Example 68 with Polygon

use of java.awt.Polygon in project airavata by apache.

the class EndifNodeGUI method createHeader.

private Polygon createHeader(Point position) {
    Polygon head = new Polygon();
    head.addPoint(position.x, position.y);
    head.addPoint(position.x, position.y + this.headHeight);
    head.addPoint(position.x + this.dimension.width, position.y + this.headHeight);
    head.addPoint(position.x + this.dimension.width, position.y + this.headHeight / 2);
    return head;
}
Also used : Polygon(java.awt.Polygon)

Example 69 with Polygon

use of java.awt.Polygon in project airavata by apache.

the class ForEachNodeGUI method calculatePositions.

private void calculatePositions() {
    // XXX Avoid instantiating a new polygon each time.
    this.polygon = new Polygon();
    Point position = getPosition();
    this.polygon.addPoint(position.x, position.y + this.headHeight / 2);
    this.polygon.addPoint(position.x, position.y + this.dimension.height);
    this.polygon.addPoint(position.x + this.dimension.width, position.y + this.dimension.height + this.headHeight - this.headHeight / 2);
    this.polygon.addPoint(position.x + this.dimension.width, position.y);
    DrawUtils.setupRoundedGeneralPath(polygon, getComponentShape());
}
Also used : Point(java.awt.Point) Polygon(java.awt.Polygon)

Example 70 with Polygon

use of java.awt.Polygon in project airavata by apache.

the class ForEachNodeGUI method createHeader.

private Polygon createHeader(Point position) {
    Polygon head = new Polygon();
    head.addPoint(position.x, position.y + this.headHeight / 2);
    head.addPoint(position.x, position.y + this.headHeight);
    head.addPoint(position.x + this.dimension.width, position.y + this.headHeight);
    head.addPoint(position.x + this.dimension.width, position.y);
    return head;
}
Also used : Polygon(java.awt.Polygon)

Aggregations

Polygon (java.awt.Polygon)192 Point (java.awt.Point)53 Rectangle (java.awt.Rectangle)30 Graphics2D (java.awt.Graphics2D)28 Area (java.awt.geom.Area)22 ArrayList (java.util.ArrayList)21 BasicStroke (java.awt.BasicStroke)20 Color (java.awt.Color)19 Paint (java.awt.Paint)15 Point2D (java.awt.geom.Point2D)13 AffineTransform (java.awt.geom.AffineTransform)12 Rectangle2D (java.awt.geom.Rectangle2D)12 Shape (java.awt.Shape)11 LocalPoint (net.runelite.api.coords.LocalPoint)11 Point (net.runelite.api.Point)10 FloatPolygon (ij.process.FloatPolygon)9 Font (java.awt.Font)8 List (java.util.List)8 FontMetrics (java.awt.FontMetrics)7 Stroke (java.awt.Stroke)7