final LayoutElement currentNode,
final StyleKey key)
{
final LayoutContext layoutContext = currentNode.getLayoutContext();
final CSSValue value = layoutContext.getValue(key);
CSSStringValue lineEllipsis = null;
CSSStringValue blockEllipsis = null;
if (value instanceof CSSValueList)
{
final CSSValueList vlist = (CSSValueList) value;
if (vlist.getLength() == 2)
{
lineEllipsis = filterString(vlist.getItem(0));
blockEllipsis = filterString(vlist.getItem(1));
}
else if (vlist.getLength() == 1)
{
lineEllipsis = filterString(vlist.getItem(0));
blockEllipsis = filterString(vlist.getItem(0));
}
}
if (lineEllipsis == null)
{
lineEllipsis = new CSSStringValue(CSSStringType.STRING, "..");
}
if (blockEllipsis == null)
{
blockEllipsis = new CSSStringValue(CSSStringType.STRING, "..");
}
layoutContext.setValue(TextStyleKeys.X_BLOCK_TEXT_OVERFLOW_ELLIPSIS, blockEllipsis);
layoutContext.setValue(TextStyleKeys.X_LINE_TEXT_OVERFLOW_ELLIPSIS, lineEllipsis);
}