Package resources
Class ResourceKit.FontRegistrationResult
- java.lang.Object
-
- resources.ResourceKit.FontRegistrationResult
-
- Enclosing class:
- ResourceKit
public static final class ResourceKit.FontRegistrationResult extends java.lang.ObjectReturned byResourceKit.registerFont(java.lang.String)to describe the result of registration.
-
-
Constructor Summary
Constructors Constructor Description FontRegistrationResult(java.awt.Font font, boolean registered)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFamily()Returns the name of the font.java.awt.FontgetFont()Returns aFontinstance for the font that was created from the resource.booleanisRegistrationSuccessful()Returnstrueif the font was registered.java.lang.StringtoString()
-
-
-
Method Detail
-
getFont
public java.awt.Font getFont()
Returns aFontinstance for the font that was created from the resource. The font will have a size of 1 point; a different size can be created by calling the font'sderiveFontmethod or, if registration was successful, by creating a newFontwith this font's family name.- Returns:
- a font created from the stream
-
getFamily
public java.lang.String getFamily()
Returns the name of the font. The font name can be used to create an instance of the font usingFont(java.lang.String, int, int).- Returns:
- the font's name
-
isRegistrationSuccessful
public boolean isRegistrationSuccessful()
Returnstrueif the font was registered. Note that if the font was not registered, it is usually because there is already a font with the same name installed on the user's system. Therefore, you will probably get some version of the font by using the font's family name. (If there is a problem loading the font, this will result in an exception when registration is attempted.)- Returns:
trueif the font was registered;falseotherwise
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-