org.gnu.gtk

Class TextMark

public class TextMark extends GObject

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.TextMark. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

You may wish to begin by reading the TextView overview which gives an overview of all the objects and data types related to the text widget and how they work together.

A TextMark is like a bookmark in a text buffer; it preserves a position in the text. You can convert the mark to an iterator using getIter. Unlike iterators, marks remain valid across buffer mutations, because their behavior is defined when text is inserted or deleted. When text containing a mark is deleted, the mark remains in the position originally occupied by the deleted text. When text is inserted at a mark, a mark with left gravity will be moved to the beginning of the newly-inserted text, and a mark with right gravity will be moved to the end.

Marks optionally have names; these can be convenient to avoid passing the TextMark object around.

Method Summary
TextBuffergetBuffer()
Gets the buffer this mark is located inside, or NULL if the mark is deleted.
booleangetDeleted()
Returns TRUE if the mark has been removed from its buffer with deleteMark.
booleangetLeftGravity()
Determines whether the mark has left gravity.
StringgetName()
Returns the mark name; returns NULL for anonymous marks.
static TypegetType()
Retrieve the runtime type used by the GLib library.
booleangetVisibility()
Returns TRUE if the mark is visible (ie a cursor is displayed for it)
voidsetVisibility(boolean setting)
Sets the visibility of mark; the insertion point is normally visible, ie you can see it as a vertical bar.

Method Detail

getBuffer

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.

Gets the buffer this mark is located inside, or NULL if the mark is deleted.

Returns: The buffer/

getDeleted

public boolean getDeleted()

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 TRUE if the mark has been removed from its buffer with deleteMark. Marks can't be used once deleted.

Returns: True if deleted

getLeftGravity

public boolean getLeftGravity()

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.

Determines whether the mark has left gravity.

Returns: TRUE if the mark has left gravity, FALSE otherwise

getName

public String getName()

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 mark name; returns NULL for anonymous marks.

Returns: The name of the mark

getType

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.

getVisibility

public boolean getVisibility()

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 TRUE if the mark is visible (ie a cursor is displayed for it)

Returns: true if it is visible

setVisibility

public void setVisibility(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 visibility of mark; the insertion point is normally visible, ie you can see it as a vertical bar. Also, the text widget uses a visible mark to indicate where a drop will occur when dragging-and-dropping text. Most other marks are not visible. Marks are not visible by default.

Parameters: setting Visibility of mark