Class GraphFontParm

java.lang.Object
org.bzdev.obnaming.misc.GraphFontParm

public class GraphFontParm extends Object
Class to provide named-object-factory parameters specifying instances of Graph.FontParms.

Parameter names will be compound names, typically using a period as a separator. When this class is used, multiple parameters will be defined, and the last component of the parameter name will be the following:

  • "name" - the name of a font or font family.
  • "justification" - the font justification (LEFT, RIGHT, or CENTER).
  • "baselinePosition" - the position of the line used to position a font up or down. Values may be TOP, CENTER, BASE, or BOTTOM.
  • "angle" - the angle in degrees of the font from horizontal, measured counterclockwise in user space.
  • "size" - the size of the font (a positive integer)
  • "style" - the style of the font (PLAIN, ITALIC, BOLD, or BOLD_ITALIC).
  • "color.red" - the red intensity of the font color, an integer in the range [0, 255].
  • "color.green" - the green intensity of the font color, an integer in the range [0, 255].
  • "color.blue" - the blue intensity of the font color, an integer in the range [0, 255].
  • "color.alpha" - the alpha intensity of the font color,an integer in the range [0, 255] with 0 indicating transparent and 255 indicating opaque.
The constants shown in upper case are enumeration constants for the following enumeration classes:
See Also:
  • Field Details

    • justification

      public Graph.Just justification
      Font justification. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • baselinePosition

      public Graph.BLineP baselinePosition
      Font baseline position. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • fontAngle

      public double fontAngle
      Font angle. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • name

      public String name
      Font name. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • fstyle

      public GraphFontParm.FontStyle fstyle
      Font style. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • size

      public int size
      Font size. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • css

      public String css
      The CSS specification of a color. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • red

      public Integer red
      The red component of a color. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • green

      public Integer green
      The green component of a color. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • blue

      public Integer blue
      The blue component of a color. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
    • alpha

      public Integer alpha
      The alpha component of a color. This field is public because the parameter managers that use it are defined outside of this package. It should not be used for other purposes.
  • Constructor Details

    • GraphFontParm

      public GraphFontParm()
      Constructor.
    • GraphFontParm

      public GraphFontParm(boolean nullValue)
      Constructor with optional null value for the font name.
      Parameters:
      nullValue - true if the font name is null; false to use the default font name.
    • GraphFontParm

      public GraphFontParm(String name, GraphFontParm.FontStyle style, int size, Color color, Graph.Just justification, Graph.BLineP baselinePosition, double angle)
      Constructor given a complete description of parameters The parameters 'justification' and 'baselinePosition' determine the text justification and baseline Position relative to the x-y coordinate used to specify a string's location.
      Parameters:
      name - the name of the font
      style - the style of the font
      size - the size of the font
      color - the color of the font
      justification - LEFT for left-justified strings; CENTER for strings that are centered, and RIGHT for strings that are right justified
      baselinePosition - TOP for text aligned at its top; CENTER for text aligned at its center; BASE for text aligned at its baseline, and BOTTOM for text aligned at its bottom.
      angle - the font angle in degrees from hoizontal, measured counterclockwise in user space
  • Method Details

    • createFontParms

      public Graph.FontParms createFontParms()
      Create font parameters
      Returns:
      the font parameters