Package resources

Class ResourceKit.FontRegistrationResult

    • 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 a Font instance for the font that was created from the resource.
      boolean isRegistrationSuccessful()
      Returns true if the font was registered.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FontRegistrationResult

        public FontRegistrationResult​(java.awt.Font font,
                                      boolean registered)
    • Method Detail

      • getFont

        public java.awt.Font getFont()
        Returns a Font 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's deriveFont method or, if registration was successful, by creating a new Font 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 using Font(java.lang.String, int, int).
        Returns:
        the font's name
      • isRegistrationSuccessful

        public boolean isRegistrationSuccessful()
        Returns true 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 class java.lang.Object