Package diva.canvas.toolbox

Examples of diva.canvas.toolbox.RoundedRectangle


                if (object instanceof NamedObj && cf != null && !_transformed
                        && _results != null
                        && _results.get(_currentPosition).containsValue(object)) {
                    Rectangle2D bounds = cf.getBackgroundFigure().getBounds();
                    float padding = _HIGHLIGHT_PADDING;
                    RoundedRectangle rf = new RoundedRectangle(
                            bounds.getX() - padding, bounds.getY() - padding,
                            bounds.getWidth() + padding * 2.0,
                            bounds.getHeight() + padding * 2.0,
                            null, _HIGHLIGHT_THICKNESS, 32.0, 32.0);
                    rf.setStrokePaint(_HIGHLIGHT_COLOR);

                    int index = cf.getFigureCount();
                    if (index < 0) {
                        index = 0;
                    }
View Full Code Here


    public Icon createIcon() {
        if (_iconCache != null) {
            return _iconCache;
        }

        Figure figure = new RoundedRectangle(0, 0, 20, 10, Color.LIGHT_GRAY,
                2.0f, 5.0, 5.0);
        _iconCache = new FigureIcon(figure, 20, 15);
        return _iconCache;
    }
View Full Code Here

        if (_spacingValue == 0.0) {
            if (_roundingValue == 0.0) {
                return new BasicRectangle(0, 0, width, height, _getFill(),
                        _getLineWidth());
            } else {
                return new RoundedRectangle(0, 0, width, height, _getFill(),
                        _getLineWidth(), _roundingValue, _roundingValue);
            }
        } else {
            CompositeFigure result;
            if (_roundingValue == 0.0) {
                result = new CompositeFigure(new BasicRectangle(-_spacingValue,
                        -_spacingValue, width + 2 * _spacingValue, height + 2
                                * _spacingValue, null, _getLineWidth()));
                result.add(new BasicRectangle(0, 0, width, height, _getFill(),
                        _getLineWidth()));
            } else {
                result = new CompositeFigure(new RoundedRectangle(
                        -_spacingValue, -_spacingValue, width + 2
                                * _spacingValue, height + 2 * _spacingValue,
                        null, _getLineWidth(), _roundingValue + _spacingValue,
                        _roundingValue + _spacingValue));
                result.add(new RoundedRectangle(0, 0, width, height,
                        _getFill(), _getLineWidth(), _roundingValue,
                        _roundingValue));
            }
            return result;
        }
View Full Code Here

TOP

Related Classes of diva.canvas.toolbox.RoundedRectangle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.