public class BrowseWidget extends BaseEntity<BrowseConfig> implements BrowseElement, BrowseInterface, QueryAssociable, RepositionListener, ResultListHandler, ScrollbarVerticalElement, Multiple, Down, Labels, Hoverable, Droppable, RowDisplayDrawListener
Modifier and Type | Class and Description |
---|---|
private static class |
BrowseWidget.PendingOpenState
Pending query reopening state while REFRESHABLE is off.
|
BaseEntity.CharsPixels
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<BrowseColumnWidget> |
columns
List of columns in browse.
|
private static int |
DATA_GUESS_DEFAULT_VALUE
Default value for the MAX-DATA-GUESS attribute.
|
private CharacterExpression |
dynTitle
The registered storage for the current browse title.
|
private int |
ignoreRepo
Flag to ignore browse-driven reposition events
|
private boolean |
initDone
Widget initialization flag.
|
private java.util.ArrayList<BrowseRow> |
intermediateRows
While we are getting new rows, this is the list of the rows that were already fetched and
can be drawn if a pause takes place during ROW-DISPLAY.
|
private java.lang.Integer |
maximumKnownRowIndex
Maximum known row index (1-based).
|
private java.lang.Integer |
pageRowsCount
Cached value of client-side (real) DOWN value.
|
private BrowseWidget.PendingOpenState |
pendingReopen
Pending query reopening state while REFRESHABLE is off.
|
private int |
pendingRepositionRow
Pending 0-based repositioned row index (i.e.
|
private P2JQuery |
query
Underlying query.
|
private int |
queryBuffersCount
Number of buffers in the original underlying query.
|
private boolean |
realDataGuessUsed
true if an actual number of fetched rows is used as MAX-DATA-GUESS. |
private BrowseRow |
rowInDisplay
Row for which ROW-DISPLAY event is being triggered.
|
group
config, deleted, frame
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
BrowseWidget()
Default constructor.
|
BrowseWidget(boolean dynamic)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
handle |
addCalcColumn(character dataType,
character format,
character initialValue,
character label)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(character dataType,
character format,
character initialValue,
character label,
NumberType position)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(character dataType,
character format,
character initialValue,
character label,
NumberType position,
character widgetType)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(character dataType,
character format,
java.lang.String initialValue,
character label)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(java.lang.String dataType,
java.lang.String format,
BaseDataType initialValue,
java.lang.String label)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(java.lang.String dataType,
java.lang.String format,
BaseDataType initialValue,
java.lang.String label,
int position)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(java.lang.String dataType,
java.lang.String format,
int initialValue,
java.lang.String label,
int position)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(java.lang.String dataType,
java.lang.String format,
java.lang.String initialValue,
character label)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(java.lang.String dataType,
java.lang.String format,
java.lang.String initialValue,
java.lang.String label)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(java.lang.String dataType,
java.lang.String format,
java.lang.String initialValue,
java.lang.String label,
int position)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
handle |
addCalcColumn(java.lang.String dataType,
java.lang.String format,
java.lang.String initialValue,
java.lang.String label,
int position,
java.lang.String widgetType)
Creates a browse column from the specified properties and returns the handle of the new
column.
|
void |
addColumn(BrowseColumnWidget column)
Add new field to the list of browse fields.
|
void |
addColumn(BrowseColumnWidget column,
int position)
Add new field to the list of browse fields.
|
private BrowseColumnWidget |
addColumnWidget(java.lang.String dataType,
java.lang.String dataFormat,
java.lang.String columnLabel,
NumberType position,
FieldReference fieldReference,
character initialValue,
BrowseColumnWidgetType widgetType,
boolean calcColumn)
Create browse column widget and add it to this browse.
|
handle |
addLikeColumn(character fieldName)
Implements the ADD-LIKE-COLUMN() widget method.
|
handle |
addLikeColumn(character fieldName,
int64 position)
Implements the ADD-LIKE-COLUMN() widget method.
|
handle |
addLikeColumn(FieldReference[] fieldReferences,
int64 position)
Implements ADD-LIKE-COLUMN() widget method.
|
handle |
addLikeColumn(handle fieldHandle)
Implements the ADD-LIKE-COLUMN() widget method.
|
handle |
addLikeColumn(handle fieldHandle,
int64 position)
Implements the ADD-LIKE-COLUMN() widget method.
|
handle |
addLikeColumn(handle fieldHandle,
long position)
Implements the ADD-LIKE-COLUMN() widget method.
|
handle |
addLikeColumn(java.lang.String fieldName)
Implements the ADD-LIKE-COLUMN() widget method.
|
handle |
addLikeColumn(java.lang.String fieldName,
int64 position)
Implements the ADD-LIKE-COLUMN() widget method.
|
handle |
addLikeColumn(java.lang.String fieldName,
long position)
Implements the ADD-LIKE-COLUMN() widget method.
|
private BrowseRow[] |
addRowsToBottom(BrowseRow[] upper,
int rowDisplayTriggerId,
ScreenBuffer[] sb,
RowDisplayStrategy displayStrategy)
Supplement the set of rows which represent the upper part of the rows in view with the
bottom part (i.e.
|
private boolean |
checkNoRecords(java.lang.String methodName)
Check if the underlying query is open and the result set contains records.
|
private boolean |
checkQueryAssigned()
Raises "Unable to do ADD-LIKE-COLUMN because the QUERY is not set" error if the query is
not set for this browse.
|
void |
cleanup()
Cleanup dynamic browse before deletion.
|
logical |
clearSortArrows()
Resets sort-arrow indicators and sort-level numbers for all browse columns.
|
logical |
createResultListEntry()
This will creates an entry in the result list for the current row.
|
logical |
deleteCurrentRow()
Implements the DELETE-CURRENT-ROW() widget method.
|
logical |
deleteResultListEntry()
This will delete the current row in the query's results.
|
logical |
deleteResultListEntry(boolean allowBetweenRows,
boolean refreshBrowse)
This will delete the current row in the query's results.
|
private logical |
deleteRow(int rowIndex,
boolean refreshBrowse)
Delete the row with the specified index.
|
logical |
deleteSelectedRow(int row)
Implements the DELETE-SELECTED-ROW() widget method.
|
logical |
deleteSelectedRow(int64 row)
Implements the DELETE-SELECTED-ROW() widget method.
|
logical |
deleteSelectedRows()
Implements the DELETE-SELECTED-ROWS() widget method.
|
private logical |
deleteSingleRow(int selIndex,
java.lang.String methodName)
Performs full cycle of DELETE-CURRENT-ROW or DELETE-SELECTED-ROW processing.
|
logical |
deselectFocusedRow()
Implements the DESELECT-FOCUSED-ROW() widget method.
|
logical |
deselectRows()
Implements the DESELECT-ROWS() widget method.
|
logical |
deselectSelectedRow(int row)
Implements the DESELECT-SELECTED-ROW() widget method.
|
logical |
deselectSelectedRow(int64 row)
Implements the DESELECT-SELECTED-ROW() widget method.
|
private void |
errorAlreadyRealized(java.lang.String attributeName)
Displays "Unable to set ATTRIBUTE_NAME because the BROWSE widget has been realised."
error
|
private void |
errorInvalidRowIndex(java.lang.String methodName)
Displays the "Invalid row index specified for browse method methodName" error
message.
|
private void |
errorNoSelectedRows(java.lang.String methodName)
Displays the "Invalid use of browse method methodName.
|
logical |
fetchSelectedRow(int64 n)
Implements the FETCH-SELECTED-ROW() widget method.
|
logical |
fetchSelectedRow(long n)
Implements the FETCH-SELECTED-ROW() widget method.
|
protected void |
finishConfigProcessing()
Finish the config processing for this browse.
|
void |
finishSetup()
Finish initialization of the browse widget.
|
private void |
fixDataTypeOverride(BrowseColumnWidget column,
BaseDataType val)
If a character value is displayed at non-character column, change column's data type to
"character" and make column right-aligned if the original column format was right-aligned or
it was a numeric column.
|
void |
forceRefresh()
Force refreshing of the browse at client side.
|
handle |
getBrowseColumn(int index)
Get specified browse column.
|
handle |
getBrowseColumn(int index,
boolean showError)
Get specified browse column.
|
handle |
getBrowseColumn(NumberType index)
Get specified browse column.
|
(package private) java.util.Iterator<BrowseColumnWidget> |
getBrowseColumns()
Get iterator for browse column widgets.
|
private int |
getBrowsePageRowCount()
Get number of rows in the browse viewport set either by DOWN or SIZE options.
|
integer |
getColumnBgColor()
Get the COLUMN-BGCOLOR attribute value.
|
integer |
getColumnFgColor()
Get the COLUMN-FGCOLOR attribute value.
|
handle |
getCurrentColumn()
Get the current column (a column can be selected by clicking on its header if
ALLOW-COLUMN-SEARCHING is
true ). |
int |
getCurrentRow()
Get current row in the query.
|
integer |
getDown()
Get the vale of the DOWN attribute.
|
WidgetConfig[] |
getEditorsConfigs()
Get configurations of editors (fill-ins, toggle-boxes or combo-boxes) used for in-browse
editing.
|
handle |
getFirstColumn()
Implements the FIRST-COLUMN attribute getter.
|
integer |
getFocusedRow()
Implements the FOCUSED-ROW attribute getter.
|
character |
getHelp()
Get the HELP writable attribute.
|
integer |
getLabelBgColor()
Gets the LABEL-BGCOLOR writable attribute.
|
integer |
getLabelFgColor()
Gets the LABEL-FGCOLOR writable attribute.
|
integer |
getLabelFont()
Get the LABEL-FONT attribute of this browse column widget.
|
integer |
getMaxDataGuess()
Get value of the MAX-DATA-GUESS attribute.
|
decimal |
getMinHeightChars()
Implements the MIN-HEIGHT-CHARS attribute getter.
|
java.lang.String |
getMousePointerImpl()
Get the MOUSE-POINTER attribute
|
integer |
getNumColumns()
Get value of NUM-COLUMNS attribute.
|
integer |
getNumEntries()
Get the number of entries in the color-table of font-table.
|
integer |
getNumLockedColumns()
Implements the NUM-LOCKED-COLUMNS attribute getter.
|
integer |
getNumSelectedRows()
Get the NUM-SELECTED-ROWS attribute.
|
integer |
getPfColor()
Blocks attempts to get the PFCOLOR attribute as it is undefined.
|
P2JQuery |
getQuery()
Get the QUERY writable attribute.
|
handle |
getQueryAsHandle()
Get the query associated with the given resource.
|
integer |
getRepositionedRow()
Implements the GET-REPOSITIONED-ROW() widget method.
|
int |
getRowCount()
Get the number of rows iterated by the query (for preselect queries - matches result size,
for adaptive queries - matches the size of the part of the result set the query has already
iterated over).
|
int |
getRowCount(int startRow)
Get number of available rows starting from the given one.
|
decimal |
getRowHeightChars()
Implements the ROW-HEIGHT-CHARS attribute getter.
|
integer |
getRowHeightPixels()
Implements the ROW-HEIGHT-PIXELS attribute getter.
|
(package private) CellAttributes |
getRowInDisplayAttributes(int columnIndex)
Get container for getting / setting attributes of the cell in the row for which ROW-DISPLAY
event is being triggered.
|
BrowseRow[] |
getRows(char searchChar,
int searchColumn,
int viewportTopRow,
int viewportBottomRow,
int rowDisplayTriggerId,
ScreenBuffer[] sb)
This function is used when search by key is performed in a browse.
|
BrowseRow[] |
getRows(int startRowIndex,
int count,
boolean forward,
java.lang.Character searchChar,
int searchColumn,
int searchFinalRow,
int viewportTopRow,
int viewportBottomRow,
int rowDisplayTriggerId,
ScreenBuffer[] sb,
RowDisplayStrategy displayStrategy)
Depending on whether search by key is performed (
searchChar parameter is
specified):
In non-search mode: retrieve several subsequent rows from the database.
In search mode: retrieve the set of rows which should be in view after search is
completed. |
BrowseRow[] |
getRows(int startRowIndex,
int count,
boolean forward,
int rowDisplayTriggerId,
ScreenBuffer[] sb,
RowDisplayStrategy displayStrategy)
Retrieves several subsequent rows from the database.
|
character |
getScreenValue()
Overrides the parent version to notify that this is not a queryable attribute.
|
integer |
getSeparatorFgColor()
Get the SEPARATOR-FGCOLOR attribute value.
|
integer |
getTitleFont()
Get the TITLE-FONT attribute of this browse, dialog, frame or pop-up menu.
|
private void |
handleError(ErrorConditionException exc,
java.lang.String methodName)
Displays the appropriate error message for an exception with specific 4GL error code.
|
logical |
hasRowMarkers()
Get value of the ROW-MARKERS attribute.
|
private void |
initMaxDataGuess()
If necessary, init MAX-DATA-GUESS after the query has been (re)opened.
|
logical |
insertRow()
Implements the INSERT-ROW() widget method.
|
logical |
insertRow(character mode)
Implements the INSERT-ROW() widget method.
|
logical |
insertRow(java.lang.String mode)
Implements the INSERT-ROW() widget method.
|
logical |
isAllowColumnSearching()
Implements the ALLOW-COLUMN-SEARCHING attribute getter.
|
logical |
isColumnMovable()
Get value of the COLUMN-MOVABLE attribute.
|
logical |
isColumnResizable()
Get value of the COLUMN-RESIZABLE attribute.
|
logical |
isColumnScrolling()
Get value of the COLUMN-SCROLLING attribute.
|
logical |
isCreateOnAdd()
Get value of the CREATE-ON-ADD attribute.
|
logical |
isCurrentRowModified()
Get value of the CURRENT-ROW-MODIFIED attribute.
|
logical |
isDropTarget()
Gets DROP-TARGET attribute.
|
private boolean |
isEditPossible()
Determine if in-browse editing is possible.
|
logical |
isExpandable()
Get value of the EXPANDABLE attribute.
|
logical |
isFitLastColumn()
Get value of the FIT-LAST-COLUMN attribute.
|
(package private) boolean |
isInRowDisplayTrigger()
Returns
true if ROW-DISPLAY trigger is being executed. |
logical |
isLabels()
Get the value of the LABELS attribute.
|
logical |
isModified()
Queries if the SCREEN-VALUE attribute for this widget was changed.
|
logical |
isMultiple()
Get the MULTIPLE attribute.
|
logical |
isNewRow()
Get value of the NEW-ROW attribute.
|
boolean |
isNewRow(int rowIndex)
Returns
true if specified row is new and is not present
in the data base. |
logical |
isNoEmptySpace()
Get value of the NO-EMPTY-SPACE attribute.
|
logical |
isNoValidate()
Gets the NO-VALIDATE ttribute.
|
logical |
isReadOnly()
Checks whether the widget is write-protected.
|
logical |
isRefreshable()
Get value of the REFRESHABLE attribute.
|
boolean |
isRowAvailable(int rowIndex)
Determines if the specified browse row is "available", i.e.
|
private boolean |
isRowInView(int viewportTopRow,
int viewportBottomRow,
int targetRow)
Returns
true if the target row is in view. |
private boolean |
isRowOnFirstPage(int targetRow)
Returns
true if the target row is on the first "page" of the result set. |
logical |
isRowResizable()
Get value of the ROW-RESIZABLE attribute.
|
logical |
isRowSelected(int row)
Implements the IS-ROW-SELECTED() widget method.
|
logical |
isRowSelected(int64 row)
Implements the IS-ROW-SELECTED() widget method.
|
logical |
isScrollable()
Gets the SCROLLABLE writeable attribute.
|
logical |
isScrollbarVertical()
Get value of the SCROLLBAR-VERTICAL attribute.
|
logical |
isSeparators()
Implements the SEPARATORS attribute getter.
|
logical |
moveColumn(int64 src,
int64 dest)
Implements the MOVE-COLUMN() widget method.
|
logical |
moveColumn(int64 src,
long dest)
Implements the MOVE-COLUMN() widget method.
|
logical |
moveColumn(long src,
int64 dest)
Implements the MOVE-COLUMN() widget method.
|
logical |
moveColumn(long src,
long dest)
Implements the MOVE-COLUMN() widget method.
|
void |
pushIntermediateRows()
Push "intermediate" rows (i.e.
|
void |
queryClosed()
Invoked when the query with which this browse widget is associated is
explicitly closed.
|
void |
queryRepositioned(boolean error,
int targetRepositionRow)
Invoked when the query with which this browse widget is associated is
explicitly repositioned.
|
logical |
refresh()
Implements the REFRESH() widget method.
|
logical |
refresh(boolean deleteCurrentRowMode)
Refresh the browse cache and redisplay the browse.
|
void |
registerQuery(P2JQuery query,
FrameElement[] list)
Register query and list of fields with the browse.
|
private void |
reposition(int64 row,
boolean fetch)
Common reposition code.
|
private void |
rowHeightError(int code,
boolean pixels)
Raise the error with the specific code related to row height.
|
logical |
scrollToCurrentRow()
Scrolls a browse (if necessary) to bring the currently selected row into view.
|
logical |
scrollToSelectedRow(int selectedRowIndex)
Scrolls a browse (if necessary) to bring the specified selected row into view.
|
logical |
scrollToSelectedRow(NumberType selectedRowIndex)
Scrolls a browse (if necessary) to bring the specified selected row into view.
|
logical |
selectAll()
Implements the SELECT-ALL() widget method.
|
logical |
selectFocusedRow()
Implements the SELECT-FOCUSED-ROW() widget method.
|
logical |
selectNextRow()
Implements the SELECT-NEXT-ROW() widget method.
|
logical |
selectPreviousRow()
Implements the SELECT-PREV-ROW() widget method.
|
logical |
selectRow(int64 row)
Implements the SELECT-ROW() widget method.
|
logical |
selectRow(long row)
Implements the SELECT-ROW() widget method.
|
void |
setAllowColumnSearching(boolean allow)
Implements the ALLOW-COLUMN-SEARCHING attribute setter.
|
void |
setAllowColumnSearching(logical allow)
Implements the ALLOW-COLUMN-SEARCHING attribute setter.
|
void |
setBgColor(int64 bgcolor)
Sets the BGCOLOR writable attribute.
|
void |
setBox(boolean box)
Set BOX attribute.
|
void |
setBox(logical box)
Set BOX attribute.
|
(package private) void |
setCellScreenValue(int columnIndex,
BaseDataType value)
If ROW-DISPLAY trigger is being executed, set the screen value of the cell.
|
void |
setCentered(boolean centered)
Set CENTERED attribute value.
|
void |
setCentered(logical centered)
Set CENTERED attribute value.
|
void |
setColumnBgColor(int64 color)
Sets the COLUMN-BGCOLOR writable attribute.
|
void |
setColumnBgColor(long color)
Sets the COLUMN-BGCOLOR writable attribute.
|
void |
setColumnFgColor(int64 color)
Sets the COLUMN-FGCOLOR writable attribute.
|
void |
setColumnFgColor(long color)
Sets the COLUMN-FGCOLOR writable attribute.
|
void |
setColumnMovable(boolean movable)
Set value of the COLUMN-MOVABLE attribute.
|
void |
setColumnMovable(logical movable)
Set value of the COLUMN-MOVABLE attribute.
|
void |
setColumnResizable(boolean resizable)
Set value of the COLUMN-RESIZABLE attribute.
|
void |
setColumnResizable(logical resizable)
Set value of the COLUMN-RESIZABLE attribute.
|
void |
setColumnScrolling(boolean columnScrolling)
Set value of the COLUMN-SCROLLING attribute.
|
void |
setColumnScrolling(logical columnScrolling)
Set value of the COLUMN-SCROLLING attribute.
|
void |
setCreateOnAdd(boolean createOnAdd)
Set value of the CREATE-ON-ADD attribute.
|
void |
setCreateOnAdd(logical createOnAdd)
Set value of the CREATE-ON-ADD attribute.
|
void |
setCurrentColumn(handle columnHandle)
Set the current column (a column can be selected by clicking on its header if
ALLOW-COLUMN-SEARCHING is
true ). |
int |
setCurrentRow(int rowIndex,
boolean force)
Set new current row in the browse.
|
void |
setDColor(int64 d)
Blocks attempts to set the DCOLOR attribute as it is read-only.
|
void |
setDown(int64 down)
Java implementation for setting the DOWN attribute which contains number of iterations in
a down frame or number of potential rows in a browse widget.
|
void |
setDown(long down)
Set new value for the DOWN attribute.
|
void |
setDropTarget(boolean flag)
Sets DROP-TARGET attribute.
|
void |
setDynamicTitle(Accessor title)
Sets the dynamic title for this browse widget.
|
void |
setDynamicTitle(BaseDataType title)
Sets the dynamic title for this browse widget.
|
void |
setDynamicTitle(CharacterExpression titleExp)
Sets the dynamic title for this browse widget.
|
void |
setEditableAll(boolean editable)
Change editable state for all columns.
|
void |
setExpandable(boolean expandable)
Set value of the EXPANDABLE attribute.
|
void |
setExpandable(logical expandable)
Set value of the EXPANDABLE attribute.
|
void |
setFitLastColumn(boolean fitLastColumn)
Set value of the FIT-LAST-COLUMN attribute.
|
void |
setFitLastColumn(logical fitLastColumn)
Set value of the FIT-LAST-COLUMN attribute.
|
void |
setFrame(GenericFrame frame)
Sets the containing frame instance.
|
void |
setHeightChars(double height)
Sets the HEIGHT-CHARS writable attribute.
|
void |
setHeightChars(NumberType height)
Sets the HEIGHT-CHARS writable attribute.
|
void |
setLabelBgColor(int64 bgcolor)
Sets the LABEL-BGCOLOR writable attribute.
|
void |
setLabelBgColor(long bgcolor)
Sets the LABEL-BGCOLOR writable attribute.
|
void |
setLabelFgColor(int64 fgcolor)
Sets the LABEL-FGCOLOR writable attribute.
|
void |
setLabelFgColor(long fgcolor)
Sets the LABEL-FGCOLOR writable attribute.
|
void |
setLabelFont(int font)
Set the LABEL-FONT attribute of this browse widget.
|
void |
setLabelFont(int64 fontNum)
Set the LABEL-FONT attribute of this browse widget.
|
void |
setLabels(boolean labels)
Set LABELS attribute.
|
void |
setLabels(logical labels)
Set LABELS attribute.
|
void |
setMaxDataGuess(double maxDataGuess)
Set value of the MAX-DATA-GUESS attribute.
|
void |
setMaxDataGuess(NumberType maxDataGuess)
Set value of the MAX-DATA-GUESS attribute.
|
void |
setModified(boolean modified)
Defines if the SCREEN-VALUE attribute for this widget has changed.
|
void |
setModified(logical modified)
Defines if the SCREEN-VALUE attribute for this widget has changed.
|
void |
setMousePointerName(java.lang.String name)
Set the MOUSE-POINTER attribute
|
void |
setMultiple(boolean multiple)
Set value of the MULTIPLE attribute.
|
void |
setMultiple(logical multiple)
Set value of the MULTIPLE attribute.
|
void |
setNoAssign(boolean noAssign)
Set value of the NO-ASSIGN attribute.
|
void |
setNoAssign(logical noAssign)
Set value of the NO-ASSIGN attribute.
|
void |
setNoBox(boolean nobox)
Set BOX attribute as opposite to passed value.
|
void |
setNoBox(logical nobox)
Set BOX attribute as opposite to passed value.
|
void |
setNoColumnScrolling(boolean noColumnScrolling)
Set value of the COLUMN-SCROLLING attribute as opposite to passed argument.
|
void |
setNoColumnScrolling(logical noColumnScrolling)
Set value of the COLUMN-SCROLLING attribute as opposite to passed argument.
|
void |
setNoEmptySpace(boolean noEmptySpace)
Set value of the NO-EMPTY-SPACE attribute.
|
void |
setNoEmptySpace(logical noEmptySpace)
Set value of the NO-EMPTY-SPACE attribute.
|
void |
setNoLabels(boolean nolabels)
Set LABELS attribute as opposite to passed value.
|
void |
setNoLabels(logical labels)
Set LABELS attribute as opposite to passed value.
|
void |
setNoRowMarkers(boolean nomarkers)
Set value of the ROW-MARKERS attribute as opposite to passed value.
|
void |
setNoRowMarkers(logical nomarkers)
Set value of the ROW-MARKERS attribute as opposite to passed value.
|
void |
setNoSeparators(boolean noseparators)
Set SEPARATORS attribute as opposite to passed value.
|
void |
setNoSeparators(logical noseparators)
Set SEPARATORS attribute as opposite to passed value.
|
void |
setNoUnderline(boolean noUnderline)
Set value of the NO-UNDERLINE attribute.
|
void |
setNoUnderline(logical noUnderline)
Set value of the NO-UNDERLINE attribute.
|
void |
setNoValidate(boolean value)
Sets the NO-VALIDATE writable attribute.
|
void |
setNoValidate(logical value)
Sets the NO-VALIDATE writable attribute.
|
void |
setNumEntries(int64 numEntries)
Set the number of entries in the color-table of font-table.
|
void |
setNumEntries(long numEntries)
Set the number of entries in the color-table of font-table.
|
void |
setNumLockedColumns(double num)
Implements the NUM-LOCKED-COLUMNS attribute setter.
|
void |
setNumLockedColumns(NumberType num)
Implements the NUM-LOCKED-COLUMNS attribute setter.
|
void |
setOverlay(boolean overlay)
Set OVERLAY attribute.
|
void |
setOverlay(logical overlay)
Set OVERLAY attribute.
|
void |
setPfColor(int64 p)
Blocks attempts to set the PFCOLOR attribute as it is undefined.
|
void |
setQuery(P2JQuery query)
Set the query which will back this browse.
|
void |
setQueryAsHandle(handle qry)
Set the query associated with the given resource.
|
void |
setQueryAsHandle(QueryWrapper qry)
Set the query associated with the given resource.
|
void |
setReadOnly(logical r)
Sets the READ-ONLY attribute of the widget.
|
void |
setRefreshable(boolean refreshable)
Set value of the REFRESHABLE attribute.
|
void |
setRefreshable(logical refreshable)
Set value of the REFRESHABLE attribute.
|
logical |
setRepositionedRow(int64 row)
Provides the SET-REPOSITIONED-ROW() method which assigns the repositioned row number for the
browse.
|
logical |
setRepositionedRow(int64 row,
character conditional)
Provides the SET-REPOSITIONED-ROW() method which assigns the row number and type of
repositioning for the browse.
|
logical |
setRepositionedRow(int64 row,
java.lang.String conditional)
Provides the SET-REPOSITIONED-ROW() method which assigns the row number and type of
repositioning for the browse.
|
logical |
setRepositionedRow(int row,
java.lang.Boolean conditional)
Implements the SET-REPOSITIONED-ROW() widget method.
|
logical |
setRepositionedRow(long row)
Provides the SET-REPOSITIONED-ROW() method which assigns the repositioned row number for the
browse.
|
logical |
setRepositionedRow(long row,
java.lang.String conditional)
Provides the SET-REPOSITIONED-ROW() method which assigns the row number and type of
repositioning for the browse.
|
void |
setRowHeightChars(double rowHeightChars)
Set value of the ROW-HEIGHT-CHARS attribute.
|
void |
setRowHeightChars(NumberType rowHeightChars)
Set value of the ROW-HEIGHT-CHARS attribute.
|
void |
setRowHeightPixels(int rowHeightPixels)
Set value of the ROW-HEIGHT-PIXELS attribute.
|
void |
setRowHeightPixels(NumberType rowHeightPixels)
Set value of the ROW-HEIGHT-PIXELS attribute.
|
void |
setRowMarkers(boolean markers)
Set value of the ROW-MARKERS attribute.
|
void |
setRowMarkers(logical markers)
Set value of the ROW-MARKERS attribute.
|
void |
setRowResizable(boolean flag)
Set value of the ROW-RESIZABLE attribute.
|
void |
setScreenValue(character value)
Overrides the parent version to notify that this is not a settable attribute.
|
void |
setScrollable(boolean scroll)
Sets the SCROLLABLE writeable attribute.
|
void |
setScrollable(logical scroll)
Sets the SCROLLABLE writeable attribute.
|
void |
setScrollbarVertical(boolean flag)
Set value of the SCROLLBAR-VERTICAL attribute.
|
void |
setScrollbarVertical(logical flag)
Set value of the SCROLLBAR-VERTICAL attribute.
|
void |
setSensitive(boolean s)
Sets new value of SENSITIVE attribute.
|
void |
setSeparatorFgColor(int64 color)
Sets the SEPARATOR-FGCOLOR writable attribute.
|
void |
setSeparatorFgColor(long color)
Sets the SEPARATOR-FGCOLOR writable attribute.
|
void |
setSeparators(boolean separators)
Set SEPARATORS attribute.
|
void |
setSeparators(logical separators)
Set SEPARATORS attribute.
|
void |
setSingle(boolean single)
Set value of the MULTIPLE attribute as opposite to passed argument.
|
void |
setSingle(logical single)
Set value of the MULTIPLE attribute as opposite to passed argument.
|
logical |
setSortArrow(int64 columnIndex,
logical ascending)
Sets the sort-arrow indicator and resets sort-level number for a browse column.
|
logical |
setSortArrow(int64 columnIndex,
logical ascending,
int64 sortNumber)
Sets the sort-arrow indicator and the sort-level number for a browse column.
|
logical |
setSortArrow(int columnIndex,
boolean ascending)
Sets the sort-arrow indicator and resets sort-level number for a browse column.
|
logical |
setSortArrow(int columnIndex,
boolean ascending,
int sortNumber)
Sets the sort-arrow indicator and the sort-level number for a browse column.
|
void |
setTitle(java.lang.String title)
Sets the TITLE writable attribute.
|
void |
setTitleFont(int64 fontNum)
Set the TITLE-FONT attribute of this browse, dialog, frame or pop-up menu.
|
void |
setWidthChars(double width)
Sets the WIDTH-CHARS writable attribute.
|
void |
setWidthChars(NumberType width)
Sets the WIDTH-CHARS writable attribute.
|
private void |
updateColumnIds()
Fill
config.columnIds array with ids of the columns. |
(package private) void |
updateDynamicTitle()
Compute the expression kept in the
dynTitle field and set it
as the current browse title. |
void |
updateRow(int rowIndex,
int[] cellIndices,
BaseDataType[] cellValues,
boolean onlyNotifyRowReleased)
Updates selected cells in the given row or nothing to do if no query
specified.
|
private boolean |
validateHeight(NumberType height)
Validate HEIGHT attribute value.
|
private boolean |
validateWidth(NumberType width)
Validate WIDTH attribute value.
|
integer |
visibleIterations()
Get the number of rows currently visible in a browse widget.
|
canSetPixelPositionInChui, changeFontWorker, getBgColor, getColumn, getDColor, getFgColor, getFont, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getNextSibling, getParent, getParent, getPrevSibling, getRow, getTitle, getTooltip, getValidParentTypes, getWidthChars, getWidthPixels, getX, getY, isMovable, isResizable, isSelected, isTabStop, prepareSizeChars, prepareSizePixels, resetAutoResize, setAlign, setBgColor, setBgColor, setColon, setColon, setColumn, setColumn, setColumnOrRow, setColumnOrRowWorker, setDColor, setDColor, setDColor, setFgColor, setFgColor, setFgColor, setFont, setGroup, setHeightCharsWorker, setHeightPixels, setHeightPixels, setHeightPixelsWorker, setMaxHeightCharsWorker, setMaxHeightPixelsWorker, setMaxWidthCharsWorker, setMaxWidthPixelsWorker, setMinHeightCharsWorker, setMinHeightPixelsWorker, setMinWidthCharsWorker, setMinWidthPixelsWorker, setMovable, setMovable, setParent, setPfColor, setPfColor, setPfColor, setResizable, setResizable, setRow, setRow, setSelected, setSelected, setSizeChars, setSizePixels, setTabStop, setTabStop, setTitle, setTooltip, setTooltip, setVirtHeightCharsWorker, setVirtHeightPixelsWorker, setVirtWidthCharsWorker, setVirtWidthPixelsWorker, setWidthCharsWorker, setWidthPixels, setWidthPixels, setWidthPixelsWorker, setX, setX, setXOrYWorker, setY, setY, useHandleChainSiblings, validateParent, validateSize, validColumnOrRow
_dynamic, _getDbName, _getFormat, _getTable, _isEntered, _isHidden, _isNotEntered, _isRealized, _isVisible, _setDynamic, _setVisible, afterConfigUpdate, apply, apply, apply, apply, asWidgetHandle, canAccess, canDelete, colorDisplay, colorPrompt, config, disable, dynamic, enable, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, getCursorOffset, getDataType, getDbName, getFirstTabItem, getFormat, getFrame, getFrameHandle, getHWND, getId, getLabel, getLabelStr, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNextTabItem, getParentHandle, getPopupMenu, getPreviousTabItem, getRetainShape, getScreenValue, getSideLabelHandle, getStretchToFit, getTable, getTransparent, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWindow, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isAutoResize, isChained, isChecked, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isNotEntered, isSelectable, isSelected, isSelected, isSensitive, isTextSelected, isThreeD, isValidatable, isVisible, labelSizeCheck, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadMousePointer, loadMousePointer, moveAfterTab, moveAfterTab, moveBeforeTabItem, moveBeforeTabItem, moveToBottom, moveToTop, moveToWorker, name, notQueryable, notSettable, notWorker, preRealizeCheck, processSideLabel, pushScreenDefinition, readOnlyError, realize, resourceDelete, setAtFormatLength, setAutoResize, setAutoResize, setAutoReturn, setBlank, setChecked, setChecked, setColumnFont, setColumnFont, setColumnLabel, setColumnLabel, setContextHelpId, setContextHelpId, setConvert3D, setConvert3D, setCursorOffset, setCursorOffset, setDataType, setDataType, setDbname, setDeblank, setDisableAutoZap, setFirstTabItem, setFont, setFormat, setFormat, setFrame, setFrame, setFrameHandle, setFrameHandle, setFrameHandle, setHeader, setHelp, setHelp, setHelpDefault, setHelpStatic, setHidden, setHidden, setId, setKeepFrameZOrder, setKeepFrameZOrder, setLabel, setLabel, setLabelFont, setLabelInt, setManualHighlight, setManualHighlight, setMaxHeightChars, setMaxWidthChars, setMenuKey, setMenuKey, setMenuMouse, setMenuMouse, setNextTabItem, setNoAutoValidate, setNumSelectedRows, setParentHandle, setParentHandle, setPopupMenu, setPopupMenu, setRetainShape, setRetainShape, setScreenLock, setScreenValue, setSelectable, setSelectable, setSensitive, setSensitive, setSensitive, setSideLabelHandle, setStretchToFit, setStretchToFit, setTable, setThreeD, setThreeD, setTitleFont, setTransparent, setTransparent, setValidation, setValidation, setVertical, setVirtHeight, setVirtHeightPixels, setVirtWidth, setVirtWidthPixels, setVisible, setVisible, setWidgetId, setWidgetId, truncatePixelSize, underline, underline, valid, validate, validateFields, validateFields, validateFields, validateFields, validateLayout, view, widgetName
delete, firstResource, firstResource, getHead, getNextSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, name, name, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData
getResourceType, id, id, instantiatingProcedure, invalidAttribute, setInstantiatingProcedure, type, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setLabelFont
setRowResizable
endFileDrop, getDroppedFile, getDroppedFile, getNumDroppedFiles, setDropTarget
setScreenValue
getPrivateData, setPrivateData, setPrivateData
getResourceType
id, id, unknown
private static int DATA_GUESS_DEFAULT_VALUE
private P2JQuery query
private int queryBuffersCount
private CharacterExpression dynTitle
private java.util.ArrayList<BrowseColumnWidget> columns
private boolean initDone
private int ignoreRepo
private java.lang.Integer pageRowsCount
private java.lang.Integer maximumKnownRowIndex
0
if there are no rows. null
if we haven't tried to fetch any rows with the underlying query yet.private boolean realDataGuessUsed
true
if an actual number of fetched rows is used as MAX-DATA-GUESS.
false
if the default value is used.private BrowseWidget.PendingOpenState pendingReopen
private int pendingRepositionRow
-1
if there is no repositioned row.private BrowseRow rowInDisplay
null
if we are not in
ROW-DISPLAY event.private java.util.ArrayList<BrowseRow> intermediateRows
null
if we are
not in getRows(char, int, int, int, int, ScreenBuffer[])
.public BrowseWidget()
public BrowseWidget(boolean dynamic)
dynamic
- Flag indicating if this is a static or dynamic resource.public integer getNumEntries()
getNumEntries
in interface NumEntries
public void setNumEntries(int64 numEntries)
setNumEntries
in interface NumEntries
numEntries
- The new size of the color-table.public void setNumEntries(long numEntries)
setNumEntries
in interface NumEntries
numEntries
- The new size of the color-table.public logical isReadOnly()
isReadOnly
in interface CommonWidget
isReadOnly
in class GenericWidget<BrowseConfig>
true
if the widget is write-protected.public void setReadOnly(logical r)
setReadOnly
in interface CommonWidget
setReadOnly
in class GenericWidget<BrowseConfig>
r
- true
if the widget should be write-protected.public character getHelp()
getHelp
in interface CommonWidget
getHelp
in class GenericWidget<BrowseConfig>
public logical isModified()
isModified
in interface CommonWidget
isModified
in class GenericWidget<BrowseConfig>
true
, the widget's screen value was changed.public void setModified(boolean modified)
setModified
in interface CommonWidget
setModified
in class GenericWidget<BrowseConfig>
modified
- true
to mark the screen value as changed.public void setModified(logical modified)
setModified
in interface CommonWidget
setModified
in class GenericWidget<BrowseConfig>
modified
- true
to mark the screen value as changed.public logical isMultiple()
isMultiple
in interface CommonWidget
isMultiple
in interface Multiple
isMultiple
in class GenericWidget<BrowseConfig>
public void setMultiple(boolean multiple)
setMultiple
in interface CommonWidget
setMultiple
in interface Multiple
setMultiple
in class GenericWidget<BrowseConfig>
multiple
- New value of the attribute.public void setMultiple(logical multiple)
setMultiple
in interface CommonWidget
setMultiple
in interface Multiple
setMultiple
in class GenericWidget<BrowseConfig>
multiple
- New value of the attribute.public void setScrollbarVertical(boolean flag)
setScrollbarVertical
in interface ScrollbarVerticalElement
flag
- New value of the attribute.public void setScrollbarVertical(logical flag)
setScrollbarVertical
in interface ScrollbarVerticalElement
flag
- New value of the attribute.public logical isScrollbarVertical()
isScrollbarVertical
in interface ScrollbarVerticalElement
public void setOverlay(boolean overlay)
overlay
- New attribute value.public void setOverlay(logical overlay)
overlay
- New attribute value.public void setRowMarkers(boolean markers)
setRowMarkers
in interface BrowseInterface
markers
- New value of the attribute.public void setRowMarkers(logical markers)
setRowMarkers
in interface BrowseInterface
markers
- New value of the attribute.public void setNoRowMarkers(boolean nomarkers)
nomarkers
- New value of the attribute.public void setNoRowMarkers(logical nomarkers)
nomarkers
- New value of the attribute.public void setNoSeparators(boolean noseparators)
noseparators
- New value for the attribute.public void setNoSeparators(logical noseparators)
noseparators
- New value for the attribute.public void setSeparators(boolean separators)
setSeparators
in interface BrowseInterface
separators
- New value for the attribute.public void setSeparators(logical separators)
setSeparators
in interface BrowseInterface
separators
- New value for the attribute.public void setLabels(boolean labels)
public void setLabels(logical labels)
public logical isLabels()
public void setNoLabels(boolean nolabels)
nolabels
- New value for the attribute.public void setCentered(boolean centered)
centered
- New value for the attribute.public void setCentered(logical centered)
centered
- New value for the attribute.public void setNoLabels(logical labels)
labels
- New value for the attribute.public void setBox(boolean box)
box
- New value for the attribute.public void setBox(logical box)
box
- New value for the attribute.public void setNoBox(boolean nobox)
nobox
- New value for the attribute.public void setNoBox(logical nobox)
nobox
- New value for the attribute.public void setSingle(logical single)
single
- New value of the attribute.public void setSingle(boolean single)
single
- New value of the attribute.public void setDynamicTitle(BaseDataType title)
title
- The new value for the dynamic title.public void setDynamicTitle(Accessor title)
title
- The new value for the dynamic title.public void setDynamicTitle(CharacterExpression titleExp)
titleExp
- The new expression for the dynamic title.public void setNoAssign(boolean noAssign)
noAssign
- New value of the attribute.public void setNoAssign(logical noAssign)
noAssign
- New value of the attribute.public void setNoUnderline(boolean noUnderline)
noUnderline
- New value of the attribute.public void setNoUnderline(logical noUnderline)
noUnderline
- New value of the attribute.public void setNoValidate(boolean value)
setNoValidate
in interface BrowseInterface
value
- The new value for the attribute.public void setNoValidate(logical value)
setNoValidate
in interface BrowseInterface
value
- The new value for the attribute.public logical isNoValidate()
isNoValidate
in interface BrowseInterface
public logical isFitLastColumn()
isFitLastColumn
in interface BrowseInterface
public void setFitLastColumn(boolean fitLastColumn)
setFitLastColumn
in interface BrowseInterface
fitLastColumn
- New value of the attribute.public void setFitLastColumn(logical fitLastColumn)
setFitLastColumn
in interface BrowseInterface
fitLastColumn
- New value of the attribute.public logical isNoEmptySpace()
public void setNoEmptySpace(boolean noEmptySpace)
noEmptySpace
- New value of the attribute.public void setNoEmptySpace(logical noEmptySpace)
noEmptySpace
- New value of the attribute.public void setFrame(GenericFrame frame)
setFrame
in interface CommonWidget
setFrame
in class GenericWidget<BrowseConfig>
frame
- GenericFrame
instance that contains this widgetpublic void setExpandable(boolean expandable)
setExpandable
in interface BrowseInterface
expandable
- New value of the attribute.public void setExpandable(logical expandable)
setExpandable
in interface BrowseInterface
expandable
- New value of the attribute.public logical isExpandable()
isExpandable
in interface BrowseInterface
public void setColumnResizable(boolean resizable)
setColumnResizable
in interface BrowseInterface
resizable
- true
you can resize a browse column by pointing, clicking, and
dragging.public void setColumnResizable(logical resizable)
setColumnResizable
in interface BrowseInterface
resizable
- true
you can resize a browse column by pointing, clicking, and
dragging.public logical isColumnResizable()
isColumnResizable
in interface BrowseInterface
true
you can resize a browse column by pointing, clicking, and
dragging.public void setColumnMovable(boolean movable)
setColumnMovable
in interface BrowseInterface
movable
- true
you can move a browse column by pointing, clicking, and
dragging.public void setColumnMovable(logical movable)
setColumnMovable
in interface BrowseInterface
movable
- true
you can move a browse column by pointing, clicking, and
dragging.public logical isCreateOnAdd()
isCreateOnAdd
in interface BrowseInterface
public void setCreateOnAdd(boolean createOnAdd)
setCreateOnAdd
in interface BrowseInterface
createOnAdd
- New value of the attribute.public void setCreateOnAdd(logical createOnAdd)
setCreateOnAdd
in interface BrowseInterface
createOnAdd
- New value of the attribute.public logical isColumnMovable()
isColumnMovable
in interface BrowseInterface
true
you can move a browse column by pointing, clicking, and
dragging.public void setRefreshable(boolean refreshable)
setRefreshable
in interface BrowseInterface
refreshable
- true
if the rows that appear in a browse are refreshed when an
application opens or repositions a query.public void setRefreshable(logical refreshable)
setRefreshable
in interface BrowseInterface
refreshable
- true
if the rows that appear in a browse are refreshed when an
application opens or repositions a query.public logical isRefreshable()
isRefreshable
in interface BrowseInterface
true
if the rows that appear in a browse are refreshed when an
application opens or repositions a query.public void setRowResizable(boolean flag)
setRowResizable
in interface BrowseInterface
flag
- true
if the row height can be changed.public logical isRowResizable()
isRowResizable
in interface BrowseInterface
true
if the row height can be changed.public logical isCurrentRowModified()
isCurrentRowModified
in interface BrowseInterface
true
if any cells in the current row have been changed.public logical isNewRow()
isNewRow
in interface BrowseInterface
true
if the row in focus was added to the browse using the
INSERT-ROW() method and has not been added to the database.public logical hasRowMarkers()
hasRowMarkers
in interface BrowseInterface
true
if the browse has row markers.public integer getLabelBgColor()
getLabelBgColor
in interface BrowseElement
getLabelBgColor
in interface BrowseInterface
public integer getLabelFgColor()
getLabelFgColor
in interface BrowseElement
public void setLabelBgColor(int64 bgcolor)
setLabelBgColor
in interface BrowseElement
setLabelBgColor
in interface BrowseInterface
bgcolor
- The new value for the LABEL-BGCOLOR attribute.public void setLabelBgColor(long bgcolor)
setLabelBgColor
in interface BrowseElement
setLabelBgColor
in interface BrowseInterface
bgcolor
- The new value for the LABEL-BGCOLOR attribute.public void setLabelFgColor(int64 fgcolor)
setLabelFgColor
in interface BrowseElement
fgcolor
- The new value for the LABEL-FGCOLOR attribute.public void setLabelFgColor(long fgcolor)
setLabelFgColor
in interface BrowseElement
fgcolor
- The new value for the LABEL-FGCOLOR attribute.public void setColumnScrolling(boolean columnScrolling)
setColumnScrolling
in interface BrowseInterface
columnScrolling
- New value of the attribute.public void setColumnScrolling(logical columnScrolling)
setColumnScrolling
in interface BrowseInterface
columnScrolling
- New value of the attribute.public logical isColumnScrolling()
isColumnScrolling
in interface BrowseInterface
true
if browse is scrolled horizontally per column.
false
for usual scrolling.public void setNoColumnScrolling(boolean noColumnScrolling)
noColumnScrolling
- New value of the attribute.public void setNoColumnScrolling(logical noColumnScrolling)
noColumnScrolling
- New value of the attribute.public void setRowHeightChars(double rowHeightChars)
setRowHeightChars
in interface BrowseInterface
rowHeightChars
- New value of the attribute.public void setRowHeightChars(NumberType rowHeightChars)
setRowHeightChars
in interface BrowseInterface
rowHeightChars
- New value of the attribute.public void setRowHeightPixels(int rowHeightPixels)
rowHeightPixels
- New value of the attribute.public void setRowHeightPixels(NumberType rowHeightPixels)
rowHeightPixels
- New value of the attribute.public integer getRowHeightPixels()
public void setTitle(java.lang.String title)
setTitle
in interface CommonWidget
setTitle
in class BaseEntity<BrowseConfig>
title
- The new value for the TITLE attribute.public integer getNumColumns()
getNumColumns
in interface CommonWidget
getNumColumns
in class GenericWidget<BrowseConfig>
public handle getBrowseColumn(int index)
getBrowseColumn
in interface BrowseInterface
index
- 1-based column index.public handle getBrowseColumn(int index, boolean showError)
index
- 1-based column index.public handle getBrowseColumn(NumberType index)
getBrowseColumn
in interface BrowseInterface
index
- 1-based column index.public integer visibleIterations()
visibleIterations
in interface BrowseInterface
public integer getNumSelectedRows()
getNumSelectedRows
in interface CommonWidget
getNumSelectedRows
in class GenericWidget<BrowseConfig>
public P2JQuery getQuery()
getQuery
in interface CommonWidget
getQuery
in class GenericWidget<BrowseConfig>
public void setQuery(P2JQuery query)
setQuery
in interface CommonWidget
setQuery
in class GenericWidget<BrowseConfig>
query
- New value for the attribute. null
to unbind previous query.public handle getQueryAsHandle()
getQueryAsHandle
in interface QueryAssociable
unknown
if none exists.public void setQueryAsHandle(handle qry)
setQueryAsHandle
in interface QueryAssociable
qry
- The query to associate.public void setQueryAsHandle(QueryWrapper qry)
setQueryAsHandle
in interface QueryAssociable
qry
- The query to associate.public logical selectAll()
selectAll
in interface CommonWidget
selectAll
in class GenericWidget<BrowseConfig>
true
.public logical deselectRows()
deselectRows
in interface CommonWidget
deselectRows
in class GenericWidget<BrowseConfig>
true
.public logical fetchSelectedRow(long n)
fetchSelectedRow
in interface BrowseInterface
n
- 1-based index of the selected row to fetch; note that this is
the index into the list of selected rows within the browse,
NOT the index of the row itself.true
if method succeeds.public logical fetchSelectedRow(int64 n)
fetchSelectedRow
in interface BrowseInterface
n
- 1-based index of the selected row to fetch; note that this is
the index into the list of selected rows within the browse,
NOT the index of the row itself.true
if method succeeds.public logical refresh()
refresh
in interface CommonWidget
refresh
in class GenericWidget<BrowseConfig>
true
.public logical refresh(boolean deleteCurrentRowMode)
deleteCurrentRowMode
- true
if this function is used for update on DELETE-CURRENT-ROW.
false
if this function is used for update on REFRESH.true
.public logical selectFocusedRow()
Selects the row that currently has focus in a browse widget, even if it is not currently displayed.
selectFocusedRow
in interface BrowseInterface
selectFocusedRow
in interface CommonWidget
selectFocusedRow
in class GenericWidget<BrowseConfig>
true
.public logical deselectFocusedRow()
Deselects the row with current focus.
deselectFocusedRow
in interface BrowseInterface
true
if the browse has at least one record.public logical selectRow(int64 row)
Selects the specified row if it is currently in the browse viewport. In a single-select browse, the previously selected row is deselected. No rows are deselected in a multiple-select browse.
selectRow
in interface BrowseInterface
row
- 1-based row index in the browse viewport.true
if the row with the given index exist in the browse viewport.public logical selectRow(long row)
Selects the specified row if it is currently in the browse viewport. In a single-select browse, the previously selected row is deselected. No rows are deselected in a multiple-select browse.
selectRow
in interface BrowseInterface
row
- 1-based row index in the browse viewport.true
if the row with the given index exist in the browse viewport.public logical selectNextRow()
Deselects all currently selected rows in a browse and selects the row after the deselected row.
This method also repositions the query to the new row and copies the record into the database buffer. The browse automatically scrolls to the selected row if it is out of view.
This method is intended for use with a browse that supports the selection of a single row at a time (MULTIPLE attribute is set to FALSE). If more than one row is selected when you execute this method, all of the selected rows are deselected and the record after the last selected row becomes the selected row.
selectNextRow
in interface BrowseInterface
true
on success.public logical selectPreviousRow()
Deselects all currently selected rows in a browse and selects the row before the deselected row.
This method also repositions the query to the new row and copies the record into the database buffer.The browse automatically scrolls to the selected row if it is out of view.
This method is intended for use with a browse that supports the selection of a single row at a time (MULTIPLE attribute is set to FALSE). If more than one row is selected when you execute this method, all of the selected rows are deselected and the record before the last selected row becomes the selected row.
selectPreviousRow
in interface BrowseInterface
true
on success.public logical deselectSelectedRow(int64 row)
Deselects the nth selected row in a browse.
Progress maintains a numbered list of selected rows, starting at 1. When the DESELECT-SELECTED-ROW(n) method is encountered, Progress searches this list to find the nth selected row.
deselectSelectedRow
in interface BrowseInterface
row
- 1-based index of a selected row (rows are numbered in the order they were
selected).true
if the row is successfully deselected.public logical deselectSelectedRow(int row)
Deselects the nth selected row in a browse.
Progress maintains a numbered list of selected rows, starting at 1. When the DESELECT-SELECTED-ROW(n) method is encountered, Progress searches this list to find the nth selected row.
deselectSelectedRow
in interface BrowseInterface
row
- 1-based index of a selected row (rows are numbered in the order they were
selected).true
if the row is successfully deselected.public logical deleteSelectedRow(int64 row)
Deletes the nth selected row from a browse and the results list.
Progress maintains a numbered list of selected rows, starting at 1. When the DELETE-SELECTED-ROW(n) method is encountered, Progress searches this list to find the nth selected row.
This method does not delete the record from the database and has no effect on the database buffer.
deleteSelectedRow
in interface BrowseInterface
row
- 1-based index of a row to delete (rows are numbered in the order they were
selected).true
if the row is successfully deleted.public logical deleteSelectedRow(int row)
Deletes the nth selected row from a browse and the results list.
Progress maintains a numbered list of selected rows, starting at 1. When the DELETE-SELECTED-ROW(n) method is encountered, Progress searches this list to find the nth selected row.
This method does not delete the record from the database and has no effect on the database buffer.
deleteSelectedRow
in interface BrowseInterface
row
- 1-based index of a row to delete (rows are numbered in the order they were
selected).true
if the row is successfully deleted.public logical deleteSelectedRows()
Deletes all currently selected rows from a browse and the associated results list.
This method does not delete the record from the database and has no effect on the database buffer.
deleteSelectedRows
in interface BrowseInterface
true
if rows were successfully deleted.public logical deleteCurrentRow()
Deletes the most recently selected row from a browse and the results list.
This method does not delete the record from the database and has no effect on the database buffer.
deleteCurrentRow
in interface BrowseInterface
true
if the row is successfully deleted.public logical isRowSelected(int64 row)
Returns true
if a specified row in the browse viewport is currently selected.
isRowSelected
in interface BrowseInterface
row
- 1-based row index in the browse viewport.true
if a specified row in the browse viewport is currently selected.public logical isRowSelected(int row)
Returns true
if a specified row in the browse viewport is currently selected.
isRowSelected
in interface BrowseInterface
row
- 1-based row index in the browse viewport.true
if a specified row in the browse viewport is currently selected.public logical insertRow(character mode)
Inserts a blank line in an updateable browse before or after the last selected row. The blank line is a placeholder for a new record to be added through the browse. This method cannot be used with a read-only browse.
insertRow
in interface BrowseInterface
mode
- "BEFORE"
if a row should be added before the current browse row.
"AFTER"
if a row should be added after the current browse row.true
if a row was successfully added.public logical insertRow(java.lang.String mode)
Inserts a blank line in an updateable browse before or after the last selected row. The blank line is a placeholder for a new record to be added through the browse. This method cannot be used with a read-only browse.
insertRow
in interface BrowseInterface
mode
- "BEFORE"
if a row should be added before the current browse row.
"AFTER"
if a row should be added after the current browse row.true
if a row was successfully added.public logical insertRow()
Inserts a blank line in an updateable browse before the last selected row. The blank line is a placeholder for a new record to be added through the browse. This method cannot be used with a read-only browse.
insertRow
in interface BrowseInterface
true
if a row was successfully added.public handle addLikeColumn(java.lang.String fieldName, int64 position)
Creates a browse column from the specified field and returns its widget handle.
addLikeColumn
in interface BrowseInterface
fieldName
- The name of a field in one of the buffers associated with the browse's query. If the
query is a join, the name must be qualified with the database name.position
- 1-based position of the browse column.public handle addLikeColumn(character fieldName, int64 position)
Creates a browse column from the specified field and returns its widget handle.
addLikeColumn
in interface BrowseInterface
fieldName
- The name of a field in one of the buffers associated with the browse's query. If the
query is a join, the name must be qualified with the database name.position
- 1-based position of the browse column.public handle addLikeColumn(FieldReference[] fieldReferences, int64 position)
fieldReferences
- Reference(s) to the target field(s).position
- 1-based position of the new browse columns.public handle addLikeColumn(java.lang.String fieldName, long position)
Creates a browse column from the specified field and returns its widget handle.
addLikeColumn
in interface BrowseInterface
fieldName
- The name of a field in one of the buffers associated with the browse's query. If the
query is a join, the name must be qualified with the database name.position
- 1-based position of the browse column.public handle addLikeColumn(handle fieldHandle, int64 position)
Creates a browse column from the specified field and returns its widget handle.
addLikeColumn
in interface BrowseInterface
fieldHandle
- Handle to a field in one of the buffers associated with the browse's query.position
- 1-based position of the browse column.public handle addLikeColumn(handle fieldHandle, long position)
Creates a browse column from the specified field and returns its widget handle.
addLikeColumn
in interface BrowseInterface
fieldHandle
- Handle to a field in one of the buffers associated with the browse's query.position
- 1-based position of the browse column.public handle addLikeColumn(character fieldName)
Creates a browse column from the specified field, adds it to the end of the columns and returns its widget handle.
addLikeColumn
in interface BrowseInterface
fieldName
- The name of a field in one of the buffers associated with the browse's query. If the
query is a join, the name must be qualified with the database name.public handle addLikeColumn(java.lang.String fieldName)
Creates a browse column from the specified field, adds it to the end of the columns and returns its widget handle.
addLikeColumn
in interface BrowseInterface
fieldName
- The name of a field in one of the buffers associated with the browse's query. If the
query is a join, the name must be qualified with the database name.public handle addLikeColumn(handle fieldHandle)
Creates a browse column from the specified field, adds it to the end of the columns and returns its widget handle.
addLikeColumn
in interface BrowseInterface
fieldHandle
- Handle to a field in one of the buffers associated with the browse's query.public logical moveColumn(int64 src, int64 dest)
Repositions a column in a browse widget.
moveColumn
in interface BrowseInterface
src
- 1-based position of the column to be moved.dest
- 1-based position to which the column is moved.true
if the column was successfully moved.public logical moveColumn(long src, long dest)
Repositions a column in a browse widget.
moveColumn
in interface BrowseInterface
src
- 1-based position of the column to be moved.dest
- 1-based position to which the column is moved.true
if the column was successfully moved.public logical moveColumn(long src, int64 dest)
Repositions a column in a browse widget.
moveColumn
in interface BrowseInterface
src
- 1-based position of the column to be moved.dest
- 1-based position to which the column is moved.true
if the column was successfully moved.public logical moveColumn(int64 src, long dest)
Repositions a column in a browse widget.
moveColumn
in interface BrowseInterface
src
- 1-based position of the column to be moved.dest
- 1-based position to which the column is moved.true
if the column was successfully moved.public integer getRepositionedRow()
Returns the row index of the browse viewport where the REPOSITION TO ROWID (or RECID) statement displays a repositioned record.
getRepositionedRow
in interface BrowseInterface
public handle getFirstColumn()
getFirstColumn
in interface BrowseInterface
public integer getFocusedRow()
getFocusedRow
in interface BrowseInterface
public integer getNumLockedColumns()
getNumLockedColumns
in interface BrowseInterface
public void setNumLockedColumns(double num)
setNumLockedColumns
in interface BrowseInterface
num
- The number of visible leading columns locked in a browse widget.public void setNumLockedColumns(NumberType num)
setNumLockedColumns
in interface BrowseInterface
num
- The number of visible leading columns locked in a browse widget.public decimal getMinHeightChars()
getMinHeightChars
in interface BrowseInterface
public decimal getRowHeightChars()
getRowHeightChars
in interface BrowseInterface
public logical isAllowColumnSearching()
isAllowColumnSearching
in interface BrowseInterface
true
if column searching is allowed for the browse.public void setAllowColumnSearching(boolean allow)
setAllowColumnSearching
in interface BrowseInterface
allow
- true
if column searching is allowed for the browse.public void setAllowColumnSearching(logical allow)
setAllowColumnSearching
in interface BrowseInterface
allow
- true
if column searching is allowed for the browse.public logical isSeparators()
isSeparators
in interface BrowseInterface
true
if row and column separators of the browse widget are displayed.public void setMaxDataGuess(double maxDataGuess)
setMaxDataGuess
in interface BrowseInterface
maxDataGuess
- The estimated number of records in a browse query.public void setMaxDataGuess(NumberType maxDataGuess)
setMaxDataGuess
in interface BrowseInterface
maxDataGuess
- The estimated number of records in a browse query.public integer getMaxDataGuess()
getMaxDataGuess
in interface BrowseInterface
public logical setRepositionedRow(int64 row)
setRepositionedRow
in interface BrowseInterface
row
- 1-based row number where the new record is displayedtrue
if
operation was successful.public logical setRepositionedRow(long row)
setRepositionedRow
in interface BrowseInterface
row
- 1-based row number where the new record is displayedtrue
if
operation was successful.public logical setRepositionedRow(long row, java.lang.String conditional)
setRepositionedRow
in interface BrowseInterface
row
- 1-based row number where the new record is displayedconditional
- If this parameter is "conditional", then method tries to
reposition to the browse viewport existing row firsttrue
if
operation was successful.public logical setRepositionedRow(int64 row, java.lang.String conditional)
setRepositionedRow
in interface BrowseInterface
row
- 1-based row number where the new record is displayedconditional
- If this parameter is "conditional", then method tries to
reposition to the browse viewport existing row firsttrue
if
operation was successful.public logical setRepositionedRow(int64 row, character conditional)
row
- 1-based row number where the new record is displayedconditional
- If this parameter is "conditional", then method tries to
reposition to the browse viewport existing row firsttrue
if
operation was successful.public logical setRepositionedRow(int row, java.lang.Boolean conditional)
row
- 1-based row number where the new record is displayedconditional
- If true
, tries to reposition to the browse viewport existing row
first. If false
it always uses the indicated row number.
null
preserves the current value.true
.public void setDColor(int64 d)
d
- Flag is not used.public integer getPfColor()
getPfColor
in interface CommonWidget
getPfColor
in class BaseEntity<BrowseConfig>
public void setPfColor(int64 p)
p
- Flag is not used.public void setTitleFont(int64 fontNum)
setTitleFont
in interface CommonWidget
setTitleFont
in class GenericWidget<BrowseConfig>
fontNum
- An entry in the font-table or unknown to refer the default font.public integer getTitleFont()
getTitleFont
in interface CommonWidget
getTitleFont
in class GenericWidget<BrowseConfig>
public logical createResultListEntry()
createResultListEntry
in interface ResultListHandler
public logical deleteResultListEntry()
deleteResultListEntry
in interface ResultListHandler
public logical deleteResultListEntry(boolean allowBetweenRows, boolean refreshBrowse)
allowBetweenRows
- If true
then the cursor can be positioned between rows (the next
row will be deleted). false
for conventional DELETE-RESULT-LIST-ENTRY()
mode where the cursor should be positioned on a row (otherwise false
is
returned).refreshBrowse
- If true
then the browse is refreshed.public WidgetConfig[] getEditorsConfigs()
null
if the
column is not editable. Return value is null
if the browse is
read-only.public int getRowCount()
public int getRowCount(int startRow)
startRow
- Initial row to start count rows from.public BrowseRow[] getRows(int startRowIndex, int count, boolean forward, int rowDisplayTriggerId, ScreenBuffer[] sb, RowDisplayStrategy displayStrategy)
startRowIndex
- Index of the first row to retrieve (0-based).count
- Maximum count of rows to return. -1
for no limit.forward
- true
if rows are retrieved in the forward direction,
false
if rows are retrieved in the backward direction,rowDisplayTriggerId
- Trigger ID of the ROW-DISPLAY trigger. -1
if there is no ROW-DISPLAY
trigger for this browse.sb
- Screen buffer for the ROW-DISPLAY trigger. null
if there is no
ROW-DISPLAY trigger for this browse.displayStrategy
- Specifies type of action for which rows are fetched and defines how rows are
iterated / displayed.null
is returned.public BrowseRow[] getRows(char searchChar, int searchColumn, int viewportTopRow, int viewportBottomRow, int rowDisplayTriggerId, ScreenBuffer[] sb)
searchChar
- Character to be searched for. Search is performed using only the first character
(in the visual data representation) in the current column. Specifying a character
puts this function in the search mode. This parameter is null
for
non-search mode.searchColumn
- For search mode: 0-based index of the column to be searched.viewportTopRow
- For search mode: 0-based index (in the result set) of the top row in the current
view.viewportBottomRow
- For search mode: 0-based index (in the result set) of the bottom row in the
current view.rowDisplayTriggerId
- Trigger ID of the ROW-DISPLAY trigger. -1
if there is no ROW-DISPLAY
trigger for this browse.sb
- Screen buffer for the ROW-DISPLAY trigger. null
if there is no
ROW-DISPLAY trigger for this browse.null
is returned.public BrowseRow[] getRows(int startRowIndex, int count, boolean forward, java.lang.Character searchChar, int searchColumn, int searchFinalRow, int viewportTopRow, int viewportBottomRow, int rowDisplayTriggerId, ScreenBuffer[] sb, RowDisplayStrategy displayStrategy)
searchChar
parameter is
specified):
startRowIndex
- Index of the first row to retrieve (0-based).count
- Maximum count of rows to return. -1
for no limit.forward
- true
if rows are retrieved in the forward direction,
false
if rows are retrieved in the backward direction,searchChar
- Character to be searched for. Search is performed using only the first character
(in the visual data representation) in the current column. Specifying a character
puts this function in the search mode. This parameter is null
for
non-search mode.searchColumn
- For search mode: 0-based index of the column to be searched.searchFinalRow
- For search mode: 0-based index of the row in the result set on which the search
should be stopped (the final row itself is included in the searchable set).viewportTopRow
- For search mode: 0-based index (in the result set) of the top row in the current
view.viewportBottomRow
- For search mode: 0-based index (in the result set) of the bottom row in the
current view.rowDisplayTriggerId
- Trigger ID of the ROW-DISPLAY trigger. -1
if there is no ROW-DISPLAY
trigger for this browse.sb
- Screen buffer for the ROW-DISPLAY trigger. null
if there is no
ROW-DISPLAY trigger for this browse.displayStrategy
- Specifies type of action for which rows are fetched and defines how rows are
iterated / displayed.null
is returned.public void pushIntermediateRows()
getRows(int, int, boolean, int, ScreenBuffer[], RowDisplayStrategy)
)
to the client, so these rows can be drawn if a pause occurs in ROW-DISPLAY trigger.pushIntermediateRows
in interface RowDisplayDrawListener
public void updateRow(int rowIndex, int[] cellIndices, BaseDataType[] cellValues, boolean onlyNotifyRowReleased) throws DataValidationException
rowIndex
- 0-based index of the row to update.cellIndices
- Cells for update indexes.cellValues
- Cells for update new values.onlyNotifyRowReleased
- Only notify server that the row has been released. Data is not updated.DataValidationException
- New values did not pass database validation rules.public boolean isNewRow(int rowIndex)
true
if specified row is new and is not present
in the data base.rowIndex
- Index of the row to return information about.true
if row is new and false
otherwise.public int setCurrentRow(int rowIndex, boolean force)
rowIndex
- 0-based index of the current row.force
- Force positioning to the specified row, even if it is selected.public int getCurrentRow()
public void setDown(long down)
public void setDown(int64 down)
public integer getDown()
public void addColumn(BrowseColumnWidget column)
column
- Field to add.public void addColumn(BrowseColumnWidget column, int position)
column
- Field to add.position
- 0-based position of the column, -1
to add it as the last column.public void setEditableAll(boolean editable)
editable
- New value for the attribute.public character getScreenValue()
getScreenValue
in interface CommonWidget
getScreenValue
in class GenericWidget<BrowseConfig>
public void setScreenValue(character value)
setScreenValue
in interface CommonWidget
setScreenValue
in class GenericWidget<BrowseConfig>
value
- Ignored.public logical isScrollable()
isScrollable
in interface BrowseInterface
isScrollable
in interface CommonWidget
isScrollable
in class GenericWidget<BrowseConfig>
public void setScrollable(logical scroll)
setScrollable
in interface BrowseInterface
setScrollable
in interface CommonWidget
setScrollable
in class GenericWidget<BrowseConfig>
scroll
- The new value for the SCROLLABLE attribute.public void setScrollable(boolean scroll)
setScrollable
in interface BrowseInterface
setScrollable
in interface CommonWidget
setScrollable
in class GenericWidget<BrowseConfig>
scroll
- The new value for the SCROLLABLE attribute.public void setBgColor(int64 bgcolor)
setBgColor
in class BaseEntity<BrowseConfig>
bgcolor
- The new value for the BGCOLOR attribute.public integer getSeparatorFgColor()
getSeparatorFgColor
in interface BrowseInterface
public integer getColumnFgColor()
getColumnFgColor
in interface BrowseInterface
public integer getColumnBgColor()
getColumnBgColor
in interface BrowseInterface
public void setSeparatorFgColor(long color)
setSeparatorFgColor
in interface BrowseInterface
color
- The new value for the attribute.public void setSeparatorFgColor(int64 color)
setSeparatorFgColor
in interface BrowseInterface
color
- The new value for the attribute.public void setColumnFgColor(long color)
setColumnFgColor
in interface BrowseInterface
color
- The new value for the attribute.public void setColumnFgColor(int64 color)
setColumnFgColor
in interface BrowseInterface
color
- The new value for the attribute.public void setColumnBgColor(long color)
setColumnBgColor
in interface BrowseInterface
color
- The new value for the attribute.public void setColumnBgColor(int64 color)
setColumnBgColor
in interface BrowseInterface
color
- The new value for the attribute.public void registerQuery(P2JQuery query, FrameElement[] list)
query
- Reference to query. May be null.list
- List of fields. May be null.public void finishSetup()
finishSetup
in class GenericWidget<BrowseConfig>
public void cleanup()
cleanup
in class GenericWidget<BrowseConfig>
public void queryRepositioned(boolean error, int targetRepositionRow)
queryRepositioned
in interface RepositionListener
error
- true
if an error happened during reposition.targetRepositionRow
- Row used as the target for reposition. If it was deleted, reposition with fetching
may end up on a different row.public void forceRefresh()
public void queryClosed()
queryClosed
in interface RepositionListener
public boolean isRowAvailable(int rowIndex)
rowIndex
- 0-base index of the target row in the browse model.true
if the row is "available", i.e. it is not deleted.public void setSensitive(boolean s)
setSensitive
in interface Sensitive
setSensitive
in class GenericWidget<BrowseConfig>
s
- new value of SENSITIVE attributepublic void setWidthChars(NumberType width)
setWidthChars
in interface Sizeable
setWidthChars
in class BaseEntity<BrowseConfig>
width
- The new value for the WIDTH-CHARS attribute.public void setWidthChars(double width)
setWidthChars
in interface Sizeable
setWidthChars
in class BaseEntity<BrowseConfig>
width
- The new value for the WIDTH-CHARS attribute.public void setHeightChars(NumberType height)
setHeightChars
in interface Sizeable
setHeightChars
in class BaseEntity<BrowseConfig>
height
- The new value for the HEIGHT-CHARS attribute.public void setHeightChars(double height)
setHeightChars
in interface Sizeable
setHeightChars
in class BaseEntity<BrowseConfig>
height
- The new value for the HEIGHT-CHARS attribute.public integer getLabelFont()
getLabelFont
in interface BrowseElement
getLabelFont
in interface CommonWidget
getLabelFont
in class GenericWidget<BrowseConfig>
public void setLabelFont(int64 fontNum)
setLabelFont
in interface BrowseElement
setLabelFont
in interface CommonWidget
setLabelFont
in class GenericWidget<BrowseConfig>
fontNum
- An entry in the font-table or unknown to refer the default font.public void setLabelFont(int font)
font
- An entry in the font-table or unknown to refer the default font.public void setMousePointerName(java.lang.String name)
setMousePointerName
in interface Hoverable
name
- the attribute valuepublic java.lang.String getMousePointerImpl()
getMousePointerImpl
in interface Hoverable
public handle getCurrentColumn()
true
).getCurrentColumn
in interface BrowseInterface
public void setCurrentColumn(handle columnHandle)
true
).setCurrentColumn
in interface BrowseInterface
columnHandle
- Handle to the new current column.public handle addCalcColumn(java.lang.String dataType, java.lang.String format, java.lang.String initialValue, java.lang.String label)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.public handle addCalcColumn(java.lang.String dataType, java.lang.String format, java.lang.String initialValue, character label)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.public handle addCalcColumn(character dataType, character format, java.lang.String initialValue, character label)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.public handle addCalcColumn(java.lang.String dataType, java.lang.String format, java.lang.String initialValue, java.lang.String label, int position)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.position
- The optional integer value position of the browse column. If pos = 2, the column is
the second column. If the position is not specified or the position is invalid, the
new column is added at the end of the columns.public handle addCalcColumn(java.lang.String dataType, java.lang.String format, java.lang.String initialValue, java.lang.String label, int position, java.lang.String widgetType)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.position
- The optional integer value position of the browse column. If pos = 2, the column is
the second column. If the position is not specified or the position is invalid, the
new column is added at the end of the columns.widgetType
- An optional character expression specifying the widget type of the column. Valid
values are "COMBO-BOX", "DROP-DOWN", "DROP-DOWN-LIST", "FILL-IN" and "TOGGLE-BOX".
The default value is "FILL-IN". If datatype-exp is not "LOGICAL", specifying
"TOGGLE-BOX" as the widget type generates a run-time error. The widget-type
parameter is ignored in character mode.public handle addCalcColumn(character dataType, character format, character initialValue, character label)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.public handle addCalcColumn(character dataType, character format, character initialValue, character label, NumberType position)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.position
- The optional integer value position of the browse column. If pos = 2, the column is
the second column. If the position is not specified or the position is invalid, the
new column is added at the end of the columns.public handle addCalcColumn(java.lang.String dataType, java.lang.String format, BaseDataType initialValue, java.lang.String label)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.public handle addCalcColumn(java.lang.String dataType, java.lang.String format, int initialValue, java.lang.String label, int position)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.position
- The optional integer value position of the browse column. If pos = 2, the column is
the second column. If the position is not specified or the position is invalid, the
new column is added at the end of the columns.public handle addCalcColumn(java.lang.String dataType, java.lang.String format, BaseDataType initialValue, java.lang.String label, int position)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.position
- The optional integer value position of the browse column. If pos = 2, the column is
the second column. If the position is not specified or the position is invalid, the
new column is added at the end of the columns.public handle addCalcColumn(character dataType, character format, character initialValue, character label, NumberType position, character widgetType)
addCalcColumn
in interface BrowseInterface
dataType
- Character expression specifying the data type. Valid values are "CHARACTER", "DATE",
"DECIMAL", "INTEGER", "INT64", or "LOGICAL".format
- Character expression specifying the column's format.initialValue
- Character expression specifying the initial value. This may be a null string.label
- Character expression specifying the column's label.position
- 1-based position of the browse column (i.e. if pos = 2, the column is the second
column). If the position is null
or invalid, the new column is added at
the end of the columns.widgetType
- An optional character expression specifying the widget type of the column. Valid
values are "COMBO-BOX", "DROP-DOWN", "DROP-DOWN-LIST", "FILL-IN" and "TOGGLE-BOX".
The default value is "FILL-IN". If datatype-exp is not "LOGICAL", specifying
"TOGGLE-BOX" as the widget type generates a run-time error. The widget-type
parameter is ignored in character mode.public logical setSortArrow(int columnIndex, boolean ascending)
setSortArrow
in interface BrowseInterface
columnIndex
- 1-based index of the column.ascending
- true
for ascending sorting (arrow up). false
for
descending sorting (arrow down).true
on success.public logical setSortArrow(int columnIndex, boolean ascending, int sortNumber)
setSortArrow
in interface BrowseInterface
columnIndex
- 1-based index of the column.ascending
- true
for ascending sorting (arrow up). false
for
descending sorting (arrow down).sortNumber
- Sort-level for the browse column. 0
to hide the sort-level number,
otherwise numbers from 1
to 9
are allowed.true
on success.public logical setSortArrow(int64 columnIndex, logical ascending)
setSortArrow
in interface BrowseInterface
columnIndex
- 1-based index of the column.ascending
- true
for ascending sorting (arrow up). false
for
descending sorting (arrow down).true
on success.public logical setSortArrow(int64 columnIndex, logical ascending, int64 sortNumber)
setSortArrow
in interface BrowseInterface
columnIndex
- 1-based index of the column.ascending
- true
for ascending sorting (arrow up). false
for
descending sorting (arrow down).sortNumber
- Sort-level for the browse column. Unknown or 0
to hide the sort-level
number, otherwise numbers from 1
to 9
are allowed.true
on success.public logical clearSortArrows()
clearSortArrows
in interface BrowseInterface
true
.public logical scrollToCurrentRow()
The position of the scrolled row is the first row in the browse viewport, unless the current row is already visible. In this case, the current row remains in the original position.
scrollToCurrentRow
in interface BrowseInterface
true
if the row is successfully scrolled into view (or if the scroll is
unnecessary).public logical isDropTarget()
isDropTarget
in interface Droppable
public void setDropTarget(boolean flag)
setDropTarget
in interface Droppable
flag
- New value for the attribute.public logical scrollToSelectedRow(int selectedRowIndex)
scrollToSelectedRow
in interface BrowseInterface
selectedRowIndex
- Selected row within the browse. A numbered list of selected rows, starting at 1 is
maintained. When the SCROLL-TO-SELECTED-ROW(n)
method is encountered,
the list is iterated to find the nth selected row.true
if the row is successfully scrolled into view (or if the scroll
is unnecessary).public logical scrollToSelectedRow(NumberType selectedRowIndex)
scrollToSelectedRow
in interface BrowseInterface
selectedRowIndex
- Selected row within the browse. A numbered list of selected rows, starting at 1 is
maintained. When the SCROLL-TO-SELECTED-ROW(n)
method is encountered,
the list is iterated to find the nth selected row.true
if the row is successfully scrolled into view (or if the scroll
is unnecessary).CellAttributes getRowInDisplayAttributes(int columnIndex)
columnIndex
- 0-based index of the column in the row for which ROW-DISPLAY event is being
triggered. Specifies the cell which attributes we are accessing.boolean isInRowDisplayTrigger()
true
if ROW-DISPLAY trigger is being executed.void setCellScreenValue(int columnIndex, BaseDataType value)
columnIndex
- 0-based index of the column to which the target cell belongs.value
- Value to set.void updateDynamicTitle()
java.util.Iterator<BrowseColumnWidget> getBrowseColumns()
protected void finishConfigProcessing()
This includes registering the columns' widget IDs with the browse's configuration.
finishConfigProcessing
in class GenericWidget<BrowseConfig>
private BrowseColumnWidget addColumnWidget(java.lang.String dataType, java.lang.String dataFormat, java.lang.String columnLabel, NumberType position, FieldReference fieldReference, character initialValue, BrowseColumnWidgetType widgetType, boolean calcColumn)
dataType
- Column data type (string representation as returned by Enum.toString()
).dataFormat
- Column data format.columnLabel
- Column label.position
- 1-based position of the browse column (i.e. if pos = 2, the column is the second
column). If the position is null
or invalid, the new column is added at
the end of the columns.fieldReference
- Reference to the buffer field which backs this column. null
if it is a
calc column.initialValue
- Initial cell value, if it is a calc column. null
if it is a normalwidgetType
- Widget type: fill-in, toggle-box or combo-box.
column.calcColumn
- true
if it is a calc column.private void updateColumnIds()
config.columnIds
array with ids of the columns.private void fixDataTypeOverride(BrowseColumnWidget column, BaseDataType val)
column
- Config of the target column.val
- Value to be displayed.private boolean validateWidth(NumberType width)
width
- WIDTH attribute value to be assigned.true
if attribute value is valid and can be assigned.private boolean validateHeight(NumberType height)
height
- HEIGHT attribute value to be assigned.true
if attribute value is valid and can be assigned.private logical deleteRow(int rowIndex, boolean refreshBrowse)
rowIndex
- 0-based index of the deleted row.refreshBrowse
- If true
then the browse is refreshed.true
on success.private void reposition(int64 row, boolean fetch)
row
- 1-based row to set.fetch
- true
to auto-fetch the record after reposition,
false
to move the cursor only.private boolean checkNoRecords(java.lang.String methodName)
methodName
- The name of 4GL method that calls this function. Used in the error text.true
if the query is open and the result set contains at least one
record.private int getBrowsePageRowCount()
private void errorInvalidRowIndex(java.lang.String methodName)
methodName
- The name of 4GL method that calls this function. Used in the error text.private void errorNoSelectedRows(java.lang.String methodName)
methodName
- The name of 4GL method that calls this function. Used in the error text.private logical deleteSingleRow(int selIndex, java.lang.String methodName)
selIndex
- 0-based position of the row in the list of selected rows. -1
for the
last selected row.methodName
- 4GL method name, used for error messages.true
of success.private void handleError(ErrorConditionException exc, java.lang.String methodName)
exc
- Exception with specific 4GL error code.methodName
- 4GL method name, used in the error message.private void initMaxDataGuess()
private boolean isEditPossible()
true
if there is at least one editable column.private boolean checkQueryAssigned()
true
if the query is set.private void errorAlreadyRealized(java.lang.String attributeName)
attributeName
- Attribute name used in the error message.private BrowseRow[] addRowsToBottom(BrowseRow[] upper, int rowDisplayTriggerId, ScreenBuffer[] sb, RowDisplayStrategy displayStrategy)
upper
- The set of rows to be supplemented, represents the upper part of the rows in view.rowDisplayTriggerId
- Trigger ID of the ROW-DISPLAY trigger. -1
if there is no ROW-DISPLAY
trigger for this browse.sb
- Screen buffer for the ROW-DISPLAY trigger. null
if there is no
ROW-DISPLAY trigger for this browse.displayStrategy
- Specifies type of action for which rows are fetched and defines how rows are
iterated / displayed.private boolean isRowInView(int viewportTopRow, int viewportBottomRow, int targetRow)
true
if the target row is in view.viewportTopRow
- 0-based index (in the browse model) of the top row in view.viewportBottomRow
- 0-based index (in the browse model) of the bottom row in view.targetRow
- 0-based index (in the browse model) of the target row.true
if the target row is in view.private boolean isRowOnFirstPage(int targetRow)
true
if the target row is on the first "page" of the result set.targetRow
- Target row to check.true
if the target row is on the first "page" of the result set.private void rowHeightError(int code, boolean pixels)
code
- 4GL error code.pixels
- true
if the error is for ROW-HEIGHT-PIXELS attribute, false
if the error is for ROW-HEIGHT(-CHARS) attribute.