outputDevice.setColor(color.topColor()); outputDevice.setStroke(new BasicStroke((int) border.top(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); outputDevice.drawBorderLine( bounds, BorderPainter.TOP, (int)border.top(), false); } else if (currentSide == BorderPainter.LEFT) { outputDevice.setColor(color.leftColor()); outputDevice.setStroke(new BasicStroke((int) border.left(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); outputDevice.drawBorderLine( bounds, BorderPainter.LEFT, (int)border.left(), false); } else if (currentSide == BorderPainter.RIGHT) { outputDevice.setColor(color.rightColor()); outputDevice.setStroke(new BasicStroke((int) border.right(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); outputDevice.drawBorderLine( bounds, BorderPainter.RIGHT, (int)border.right(), false); } else if (currentSide == BorderPainter.BOTTOM) { outputDevice.setColor(color.bottomColor()); outputDevice.setStroke(new BasicStroke((int) border.bottom(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); outputDevice.drawBorderLine(
outputDevice.setColor(color.topColor()); outputDevice.setStroke(new BasicStroke((int) border.top(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); outputDevice.drawBorderLine( bounds, BorderPainter.TOP, (int)border.top(), false); } else if (currentSide == BorderPainter.LEFT) { outputDevice.setColor(color.leftColor()); outputDevice.setStroke(new BasicStroke((int) border.left(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); outputDevice.drawBorderLine( bounds, BorderPainter.LEFT, (int)border.left(), false); } else if (currentSide == BorderPainter.RIGHT) { outputDevice.setColor(color.rightColor()); outputDevice.setStroke(new BasicStroke((int) border.right(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); outputDevice.drawBorderLine( bounds, BorderPainter.RIGHT, (int)border.right(), false); } else if (currentSide == BorderPainter.BOTTOM) { outputDevice.setColor(color.bottomColor()); outputDevice.setStroke(new BasicStroke((int) border.bottom(), BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); outputDevice.drawBorderLine(
outputDevice.setColor(bcolor.topColor()); outputDevice.setColor(bcolor.bottomColor()); if ((int) border.bottom() == 1) { outputDevice.drawBorderLine(bounds, BorderPainter.BOTTOM, outputDevice.setColor(bcolor.rightColor()); if ((int) border.right() == 1) { outputDevice.drawBorderLine(bounds, BorderPainter.RIGHT, outputDevice.setColor(bcolor.leftColor()); if ((int) border.left() == 1) { outputDevice.drawBorderLine(bounds, BorderPainter.LEFT,
outputDevice.setColor(bcolor.topColor()); outputDevice.setColor(bcolor.bottomColor()); if ((int) border.bottom() == 1) { outputDevice.drawBorderLine(bounds, BorderPainter.BOTTOM, outputDevice.setColor(bcolor.rightColor()); if ((int) border.right() == 1) { outputDevice.drawBorderLine(bounds, BorderPainter.RIGHT, outputDevice.setColor(bcolor.leftColor()); if ((int) border.left() == 1) { outputDevice.drawBorderLine(bounds, BorderPainter.LEFT,
private static void drawText(RenderingContext c, BlockBox box, IdentValue listStyle) { MarkerData.TextMarker text = box.getMarkerData().getTextMarker(); int x = getReferenceX(c, box); x += -text.getLayoutWidth(); int y = getReferenceBaseline(c, box); c.getOutputDevice().setColor(box.getStyle().getColor()); c.getOutputDevice().setFont(box.getStyle().getFSFont(c)); c.getTextRenderer().drawString( c.getOutputDevice(), text.getText(), x, y); } }
public static void paint(RenderingContext c, BlockBox box) { if (box.getMarkerData() == null) { return; } MarkerData markerData = box.getMarkerData(); if (markerData.getImageMarker() != null) { drawImage(c, box, markerData); } else { CalculatedStyle style = box.getStyle(); IdentValue listStyle = style.getIdent(CSSName.LIST_STYLE_TYPE); c.getOutputDevice().setColor(style.getColor()); if (markerData.getGlyphMarker() != null) { drawGlyph(c, box, style, listStyle); } else if (markerData.getTextMarker() != null){ drawText(c, box, listStyle); } } }
public static void paint(RenderingContext c, BlockBox box) { if (box.getMarkerData() == null) { return; } MarkerData markerData = box.getMarkerData(); if (markerData.getImageMarker() != null) { drawImage(c, box, markerData); } else { CalculatedStyle style = box.getStyle(); IdentValue listStyle = style.getIdent(CSSName.LIST_STYLE_TYPE); c.getOutputDevice().setColor(style.getColor()); if (markerData.getGlyphMarker() != null) { drawGlyph(c, box, style, listStyle); } else if (markerData.getTextMarker() != null){ drawText(c, box, listStyle); } } }
private static void drawText(RenderingContext c, BlockBox box, IdentValue listStyle) { MarkerData.TextMarker text = box.getMarkerData().getTextMarker(); int x = getReferenceX(c, box); x += -text.getLayoutWidth(); int y = getReferenceBaseline(c, box); c.getOutputDevice().setColor(box.getStyle().getColor()); c.getOutputDevice().setFont(box.getStyle().getFSFont(c)); c.getTextRenderer().drawString( c.getOutputDevice(), text.getText(), x, y); } }