Class SpanStylePaintInstruction

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.swt.graphics.Color backgroundColor
      The background color that should be applied on paint.
      private java.lang.Integer fontSize
      The font size in points that should be applied on paint.
      private java.lang.String fontType
      The font type that should be applied on paint.
      private org.eclipse.swt.graphics.Color foregroundColor
      The foreground color that should be applied on paint.
      private TagProcessingState state  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.swt.graphics.FontMetrics getFontMetrics​(org.eclipse.swt.graphics.GC gc)
      Calculates the FontMetrics based on the font information of this FontMetricsProvider in conjunction with the current set font information set to the given GC.
      void paint​(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle area)  
      void setBackgroundColor​(org.eclipse.swt.graphics.Color backgroundColor)  
      void setFontSize​(java.lang.Integer fontSize)  
      void setFontType​(java.lang.String fontType)  
      void setForegroundColor​(org.eclipse.swt.graphics.Color foregroundColor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • foregroundColor

        private org.eclipse.swt.graphics.Color foregroundColor
        The foreground color that should be applied on paint.
      • backgroundColor

        private org.eclipse.swt.graphics.Color backgroundColor
        The background color that should be applied on paint.
      • fontSize

        private java.lang.Integer fontSize
        The font size in points that should be applied on paint.
      • fontType

        private java.lang.String fontType
        The font type that should be applied on paint.
    • Constructor Detail

      • SpanStylePaintInstruction

        public SpanStylePaintInstruction​(TagProcessingState state)
    • Method Detail

      • paint

        public void paint​(org.eclipse.swt.graphics.GC gc,
                          org.eclipse.swt.graphics.Rectangle area)
        Specified by:
        paint in interface PaintInstruction
      • getFontMetrics

        public org.eclipse.swt.graphics.FontMetrics getFontMetrics​(org.eclipse.swt.graphics.GC gc)
        Description copied from interface: FontMetricsProvider
        Calculates the FontMetrics based on the font information of this FontMetricsProvider in conjunction with the current set font information set to the given GC.

        Note: To retrieve the FontMetrics it is necessary to set the Font based on the local font information and the current applied font. You should not reset the Font on the GC in this method again, because the font information might be used by other FontMetricsProvider.

        Specified by:
        getFontMetrics in interface FontMetricsProvider
        Parameters:
        gc - The GC that should be used to retrieve the FontMetrics
        Returns:
        The FontMetrics based on the font information of this FontMetricsProvider in conjunction with the current set font information set to the given GC.
      • setForegroundColor

        public void setForegroundColor​(org.eclipse.swt.graphics.Color foregroundColor)
      • setBackgroundColor

        public void setBackgroundColor​(org.eclipse.swt.graphics.Color backgroundColor)
      • setFontSize

        public void setFontSize​(java.lang.Integer fontSize)
      • setFontType

        public void setFontType​(java.lang.String fontType)