本文整理汇总了Java中cz.vutbr.web.css.CSSProperty.WhiteSpace方法的典型用法代码示例。如果您正苦于以下问题:Java CSSProperty.WhiteSpace方法的具体用法?Java CSSProperty.WhiteSpace怎么用?Java CSSProperty.WhiteSpace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cz.vutbr.web.css.CSSProperty
的用法示例。
在下文中一共展示了CSSProperty.WhiteSpace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setParent
import cz.vutbr.web.css.CSSProperty; //导入方法依赖的package包/类
@Override
public void setParent(ElementBox parent)
{
super.setParent(parent);
if (getParent() != null)
{
//load the relevant style values
transform = getParent().getStyle().getProperty("text-transform");
if (transform == null)
transform = TextTransform.NONE;
//reset the whitespace processing according to the parent settings
CSSProperty.WhiteSpace ws = getParent().getWhiteSpace();
if (ws != ElementBox.WHITESPACE_NORMAL || transform != TextTransform.NONE)
setWhiteSpace(ws);
}
}
示例2: setWhiteSpace
import cz.vutbr.web.css.CSSProperty; //导入方法依赖的package包/类
/**
* Sets the whitespace processing for this box. The text content is then treated accordingly. The text start and text end
* indices are reset to their initial values.
*/
public void setWhiteSpace(CSSProperty.WhiteSpace value)
{
splitws = (value == ElementBox.WHITESPACE_NORMAL || value == ElementBox.WHITESPACE_PRE_WRAP || value== ElementBox.WHITESPACE_PRE_LINE);
collapsews = (value == ElementBox.WHITESPACE_NORMAL || value == ElementBox.WHITESPACE_NOWRAP || value == ElementBox.WHITESPACE_PRE_LINE);
linews = (value == ElementBox.WHITESPACE_NORMAL || value == ElementBox.WHITESPACE_NOWRAP);
//When this is the original box, apply the whitespace. For the copied boxes, the whitespace has been already applied (they contain
//a copy of the original, already processed content).
if (!splitted)
applyWhiteSpace();
//recompute widths (possibly different wrapping)
computeLineLengths();
minwidth = computeMinimalWidth();
maxwidth = computeMaximalWidth();
}