public final class RelativeFont
extends java.lang.Object
implements java.beans.PropertyChangeListener
Modifier and Type | Field and Description |
---|---|
static RelativeFont |
BOLD |
static RelativeFont |
HUGE |
static RelativeFont |
ITALIC |
static RelativeFont |
LARGE |
static RelativeFont |
NORMAL |
static RelativeFont |
PLAIN |
static RelativeFont |
SMALL |
static RelativeFont |
TINY |
Modifier and Type | Method and Description |
---|---|
java.awt.Font |
derive(java.awt.Font font)
Creates a new font by replicating the specified one
and applying a new family, style, and/or size.
|
RelativeFont |
family(java.lang.String family) |
<T extends java.awt.Component> |
install(T component)
Installs this instance on the specified component.
|
RelativeFont |
large() |
void |
propertyChange(java.beans.PropertyChangeEvent event) |
RelativeFont |
small() |
RelativeFont |
style(int style) |
static <T extends java.awt.Component> |
uninstallFrom(T component)
Uninstalls all instances from the specified component.
|
public static final RelativeFont NORMAL
public static final RelativeFont PLAIN
public static final RelativeFont BOLD
public static final RelativeFont ITALIC
public static final RelativeFont LARGE
public static final RelativeFont SMALL
public static final RelativeFont HUGE
public static final RelativeFont TINY
public RelativeFont family(java.lang.String family)
family
- a new family to derive fontpublic RelativeFont style(int style)
style
- a new style to derive fontpublic RelativeFont large()
public RelativeFont small()
public <T extends java.awt.Component> T install(T component)
component
- the component to install onpublic static <T extends java.awt.Component> T uninstallFrom(T component)
component
- the component to uninstall frompublic java.awt.Font derive(java.awt.Font font)
font
- the font to modifypublic void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener