Implements the Highlighter interfaces. Implements a simple highlight painter that renders in a solid color.
Implements the Highlighter interfaces. Implements a simple highlight painter that renders in a solid color.
Static Constant.
Default implementation of LayeredHighlighter.LayerPainter that can be used for painting highlights.
As of 1.4 this field is final.
type: javax.swing.text.LayeredHighlighter$LayerPainter
Static Constant. Default implementation of LayeredHighlighter.LayerPainter that can be used for painting highlights. As of 1.4 this field is final. type: javax.swing.text.LayeredHighlighter$LayerPainter
(->default-highlighter)
Constructor.
Creates a new DefaultHighlighther object.
Constructor. Creates a new DefaultHighlighther object.
(add-highlight this p-0 p-1 p)
Adds a highlight to the view. Returns a tag that can be used to refer to the highlight.
p-0 - the start offset of the range to highlight >= 0 - int
p-1 - the end offset of the range to highlight >= p0 - int
p - the painter to use to actually render the highlight - javax.swing.text.Highlighter$HighlightPainter
returns: an object that can be used as a tag
to refer to the highlight - java.lang.Object
throws: javax.swing.text.BadLocationException - if the specified location is invalid
Adds a highlight to the view. Returns a tag that can be used to refer to the highlight. p-0 - the start offset of the range to highlight >= 0 - `int` p-1 - the end offset of the range to highlight >= p0 - `int` p - the painter to use to actually render the highlight - `javax.swing.text.Highlighter$HighlightPainter` returns: an object that can be used as a tag to refer to the highlight - `java.lang.Object` throws: javax.swing.text.BadLocationException - if the specified location is invalid
(change-highlight this tag p-0 p-1)
Changes a highlight.
tag - the highlight tag - java.lang.Object
p-0 - the beginning of the range >= 0 - int
p-1 - the end of the range >= p0 - int
throws: javax.swing.text.BadLocationException - if the specified location is invalid
Changes a highlight. tag - the highlight tag - `java.lang.Object` p-0 - the beginning of the range >= 0 - `int` p-1 - the end of the range >= p0 - `int` throws: javax.swing.text.BadLocationException - if the specified location is invalid
(deinstall this c)
Called when the UI is being removed from the interface of a JTextComponent.
c - the component - javax.swing.text.JTextComponent
Called when the UI is being removed from the interface of a JTextComponent. c - the component - `javax.swing.text.JTextComponent`
(get-draws-layered-highlights? this)
returns: boolean
returns: `boolean`
(get-highlights this)
Makes a copy of the highlights. Does not actually clone each highlight, but only makes references to them.
returns: the copy - javax.swing.text.Highlighter$Highlight[]
Makes a copy of the highlights. Does not actually clone each highlight, but only makes references to them. returns: the copy - `javax.swing.text.Highlighter$Highlight[]`
(install this c)
Called when the UI is being installed into the interface of a JTextComponent. Installs the editor, and removes any existing highlights.
c - the editor component - javax.swing.text.JTextComponent
Called when the UI is being installed into the interface of a JTextComponent. Installs the editor, and removes any existing highlights. c - the editor component - `javax.swing.text.JTextComponent`
(paint this g)
Renders the highlights.
g - the graphics context - java.awt.Graphics
Renders the highlights. g - the graphics context - `java.awt.Graphics`
(paint-layered-highlights this g p-0 p-1 view-bounds editor view)
When leaf Views (such as LabelView) are rendering they should call into this method. If a highlight is in the given region it will be drawn immediately.
g - Graphics used to draw - java.awt.Graphics
p-0 - starting offset of view - int
p-1 - ending offset of view - int
view-bounds - Bounds of View - java.awt.Shape
editor - JTextComponent - javax.swing.text.JTextComponent
view - View instance being rendered - javax.swing.text.View
When leaf Views (such as LabelView) are rendering they should call into this method. If a highlight is in the given region it will be drawn immediately. g - Graphics used to draw - `java.awt.Graphics` p-0 - starting offset of view - `int` p-1 - ending offset of view - `int` view-bounds - Bounds of View - `java.awt.Shape` editor - JTextComponent - `javax.swing.text.JTextComponent` view - View instance being rendered - `javax.swing.text.View`
(remove-all-highlights this)
Removes all highlights.
Removes all highlights.
(remove-highlight this tag)
Removes a highlight from the view.
tag - the reference to the highlight - java.lang.Object
Removes a highlight from the view. tag - the reference to the highlight - `java.lang.Object`
(set-draws-layered-highlights this new-value)
If true, highlights are drawn as the Views draw the text. That is the Views will call into paintLayeredHighlight which will result in a rectangle being drawn before the text is drawn (if the offsets are in a highlighted region that is). For this to work the painter supplied must be an instance of LayeredHighlightPainter.
new-value - boolean
If true, highlights are drawn as the Views draw the text. That is the Views will call into paintLayeredHighlight which will result in a rectangle being drawn before the text is drawn (if the offsets are in a highlighted region that is). For this to work the painter supplied must be an instance of LayeredHighlightPainter. new-value - `boolean`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close