use of org.terasology.engine.rendering.nui.widgets.browser.ui.style.ContainerInteger in project Terasology by MovingBlocks.
the class HTMLUtils method createParagraphRenderStyleFromCommonAttributes.
public static ParagraphRenderStyle createParagraphRenderStyleFromCommonAttributes(Attributes attributes) {
Color textColor = getTextColor(attributes);
ParagraphRenderStyle.FloatStyle floatStyle = getFloatStyle(attributes);
ParagraphRenderStyle.ClearStyle clearStyle = getClearStyle(attributes);
HorizontalAlign horizontalAlign = getHorizontalAlign(attributes);
Color backgroundColor = getBackgroundColor(attributes);
ContainerInteger paragraphMarginTop = getParagraphMarginTop(attributes);
ContainerInteger paragraphMarginBottom = getParagraphMarginBottom(attributes);
ContainerInteger paragraphMarginLeft = getParagraphMarginLeft(attributes);
ContainerInteger paragraphMarginRight = getParagraphMarginRight(attributes);
ContainerInteger paragraphPaddingTop = getParagraphPaddingTop(attributes);
ContainerInteger paragraphPaddingBottom = getParagraphPaddingBottom(attributes);
ContainerInteger paragraphPaddingLeft = getParagraphPaddingLeft(attributes);
ContainerInteger paragraphPaddingRight = getParagraphPaddingRight(attributes);
ContainerInteger minimumWidth = getMinimumWidth(attributes);
return new ParagraphRenderStyle() {
@Override
public Color getColor(boolean hyperlink) {
return textColor;
}
@Override
public FloatStyle getFloatStyle() {
return floatStyle;
}
@Override
public ClearStyle getClearStyle() {
return clearStyle;
}
@Override
public HorizontalAlign getHorizontalAlignment() {
return horizontalAlign;
}
@Override
public Color getParagraphBackground() {
return backgroundColor;
}
@Override
public ContainerInteger getParagraphMarginTop() {
return paragraphMarginTop;
}
@Override
public ContainerInteger getParagraphMarginBottom() {
return paragraphMarginBottom;
}
@Override
public ContainerInteger getParagraphMarginLeft() {
return paragraphMarginLeft;
}
@Override
public ContainerInteger getParagraphMarginRight() {
return paragraphMarginRight;
}
@Override
public ContainerInteger getParagraphPaddingTop() {
return paragraphPaddingTop;
}
@Override
public ContainerInteger getParagraphPaddingBottom() {
return paragraphPaddingBottom;
}
@Override
public ContainerInteger getParagraphPaddingLeft() {
return paragraphPaddingLeft;
}
@Override
public ContainerInteger getParagraphPaddingRight() {
return paragraphPaddingRight;
}
@Override
public ContainerInteger getParagraphMinimumWidth() {
return minimumWidth;
}
};
}
Aggregations