public class SwingDerivedFont extends Font
This class extends java.awt.Font so that it can be used everywhere, but especially as title font in TitledBorder.
BOLD, CENTER_BASELINE, DIALOG, DIALOG_INPUT, HANGING_BASELINE, ITALIC, LAYOUT_LEFT_TO_RIGHT, LAYOUT_NO_LIMIT_CONTEXT, LAYOUT_NO_START_CONTEXT, LAYOUT_RIGHT_TO_LEFT, MONOSPACED, name, PLAIN, pointSize, ROMAN_BASELINE, SANS_SERIF, SERIF, size, style, TRUETYPE_FONT, TYPE1_FONT
Constructor and Description |
---|
SwingDerivedFont(Font font,
String nameChange,
int styleChange,
int sizeChange,
boolean absoluteSize)
Constructs a derived font based on the given font.
|
SwingDerivedFont(String nameChange,
int styleChange,
int sizeChange,
boolean absoluteSize)
Constructs a derived font.
|
Modifier and Type | Method and Description |
---|---|
Font |
derive(Font font)
Creates a derived font.
|
boolean |
equals(Object obj)
Determines whether another object is equal to this object.
|
String |
getNameChange()
Returns the new font name; or null.
|
int |
getSizeChange()
Returns the absolute or relative font size; or zero.
|
int |
getStyleChange()
Returns the font style change; or zero.
|
int |
hashCode()
Returns the hash code for this object.
|
boolean |
isAbsoluteSize()
Returns whether the size changes absolute or relative.
|
String |
toString()
Returns a string representation of the object.
|
canDisplay, canDisplay, canDisplayUpTo, canDisplayUpTo, canDisplayUpTo, createFont, createFont, createGlyphVector, createGlyphVector, createGlyphVector, createGlyphVector, decode, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, deriveFont, getAttributes, getAvailableAttributes, getBaselineFor, getFamily, getFamily, getFont, getFont, getFont, getFontName, getFontName, getItalicAngle, getLineMetrics, getLineMetrics, getLineMetrics, getLineMetrics, getMaxCharBounds, getMissingGlyphCode, getName, getNumGlyphs, getPeer, getPSName, getSize, getSize2D, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getStyle, getTransform, hasLayoutAttributes, hasUniformLineMetrics, isBold, isItalic, isPlain, isTransformed, layoutGlyphVector
public SwingDerivedFont(String nameChange, int styleChange, int sizeChange, boolean absoluteSize)
nameChange
- The new font name; or null.styleChange
- The font style change; or zero.
The lower 16 bits are added; the upper 16 bits are removed.sizeChange
- The absolute or relative font size; or zero.absoluteSize
- Specifies whether the size changes absolute or relative.public SwingDerivedFont(Font font, String nameChange, int styleChange, int sizeChange, boolean absoluteSize)
font
- The base font.nameChange
- The new font name; or null.styleChange
- The font style change; or zero.
The lower 16 bits are added; the upper 16 bits are removed.sizeChange
- The absolute or relative font size; or zero.absoluteSize
- Specifies whether the size changes absolute or relative.public String getNameChange()
public int getStyleChange()
public int getSizeChange()
public boolean isAbsoluteSize()
public boolean equals(Object obj)
public int hashCode()
Copyright (C) 2004-2019 FormDev Software GmbH. All rights reserved.