|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TextUI
javax.swing.plaf.basic.BasicTextUI
javax.swing.plaf.basic.BasicTextAreaUI
org.fife.ui.rtextarea.RTextAreaUI
org.fife.ui.rsyntaxtextarea.RSyntaxTextAreaUI
public class RSyntaxTextAreaUI
UI used by RSyntaxTextArea. This allows us to implement
syntax highlighting.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTextUI |
|---|
javax.swing.plaf.basic.BasicTextUI.BasicCaret, javax.swing.plaf.basic.BasicTextUI.BasicHighlighter |
| Field Summary |
|---|
| Fields inherited from class org.fife.ui.rtextarea.RTextAreaUI |
|---|
textArea |
| Constructor Summary | |
|---|---|
RSyntaxTextAreaUI(javax.swing.JComponent rSyntaxTextArea)
Constructor. |
|
| Method Summary | |
|---|---|
javax.swing.text.View |
create(javax.swing.text.Element elem)
Creates the view for an element. |
protected javax.swing.text.Highlighter |
createHighlighter()
Creates the highlighter to use for syntax text areas. |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent ta)
|
protected java.lang.String |
getActionMapName()
Returns the name to use to cache/fetch the shared action map. |
javax.swing.text.EditorKit |
getEditorKit(javax.swing.text.JTextComponent tc)
Fetches the EditorKit for the UI. |
protected javax.swing.InputMap |
getRTextAreaInputMap()
Get the InputMap to use for the UI. |
protected void |
paintEditorAugmentations(java.awt.Graphics g)
Paints editor augmentations added by RTextArea: highlighted lines, current line highlight, and margin line. |
protected void |
paintMatchedBracket(java.awt.Graphics g)
Paints the "matched bracket", if any. |
protected void |
paintMatchedBracketImpl(java.awt.Graphics g,
RSyntaxTextArea rsta,
java.awt.Rectangle r)
|
protected void |
propertyChange(java.beans.PropertyChangeEvent e)
Gets called whenever a bound property is changed on this UI's RSyntaxTextArea. |
void |
refreshSyntaxHighlighting()
Updates the view. |
int |
yForLine(int line)
Returns the y-coordinate of the specified line. |
int |
yForLineContaining(int offs)
Returns the y-coordinate of the line containing a specified offset. |
| Methods inherited from class org.fife.ui.rtextarea.RTextAreaUI |
|---|
createCaret, createKeymap, createRTextAreaActionMap, getRTextArea, getVisibleEditorRect, installDefaults, installKeyboardActions, installUI, paintBackground, paintCurrentLineHighlight, paintLineHighlights, paintMarginLine, paintSafely |
| Methods inherited from class javax.swing.plaf.basic.BasicTextAreaUI |
|---|
getBaseline, getBaselineResizeBehavior, getMinimumSize, getPreferredSize, getPropertyPrefix |
| Methods inherited from class javax.swing.plaf.basic.BasicTextUI |
|---|
create, damageRange, damageRange, getComponent, getKeymapName, getMaximumSize, getNextVisualPositionFrom, getRootView, getToolTipText, installListeners, modelChanged, modelToView, modelToView, paint, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel |
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RSyntaxTextAreaUI(javax.swing.JComponent rSyntaxTextArea)
| Method Detail |
|---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent ta)
public javax.swing.text.View create(javax.swing.text.Element elem)
create in interface javax.swing.text.ViewFactorycreate in class RTextAreaUIelem - The element.
protected javax.swing.text.Highlighter createHighlighter()
createHighlighter in class javax.swing.plaf.basic.BasicTextUIprotected java.lang.String getActionMapName()
getActionMapName in class RTextAreaUIpublic javax.swing.text.EditorKit getEditorKit(javax.swing.text.JTextComponent tc)
getEditorKit in class RTextAreaUItc - The text component for which this UI is installed.
TextUI.getEditorKit(javax.swing.text.JTextComponent)protected javax.swing.InputMap getRTextAreaInputMap()
This method is not named getInputMap() because there is
a package-private method in BasicTextAreaUI with that name.
Thus, creating a new method with that name causes certain compilers to
issue warnings that you are not actually overriding the original method
(since it is package-private).
getRTextAreaInputMap in class RTextAreaUIprotected void paintEditorAugmentations(java.awt.Graphics g)
RTextAreaUI
paintEditorAugmentations in class RTextAreaUIg - The graphics context with which to paint.protected void paintMatchedBracket(java.awt.Graphics g)
g - The graphics context.
protected void paintMatchedBracketImpl(java.awt.Graphics g,
RSyntaxTextArea rsta,
java.awt.Rectangle r)
protected void propertyChange(java.beans.PropertyChangeEvent e)
RSyntaxTextArea.
propertyChange in class javax.swing.plaf.basic.BasicTextAreaUIe - The property change event.public void refreshSyntaxHighlighting()
RSyntaxTextArea changes its syntax editing style.
public int yForLine(int line)
throws javax.swing.text.BadLocationException
This method is quicker than using traditional
modelToView(int) calls, as the entire bounding box isn't
computed.
yForLine in class RTextAreaUIline - The line number.
-1 if
this text area doesn't yet have a positive size or the line is
hidden (i.e. from folding).
javax.swing.text.BadLocationException - If line isn't a valid line
number for this document.
public int yForLineContaining(int offs)
throws javax.swing.text.BadLocationException
This is faster than calling modelToView(offs).y, so it is
preferred if you do not need the actual bounding box.
yForLineContaining in class RTextAreaUIoffs - The offset info the document.
-1 if
this text area doesn't yet have a positive size or the line is
hidden (i.e. from folding).
javax.swing.text.BadLocationException - If offs isn't a valid offset
into the document.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||