Package org.omegat.util.gui
Class Styles
java.lang.Object
org.omegat.util.gui.Styles
Static attributes for text.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeSetcreateAttributeSet(@Nullable Color foregroundColor, @Nullable Color backgroundColor, @Nullable Boolean bold, @Nullable Boolean italic) Construct required attributes set.static AttributeSetcreateAttributeSet(@Nullable Color foregroundColor, @Nullable Color backgroundColor, @Nullable Boolean bold, @Nullable Boolean italic, @Nullable Boolean strikethrough, @Nullable Boolean underline)
-
Method Details
-
createAttributeSet
public static AttributeSet createAttributeSet(@Nullable Color foregroundColor, @Nullable Color backgroundColor, @Nullable Boolean bold, @Nullable Boolean italic) Construct required attributes set.Since we need many attributes combinations, it's not a good idea to have variable to each attribute set. There is no sense to store created attributes in the cache, because calculate hash for cache requires about 2-3 time more than create attributes set from scratch.
1000000 attributes creation requires about 305 ms - it's enough fast.
-
createAttributeSet
-