## org.gnu.gtk
Class TextTag

    java.lang.Object
      org.gnu.glib.GObject
          org.gnu.gtk.TextTag

public class TextTag
extends GObject

See the `TextBuffer` description for an overview of these classes.

TextTags should be created using the `TextBuffer.createTag(String)` method.

Field Summary

Fields inherited from class org.gnu.glib.GObject
`eventsInitialized`

Constructor Summary
`protected` `TextTag(Handle handle)`
`` `TextTag(java.lang.String name)` Construct a new TextTag

Method Summary
`java.lang.String` `getName()` Returns the name of the tag
`protected static java.lang.String` `getName(Handle cptr)`
`int` `getPriority()` Returns the priority of the tag.
`static Type` `getType()` Retrieve the runtime type used by the GLib library.
`protected static int` `gtk_text_tag_get_priority(Handle tag)`
`protected static int` `gtk_text_tag_get_type()`
`protected static Handle` `gtk_text_tag_new(java.lang.String name)`
`protected static void` `gtk_text_tag_set_priority(Handle tag, int priority)`
`void` `setBackground(java.lang.String background)` Sets the background color as a string.
`void` `setBackgroundFullHeight(boolean fullHeight)` Whether the background color fills the entire line height or only the height of the tagged characters.
`void` `setBackgroundStipple(Pixmap stipple)` Bitmap to use as a mask when drawing the text background.
`protected static void` `setBooleanProperty(Handle handle, java.lang.String property, boolean setting)`
`void` `setDirection(TextDirection direction)` Text direction, e.g.
`protected static void` `setDoubleProperty(Handle handle, java.lang.String property, double setting)`
`void` `setEditable(boolean editable)` Whether the text can be modified by the user.
`void` `setFamily(java.lang.String family)` Name of the font family, e.g.
`void` `setFont(java.lang.String font)` Font description as a string, e.g.
`protected static void` `setFontDesc(Handle handle, Handle fontDesc)`
`void` `setFontDescription(FontDescription fontDesc)` Font description as a FontDescription.
`void` `setForeground(java.lang.String foreground)` Foreground color as a string
`void` `setForegroundStipple(Pixmap stipple)` Bitmap to use as a mask when drawing the text foreground.
`void` `setIndent(int indent)` Amount to indent the paragraph, in pixels.
`protected static void` `setIntProperty(Handle handle, java.lang.String property, int setting)`
`void` `setJustification(Justification justification)` Left, right, or center justification.
`void` `setLanguage(java.lang.String language)` The language this text is in, as an ISO code.
`void` `setLeftMargin(int margin)` Width of the left margin in pixels.
`void` `setPixelsAboveLines(int setting)` Pixels of blank space above paragraphs.
`void` `setPixelsBelowLines(int setting)` Pixels of blank space below paragraphs.
`void` `setPixelsInsideWrap(int setting)` Pixels of blank space between wrapped lines in a paragraph.
`protected static void` `setPixmapProperty(Handle handle, java.lang.String property, Handle pixmap)`
`void` `setPriority(int priority)` Sets the priority of the Tag.
`void` `setRightMargin(int margin)` Width of the right margin in pixels.
`void` `setRise(int rise)` Offset of text above the baseline (below the baseline if rise is negative) in pixels.
`void` `setScale(Scale scale)` Font size as a scale factor relative to the default font size.
`void` `setSize(int size)` Font size in Pango units.
`void` `setSizePoints(double points)` Font size in points.
`void` `setStretch(Stretch stretch)` Font stretch as a Stretch.
`void` `setStrikethrough(boolean strikethrough)` Whether to strike through the text.
`protected static void` `setStringProperty(Handle handle, java.lang.String property, java.lang.String setting)`
`void` `setStyle(Style style)` Font Style
`protected static void` `setTabs(Handle handle, Handle tabArray)`
`void` `setTabs(TabArray tabs)` Custom tabs for this text.
`void` `setUnderline(Underline underline)` Style of underline for this text.
`void` `setVariant(Variant variant)` Font variant as a Variant.
`void` `setWeight(Weight weight)` Font weight as an integer, see predefined values in Weight
`void` `setWrapMode(WrapMode mode)` Whether to wrap lines never, at word boundaries, or at character boundaries.

Methods inherited from class org.gnu.glib.GObject

`addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, equals, freezeNotify, getBooleanProperty, getData, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getHandle, getIntFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getNullHandle, getPixbufProperty, getProperty, getStringFromHandle, getStringProperty, hashCode, hasProperty, instantiateJGObjectFromGType, notify, removeEventHandler, removeListener, retrieveGObject, setBooleanProperty, setData, setData, setDoubleProperty, setFloatProperty, setHandle, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TextTag

    public TextTag(java.lang.String name)

  Construct a new TextTag

Parameters:
  `name` -

### TextTag

    protected TextTag(Handle handle)

Method Detail

### getType

    public static Type getType()

  Retrieve the runtime type used by the GLib library.

### getName

    public java.lang.String getName()

  Returns the name of the tag

### setPriority

    public void setPriority(int priority)

  Sets the priority of the Tag. Valid priorities are start at 0 and go to one less than `TextTagTable.getSize()`. Each tag in a table has a unique priority; setting the priority of one tag shifts the priorities of all the other tags in the table to maintain a unique priority for each tag. Higher priority tags "win" if two tags both set the same text attribute. When adding a tag to a tag table, it will be assigned the highest priority in the table by default; so normally the precedence of a set of tags is the order in which they were added to the table, or created with `TextBuffer.createTag(String)`, which adds the tag to the buffer's table automatically.

### getPriority

    public int getPriority()

  Returns the priority of the tag.

  See Also:
    `setPriority(int)`

### setBackground

    public void setBackground(java.lang.String background)

  Sets the background color as a string.

  Parameters:
    `background` -

### setBackgroundFullHeight

    public void setBackgroundFullHeight(boolean fullHeight)

  Whether the background color fills the entire line height or only the height of the tagged characters.

  Parameters:
    `fullHeight` -

### setBackgroundStipple

    public void setBackgroundStipple(Pixmap stipple)

  Bitmap to use as a mask when drawing the text background.

  Parameters:
    `stipple` -

### setDirection

    public void setDirection(TextDirection direction)

  Text direction, e.g. right-to-left or left-to-right.

  Parameters:
    `direction` -

### setEditable

    public void setEditable(boolean editable)

  Whether the text can be modified by the user.

  Parameters:
    `editable` -

### setFamily

    public void setFamily(java.lang.String family)

  Name of the font family, e.g. Sans, Helvetica, Times, Monospace.

  Parameters:
    `family` -

### setFont

    public void setFont(java.lang.String font)

  Font description as a string, e.g. "Sans Italic 12".

  Parameters:
    `font` -

### setFontDescription

    public void setFontDescription(FontDescription fontDesc)

  Font description as a FontDescription.

  Parameters:
    `fontDesc` -

### setForeground

    public void setForeground(java.lang.String foreground)

  Foreground color as a string

  Parameters:
    `foreground` -

### setForegroundStipple

    public void setForegroundStipple(Pixmap stipple)

  Bitmap to use as a mask when drawing the text foreground.

  Parameters:
    `stipple` -

### setIndent

    public void setIndent(int indent)

  Amount to indent the paragraph, in pixels.

  Parameters:
    `indent` -

### setJustification

    public void setJustification(Justification justification)

  Left, right, or center justification.

  Parameters:
    `justification` -

### setLanguage

    public void setLanguage(java.lang.String language)

  The language this text is in, as an ISO code. Pango can use this as a hint when rendering the text. If not set, an appropriate default will be used.

  Parameters:
    `language` -

### setLeftMargin

    public void setLeftMargin(int margin)

  Width of the left margin in pixels.

  Parameters:
    `margin` -

### setPixelsAboveLines

    public void setPixelsAboveLines(int setting)

  Pixels of blank space above paragraphs.

  Parameters:
    `setting` -

### setPixelsBelowLines

    public void setPixelsBelowLines(int setting)

  Pixels of blank space below paragraphs.

  Parameters:
    `setting` -

### setPixelsInsideWrap

    public void setPixelsInsideWrap(int setting)

  Pixels of blank space between wrapped lines in a paragraph.

  Parameters:
    `setting` -

### setRightMargin

    public void setRightMargin(int margin)

  Width of the right margin in pixels.

  Parameters:
    `margin` -

### setRise

    public void setRise(int rise)

  Offset of text above the baseline (below the baseline if rise is negative) in pixels.

  Parameters:
    `rise` -

### setScale

    public void setScale(Scale scale)

  Font size as a scale factor relative to the default font size. This properly adapts to theme changes etc. so is recommended.

  Parameters:
    `scale` -

### setSize

    public void setSize(int size)

  Font size in Pango units.

  Parameters:
    `size` -

### setSizePoints

    public void setSizePoints(double points)

  Font size in points.

  Parameters:
    `points` -

### setStretch

    public void setStretch(Stretch stretch)

  Font stretch as a Stretch.

  Parameters:
    `stretch` -

### setStrikethrough

    public void setStrikethrough(boolean strikethrough)

  Whether to strike through the text.

  Parameters:
    `strikethrough` -

### setStyle

    public void setStyle(Style style)

  Font Style

  Parameters:
    `style` -

### setTabs

    public void setTabs(TabArray tabs)

  Custom tabs for this text.

  Parameters:
    `tabs` -

### setUnderline

    public void setUnderline(Underline underline)

  Style of underline for this text.

  Parameters:
    `underline` -

### setVariant

    public void setVariant(Variant variant)

  Font variant as a Variant.

  Parameters:
    `variant` -

### setWeight

    public void setWeight(Weight weight)

  Font weight as an integer, see predefined values in Weight

  Parameters:
    `weight` -

### setWrapMode

    public void setWrapMode(WrapMode mode)

  Whether to wrap lines never, at word boundaries, or at character boundaries.

  Parameters:
    `mode` -

### getName

    protected static final java.lang.String getName(Handle cptr)

### gtk_text_tag_get_type

    protected static final int gtk_text_tag_get_type()

### gtk_text_tag_new

    protected static final Handle gtk_text_tag_new(java.lang.String name)

### gtk_text_tag_get_priority

    protected static final int gtk_text_tag_get_priority(Handle tag)

### gtk_text_tag_set_priority

    protected static final void gtk_text_tag_set_priority(Handle tag,
                                                          int priority)

### setStringProperty

    protected static final void setStringProperty(Handle handle,
                                                  java.lang.String property,
                                                  java.lang.String setting)

### setBooleanProperty

    protected static final void setBooleanProperty(Handle handle,
                                                   java.lang.String property,
                                                   boolean setting)

### setIntProperty

    protected static final void setIntProperty(Handle handle,
                                               java.lang.String property,
                                               int setting)

### setDoubleProperty

    protected static final void setDoubleProperty(Handle handle,
                                                  java.lang.String property,
                                                  double setting)

### setPixmapProperty

    protected static final void setPixmapProperty(Handle handle,
                                                  java.lang.String property,
                                                  Handle pixmap)

### setTabs

    protected static final void setTabs(Handle handle,
                                        Handle tabArray)

### setFontDesc

    protected static final void setFontDesc(Handle handle,
                                            Handle fontDesc)