BBjGrid
Description
In BBj 7.00 and higher, the BBjGrid is the abstract base class for BBjStandardGrid, BBjDataAwareGrid and BBjDataBoundGrid. BBjGrid contains the methods that are common to BBjStandardGrid, BBjDataAwareGrid, and BBjDataBoundGrid.
Extended Interfaces
DragSource, DropTarget, CommonGrid, Focusable, MouseWheelEnabled, Scrollable.TabTraversable
Methods of BBjGrid – Drag and Drop
Return Value | Method |
---|---|
boolean | getDragAccept() |
boolean | getDragEnabled() |
string | getDragType(int row, int column) |
BBjVector | getDropTypes(int column) |
BBjVector | getDropTypes(int row, int column) |
void | setDragAccept(boolean drag) |
void | setDragEnabled(boolean mode) |
void | setDragType(int column, string type) |
void | setDragType(int row, int column, string type) |
void | setDropTypes(int column, BBjVector types!) |
void | setDropTypes(int row, int column, BBjVector types!) |
Methods of BBjGrid – Grid CSS Style
Return Value | Method |
---|---|
void | addCellStyleName(int row, int column, string styleName) |
void | addColumnStyleName(int column, string styleName) |
void | addRowStyleName(int row, string styleName) |
void | clearCellStyleNames(int row, int column) |
void | clearColumnStyleNames(int column) |
void | clearRowStyleNames(int row) |
BBjVector | getCellStyleNames(int row, int column) |
BBjVector | getColumnStyleNames(int column) |
BBjVector | getRowStyleNames(int row) |
void | removeCellStyleName(int row, int column, string styleName) |
void | removeColumnStyleName(int column, string styleName) |
void | removeRowStyleName(int row, string styleName) |
Methods of BBjGrid – Grid Headers
Return Value | Method |
---|---|
int | getColumnGutter() |
BBjGridHeader | getColumnHeader() |
int | getColumnHeaderHeight() |
int | getHasColumnHeader() |
int | getRowGutter() |
void | setColumnGutter(int gutter) |
void | setColumnHeaderHeight(int height) |
void | setHasColumnHeader(int header) |
void | setRowGutter(int gutter) |
Methods of BBjGrid – Grid Rows and Columns
Return Value | Method |
---|---|
void | adjustSpacesWhenDisplaying(int column, boolean stripLeading, boolean stripTrailing, boolean collapseMultipleSpaces, boolean removeAllSpaces) |
void | adjustSpacesWhenSaving(int column, boolean stripLeading, boolean stripTrailing, boolean collapseMultipleSpaces, boolean removeAllSpaces) |
void | doLowerCaseWhenDisplaying(int column) |
void | doLowerCaseWhenSaving(int column) |
void | doUpperCaseWhenDisplaying(int column) |
void | doUpperCaseWhenSaving(int column) |
void | fillGridWithColumns(int fit) |
int | getBottomRow() |
BBjGridCell | getCell(int row, int column) |
BBjGridData | getCellRange(int startRow, int startCol, int endRow, int endRow) |
BBjInteger | getClientAreaHeight() |
BBjInteger | getClientAreaWidth() |
BBjGridData | getColumnData(int col, int startRow, int endRow) |
int | getColumnWidth(int column) |
BBjVector | getColumnWidths() |
BBjVector | getColumnWidths(boolean units) |
int | getDefaultColumnWidth() |
int | getHorizontalCellSpacing() |
int | getHorizontalLinesVisible() |
int | getInterspace() - deprecated, use getHorizontalCellSpacing |
int | getLeftColumn() |
int | getMaxVisibleColumns() |
int | getMaxVisibleRows() |
int | getNumColumns() |
int | getNumRows() |
BBjGridData | getRowData(int row) |
BBjGridData | getRowData(int startRow, int endRow) |
int | getRowHeight() |
int | getRowHeight(int row) |
int | getShouldHighlightSelectedColumn() |
int | getShouldHighlightSelectedRow() |
boolean | getSnapToRowHeight() |
string | getToolTipText() |
string | getToolTipText(int col) |
string | getToolTipText(int row, int col) |
int | getTopRow() |
int | getVerticalCellSpacing() |
int | getVerticalLinesVisible() |
int | getVisibleColumnCount() - deprecated, use getVisibleColumns or getMaxVisibleColumns |
int | getVisibleColumns() |
int | getVisibleRowCount() - deprecated, use getVisibleRows or getMaxVisibleRows |
int | getVisibleRows() |
int | isColumnVisible(int column) |
int | isFitToGrid() |
int | isRowVisible(int row) |
int | isUserResizable() |
BBjGridCell | makeCell(int row, int col) |
void | replaceCommasWhenDisplaying(int column, string valueString) |
void | replaceCommasWhenSaving(int column, string valueString) |
void | replaceDecimalsWhenDisplaying(int column, string valueString) |
void | replaceDecimalsWhenSaving(int column, string valueString) |
void | setCell(BBjGridCell cell) |
void | setCells(BBjVector cells) |
void | setColumnWidth(int column, int width) |
void | setColumnVisible(int column) |
void | setDefaultColumnWidth(int width) |
void | setFitToGrid(int fit) |
void | setHorizontalCellSpacing(int spacing) |
void | setHorizontalLinesVisible(int visible) |
void | setInterspace(int interspace) – deprecated, use setHorizontalCellSpacing() |
void | setLeftColumn(int column) |
void | setMouseCapture(boolean capture) |
void | setRowHeight(int height) |
void | setRowHeight (int row, int height) |
void | setRowVisible(int row) |
void | setSelectedCell(int row, int col) |
void | setSelectedCell(BBjGridCell gridCell!) |
void | setSelectedCells(BBjVector selection!) |
void | setShouldHighlightSelectedColumn(int should) |
void | setSnapToRowHeight(boolean shouldSnap) |
void | setToolTipText(string text) |
void | setToolTipText(int col, string text) |
void | setToolTipText(int row, int col, string text) |
void | setShouldHighlightSelectedRow(int should) |
void | setTopRow(int row) |
void | setUserResizable(int resize) |
void | setVerticalCellSpacing(int spacing) |
void | setVerticalLinesVisible(int visible) |
Methods of BBjGrid – Grid Scrolling
Return Value | Method |
---|---|
boolean | getHorizontalScrollable() |
boolean | getHorizontalScrollBarAlways() |
int | getPagingAmount() |
boolean | getScrollbarTriggerTopBottomEvent() |
boolean | getScrollOutside() |
boolean | getScrollUpdate() |
boolean | getVerticalScrollable() |
boolean | getVerticalScrollBarAlways() |
boolean | isPaging() |
void | scrollToBottom() |
void | setHorizontalScrollable(boolean scroll) |
void | setHorizontalScrollBarAlways(boolean always) |
void | setPaging(boolean paging) |
void | setPagingAmount(int rows) |
void | setScrollbarTriggerTopBottomEvent(boolean value) |
void | setScrollOutside(boolean outside) |
void | setScrollUpdate(boolean update) |
void | setVerticalScrollable(boolean scroll) |
void | setVerticalScrollBarAlways(boolean always) |
void | suppressUpdatesWhileScrolling(boolean suppress) |
Methods of BBjGrid – Grid Cell Contents
Return Value | Method |
---|---|
string | getCellText(int row, int column) |
string | getColumnHeaderCellText(int column) |
string | getColumnMask(int column) |
int | getInsertMode() |
boolean | getShowMaskWhenRendering() – deprecated in BBj 7.00 |
void | getShowMaskWhenRendering(int shouldShow) – deprecated in BBj 7.00 |
int | getStringWidth(string text) |
void | setInsertMode(int mode) |
void | setColumnHeaderCellText(int column, string text) |
void | setColumnHeaderText(BBjVector strings!) |
void | setColumnMask(int column, string mask) |
Methods of BBjGrid – Grid Cell Editing
Return Value | Method |
---|---|
void | endEdit() |
void | endEdit(int suppress) |
int | getEditClickCount() |
string | getEditText() |
int | isColumnEditable(int column) |
int | isEditable() |
boolean | isEditing() |
boolean | isEditOnKeyPress() |
int | isRowEditable() |
void | setColumnEditable(int column, int editable) |
void | setEditClickCount(int count) |
void | setEditable(int editable) |
void | setEditOnKeyPress(boolean value) |
void | setRowEditable(int row, int editable) |
void | startEdit(int row, int column) |
Methods of BBjGrid – Grid Cell Style
Return Value | Method |
---|---|
int | getColumnHeaderCellStyle(int column) |
int | getColumnHeaderStyle() |
void | setColumnHeaderCellStyle(int column, int style) |
void | setColumnHeaderStyle(int style) |
Methods of BBjGrid – Grid Cell Alignment
Methods of BBjGrid – Grid Cell Selection
Methods of BBjGrid – Grid Colors
Methods of BBjGrid – Grid Fonts
Return Value | Method |
---|---|
BBjFont | getColumnFont(int column) |
BBjFont | getColumnHeaderFont() |
BBjFont | getMainGridFont() |
void | setColumnFont(int col, BBjFont font!) |
void | setColumnHeaderFont(BBjFont font!) |
void | setMainGridFont(BBjFont font!) |
Methods of BBjGrid – Icon Functions
Return Value | Method |
---|---|
void | setColumnHeaderCellIcon(int imageListID, int index, int column) |
void | setColumnHeaderCellImage(int column, BBjImage image!) |
Methods of BBjGrid – Miscellaneous Grid Functions
Return Value | Method |
---|---|
boolean | getBeepOnValidationFailure() |
int | getStartEditSelectionMode() |
boolean | getTrimBlankSpace() |
string | getUpdateErrorMessage() |
boolean | isDataAware() |
boolean | isDataBound() |
boolean | isEnabled() |
boolean | setBeepOnValidationFailure(boolean shouldBeep) |
void | setEnabled(boolean enabled) |
int | setStartEditSelectionMode(int mode) |
void | setTrimBlankSpace(boolean shouldTrim) |
boolean | showCalendarForCell() |
boolean |
showCalendarForCell(boolean stopCellEdit) showCalendarForCell(int row, int column) showCalendarForCell(int row, int column, boolean stopCellEdit) |
Methods of BBjGrid implemented for CommonGrid
Return Value | Method |
---|---|
void | endEdit() |
int | endEdit(int suppress) |
int | getColumnStyle(int column) |
int | getDefaultGridStyle() |
void | setColumnStyle(int column, int style) |
void | setDefaultGridStyle(int style) |
void | startEdit(int row, int col) |
Methods of BBjGrid implemented for Focusable
Return Value | Method |
---|---|
boolean | isFocusable() |
void | setFocusable(boolean focus) |
Methods of BBjGrid implemented for MouseWheelEnabled
Return Value | Method |
---|---|
int | getScrollWheelBehavior() |
void | setScrollWheelBehavior(int trav) |
Methods of BBjGrid implemented for Scrollable
Return Value | Method |
---|---|
int | getHorizontalScrollBarHeight() |
int | getHorizontalScrollBarPosition() |
int | getHorizontalScrollBarWidth() |
int | getVerticalScrollBarHeight() |
int | getVerticalScrollBarPosition() |
int | getVerticalScrollBarWidth() |
boolean | isHorizontalScrollBarVisible() |
boolean | isVerticalScrollBarVisible() |
void | setHorizontalScrollBarPosition(int position) |
void | setVerticalScrollBarPosition(int position) |
Methods of BBjGrid implemented for TabTraversable
Return Value | Method |
---|---|
boolean | isTabTraversable() |
void | setTabTraversable(boolean trav) |
Methods of BBjGrid inherited from BBjControl
Events
CSS
The visual appearance of BUI controls is defined using CSS (cascading style sheets) rules. Easily change the default colors, border, and other settings by customizing these rules, all without changing any application code. See CSS API for a high-level overview of BUI CSS.
The BBjGrid is a complex structured control with several nested layers. It defines the following style names:
.BBjGrid |
.BBjGrid.bbj-disabled |
.BBjGrid-columnHeader |
.BBjGrid-rowHeader |
.BBjGrid-table |
.BBjGrid-corner |
.BBjGrid-fieldScrollPanel |
.BBjGrid-clippingPanel |
.BBjGrid-fieldPanel |
.BBjGrid-masterPanel |
.BBjGrid-noborder |
.BBjGrid .bbj-selected (note the space between .BBjGrid and .bbj-selected) |
.BBjGrid .bbj-highlighted
(note the space between .BBjGrid and .bbj-highlighted) |
.BBjGrid-editingCell |
.BBjGrid-mainGridCell |
.BBjGrid-columnHeaderCell |
.BBjGrid-rowHeaderCell |
.BBjGrid-cell-wrapper |
.BBjGrid-buttonOffCell |
.BBjGrid-buttonDownCell |
.BBjGrid-checkOffCell |
.BBjGrid-checkDownCell |
.BBjGrid-textCell |
.BBjGrid-inputECell |
.BBjGrid-inputNCell |
.BBjGrid-inputDCell |
.BBjGrid-labelCell |
.BBjGrid-listButtonCell |
.BBjGrid-listEditCell |
As with all BBjControls, the top level style name, .BBjGrid, corresponds to the control name. The next level in is .BBjGrid-masterPanel. For implementation reasons, this is the level that defines the default outer border. The master panel contains four separate areas: The main body of the grid, with a style name of .BBjGrid-fieldPanel; column and row headers, with style names of .BBjGrid-columnHeader and .BBjGrid-rowHeader; and the small leftover piece in the upper left corner, .BBjGrid-corner.
Within the main grid and column headers, individual cells have the style names .BBjGrid-mainGridCell, .BBjGrid-columnHeaderCell, or .BBjGrid-rowHeaderCell. Each cell is also assigned several additional style names based on the type of cell (the default type is .BBjGrid-inputECell), the cell row and column (.BBjGid-row0, .BBjGrid-column0, etc.), .BBjGrid-evenRow or .BBjGrid-oddRow, and a style based on whether the column is currently sorted (.BBjGrid-unsorted, .BBjGrid-ascending, .BBjGrid-descending).
When a given cell is in edit mode, it also has the style name .BBjGrid-editingCell. Within the body of the grid, .BBjGrid.bbj-selected is applied to the selected cell(s). Row and column headers corresponding to selected cells can be highlighted using the style name .BBjGrid .bbj-highlighted.
The easiest way to understand this complex structure is with a simple grid sample. This is a very basic 3x3 grid, with row and column headers:
|
By default, this is how BUI renders that grid:
Now we define a few simple CSS rules: Eliminate all interior borders; set the highlight color to a CSS gradient; and add drop shadows to the selected and edited grid cell.
|
With those CSS rules, the grid looks like this:
Remarks
None.
Constants
AUTO_RESIZE_ALL_COLUMNS |
AUTO_RESIZE_LAST_COLUMN |
AUTO_RESIZE_NEXT_COLUMN |
AUTO_RESIZE_OFF |
AUTO_RESIZE_SUBSEQUENT_COLUMNS |
GRID_ALIGN_LEFT |
GRID_ALIGN_RIGHT |
GRID_ALIGN_CENTER |
GRID_HIGHLIGHT_OUTLINE |
GRID_HIGHLIGHT_COLOR |
GRID_NAVIGATE_COLUMN_THEN_CONTROL |
GRID_NAVIGATE_COLUMN_THEN_WRAP |
GRID_NAVIGATE_CONTROL |
GRID_NAVIGATE_GRID |
GRID_NAVIGATE_LEGACY |
GRID_SELECT_CELL |
GRID_SELECT_ROW |
GRID_SELECT_COLUMN |
GRID_STYLE_BUTTON_UP |
GRID_STYLE_BUTTON_DOWN |
Constants inherited from BBjControl
Example
BBjGrid is an abstract class and cannot be instantiated. For examples, see BBjStandardGrid, and BBjDataAwareGrid.
See Also
BBj Object Creation and Assignment
CALLBACK Verb - Register BBj Subroutine
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.