Class Styles


  • public final class Styles
    extends java.lang.Object
    Static attributes for text.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Styles.EditorColor  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.swing.text.AttributeSet createAttributeSet​(java.awt.Color foregroundColor, java.awt.Color backgroundColor, java.lang.Boolean bold, java.lang.Boolean italic)
      Construct required attributes set.
      static javax.swing.text.AttributeSet createAttributeSet​(java.awt.Color foregroundColor, java.awt.Color backgroundColor, java.lang.Boolean bold, java.lang.Boolean italic, java.lang.Boolean strikethrough, java.lang.Boolean underline)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createAttributeSet

        public static javax.swing.text.AttributeSet createAttributeSet​(java.awt.Color foregroundColor,
                                                                       java.awt.Color backgroundColor,
                                                                       java.lang.Boolean bold,
                                                                       java.lang.Boolean italic)
        Construct required attributes set. Since we need many attributes combinations, it's not good idea to have variable to each attributes set. There is no sense to store created attributes in the cache, because calculate hash for cache require about 2-3 time more than just create attributes set from scratch. 1000000 attributes creation require about 305 ms - it's enough fast.
      • createAttributeSet

        public static javax.swing.text.AttributeSet createAttributeSet​(java.awt.Color foregroundColor,
                                                                       java.awt.Color backgroundColor,
                                                                       java.lang.Boolean bold,
                                                                       java.lang.Boolean italic,
                                                                       java.lang.Boolean strikethrough,
                                                                       java.lang.Boolean underline)