public class CodeEditorDefaults
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.awt.Color |
anchorMarkColor |
boolean |
blockCaret |
boolean |
bracketHighlight
True if associated start / end brackets is presented.
|
java.awt.Color |
bracketHighlightColor
The associated start / end brackets color.
|
boolean |
caretBlinks
True if the caret is blinking.
|
java.awt.Color |
caretColor
The Caret color.
|
java.awt.Color |
caretMarkColor |
boolean |
caretVisible
True if the caret is visible.
|
int |
cols
The number of columns of the editor.
|
SyntaxDocument |
document |
boolean |
editable
True if the document is editable.
|
int |
electricScroll |
java.awt.Color |
eolMarkerColor
The end of line markers color.
|
boolean |
eolMarkers
True if end of lines markers are visible.
|
java.awt.Font |
font
The document Font.
|
java.awt.Color |
gutterBgColor
The gutter background color.
|
java.awt.Color |
gutterBorderColor
The gutter border color.
|
int |
gutterBorderWidth
The gutter border width.
|
boolean |
gutterCollapsed
True if the gutter is collapsed.
|
boolean |
gutterExpandable
True if the gutter can be expanded or collapsed.
|
java.awt.Color |
gutterFgColor
The gutter foreground color.
|
java.awt.Font |
gutterFont
The gutter font.
|
java.awt.Color |
gutterHighlightColor
The gutter highlight color.
|
int |
gutterNumberAlignment
The gutter number alignment.
|
int |
gutterWidth
The gutter width.
|
boolean |
hasPopup
Specifies if there is a popup which should appear for right-clicking in the editor area.
|
InputHandler |
inputHandler |
boolean |
lineHighlight
True line highlighting is presented.
|
java.awt.Color |
lineHighlightColor
The line highlight color.
|
boolean |
paintInvalid |
int |
rows
The number of rows of the editor.
|
java.awt.Color |
selectionColor
The selection color.
|
java.awt.Color |
selectionMarkColor |
SyntaxStyle[] |
styles |
int |
tabSize
The tabulation size.
|
Constructor and Description |
---|
CodeEditorDefaults() |
CodeEditorDefaults(CodeEditorDefaults defaults) |
Modifier and Type | Method and Description |
---|---|
void |
addGutter()
Set the gutter as visible and make it expandable.
|
static java.awt.Color |
copyColor(java.awt.Color color)
Copy a color value.
|
static java.awt.Font |
copyFont(java.awt.Font font)
Copy a font value.
|
static CodeEditorDefaults |
getDefaults()
Returns a new CodeEditorDefaults object with the default values filled in.
|
javax.swing.JPopupMenu |
getPopup()
Return the popup which will be used when right-clicking on the editor.
|
void |
removeGutter()
Remove the gutter and make it not expandable.
|
void |
setPopup(javax.swing.JPopupMenu popup)
Set the popup which will be used when rightt-clicking on the editor.
|
void |
setStyle(byte keyword,
java.awt.Color color,
boolean italic,
boolean bold)
Set a style for a Token.
|
public InputHandler inputHandler
public SyntaxDocument document
public boolean editable
public boolean caretVisible
public boolean caretBlinks
public boolean blockCaret
public int electricScroll
public boolean gutterCollapsed
public boolean gutterExpandable
public int gutterWidth
public java.awt.Color gutterBgColor
public java.awt.Color gutterFgColor
public java.awt.Color gutterHighlightColor
public java.awt.Color gutterBorderColor
public int gutterBorderWidth
public int gutterNumberAlignment
SwingConstants.LEFT
SwingConstants.CENTER
SwingConstants.RIGHT
public java.awt.Font gutterFont
public java.awt.Color caretMarkColor
public java.awt.Color anchorMarkColor
public java.awt.Color selectionMarkColor
public int cols
public int rows
public SyntaxStyle[] styles
public java.awt.Font font
public java.awt.Color caretColor
public java.awt.Color selectionColor
public java.awt.Color lineHighlightColor
public boolean lineHighlight
public java.awt.Color bracketHighlightColor
public boolean bracketHighlight
public java.awt.Color eolMarkerColor
public boolean eolMarkers
public boolean paintInvalid
public int tabSize
public boolean hasPopup
public CodeEditorDefaults()
public CodeEditorDefaults(CodeEditorDefaults defaults)
public static CodeEditorDefaults getDefaults()
public void removeGutter()
addGutter()
public void addGutter()
removeGutter()
public void setPopup(javax.swing.JPopupMenu popup)
popup
- the popuppublic javax.swing.JPopupMenu getPopup()
public void setStyle(byte keyword, java.awt.Color color, boolean italic, boolean bold)
keyword
- the Token idcolor
- the coloritalic
- true if the text should be in italicbold
- true if the text should be in boldpublic static java.awt.Color copyColor(java.awt.Color color)
color
- the colorpublic static java.awt.Font copyFont(java.awt.Font font)
font
- the fontCopyright © 2016, 2017, 2018, 2019, 2023 Herve Girod. All Rights Reserved. Documentation and source under the MIT licence