Class BoundCalc

    • Field Detail

      • plainMetrics

        public static final java.awt.FontMetrics plainMetrics
      • boldMetrics

        public static final java.awt.FontMetrics boldMetrics
    • Constructor Detail

      • BoundCalc

        public BoundCalc()
      • BoundCalc

        public BoundCalc​(Translator aTranslator)
    • Method Detail

      • plainWidth

        public static double plainWidth​(java.lang.String s)
        Computes the width of string in plain font.
        Parameters:
        s - the text to be drawn.
        Returns:
        the width of drawn text
      • boldWidth

        public static double boldWidth​(java.lang.String s)
        Computes the width of string s in bol
        Parameters:
        s - the text to be drawn.
        Returns:
        the width of the drawn text.
      • draw

        protected void draw​(Element element,
                            double margin)
      • getBounds

        public java.awt.geom.Rectangle2D getBounds​(Element e)