|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
org.fife.ui.rtextarea.RTextScrollPane
public class RTextScrollPane
An extension of javax.swing.JScrollPane
that will only take
RTextArea
s for its view. This class has the ability to show:
Gutter
class.
Each RTextScrollPane
has a Gutter
instance that
it uses as its row header. The gutter is only made visible when one of its
features is being used (line numbering and/or icons).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JScrollPane |
---|
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JScrollPane |
---|
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
RTextScrollPane()
Constructor. |
|
RTextScrollPane(RTextArea textArea)
Creates a scroll pane. |
|
RTextScrollPane(RTextArea textArea,
boolean lineNumbers)
Creates a scroll pane. |
|
RTextScrollPane(RTextArea area,
boolean lineNumbers,
Color lineNumberColor)
Creates a scroll pane with preferred size (width, height). |
Method Summary | |
---|---|
Gutter |
getGutter()
Returns the gutter. |
boolean |
getLineNumbersEnabled()
Returns true if the line numbers are enabled and visible. |
RTextArea |
getTextArea()
Returns the text area being displayed. |
boolean |
isIconRowHeaderEnabled()
Returns whether the icon row header is enabled. |
void |
setIconRowHeaderEnabled(boolean enabled)
Toggles whether the icon row header (used for breakpoints, bookmarks, etc.) is enabled. |
void |
setLineNumbersEnabled(boolean enabled)
Toggles whether or not line numbers are visible. |
void |
setViewportView(Component view)
Sets the view for this scroll pane. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RTextScrollPane()
setViewportView(Component)
and pass in an RTextArea
for this scroll pane to render line numbers properly.
public RTextScrollPane(RTextArea textArea)
textArea
- The text area this scroll pane will contain.public RTextScrollPane(RTextArea textArea, boolean lineNumbers)
textArea
- The text area this scroll pane will contain. If this is
null
, you must call
setViewportView(Component)
, passing in an
RTextArea
.lineNumbers
- Whether line numbers should be enabled.public RTextScrollPane(RTextArea area, boolean lineNumbers, Color lineNumberColor)
area
- The text area this scroll pane will contain. If this is
null
, you must call
setViewportView(Component)
, passing in an
RTextArea
.lineNumbers
- Whether line numbers are initially enabled.lineNumberColor
- The color to use for line numbers.Method Detail |
---|
public Gutter getGutter()
public boolean getLineNumbersEnabled()
true
if the line numbers are enabled and visible.
setLineNumbersEnabled(boolean)
public RTextArea getTextArea()
setViewportView(Component)
public boolean isIconRowHeaderEnabled()
setIconRowHeaderEnabled(boolean)
public void setIconRowHeaderEnabled(boolean enabled)
enabled
- Whether the icon row header is enabled.isIconRowHeaderEnabled()
public void setLineNumbersEnabled(boolean enabled)
enabled
- Whether or not line numbers should be visible.getLineNumbersEnabled()
public void setViewportView(Component view)
RTextArea
.
setViewportView
in class JScrollPane
view
- The new view.getTextArea()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |