Class Font

java.lang.Object
org.refcodes.textual.Font
All Implemented Interfaces:
org.refcodes.mixin.FamilyAccessor<FontFamily>, org.refcodes.mixin.FamilyAccessor.FamilyBuilder<FontFamily,Font>, org.refcodes.mixin.FamilyAccessor.FamilyMutator<FontFamily>, org.refcodes.mixin.FamilyAccessor.FamilyProperty<FontFamily>, org.refcodes.mixin.NameAccessor, org.refcodes.mixin.NameAccessor.NameBuilder<Font>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty, org.refcodes.mixin.SizeAccessor, org.refcodes.mixin.SizeAccessor.SizeBuilder<Font>, org.refcodes.mixin.SizeAccessor.SizeMutator, org.refcodes.mixin.SizeAccessor.SizeProperty, org.refcodes.mixin.StyleAccessor<FontStyle>, org.refcodes.mixin.StyleAccessor.StyleBuilder<FontStyle,Font>, org.refcodes.mixin.StyleAccessor.StyleMutator<FontStyle>, org.refcodes.mixin.StyleAccessor.StyleProperty<FontStyle>

public class Font extends Object implements org.refcodes.mixin.FamilyAccessor.FamilyProperty<FontFamily>, org.refcodes.mixin.FamilyAccessor.FamilyBuilder<FontFamily,Font>, org.refcodes.mixin.StyleAccessor.StyleProperty<FontStyle>, org.refcodes.mixin.StyleAccessor.StyleBuilder<FontStyle,Font>, org.refcodes.mixin.SizeAccessor.SizeProperty, org.refcodes.mixin.SizeAccessor.SizeBuilder<Font>, org.refcodes.mixin.NameAccessor.NameProperty, org.refcodes.mixin.NameAccessor.NameBuilder<Font>
The Font describes a more generic font.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.mixin.FamilyAccessor

    org.refcodes.mixin.FamilyAccessor.FamilyBuilder<T extends Object,B extends org.refcodes.mixin.FamilyAccessor.FamilyBuilder<T,B>>, org.refcodes.mixin.FamilyAccessor.FamilyMutator<T extends Object>, org.refcodes.mixin.FamilyAccessor.FamilyProperty<T extends Object>

    Nested classes/interfaces inherited from interface org.refcodes.mixin.NameAccessor

    org.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty

    Nested classes/interfaces inherited from interface org.refcodes.mixin.SizeAccessor

    org.refcodes.mixin.SizeAccessor.SizeBuilder<B extends org.refcodes.mixin.SizeAccessor.SizeBuilder<B>>, org.refcodes.mixin.SizeAccessor.SizeMutator, org.refcodes.mixin.SizeAccessor.SizeProperty

    Nested classes/interfaces inherited from interface org.refcodes.mixin.StyleAccessor

    org.refcodes.mixin.StyleAccessor.StyleBuilder<T extends Object,B extends org.refcodes.mixin.StyleAccessor.StyleBuilder<T,B>>, org.refcodes.mixin.StyleAccessor.StyleMutator<T extends Object>, org.refcodes.mixin.StyleAccessor.StyleProperty<T extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new font impl.
    Font(Font aFont)
    Instantiates a new font from a Font.
    Font(String aFontName, FontStyle aFontStyle)
    Instantiates a new font impl.
    Font(String aFontName, FontStyle aFontStyle, int aFontSize)
    Instantiates a new font impl.
    Font(FontFamily aFontType, FontStyle aFontStyle)
    Instantiates a new font impl.
    Font(FontFamily aFontType, FontStyle aFontStyle, int aFontSize)
    Instantiates a new font impl.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    void
    setFamily(FontFamily aFontCategory)
    void
    setName(String aFontName)
    void
    setSize(int aFontSize)
    void
    setStyle(FontStyle aFontStyle)
    Returns the according Font.
    withName(String aFontName)
    withSize(int aFontSize)
    withStyle(FontStyle aFontStyle)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.refcodes.mixin.FamilyAccessor.FamilyProperty

    letFamily

    Methods inherited from interface org.refcodes.mixin.NameAccessor.NameProperty

    letName

    Methods inherited from interface org.refcodes.mixin.SizeAccessor.SizeProperty

    letSize

    Methods inherited from interface org.refcodes.mixin.StyleAccessor.StyleProperty

    letStyle
  • Constructor Details

    • Font

      public Font()
      Instantiates a new font impl.
    • Font

      public Font(Font aFont)
      Instantiates a new font from a Font.
      Parameters:
      aFont - The Font to use.
    • Font

      public Font(FontFamily aFontType, FontStyle aFontStyle, int aFontSize)
      Instantiates a new font impl.
      Parameters:
      aFontType - the font type
      aFontStyle - the font style
      aFontSize - the font size
    • Font

      public Font(FontFamily aFontType, FontStyle aFontStyle)
      Instantiates a new font impl.
      Parameters:
      aFontType - the font type
      aFontStyle - the font style
    • Font

      public Font(String aFontName, FontStyle aFontStyle, int aFontSize)
      Instantiates a new font impl.
      Parameters:
      aFontName - the font name
      aFontStyle - the font style
      aFontSize - the font size
    • Font

      public Font(String aFontName, FontStyle aFontStyle)
      Instantiates a new font impl.
      Parameters:
      aFontName - the font name
      aFontStyle - the font style
  • Method Details

    • toAwtFont

      public Font toAwtFont()
      Returns the according Font.
      Returns:
      The according Font.
    • getFamily

      public FontFamily getFamily()
      Specified by:
      getFamily in interface org.refcodes.mixin.FamilyAccessor<FontFamily>
    • setFamily

      public void setFamily(FontFamily aFontCategory)
      Specified by:
      setFamily in interface org.refcodes.mixin.FamilyAccessor.FamilyMutator<FontFamily>
    • withFamily

      public Font withFamily(FontFamily aFontName)
      Specified by:
      withFamily in interface org.refcodes.mixin.FamilyAccessor.FamilyBuilder<FontFamily,Font>
    • getStyle

      public FontStyle getStyle()
      Specified by:
      getStyle in interface org.refcodes.mixin.StyleAccessor<FontStyle>
    • setStyle

      public void setStyle(FontStyle aFontStyle)
      Specified by:
      setStyle in interface org.refcodes.mixin.StyleAccessor.StyleMutator<FontStyle>
    • withStyle

      public Font withStyle(FontStyle aFontStyle)
      Specified by:
      withStyle in interface org.refcodes.mixin.StyleAccessor.StyleBuilder<FontStyle,Font>
    • getSize

      public int getSize()
      Specified by:
      getSize in interface org.refcodes.mixin.SizeAccessor
    • setSize

      public void setSize(int aFontSize)
      Specified by:
      setSize in interface org.refcodes.mixin.SizeAccessor.SizeMutator
    • withSize

      public Font withSize(int aFontSize)
      Specified by:
      withSize in interface org.refcodes.mixin.SizeAccessor.SizeBuilder<Font>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName

      public String getName()
      Specified by:
      getName in interface org.refcodes.mixin.NameAccessor
    • setName

      public void setName(String aFontName)
      Specified by:
      setName in interface org.refcodes.mixin.NameAccessor.NameMutator
    • withName

      public Font withName(String aFontName)
      Specified by:
      withName in interface org.refcodes.mixin.NameAccessor.NameBuilder<Font>