public void createMarkerData(LayoutContext c) { if (getMarkerData() != null) { return; } StrutMetrics strutMetrics = InlineBoxing.createDefaultStrutMetrics(c, this); boolean imageMarker = false; MarkerData result = new MarkerData(); result.setStructMetrics(strutMetrics); CalculatedStyle style = getStyle(); IdentValue listStyle = style.getIdent(CSSName.LIST_STYLE_TYPE); String image = style.getStringProperty(CSSName.LIST_STYLE_IMAGE); if (! image.equals("none")) { result.setImageMarker(makeImageMarker(c, strutMetrics, image)); imageMarker = result.getImageMarker() != null; } if (listStyle != IdentValue.NONE && ! imageMarker) { if (listStyle == IdentValue.CIRCLE || listStyle == IdentValue.SQUARE || listStyle == IdentValue.DISC) { result.setGlyphMarker(makeGlyphMarker(strutMetrics)); } else { result.setTextMarker(makeTextMarker(c, listStyle)); } } setMarkerData(result); }
public void createMarkerData(LayoutContext c) { if (getMarkerData() != null) { return; } StrutMetrics strutMetrics = InlineBoxing.createDefaultStrutMetrics(c, this); boolean imageMarker = false; MarkerData result = new MarkerData(); result.setStructMetrics(strutMetrics); CalculatedStyle style = getStyle(); IdentValue listStyle = style.getIdent(CSSName.LIST_STYLE_TYPE); String image = style.getStringProperty(CSSName.LIST_STYLE_IMAGE); if (! image.equals("none")) { result.setImageMarker(makeImageMarker(c, strutMetrics, image)); imageMarker = result.getImageMarker() != null; } if (listStyle != IdentValue.NONE && ! imageMarker) { if (listStyle == IdentValue.CIRCLE || listStyle == IdentValue.SQUARE || listStyle == IdentValue.DISC) { result.setGlyphMarker(makeGlyphMarker(strutMetrics)); } else { result.setTextMarker(makeTextMarker(c, listStyle)); } } setMarkerData(result); }