public abstract class EditScroller
extends java.lang.Object
In such cases, the scrolling can be done via the cursor left/right, home or end keys. This class provides APIs which allow the widget to adjust its content, depending on the index on which the scrolling anchor is currently positioned and on the anchor's location.
Modifier and Type | Field and Description |
---|---|
protected int |
anchorIndex
The anchor's location in the widget's content
|
Constructor and Description |
---|
EditScroller() |
Modifier and Type | Method and Description |
---|---|
abstract NativePoint |
adjustLocation(java.lang.String txt,
NativePoint np)
Adjust the location so that only the visible content will be displayed.
|
int |
getAnchorIndex()
Get the anchor.
|
abstract int |
getDelta()
Get the amount of characters which are over the left-most edge, and are not being displayed.
|
abstract int |
getOffset()
Get the index of the leftmost visible character in the widget's displayable area.
|
void |
setAnchorIndex(int anchorIndex)
Set the
anchorIndex to the new index. |
public abstract int getDelta()
public abstract NativePoint adjustLocation(java.lang.String txt, NativePoint np)
txt
- The full content.np
- The current location of the content.public abstract int getOffset()
public void setAnchorIndex(int anchorIndex)
anchorIndex
to the new index.anchorIndex
- The new anchor index.public int getAnchorIndex()
anchorIndex
.