org.gnu.pango

Class TabArray

public class TabArray extends Boxed

A PangoTabArray struct contains an array of tab stops. Each tab stop has an alignment and a position.
Constructor Summary
TabArray(int initialSize, boolean positionsInPixels)
Creates an array of initialSize tab stops.
TabArray(TabArray tabArray)
Create a TabArray that is a copy of the provided TabArray.
TabArray(Handle handle)
Constructs new Tab array from handle to native resources.
Method Summary
TabAligngetAligment(int tabIndex)
Returns the alignment ofthe tab stop
intgetPosition(int tabIndex)
Returns the position of the tab stops
intgetSize()
Get the number of tab stops in the array
static TabArraygetTabArray(Handle handle)
Constructs new Tab array from handle to native resources.
booleanpositionInPixels()
Returns true if the tab positions are in pixels and false if they are in Pango units.
voidresize(int newSize)
Resizes a tab array.
voidsetTab(int tabIndex, TabAlign alignment, int location)
Sets the alignment and location of a tab stop.

Constructor Detail

TabArray

public TabArray(int initialSize, boolean positionsInPixels)
Creates an array of initialSize tab stops. Tab stops are specified in pixel units if positionsInPixels is true, otherwise in Pango units. All stops are initially at position 0.

TabArray

public TabArray(TabArray tabArray)
Create a TabArray that is a copy of the provided TabArray.

Parameters: tabArray

TabArray

public TabArray(Handle handle)
Constructs new Tab array from handle to native resources. Used internally by Java-Gnome.

Method Detail

getAligment

public TabAlign getAligment(int tabIndex)
Returns the alignment ofthe tab stop

getPosition

public int getPosition(int tabIndex)
Returns the position of the tab stops

getSize

public int getSize()
Get the number of tab stops in the array

getTabArray

public static TabArray getTabArray(Handle handle)
Constructs new Tab array from handle to native resources. Used internally by Java-Gnome.

positionInPixels

public boolean positionInPixels()
Returns true if the tab positions are in pixels and false if they are in Pango units.

resize

public void resize(int newSize)
Resizes a tab array. You must subsequently initialize any tabs that were added as a result of growing the array.

setTab

public void setTab(int tabIndex, TabAlign alignment, int location)
Sets the alignment and location of a tab stop. Alignment must always be {@link TabAlign#LEFT} in the current implementation.

Parameters: tabIndex The index of a tab stop alignment Tab alignment location Tab location in pango units