public class Style extends Object implements Cloneable
RSyntaxTextArea
has a corresponding Style
; this
Style
tells us the following things:
Modifier and Type | Field and Description |
---|---|
Color |
background |
static Color |
DEFAULT_BACKGROUND |
static Font |
DEFAULT_FONT |
static Color |
DEFAULT_FOREGROUND |
Font |
font |
Color |
foreground |
boolean |
underline |
Constructor and Description |
---|
Style()
Creates a new style defaulting to black foreground, no
background, and no styling.
|
Style(Color fg)
Creates a new style with the specified foreground and no styling.
|
Style(Color fg,
Color bg)
Creates a new style with the specified colors and no styling.
|
Style(Color fg,
Color bg,
Font font)
Creates a new style.
|
Style(Color fg,
Color bg,
Font font,
boolean underline)
Creates a new style.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a deep copy of this object.
|
boolean |
equals(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.
|
String |
toString()
Returns a string representation of this style.
|
public static final Color DEFAULT_FOREGROUND
public static final Color DEFAULT_BACKGROUND
public static final Font DEFAULT_FONT
public Color foreground
public Color background
public boolean underline
public Font font
public Style()
public Style(Color fg)
fg
- The foreground color to use.public Style(Color fg, Color bg)
fg
- The foreground color to use.bg
- The background color to use.public Style(Color fg, Color bg, Font font)
fg
- The foreground color to use.bg
- The background color to use.font
- The font for this syntax scheme.public Object clone()
public boolean equals(Object o2)
public int hashCode()
This method is implemented, since equals(Object)
is implemented,
to keep FindBugs happy.