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 |
| Constructor and Description |
|---|
GridDriver(ru.curs.celesta.dbutils.BasicCursor c) |
GridDriver(ru.curs.celesta.dbutils.BasicCursor c,
Runnable callback) |
| 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 |
setChangeNotifier(Runnable changeNotifier)
Sets change notifier (a method that is being called when grid metrics
update is ready).
|
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.
|
public static final int DEFAULT_SMALL_SCROLL
public static final int DEFAULT_COUNT
public GridDriver(ru.curs.celesta.dbutils.BasicCursor c,
Runnable callback)
public GridDriver(ru.curs.celesta.dbutils.BasicCursor c)
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 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 void setChangeNotifier(Runnable changeNotifier)
changeNotifier - new change modifier.public Runnable getChangeNotifier()
public void setMaxExactScrollValue(int smallScroll)
smallScroll - new value.public int getMaxExactScrollValue()
Copyright © 2019 CURS. All rights reserved.