Package com.jformdesigner.model
Class SwingDerivedFont
- java.lang.Object
-
- java.awt.Font
-
- com.jformdesigner.model.SwingDerivedFont
-
- All Implemented Interfaces:
Serializable
public class SwingDerivedFont extends Font
Used to specify derived fonts.This class extends java.awt.Font so that it can be used everywhere, but especially as title font in TitledBorder.
- Since:
- 3.1
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.awt.Font
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 Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Fontderive(Font font)Creates a derived font.booleanequals(Object obj)Determines whether another object is equal to this object.StringgetNameChange()Returns the new font name; or null.intgetSizeChange()Returns the absolute or relative font size; or zero.intgetStyleChange()Returns the font style change; or zero.inthashCode()Returns the hash code for this object.booleanisAbsoluteSize()Returns whether the size changes absolute or relative.StringtoString()Returns a string representation of the object.-
Methods inherited from class java.awt.Font
canDisplay, canDisplay, canDisplayUpTo, canDisplayUpTo, canDisplayUpTo, createFont, createFont, createFonts, createFonts, 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, getPSName, getSize, getSize2D, getStringBounds, getStringBounds, getStringBounds, getStringBounds, getStyle, getTransform, hasLayoutAttributes, hasUniformLineMetrics, isBold, isItalic, isPlain, isTransformed, layoutGlyphVector, textRequiresLayout
-
-
-
-
Constructor Detail
-
SwingDerivedFont
public SwingDerivedFont(String nameChange, int styleChange, int sizeChange, boolean absoluteSize)
Constructs a derived font.- Parameters:
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.
-
SwingDerivedFont
public SwingDerivedFont(Font font, String nameChange, int styleChange, int sizeChange, boolean absoluteSize)
Constructs a derived font based on the given font.- Parameters:
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.
-
-
Method Detail
-
getNameChange
public String getNameChange()
Returns the new font name; or null.
-
getStyleChange
public int getStyleChange()
Returns the font style change; or zero. The lower 16 bits are added; the upper 16 bits are removed.
-
getSizeChange
public int getSizeChange()
Returns the absolute or relative font size; or zero.
-
isAbsoluteSize
public boolean isAbsoluteSize()
Returns whether the size changes absolute or relative.
-
equals
public boolean equals(Object obj)
Determines whether another object is equal to this object.
-
hashCode
public int hashCode()
Returns the hash code for this object.
-
-