Package com._1c.g5.v8.dt.md.ui
Class FormattedStringSettings
- java.lang.Object
-
- com._1c.g5.v8.dt.md.ui.FormattedStringSettings
-
public class FormattedStringSettings extends Object
The settings for formatted text.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FormattedStringSettings.Unit
Possible css size-oriented units.
-
Field Summary
Fields Modifier and Type Field Description static FormattedStringSettings
DEFAULT
Default formatted text settings.static int
DEFAULT_DPI
Common DPI value (100% scaling in Windows).static double
DPI_FONT_SCALE_FACTOR
-
Constructor Summary
Constructors Constructor Description FormattedStringSettings(Font font, Color color, Color backgroundColor, int scale)
The constructor.FormattedStringSettings(Font font, Color color, Color backgroundColor, int scale, FormattedStringSettings.Unit fontSizeUnit, double margin, FormattedStringSettings.Unit marginUnit, double padding, FormattedStringSettings.Unit paddingUnit, double letterSpacing, FormattedStringSettings.Unit letterSpacingUnit, double lineHeight, FormattedStringSettings.Unit lineHeightUnit)
The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getBackgroundColor()
Returns background color.Color
getColor()
Returns color.Font
getFont()
Returns font.FormattedStringSettings.Unit
getFontSizeUnit()
Returns formatted text font size units.double
getLetterSpacing()
Returns formatted text letter spacing.FormattedStringSettings.Unit
getLetterSpacingUnit()
Returns formatted text letter spacing units.double
getLineHeight()
Returns formatted text line height.FormattedStringSettings.Unit
getLineHeightUnit()
Returns formatted text line height units.double
getMargin()
Returns formatted text margin.FormattedStringSettings.Unit
getMarginUnit()
Returns formatted text margin units.double
getPadding()
Returns formatted text padding.FormattedStringSettings.Unit
getPaddingUnit()
Returns formatted text padding units.int
getScale()
Returns scale factor.static String
removeFormatTags(String stringWithTags)
Removes format tags from given string.
-
-
-
Field Detail
-
DEFAULT_DPI
public static final int DEFAULT_DPI
Common DPI value (100% scaling in Windows).- See Also:
- Constant Field Values
-
DPI_FONT_SCALE_FACTOR
public static double DPI_FONT_SCALE_FACTOR
-
DEFAULT
public static final FormattedStringSettings DEFAULT
Default formatted text settings.
-
-
Constructor Detail
-
FormattedStringSettings
public FormattedStringSettings(Font font, Color color, Color backgroundColor, int scale)
The constructor.- Parameters:
font
- the formatted text font, cannot benull
color
- the formatted text color, cannot benull
background
- color the formatted text color, can benull
scale
- the form scale factor
-
FormattedStringSettings
public FormattedStringSettings(Font font, Color color, Color backgroundColor, int scale, FormattedStringSettings.Unit fontSizeUnit, double margin, FormattedStringSettings.Unit marginUnit, double padding, FormattedStringSettings.Unit paddingUnit, double letterSpacing, FormattedStringSettings.Unit letterSpacingUnit, double lineHeight, FormattedStringSettings.Unit lineHeightUnit)
The constructor.- Parameters:
font
- the formatted text font, cannot benull
color
- the formatted text color, cannot benull
background
- color the formatted text color, can benull
scale
- the form scale factorfontSizeUnit
- the formatted text size unitsmargin
- the formatted text marginmarginUnit
- the formatted text margin unitspadding
- the formatted text paddingpaddingUnit
- the formatted text padding unitsletterSpacing
- the formatted text letter spacingletterSpacingUnit
- the formatted text letter spacing unitslineHeight
- the formatted text line heightlineHeightUnit
- the formatted text line height units
-
-
Method Detail
-
getFont
public Font getFont()
Returns font.- Returns:
- font, cannot be
null
-
getColor
public Color getColor()
Returns color.- Returns:
- color, cannot be
null
-
getBackgroundColor
public Color getBackgroundColor()
Returns background color.- Returns:
- background color, can be
null
-
getScale
public int getScale()
Returns scale factor.- Returns:
- scale factor
-
getPadding
public double getPadding()
Returns formatted text padding.- Returns:
- formatted text padding
-
getMargin
public double getMargin()
Returns formatted text margin.- Returns:
- formatted text margin
-
getLineHeight
public double getLineHeight()
Returns formatted text line height.- Returns:
- formatted text line height
-
getLetterSpacing
public double getLetterSpacing()
Returns formatted text letter spacing.- Returns:
- formatted text letter spacing
-
getPaddingUnit
public FormattedStringSettings.Unit getPaddingUnit()
Returns formatted text padding units.- Returns:
- formatted text padding units
-
getMarginUnit
public FormattedStringSettings.Unit getMarginUnit()
Returns formatted text margin units.- Returns:
- formatted text margin units
-
getLineHeightUnit
public FormattedStringSettings.Unit getLineHeightUnit()
Returns formatted text line height units.- Returns:
- formatted text line height units
-
getLetterSpacingUnit
public FormattedStringSettings.Unit getLetterSpacingUnit()
Returns formatted text letter spacing units.- Returns:
- formatted text letter spacing units
-
getFontSizeUnit
public FormattedStringSettings.Unit getFontSizeUnit()
Returns formatted text font size units.- Returns:
- formatted text font size units
-
-