Example usage for java.awt.geom Ellipse2D isEmpty

List of usage examples for java.awt.geom Ellipse2D isEmpty

Introduction

In this page you can find the example usage for java.awt.geom Ellipse2D isEmpty.

Prototype

public abstract boolean isEmpty();

Source Link

Document

Determines whether the RectangularShape is empty.

Usage

From source file:com.gargoylesoftware.htmlunit.html.HtmlArea.java

private boolean isEmpty() {
    final String shape = StringUtils.defaultIfEmpty(getShapeAttribute(), "rect").toLowerCase(Locale.ROOT);

    if ("default".equals(shape) && getCoordsAttribute() != null) {
        return false;
    }/*  w w  w.ja va  2 s .  c  om*/

    if ("rect".equals(shape) && getCoordsAttribute() != null) {
        final Rectangle2D rectangle = parseRect();
        return rectangle.isEmpty();
    }

    if ("circle".equals(shape) && getCoordsAttribute() != null) {
        final Ellipse2D ellipse = parseCircle();
        return ellipse.isEmpty();
    }

    if ("poly".equals(shape) && getCoordsAttribute() != null) {
        return false;
    }

    return false;
}