Example usage for java.awt Color toString

List of usage examples for java.awt Color toString

Introduction

In this page you can find the example usage for java.awt Color toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of this Color .

Usage

From source file:Main.java

public static void main(String[] args) {
    Color myColor = Color.RED;

    System.out.println(myColor.toString());

}

From source file:ColorComboBoxEditor.java

protected void fireActionEvent(Color color) {
    Object listeners[] = listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == ActionListener.class) {
            ActionEvent actionEvent = new ActionEvent(editor, ActionEvent.ACTION_PERFORMED, color.toString());
            ((ActionListener) listeners[i + 1]).actionPerformed(actionEvent);
        }/*from   ww w .j a  v  a 2 s .c  om*/
    }
}

From source file:edu.ku.brc.specify.tests.PreferenceTest.java

/**
 * Tests the Color//from   w w w. ja va2 s.  co m
 */
public void testColorWrapperCache() {

    String attrName = "valErrColorTest";

    ColorWrapper colorWrapper = new ColorWrapper("255, 128, 64");

    Color oldColor = new Color(255, 128, 64);

    assertTrue(oldColor.toString().equals(colorWrapper.getColor().toString()));

    AppPrefsCache.register(colorWrapper, "ui", "formatting", attrName);

    String newColorStr = "64, 255, 128";
    //Color newColor = new Color(64, 255, 128);

    AppPreferences.getRemote().put("ui.formatting." + attrName, newColorStr);
    //try {
    //    AppPreferences.getInstance().flush();
    //} catch (BackingStoreException ex) {}

    log.info("New Color: " + colorWrapper.toString() + " [" + newColorStr + "]");

    assertTrue(AppPrefsCache.getValue("ui", "formatting", attrName).equals(newColorStr));
    assertTrue(colorWrapper.toString().equals(newColorStr));
}

From source file:com.chart.SwingChart.java

/**
 * /* w  w w .j a va2 s .  c  om*/
 * @param axis Axis name to wich the new series belongs
 * @param cs Series Coinfiguration
 */
@Override
public final void addSeries(String axis, SimpleSeriesConfiguration cs) {
    for (int i = 0; i < axes.size(); i++) {
        if (axes.get(i).getName().equals(axis)) {
            String strColor;
            javafx.scene.paint.Color color;
            int indice = seriesList.size();
            if (cs.getColor() == null) {
                color = getColor(indice);
            } else {
                color = cs.getColor();
            }
            strColor = color.toString();

            XYSeriesCollection dataset = datasetList.get(i);
            Series series = new Series(cs.getName(), "color: " + strColor + ";width: "
                    + String.valueOf(cs.getLineWidth()) + ";shape: " + cs.getShapeName() + ";", i,
                    dataset.getSeriesCount());
            dataset.addSeries(series);

            XYItemRenderer renderer = plot.getRenderer(i);
            renderer.setSeriesPaint(dataset.getSeriesCount() - 1, scene2awtColor(color));

            SeriesShape simb = new SeriesShape(cs.getShapeName(),
                    javafx.scene.paint.Color.web(strColor.replace("#", "0x")));

            if (cs.getLineWidth() > 0) {
                ((XYLineAndShapeRenderer) renderer).setSeriesLinesVisible(dataset.getSeriesCount() - 1, true);
                renderer.setSeriesStroke(dataset.getSeriesCount() - 1, new BasicStroke(cs.getLineWidth()));
            } else {
                ((XYLineAndShapeRenderer) renderer).setSeriesLinesVisible(dataset.getSeriesCount() - 1, false);
            }

            if (cs.getShapeName().equals("null")) {
                renderer.setSeriesShape(dataset.getSeriesCount() - 1, null);
                ((XYLineAndShapeRenderer) renderer).setSeriesShapesVisible(dataset.getSeriesCount() - 1, false);
            } else {
                renderer.setSeriesShape(dataset.getSeriesCount() - 1, simb.getShapeAWT());
                ((XYLineAndShapeRenderer) renderer).setSeriesShapesVisible(dataset.getSeriesCount() - 1, true);
                if (cs.getShapeName().contains("empty")) {
                    ((XYLineAndShapeRenderer) renderer).setSeriesShapesFilled(dataset.getSeriesCount() - 1,
                            false);
                } else {
                    ((XYLineAndShapeRenderer) renderer).setSeriesShapesFilled(dataset.getSeriesCount() - 1,
                            true);
                }
            }

            if (i == 0) {
                plot.setRenderer(renderer);
            } else {
                plot.setRenderer(i, renderer);
            }

            seriesList.add(series);

            final LegendAxis le = getLegendAxis(axis);
            final Label label = new Label(cs.toString());
            Platform.runLater(() -> {
                label.setStyle("fondo: " + strChartBackgroundColor
                        + ";-fx-background-color: fondo;-fx-text-fill: ladder(fondo, white 49%, black 50%);-fx-padding:5px;-fx-background-radius: 5;-fx-font-size: "
                        + String.valueOf(fontSize) + "px");
            });

            label.setOnMouseClicked((MouseEvent t) -> {
                if (t.getClickCount() == 2) {
                    for (int i1 = 0; i1 < seriesList.size(); i1++) {
                        if (seriesList.get(i1).getKey().toString().equals(label.getText())) {
                            editSeries(seriesList.get(i1));
                            break;
                        }
                    }
                }
            });
            label.setOnMouseExited((MouseEvent t) -> {
                label.setStyle(
                        label.getStyle().replace("-fx-background-color: blue", "-fx-background-color: fondo"));
            });
            label.setOnMouseEntered((MouseEvent t) -> {
                label.setStyle(
                        label.getStyle().replace("-fx-background-color: fondo", "-fx-background-color: blue"));
                for (Node le1 : legendFrame.getChildren()) {
                    if (le1 instanceof LegendAxis) {
                        le1.setStyle("-fx-background-color:" + strBackgroundColor);
                        ((LegendAxis) le1).selected = false;
                    }
                }
            });
            label.setStyle("fondo: " + strChartBackgroundColor
                    + ";-fx-text-fill: white;-fx-background-color: fondo;-fx-padding:5px;-fx-background-radius: 5;-fx-font-size: "
                    + String.valueOf(fontSize) + "px");

            le.getChildren().add(label);
            label.setGraphic(simb.getShapeGraphic());

            break;
        }
    }
}

From source file:network.view.relacoesEntidadesUI.GraphViewEntity.java

private void colorCluster(Set vertices, Color c) {
    for (Iterator iter = vertices.iterator(); iter.hasNext();) {
        Vertex v = (Vertex) iter.next();
        System.out.println("Vertex: " + v.toString() + "  Color: " + c.toString());
        if (!v.toString().equals("V0"))
            v.setUserDatum(DEMOKEY, c, UserData.REMOVE);
    }//from   ww w .j a v  a2s .  c o m
}

From source file:org.pentaho.reporting.engine.classic.core.modules.parser.bundle.writer.StyleWriterUtility.java

public static void writeBorderStyles(final XmlWriter writer, final ElementStyleSheet style) throws IOException {
    if (writer == null) {
        throw new NullPointerException();
    }/*from  www  .j  a  va 2s.c  o m*/
    if (style == null) {
        throw new NullPointerException();
    }

    final AttributeList bandStyleAtts = new AttributeList();

    if (style.isLocalKey(ElementStyleKeys.BACKGROUND_COLOR)) {
        final Color value = (Color) style.getStyleProperty(ElementStyleKeys.BACKGROUND_COLOR);
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "background-color",
                ColorValueConverter.colorToString(value));
    }

    final FastDecimalFormat absoluteLengthFormat = getAbsoluteLengthFormat();
    if (style.isLocalKey(ElementStyleKeys.PADDING_TOP) && style.isLocalKey(ElementStyleKeys.PADDING_LEFT)
            && style.isLocalKey(ElementStyleKeys.PADDING_BOTTOM)
            && style.isLocalKey(ElementStyleKeys.PADDING_RIGHT)) {
        final double paddingTop = style.getDoubleStyleProperty(ElementStyleKeys.PADDING_TOP, 0);
        final double paddingLeft = style.getDoubleStyleProperty(ElementStyleKeys.PADDING_LEFT, 0);
        final double paddingBottom = style.getDoubleStyleProperty(ElementStyleKeys.PADDING_BOTTOM, 0);
        final double paddingRight = style.getDoubleStyleProperty(ElementStyleKeys.PADDING_RIGHT, 0);
        if (paddingTop == paddingLeft && paddingTop == paddingRight && paddingTop == paddingBottom) {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding",
                    absoluteLengthFormat.format(paddingTop));
        } else {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding-top",
                    absoluteLengthFormat.format(paddingTop));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding-left",
                    absoluteLengthFormat.format(paddingLeft));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding-bottom",
                    absoluteLengthFormat.format(paddingBottom));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding-right",
                    absoluteLengthFormat.format(paddingRight));
        }
    } else {
        if (style.isLocalKey(ElementStyleKeys.PADDING_TOP)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.PADDING_TOP, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding-top",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.PADDING_LEFT)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.PADDING_LEFT, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding-left",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.PADDING_BOTTOM)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.PADDING_BOTTOM, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding-bottom",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.PADDING_RIGHT)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.PADDING_RIGHT, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "padding-right",
                    absoluteLengthFormat.format(value));
        }
    }

    if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_WIDTH)
            && style.isLocalKey(ElementStyleKeys.BORDER_LEFT_WIDTH)
            && style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_WIDTH)
            && style.isLocalKey(ElementStyleKeys.BORDER_RIGHT_WIDTH)) {
        final double top = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_WIDTH, 0);
        final double left = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_LEFT_WIDTH, 0);
        final double bottom = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_WIDTH, 0);
        final double right = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_RIGHT_WIDTH, 0);
        if (top == left && top == right && top == bottom) {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-width",
                    absoluteLengthFormat.format(top));
        } else {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-width",
                    absoluteLengthFormat.format(top));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-left-width",
                    absoluteLengthFormat.format(left));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-width",
                    absoluteLengthFormat.format(bottom));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-right-width",
                    absoluteLengthFormat.format(right));
        }
    } else {
        if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_WIDTH)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_WIDTH, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-width",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_LEFT_WIDTH)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_LEFT_WIDTH, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-left-width",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_WIDTH)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_WIDTH, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-width",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_RIGHT_WIDTH)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_RIGHT_WIDTH, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-right-width",
                    absoluteLengthFormat.format(value));
        }
    }
    if (style.isLocalKey(ElementStyleKeys.BORDER_BREAK_WIDTH)) {
        final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_BREAK_WIDTH, 0);
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-break-width",
                absoluteLengthFormat.format(value));
    }

    if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_COLOR)
            && style.isLocalKey(ElementStyleKeys.BORDER_LEFT_COLOR)
            && style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_COLOR)
            && style.isLocalKey(ElementStyleKeys.BORDER_RIGHT_COLOR)) {
        final Color top = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_TOP_COLOR);
        final Color left = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_LEFT_COLOR);
        final Color bottom = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_BOTTOM_COLOR);
        final Color right = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_RIGHT_COLOR);
        if (ObjectUtilities.equal(top, left) && ObjectUtilities.equal(top, right)
                && ObjectUtilities.equal(top, bottom)) {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-color",
                    ColorValueConverter.colorToString(top));
        } else {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-color",
                    ColorValueConverter.colorToString(top));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-left-color",
                    ColorValueConverter.colorToString(left));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-color",
                    ColorValueConverter.colorToString(bottom));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-right-color",
                    ColorValueConverter.colorToString(right));
        }
    } else {
        if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_COLOR)) {
            final Color value = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_TOP_COLOR);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-color",
                    ColorValueConverter.colorToString(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_LEFT_COLOR)) {
            final Color value = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_LEFT_COLOR);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-left-color",
                    ColorValueConverter.colorToString(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_COLOR)) {
            final Color value = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_BOTTOM_COLOR);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-color",
                    ColorValueConverter.colorToString(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_RIGHT_COLOR)) {
            final Color value = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_RIGHT_COLOR);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-right-color",
                    ColorValueConverter.colorToString(value));
        }
    }
    if (style.isLocalKey(ElementStyleKeys.BORDER_BREAK_COLOR)) {
        final Color value = (Color) style.getStyleProperty(ElementStyleKeys.BORDER_BREAK_COLOR);
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-break-color",
                ColorValueConverter.colorToString(value));
    }

    if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_STYLE)
            && style.isLocalKey(ElementStyleKeys.BORDER_LEFT_STYLE)
            && style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_STYLE)
            && style.isLocalKey(ElementStyleKeys.BORDER_RIGHT_STYLE)) {
        final Object top = style.getStyleProperty(ElementStyleKeys.BORDER_TOP_STYLE);
        final Object left = style.getStyleProperty(ElementStyleKeys.BORDER_LEFT_STYLE);
        final Object bottom = style.getStyleProperty(ElementStyleKeys.BORDER_BOTTOM_STYLE);
        final Object right = style.getStyleProperty(ElementStyleKeys.BORDER_RIGHT_STYLE);
        if (ObjectUtilities.equal(top, left) && ObjectUtilities.equal(top, right)
                && ObjectUtilities.equal(top, bottom)) {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-style", top.toString());
        } else {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-style", top.toString());
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-left-style", left.toString());
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-style", bottom.toString());
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-right-style", right.toString());
        }
    } else {
        if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_STYLE)) {
            final Object value = style.getStyleProperty(ElementStyleKeys.BORDER_TOP_STYLE);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-style", value.toString());
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_LEFT_STYLE)) {
            final Object value = style.getStyleProperty(ElementStyleKeys.BORDER_LEFT_STYLE);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-left-style", value.toString());
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_STYLE)) {
            final Object value = style.getStyleProperty(ElementStyleKeys.BORDER_BOTTOM_STYLE);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-style", value.toString());
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_RIGHT_STYLE)) {
            final Object value = style.getStyleProperty(ElementStyleKeys.BORDER_RIGHT_STYLE);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-right-style", value.toString());
        }
    }
    if (style.isLocalKey(ElementStyleKeys.BORDER_BREAK_STYLE)) {
        final Object value = style.getStyleProperty(ElementStyleKeys.BORDER_BREAK_STYLE);
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-break-style", value.toString());
    }

    if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_WIDTH)
            && style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH)
            && style.isLocalKey(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_WIDTH)
            && style.isLocalKey(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_WIDTH)) {
        final double bottomLeft = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_WIDTH,
                0);
        final double bottomRight = style
                .getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH, 0);
        final double topLeft = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_WIDTH, 0);
        final double topRight = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_WIDTH, 0);
        if (bottomLeft == bottomRight && bottomLeft == topRight && bottomLeft == topLeft) {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-radius-width",
                    absoluteLengthFormat.format(bottomLeft));
        } else {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-left-radius-width",
                    absoluteLengthFormat.format(topLeft));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-right-radius-width",
                    absoluteLengthFormat.format(topRight));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-left-radius-width",
                    absoluteLengthFormat.format(bottomLeft));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-right-radius-width",
                    absoluteLengthFormat.format(bottomRight));
        }
    } else {
        if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_WIDTH)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_WIDTH, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-left-radius-width",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_WIDTH)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_WIDTH,
                    0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-right-radius-width",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_WIDTH)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_WIDTH,
                    0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-left-radius-width",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_WIDTH,
                    0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-right-radius-width",
                    absoluteLengthFormat.format(value));
        }
    }

    if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_HEIGHT)
            && style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_HEIGHT)
            && style.isLocalKey(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_HEIGHT)
            && style.isLocalKey(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_HEIGHT)) {
        final double bottomLeft = style
                .getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_HEIGHT, 0);
        final double bottomRight = style
                .getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_HEIGHT, 0);
        final double topLeft = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_HEIGHT, 0);
        final double topRight = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_HEIGHT,
                0);
        if (bottomLeft == bottomRight && bottomLeft == topRight && bottomLeft == topLeft) {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-radius-height",
                    absoluteLengthFormat.format(bottomLeft));
        } else {
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-left-radius-height",
                    absoluteLengthFormat.format(topLeft));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-right-radius-height",
                    absoluteLengthFormat.format(topRight));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-left-radius-height",
                    absoluteLengthFormat.format(bottomLeft));
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-right-radius-height",
                    absoluteLengthFormat.format(bottomRight));
        }
    } else {
        if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_HEIGHT)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_LEFT_RADIUS_HEIGHT,
                    0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-left-radius-height",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_HEIGHT)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_TOP_RIGHT_RADIUS_HEIGHT,
                    0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-top-right-radius-height",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_HEIGHT)) {
            final double value = style.getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_LEFT_RADIUS_HEIGHT,
                    0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-left-radius-height",
                    absoluteLengthFormat.format(value));
        }
        if (style.isLocalKey(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_HEIGHT)) {
            final double value = style
                    .getDoubleStyleProperty(ElementStyleKeys.BORDER_BOTTOM_RIGHT_RADIUS_HEIGHT, 0);
            bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "border-bottom-right-radius-height",
                    absoluteLengthFormat.format(value));
        }
    }

    if (bandStyleAtts.isEmpty() == false) {
        writer.writeTag(BundleNamespaces.STYLE, "border-styles", bandStyleAtts, XmlWriterSupport.CLOSE);
    }
}