Package org.fife.ui.rsyntaxtextarea
Class Style
java.lang.Object
org.fife.ui.rsyntaxtextarea.Style
- All Implemented Interfaces:
Cloneable
The color and style information for a token type. Each token type in an
RSyntaxTextArea
has a corresponding Style
; this
Style
tells us the following things:
- What foreground color to use for tokens of this type.
- What background color to use.
- The font to use.
- Whether the token should be underlined.
- Version:
- 0.6
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStyle()
Creates a new style defaulting to black foreground, no background, and no styling.Creates a new style with the specified foreground and no styling.Creates a new style with the specified colors and no styling.Creates a new style.Creates a new style. -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
Returns whether two (possiblynull
) objects are equal.clone()
Returns a deep copy of this object.boolean
Returns whether two syntax schemes are equal.int
hashCode()
Computes the hash code to use when adding this syntax scheme to hash tables.toString()
Returns a string representation of this style.
-
Field Details
-
DEFAULT_FOREGROUND
-
DEFAULT_BACKGROUND
-
DEFAULT_FONT
-
foreground
-
background
-
underline
public boolean underline -
font
-
fontMetrics
-
-
Constructor Details
-
Style
public Style()Creates a new style defaulting to black foreground, no background, and no styling. -
Style
Creates a new style with the specified foreground and no styling.- Parameters:
fg
- The foreground color to use.
-
Style
Creates a new style with the specified colors and no styling.- Parameters:
fg
- The foreground color to use.bg
- The background color to use.
-
Style
Creates a new style.- Parameters:
fg
- The foreground color to use.bg
- The background color to use.font
- The font for this syntax scheme.
-
Style
Creates a new style.- Parameters:
fg
- The foreground color to use.bg
- The background color to use.font
- The font for this syntax scheme.underline
- Whether to underline tokens with this style.
-
-
Method Details
-
areEqual
Returns whether two (possiblynull
) objects are equal. -
clone
Returns a deep copy of this object. -
equals
Returns whether two syntax schemes are equal. -
hashCode
public int hashCode()Computes the hash code to use when adding this syntax scheme to hash tables.This method is implemented, since
equals(Object)
is implemented, to keep FindBugs happy. -
toString
Returns a string representation of this style.
-