Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Container
org.gnu.gtk.TextView
public class TextView
extends Container
TextBuffer
, which
represents the text being edited, and TextView
, a widget which can
display a TextBuffer. Each buffer can be displayed by any number of views.
One of the important things to remember about text in java-gnome is that it's
in the UTF-8 encoding. This means that one character can be encoded as
multiple bytes. Character counts are usually referred to as offsets, while
byte counts are called indexes. If you confuse these two, things will work
fine with ASCII, but as soon as your buffer contains multibyte characters,
bad things will happen.
Text in a buffer can be marked with tags. A tag is an attribute that can be
applied to some range of text. For example, a tag might be called "bold" and
make the text inside the tag bold. However, the tag concept is more general
than that; tags don't have to affect appearance. They can instead affect the
behavior of mouse and key presses, "lock" a range of text so the user can't
edit it, or countless other things. A tag is represented by a TextTag
object. One TextTag can be applied to any number of text ranges in any number
of buffers.
Each tag is stored in a TextTagTable
. A tag table defines a set of
tags that can be used together. Each buffer has one tag table associated with
it; only tags from that tag table can be used with the buffer. A single tag
table can be shared between multiple buffers, however.
Tags can have names, which is convenient sometimes (for example, you can name
your tag that makes things bold "bold"), but they can also be anonymous
(which is convenient if you're creating tags on-the-fly).
Most text manipulation is accomplished with iterators, represented by a
TextIter
. An iterator represents a position between two characters
in the text buffer. Iterators are not valid indefinitely; whenever the buffer
is modified in a way that affects the number of characters in the buffer, all
outstanding iterators become invalid. (Note that deleting 5 characters and
then reinserting 5 still invalidates iterators, though you end up with the
same number of characters you pass through a state with a different number).
Because of this, iterators can't be used to preserve positions across buffer
modifications. To preserve a position, the TextMark
object is ideal.
You can think of a mark as an invisible cursor or insertion point; it floats
in the buffer, saving a position. If the text surrounding the mark is
deleted, the mark remains in the position the text once occupied; if text is
inserted at the mark, the mark ends up either to the left or to the right of
the new text, depending on its gravity. The standard text cursor in
left-to-right languages is a mark with right gravity, because it stays to the
right of inserted text.
Like tags, marks can be either named or anonymous. There are two marks
built-in to TextBuffer
; these are named "insert" and
"selection_bound" and refer to the insertion point and the boundary of the
selection which is not the insertion point, respectively. If no text is
selected, these two marks will be in the same position. You can manipulate
what is selected and where the cursor appears by moving these marks around.
Text buffers always contain at least one line, but may be empty (that is,
buffers can contain zero characters). The last line in the text buffer never
ends in a line separator (such as newline); the other lines in the buffer
always end in a line separator. Line separators count as characters when
computing character counts and character offsets. Note that some Unicode line
separators are represented with multiple bytes in UTF-8, and the
two-character sequence "\r\n" is also considered a line separator.
Nested Class Summary | |
static class |
|
Constructor Summary | |
| |
| |
|
Method Summary | |
void |
|
void |
|
Point |
|
boolean |
|
int |
|
TextBuffer |
|
boolean |
|
TextAttributes |
|
boolean |
|
Class |
|
EventType |
|
Adjustment | |
int |
|
TextIter |
|
TextIter |
|
Justification |
|
int |
|
TextView.VerticalLineRange |
|
boolean |
|
int |
|
int |
|
int |
|
int |
|
TabArray |
|
static TextView |
|
static Type |
|
Adjustment | |
Rectangle |
|
Window |
|
TextWindowType |
|
WrapMode |
|
boolean |
|
boolean |
|
void |
|
void |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
Point |
|
Methods inherited from class org.gnu.gtk.Container | |
add , addListener , getBooleanChildProperty , getBorderWidth , getChildProperty , getChildren , getEventListenerClass , getEventType , getIntChildProperty , getResizeMode , getType , remove , removeListener , resizeChildren , setBooleanChildProperty , setBorderWidth , setChildProperty , setIntChildProperty , setResizeMode |
public TextView()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Constructs a new TextView. If you don't specify a buffer before using it, a default one will be created for you.
public TextView(Handle handle)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Construct a TextView from a handle to a native resource.
public TextView(TextBuffer buffer)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Creates a new TextView widget displaying the buffer buffer. One buffer can be shared among many widgets.
- Parameters:
buffer
- Buffer to use
public void addChild(Widget child, TextChildAnchor anchor)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Adds a child widget in the text buffer, at the given anchor.
- Parameters:
child
- A Widgetanchor
- A TextChildAnchor in the TextBuffer for his view
public void addListener(TextViewListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Register an object to receive text view event notification.
- Parameters:
listener
- The object that has implemented the TextViewListener interface that is to receive the text view events.
public Point bufferToWindowCoords(TextWindowType winType, int xCoord, int yCoord)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Converts coordinate (xCoord, yCoord) to coordinates for the windowwinType
. Note that you can't convert coordinates for a non-existing window (seesetBorderWindowSize(TextWindowType,int)
.
- Parameters:
winType
- aTextWindowType
xCoord
- buffer X coordinateyCoord
- buffer Y coordinate
- Returns:
- the corresponding window coordinates
public boolean getAcceptsTab()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns whether pressing the Tab key inserts a tab characters.
- Since:
- 2.4
- See Also:
setAcceptsTab(boolean)
public int getBorderWindowSize(TextWindowType type)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the width of the specified border window.
- Parameters:
type
- The window to return size from
- Returns:
- The size of the window
- See Also:
.
public TextBuffer getBuffer()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the buffer being used
- Returns:
- The buffer used in the widget.
public boolean getCursorVisible()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Find out whether the cursor is being displayed.
- Returns:
- Whether the insertion cursor is visible
public TextAttributes getDefaultAttributes()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Obtains a copy of the default text attributes. These are the attributes used for text unless a tag overrides them.
- Returns:
- The text attributes being used
public boolean getEditable()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the default editability of the GtkTextView. Tags in the buffer may override this setting for some ranges of text.
- Returns:
- true if the widget is editable.
public Class getEventListenerClass(String signal)
- Overrides:
- getEventListenerClass in interface Container
public EventType getEventType(String signal)
- Overrides:
- getEventType in interface Container
public int getIndent()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the default indentation of paragraphs in text_view. Tags in the view's buffer may override the default. The indentation may be negative.
- Returns:
- The number of pixels of indentation
public TextIter getIterAtLocation(int x, int y)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns an iterator for the location pointed to by the coordinatesx
andy
within the buffer. Coordinates obtained in relation to the widget must be converted to buffer coordinates using windowToBufferCoords before passing them into this method.
- Parameters:
x
- x buffer coordinatey
- y buffer coordinate
- Returns:
- an iterator to a given x-y coordinate location
public TextIter getIterAtLocation(Point bufferCoords)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns an iterator for the location pointed to by bufferCoords, representing coordinates within the buffer. Coordinates obtained in relation to the widget must be converted to buffer coordinates using windowToBufferCoords.
- Parameters:
bufferCoords
- a Point representing a pair of buffer coordinates
- Returns:
- an iterator to a given x-y coordinate location
public Justification getJustification()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the default justification of text in this TextView. Tags in the buffer may override the default.
- Returns:
- The default justification
public int getLeftMargin()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the default left margin size of paragraphs in the TextView. Tags in the buffer may override the default.
- Returns:
- The left margin, in pixels
public TextView.VerticalLineRange getLineYRange(TextIter iter)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the y coordinate of the top of the line containingiter
, and the height of the line. The coordinate is a buffer coordinate; convert to window coordinates withwindowToBufferCoords(TextWindowType,int,int)
.
- Parameters:
iter
- A valid TextIter
- Returns:
- The y-coordinate and Height of the line containing iter
public boolean getOverwrite()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns whether the TextView is in overwrite mode or not.
- Since:
- 2.4
- See Also:
setOverwrite(boolean)
public int getPixelsAboveLines()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the default number of pixels to put above paragraphs.
- Returns:
- the default number of pixels to put above paragraphs.
public int getPixelsBelowLines()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the default number of pixels of blank space to put below paragraphs.
- Returns:
- the default number of pixels of blank space to put below paragraphs
public int getPixelsInsideWrap()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the default number of pixels of blank space to leave between display/wrapped lines within a paragraph.
- Returns:
- the default number of pixels of blank space to leave between display/wrapped lines within a paragraph.
public int getRightMargin()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the default right margin size of paragraphs in the TextView. Tags in the buffer may override the default.
- Returns:
- The right margin, in pixels
public TabArray getTabs()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the default tabs for text_view. Tags in the buffer may override the defaults. The returned array will be NULL if "standard" (8-space) tabs are used.
public static TextView getTextView(Handle handle)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Internal static factory method to be used by Java-Gnome only.
public static Type getType()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retrieve the runtime type used by the GLib library.
public Rectangle getVisibleRectangle()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns a Rectangle with the currently-visible region of the buffer, in buffer coordinates. Convert to window coordinates withbufferToWindowCoords(TextWindowType,int,int)
.
public Window getWindow(TextWindowType type)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retrieves theWindow
corresponding to an area of the text view; possible windows include the overall widget window, child windows on the left, right, top, bottom, and the window that displays the text buffer. Windows are null and nonexistent if their width or height is 0, and are nonexistent before the widget has been realized.
- Parameters:
type
- The window to get
- Returns:
- The window, or null
public TextWindowType getWindowType(Window win)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Usually used to find out which window an event corresponds to.
- Parameters:
win
- A window
- Returns:
- The type of the window
public WrapMode getWrapMode()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the line wrapping for the view.
- Returns:
- the line wrap setting for the view.
public boolean moveCursorOnScreen()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Moves the cursor to the currently visible region of the buffer, it it isn't there already.
- Returns:
- TRUE if the cursor had to be moved.
public boolean moveMarkOnScreen(TextMark mark)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Moves a mark within the buffer so that it's located within the currently-visible text area.
- Returns:
- TRUE if the mark had to be moved.
public void removeListener(TextViewListener listener)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Unregister an object that was receiving text view event notification.
- Parameters:
listener
- The object that is to no longer receive text view events.
public void scrollMarkOnScreen(TextMark mark)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Scrolls this the minimum distance such that mark is contained within the visible area of the widget.
- Parameters:
mark
- a mark in the buffer of the TextView.
public boolean scrollToIter(TextIter iter, double withinMargin)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Scrolls text view so that iter is on the screen. The effective screen for purposes of this function is reduced by a margin of size within_margin. NOTE: This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid oddness, consider using gtk_text_view_scroll_to_mark() which saves a point to be scrolled to after line validation.
- Parameters:
iter
- a TextIterwithinMargin
- Margin as a [0.0,0.5) fraction of screen size.
- Returns:
- TRUE if scrolling occurred
public boolean scrollToIter(TextIter iter, double withinMargin, double xAlign, double yAlign)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Scrolls text view so that iter is on the screen in the position indicated by xalign and yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. The effective screen for purposes of this function is reduced by a margin of size within_margin. NOTE: This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid oddness, consider usingscrollToMark(TextMark,double,boolean,double,double)
which saves a point to be scrolled to after line validation.
- Parameters:
iter
- a TextIterwithinMargin
- Margin as a [0.0,0.5) fraction of screen size.xAlign
- : horizontal alignment of mark within visible area.yAlign
- : vertical alignment of mark within visible area
- Returns:
- TRUE if scrolling occurred
public void scrollToMark(TextMark mark, double withinMargin)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Scrolls the view so that mark is on the screen. The text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size withinMargin.
- Parameters:
mark
- ATextMark
withinMargin
- Margin as a fraction of screen size
public void scrollToMark(TextMark mark, double withinMargin, boolean useAlign, double xAlign, double yAlign)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Scrolls the view so that mark is on the screen in the position indicated by xAlign and yAlign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center.
- Parameters:
mark
- ATextMark
withinMargin
- Margin as a fraction of screen sizeuseAlign
- Whether to use alignment arguments.xAlign
- Horizontal alignment of mark within visible area.yAlign
- : vertical alignment of mark within visible area
public void setAcceptsTab(boolean acceptsTab)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the behavior of the text widget when the Tab key is pressed. If TRUE, a tab character is inserted. If is FALSE, the keyboard focus is moved to the next widget in the focus chain.
- Parameters:
acceptsTab
- TRUE if pressing the Tab key should insert a tab character, FALSE, if pressing the Tab key should move the keyboard focus
- Since:
- 2.4
public void setBorderWindowSize(TextWindowType type, int size)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the width of theTextWindowType.LEFT
orTextWindowType.RIGHT
windows, or the height ofTextWindowType.TOP
orTextWindowType.BOTTOM
Windows. Automatically destroys the corresponding window if the size is set to 0, and creates the window if the size is set to non-zero. This function can only be used for the "border windows," it doesn't work withTextWindowType.WIDGET
,TextWindowType.TEXT
, orTextWindowType.PRIVATE
.
- Parameters:
type
- The window to affectsize
- Width or height of the window
public void setBuffer(TextBuffer buffer)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets buffer as the buffer being displayed by the view.
- Parameters:
buffer
- The new buffer to display
public void setCursorVisible(boolean setting)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Toggles whether the insertion point is displayed. A buffer with no editable text probably shouldn't have a visible cursor, so you may want to turn the cursor off.
- Parameters:
setting
- Whether to show the insertion cursor
public void setEditable(boolean setting)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default editability of the GtkTextView. You can override this default setting with tags in the buffer, using the "editable" attribute of tags.
- Parameters:
setting
- Whether it's editable
public void setIndent(int indent)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default indentation for paragraphs in text_view. Tags in the buffer may override the default.
- Parameters:
indent
- Indentation in pixels
public void setJustification(Justification justification)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default justification of text in text_view. Tags in the view's buffer may override the default.
- Parameters:
justification
- The justification to use.
public void setLeftMargin(int leftMargin)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default left margin for text in text_view. Tags in the buffer may override the default.
- Parameters:
leftMargin
- Size of left margin, in pixels
public void setOverwrite(boolean overwrite)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Changes the overwrite mode (whether text is overwritten)
- Parameters:
overwrite
- TRUE to turn on overwrite mode, FALSE to turn it off
- Since:
- 2.4
public void setPixelsAboveLines(int pixelsAboveLines)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default number of blank pixels above paragraphs in text_view. Tags in the buffer for text_view may override the defaults.
- Parameters:
pixelsAboveLines
- Pixels above paragraphs
public void setPixelsBelowLine(int pixelsBelowLines)
Deprecated. Use
setPixelsBelowLines(int)
instead.Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.Sets the default number of pixels of blank space to put below paragraphs in text_view. May be overridden by tags applied to text_view's buffer.
- Parameters:
pixelsBelowLines
- Pixels below paragraphs
public void setPixelsBelowLines(int pixelsBelowLines)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default number of pixels of blank space to put below paragraphs in text_view. May be overridden by tags applied to text_view's buffer.
- Parameters:
pixelsBelowLines
- Pixels below paragraphs
public void setPixelsInsideWrap(int pixelsInsideWrap)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default number of pixels of blank space to leave between display/wrapped lines within a paragraph. May be overridden by tags in text_view's buffer.
- Parameters:
pixelsInsideWrap
- Default number of pixels between wrapped lines
public void setRightMargin(int rightMargin)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default right margin for text in text_view. Tags in the buffer may override the default.
- Parameters:
rightMargin
- Size of right margin, in pixels
public void setTabs(TabArray tabStops)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default tab stops for paragraphs in text_view. Tags in the buffer may override the default.
- Parameters:
tabStops
- tabs as a PangoTabArray
public void setWrapMode(WrapMode wrapMode)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the line wrapping for the view.
- Parameters:
wrapMode
- A WrapMode
public Point windowToBufferCoords(TextWindowType winType, int xCoord, int yCoord)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Converts coordinates on the window identified by thewinType
to buffer coordinates.
- Parameters:
winType
- aTextWindowType
.xCoord
- the x-coordinate in relation to the Window winyCoord
- the y-coordinate in relation to the Window win
- Returns:
- a Point representing the buffer coordinates