Package resources
Class ResourceKit.FontRegistrationResult
- java.lang.Object
-
- resources.ResourceKit.FontRegistrationResult
-
- Enclosing class:
- ResourceKit
public static final class ResourceKit.FontRegistrationResult extends java.lang.Object
Returned 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.String
getFamily()
Returns the name of the font.java.awt.Font
getFont()
Returns aFont
instance for the font that was created from the resource.boolean
isRegistrationSuccessful()
Returnstrue
if the font was registered.java.lang.String
toString()
-
-
-
Method Detail
-
getFont
public java.awt.Font getFont()
Returns aFont
instance 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'sderiveFont
method or, if registration was successful, by creating a newFont
with 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()
Returnstrue
if 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:
true
if the font was registered;false
otherwise
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-