public final class TextWindowType
extends org.freedesktop.bindings.Constant
The TEXT
Window is where most of the work happens; use
Textview's getWindow(TEXT)
rather than Widget's getWindow()
and can be used if you need
to work out relative positioning.
On the other hand there are border windows, specified by LEFT
,
TOP
, etc. These border Windows are an obscure, advanced,
and not wholly functional feature of GTK. The accompanying illustration
is a TextView with each border window specified to a width of 50 pixels and
a Label placed at window co-ordinates 0
,0
in each one.
Code to create this snapshot consisted of a series of calls like:
left = new Label("LEFT"); view.setBorderWindowSize(TextWindowType.LEFT, 50); view.add(left, TextWindowType.LEFT, 0, 0);one for each side. Note the positions and relative sizes of the scrollbars added by the ScrolledWindow into which the TextView was placed. As you can see, only the left border window one makes very much sense, as it could be used for things like breakpoint annotations in a programming editor.
WARNING
By all accounts, this feature is still evolving in
GTK; it is entirely possible that it was not completely implemented in the
first place, and in any case the interface for using it seems ... unsteady.
We have included this in java-gnome largely because we had already gone to
all the work of exposing it only to discover that it is exceedingly hard to
use and somewhat buggy. Hopefully GTK will improve, but if you use this,
expect the behaviour to be somewhat unpredictable.
Modifier and Type | Field and Description |
---|---|
static TextWindowType |
BOTTOM
The optional border Window below a TextView.
|
static TextWindowType |
LEFT
The optional border Window on the left hand side of a TextView.
|
static TextWindowType |
RIGHT
The optional border Window on the left hand side of a TextView.
|
static TextWindowType |
TEXT
The main part of the TextView which displays the text to the user.
|
static TextWindowType |
TOP
The optional border Window above a TextView.
|
public static TextWindowType BOTTOM
public static TextWindowType LEFT
public static TextWindowType RIGHT
public static TextWindowType TEXT
public static TextWindowType TOP