|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.utils.HUDFont
public class HUDFont
The HUDFont abstracts fonts usable on the HUD.
TODO: The font size should be as euqually sized on each Canvas3D resolution. For this to work, the underlying AWT-Font must be selected appropriately to avoid scaling.
| Nested Class Summary | |
|---|---|
static class |
HUDFont.FontStyle
|
| Field Summary | |
|---|---|
static HUDFont.FontStyle |
BOLD
|
static HUDFont.FontStyle |
BOLD_ITALIC
|
static HUDFont.FontStyle |
ITALIC
|
static HUDFont.FontStyle |
PLAIN
|
| Method Summary | |
|---|---|
HUDFont |
derive(HUDFont.FontStyle style)
Returns a derived font instance. |
HUDFont |
derive(HUDFont.FontStyle style,
int size)
Returns a derived font instance. |
HUDFont |
derive(int size)
Returns a derived font instance. |
java.awt.Font |
getAWTFont(HUD hud)
Returns the underlying Font. |
static HUDFont |
getFont(java.lang.String name,
HUDFont.FontStyle style,
int size)
Returns the corresponding HUDFont instance. |
static HUDFont |
getFont(java.net.URL url,
HUDFont.FontStyle style,
int size)
Returns the corresponding HUDFont instance. |
java.awt.FontMetrics |
getFontMetrics(HUD hud)
Returns a matching FontMetrics. |
java.lang.String |
getName()
Returns the font's name. |
int |
getSize()
Returns the size. |
HUDFont.FontStyle |
getStyle()
Returns the style. |
static boolean |
getUseFontScaling()
Gets whether fonts are scaled to match the selected resolution or are simply passed through (different optical size for different resolutions. |
static void |
setUseFontScaling(boolean useFontScaling)
Sets whether fonts are scaled to match the selected resolution or are simply passed through (different optical size for different resolutions. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final HUDFont.FontStyle PLAIN
HUDFont.FontStyle.PLAINpublic static final HUDFont.FontStyle BOLD
HUDFont.FontStyle.BOLDpublic static final HUDFont.FontStyle ITALIC
HUDFont.FontStyle.ITALICpublic static final HUDFont.FontStyle BOLD_ITALIC
HUDFont.FontStyle.BOLD_ITALIC| Method Detail |
|---|
public static final void setUseFontScaling(boolean useFontScaling)
useFontScaling - public static final boolean getUseFontScaling()
public final java.lang.String getName()
public final HUDFont.FontStyle getStyle()
public final int getSize()
public final HUDFont derive(HUDFont.FontStyle style,
int size)
style - size -
public final HUDFont derive(HUDFont.FontStyle style)
style -
public final HUDFont derive(int size)
size -
public final java.awt.Font getAWTFont(HUD hud)
Font.
hud -
Fontpublic final java.awt.FontMetrics getFontMetrics(HUD hud)
FontMetrics.
hud -
FontMetrics.public java.lang.String toString()
toString in class java.lang.Object
public static final HUDFont getFont(java.lang.String name,
HUDFont.FontStyle style,
int size)
name - style - size -
public static final HUDFont getFont(java.net.URL url,
HUDFont.FontStyle style,
int size)
throws java.io.IOException
url - style - size -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||