Class LinePainter


  • public class LinePainter
    extends java.lang.Object
    • Field Detail

      • biggestMetrics

        private org.eclipse.swt.graphics.FontMetrics biggestMetrics
      • contentWidth

        private int contentWidth
      • trimmedContentWidth

        private int trimmedContentWidth
      • justifySpace

        private int justifySpace
      • roundingPixels

        private int roundingPixels
      • words

        private java.util.List<java.lang.String> words
    • Constructor Detail

      • LinePainter

        public LinePainter()
    • Method Detail

      • paint

        public void paint​(org.eclipse.swt.graphics.GC gc,
                          org.eclipse.swt.graphics.Rectangle area)
      • getBiggestMetrics

        public org.eclipse.swt.graphics.FontMetrics getBiggestMetrics()
      • getLineHeight

        public int getLineHeight()
      • getContentWidth

        public int getContentWidth()
        Returns:
        The static content width taking spaces into account.
      • increaseContentWidth

        public void increaseContentWidth​(int width)
        Increase the static content with with spaces.
        Parameters:
        width - The width that should be added to the static content width.
      • getTrimmedContentWidth

        public int getTrimmedContentWidth()
        Returns:
        The static content width without spaces.
      • increaseTrimmedContentWidth

        public void increaseTrimmedContentWidth​(int width)
        Increase the static content with without spaces.
        Parameters:
        width - The width that should be added to the static content width.
      • getNextJustifySpace

        public int getNextJustifySpace()
        Returns:
        The number of pixels that need to be added to render a text justified.