public final class GridDriver extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_COUNT
The default assumption for a records count in a table.
|
static int |
DEFAULT_SMALL_SCROLL |
static long |
REFINEMENT_DELAY_MS |
| Constructor and Description |
|---|
GridDriver(ru.curs.celesta.dbutils.BasicCursor c,
Runnable changeNotifier) |
| Modifier and Type | Method and Description |
|---|---|
int |
getApproxTotalCount()
Returns (approximate) total record count.
|
Runnable |
getChangeNotifier()
Gets change notifier.
|
int |
getMaxExactScrollValue()
If the grid is scrolled less than for returned number of records, the
exact positioning in cycle will be used instead of interpolation.
|
int |
getTopVisiblePosition()
Returns scrollbar's knob position for current cursor value.
|
boolean |
isValidFor(ru.curs.celesta.dbutils.BasicCursor c)
Checks if this driver is valid for a given cursor with its filters and
sorting.
|
void |
setMaxExactScrollValue(int smallScroll)
If the grid is scrolled less than for given amount of records, the exact
positioning in cycle will be used instead of interpolation.
|
void |
setPosition(ru.curs.celesta.dbutils.BasicCursor c)
Adjusts internal state for pre-positioned cursor.
|
boolean |
setPosition(int position,
ru.curs.celesta.dbutils.BasicCursor c)
Fills key fields of a cursor based on scroller knob position.
|
void |
truncate() |
public static final int DEFAULT_SMALL_SCROLL
public static final long REFINEMENT_DELAY_MS
public static final int DEFAULT_COUNT
public GridDriver(ru.curs.celesta.dbutils.BasicCursor c,
Runnable changeNotifier)
public boolean isValidFor(ru.curs.celesta.dbutils.BasicCursor c)
c - Cursor for checking.public boolean setPosition(int position,
ru.curs.celesta.dbutils.BasicCursor c)
position - scrollbar knob positionc - Alive cursor to be modifiedpublic void truncate()
public void setPosition(ru.curs.celesta.dbutils.BasicCursor c)
c - Cursor that is set to a certain position.public int getTopVisiblePosition()
public int getApproxTotalCount()
Just after creation of this object this method returns DEFAULT_COUNT value, but it asynchronously requests total count right after constructor execution.
public Runnable getChangeNotifier()
public void setMaxExactScrollValue(int smallScroll)
smallScroll - new value.public int getMaxExactScrollValue()
Copyright © 2019 CURS. All rights reserved.