public class Style
extends java.lang.Object
implements java.lang.Cloneable
RSyntaxTextArea
has a corresponding Style
; this
Style
tells us the following things:
限定符和类型 | 字段和说明 |
---|---|
java.awt.Color |
background |
static java.awt.Color |
DEFAULT_BACKGROUND |
static java.awt.Font |
DEFAULT_FONT |
static java.awt.Color |
DEFAULT_FOREGROUND |
java.awt.Font |
font |
java.awt.Color |
foreground |
boolean |
underline |
构造器和说明 |
---|
Style()
Creates a new style defaulting to black foreground, no
background, and no styling.
|
Style(java.awt.Color fg)
Creates a new style with the specified foreground and no styling.
|
Style(java.awt.Color fg,
java.awt.Color bg)
Creates a new style with the specified colors and no styling.
|
Style(java.awt.Color fg,
java.awt.Color bg,
java.awt.Font font)
Creates a new style.
|
Style(java.awt.Color fg,
java.awt.Color bg,
java.awt.Font font,
boolean underline)
Creates a new style.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
clone()
Returns a deep copy of this object.
|
boolean |
equals(java.lang.Object o2)
Returns whether or not two syntax schemes are equal.
|
int |
hashCode()
Computes the hash code to use when adding this syntax scheme to
hash tables.
|
java.lang.String |
toString()
Returns a string representation of this style.
|
public static final java.awt.Color DEFAULT_FOREGROUND
public static final java.awt.Color DEFAULT_BACKGROUND
public static final java.awt.Font DEFAULT_FONT
public java.awt.Color foreground
public java.awt.Color background
public boolean underline
public java.awt.Font font
public Style()
public Style(java.awt.Color fg)
fg
- The foreground color to use.public Style(java.awt.Color fg, java.awt.Color bg)
fg
- The foreground color to use.bg
- The background color to use.public Style(java.awt.Color fg, java.awt.Color bg, java.awt.Font font)
fg
- The foreground color to use.bg
- The background color to use.font
- The font for this syntax scheme.public Style(java.awt.Color fg, java.awt.Color bg, java.awt.Font font, boolean underline)
fg
- The foreground color to use.bg
- The background color to use.font
- The font for this syntax scheme.underline
- Whether or not to underline tokens with this style.public java.lang.Object clone()
clone
在类中 java.lang.Object
public boolean equals(java.lang.Object o2)
equals
在类中 java.lang.Object
o2
- The object with which to compare this syntax scheme.public int hashCode()
This method is implemented, since equals(Object)
is implemented,
to keep FindBugs happy.
hashCode
在类中 java.lang.Object
public java.lang.String toString()
toString
在类中 java.lang.Object