|
|||||||||
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 |
---|
BasicTextUI.BasicCaret, BasicTextUI.BasicHighlighter |
Field Summary |
---|
Fields inherited from class org.fife.ui.rtextarea.RTextAreaUI |
---|
textArea |
Constructor Summary | |
---|---|
RSyntaxTextAreaUI(JComponent rSyntaxTextArea)
Constructor. |
Method Summary | |
---|---|
View |
create(Element elem)
Creates the view for an element. |
protected Highlighter |
createHighlighter()
Creates the highlighter to use for syntax text areas. |
static ComponentUI |
createUI(JComponent ta)
|
protected String |
getActionMapName()
Returns the name to use to cache/fetch the shared action map. |
EditorKit |
getEditorKit(JTextComponent tc)
Fetches the EditorKit for the UI. |
protected InputMap |
getRTextAreaInputMap()
Get the InputMap to use for the UI. |
protected void |
paintBackground(Graphics g)
Paints the text area's background. |
protected void |
paintMatchedBracket(Graphics g)
Paints the "matched bracket", if any. |
protected void |
propertyChange(PropertyChangeEvent e)
Gets called whenever a bound property is changed on this UI's RSyntaxTextArea . |
void |
refreshSyntaxHighlighting()
Updates the view. |
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, paintCurrentLineHighlight, paintLineHighlights, paintMarginLine |
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, paintSafely, 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(JComponent rSyntaxTextArea)
Method Detail |
---|
public static ComponentUI createUI(JComponent ta)
public View create(Element elem)
create
in interface ViewFactory
create
in class RTextAreaUI
elem
- The element.
protected Highlighter createHighlighter()
createHighlighter
in class BasicTextUI
protected String getActionMapName()
getActionMapName
in class RTextAreaUI
public EditorKit getEditorKit(JTextComponent tc)
getEditorKit
in class RTextAreaUI
tc
- The text component for which this UI is installed.
TextUI.getEditorKit(javax.swing.text.JTextComponent)
protected 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 RTextAreaUI
protected void paintBackground(Graphics g)
paintBackground
in class RTextAreaUI
g
- The graphics component on which to paint.protected void paintMatchedBracket(Graphics g)
g
- The graphics context.protected void propertyChange(PropertyChangeEvent e)
RSyntaxTextArea
.
propertyChange
in class BasicTextAreaUI
e
- The property change event.public void refreshSyntaxHighlighting()
RSyntaxTextArea
changes its syntax editing style.
public int yForLineContaining(int offs) throws 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 RTextAreaUI
offs
- The offset info the document.
-1
if
this text area doesn't yet have a positive size.
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 |