public final class FxGraphicalUtility extends Object
Modifier and Type | Method | Description |
---|---|---|
static Font |
toFont(String aFontName,
String aText,
double aLength,
org.refcodes.graphical.LayoutMode aLayoutMode) |
Calculates the size for the given
Font in order to fit in the
given length (width or height) and returns an accordingly calculated
Font with the same Font.getName() . |
static Font |
toFontHeight(String aFontName,
String aText,
double aHeight) |
Calculates the size for the given
Font in order to fit in the
given height and returns an accordingly calculated Font with the
same Font.getName() . |
static double |
toFontSize(String aFontName,
String aText,
double aLength,
org.refcodes.graphical.LayoutMode aLayoutMode) |
Calculates the size for the given
Font in order to fit in the
given length (width or height). |
static double |
toFontSizeHeight(String aFontName,
String aText,
double aHeight) |
Calculates the size for the given
Font in order to fit in the
given height. |
static double |
toFontSizeWidth(String aFontName,
String aText,
double aWidth) |
Calculates the size for the given
Font in order to fit in the
given width. |
static Font |
toFontWidth(String aFontName,
String aText,
double aWidth) |
Calculates the size for the given
Font in order to fit in the
given width and returns an accordingly calculated Font with the
same Font.getName() . |
static Image |
toImage(InputStream aInputStream) |
To image.
|
static Image[] |
toImages(InputStream... aInputStreams) |
To images.
|
static Pos |
toPos(org.refcodes.textual.HorizAlignTextMode aHorizAlignTextMode,
org.refcodes.textual.VertAlignTextMode aVertAlignTextMode) |
Converts them text align modes to a
Pos element. |
public static Image toImage(InputStream aInputStream)
aInputStream
- the input streampublic static Image[] toImages(InputStream... aInputStreams)
aInputStreams
- the input streamspublic static double toFontSizeWidth(String aFontName, String aText, double aWidth)
Font
in order to fit in the
given width.aFontName
- The name of the Font
to be used.aText
- The text for which to calculate the font size in order to
fit into the given width.aWidth
- The length width in which the text with the newly
calculated font-size is to fit.Font
in
order for the given text to fit into the provided width.public static double toFontSizeHeight(String aFontName, String aText, double aHeight)
Font
in order to fit in the
given height.aFontName
- The name of the Font
to be used.aText
- The text for which to calculate the font size in order to
fit into the given height.aHeight
- The height in which the text with the newly calculated
font-size is to fit.Font
in
order for the given text to fit into the provided height.public static double toFontSize(String aFontName, String aText, double aLength, org.refcodes.graphical.LayoutMode aLayoutMode)
Font
in order to fit in the
given length (width or height).aFontName
- The name of the Font
to be used.aText
- The text for which to calculate the font size in order to
fit into the given length (width or height).aLength
- The length (width or height, as of the LayoutMode
)
in which the text with the newly calculated font-size is to fit.aLayoutMode
- The mode to determine whether to use the width or the
height to calculate relative to.Font
in
order for the given text to fit into the provided length (width
or height).public static Font toFont(String aFontName, String aText, double aLength, org.refcodes.graphical.LayoutMode aLayoutMode)
Font
in order to fit in the
given length (width or height) and returns an accordingly calculated
Font
with the same Font.getName()
.aFontName
- The name of the Font
to be used.aText
- The text for which to calculate the font size in order to
fit into the given length (width or height).aLength
- The length (width or height, as of the LayoutMode
)
in which the text with the newly calculated font-size is to fit.aLayoutMode
- The mode to determine whether to use the width or the
height to calculate relative to.Font
to be used for the given Font
in order for the given text to fit into the provided length
(width or height).public static Font toFontWidth(String aFontName, String aText, double aWidth)
Font
in order to fit in the
given width and returns an accordingly calculated Font
with the
same Font.getName()
.aFontName
- The name of the Font
to be used.aText
- The text for which to calculate the font size in order to
fit into the given width.aWidth
- The width in which the text with the newly calculated
font-size is to fit.Font
to be used for the given Font
in order for the given text to fit into the provided width.public static Font toFontHeight(String aFontName, String aText, double aHeight)
Font
in order to fit in the
given height and returns an accordingly calculated Font
with the
same Font.getName()
.aFontName
- The name of the Font
to be used.aText
- The text for which to calculate the font size in order to
fit into the given height.aHeight
- The height in which the text with the newly calculated
font-size is to fit.Font
to be used for the given Font
in order for the given text to fit into the provided height.Copyright © 2021. All rights reserved.