public class BrowseImpl extends Browse<ChuiOutputManager>
Modifier and Type | Class and Description |
---|---|
private static interface |
BrowseImpl.ColumnRenderer
Interface for renderers of horizontally scrollable rows.
|
private class |
BrowseImpl.DataColumnRenderer
Renders a data line immediately to the terminal.
|
private class |
BrowseImpl.LabelColumnRenderer
Renders the labels area.
|
private class |
BrowseImpl.SpaceColumnRenderer
Renders a data line which is outside data model.
|
Browse.SelectedRow
Modifier and Type | Field and Description |
---|---|
private static int |
DEFAULT_CHUI_DOWN
Default DOWN value for ChUI browse.
|
protected double |
ilPageWidth
Number of character character columns in the displayable page.
|
protected double |
ilRightSpaceWidth
Number of space columns on screen between the data area and the right
border.
|
private BrowseImpl.DataColumnRenderer |
rndrData
The renderer for a data area with values.
|
private BrowseImpl.LabelColumnRenderer |
rndrLabels
The renderer for columns labels area.
|
private BrowseImpl.SpaceColumnRenderer |
rndrSpace
The renderer for data lines which are outside data model.
|
protected double |
separatorLen
Separator line length
|
activeEditor, browseModel, CACHE_SIZE, colorCommon, colorCurrent, colorHSep, config, currColumn, currentRowDisplayStrategy, currRowSelected, currRowUpdates, dcData, drawLabels, editedRow, editedRowIndex, editingExistingRowBefore, hadDraw, ilFirstScrollCol, ilLabelsHeight, initialRow, intermediateDcData, navigable, NEW_ROWS_NUMERATION_START, originalHeight, originalWidth, pseudoFocus, rcLabels, rowCountAssessment, savingRow, scrollColumn, selectedRowIndices, separatorQuirk
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
BrowseImpl(WidgetId id,
BrowseConfig cfg)
Constructs the CHUI-specific version of Browse widget.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addEditor(Widget editor)
Add editor widget to the browse.
|
void |
afterConfigUpdate(BrowseConfig beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
protected void |
columnToView(int visibleColumnIndex)
Setups scrolling to fully (as possible) show the given column.
|
void |
doLayout()
Lay out the browse.
|
void |
draw()
Draws the widget: border, header, selection marks and line, internal
FillIn etc.
|
void |
drawCaret()
Sets position of terminal's cursor.
|
private int |
getAvailableWidth()
Get width of the browse area available for scrollable columns, i.e.
|
private ChuiCellAttributes |
getCellAttr(int rowIndex,
int columnIndex)
Get attributes of the specific cell.
|
boolean |
hasRowMarkers()
If the browse has row markers drawn.
|
protected void |
initEditorConfig(BaseConfig cfg)
Initialize editor fill-in config.
|
protected boolean |
isFirstLastRowCopyQuirk()
Determine if this browse should have the following quirk: is a new row is inserted before
the first row or after the last row, the value of the current column is copied from the
first/last row to the new row.
|
void |
notifyColumnsUpdated()
Notify the browse that some columns have been added to it or visibility of columns has been
changed.
|
private void |
printSpaces(int width,
Color color)
Outputs several spaces to the terminal.
|
private void |
renderAbstractLine(BrowseImpl.ColumnRenderer renderer,
int rowIdx)
Renders a line from horizontally scrollable area.
|
void |
setDown(int down)
Set number of rows to display data.
|
void |
setSize(double width,
double height)
Sets new widget's size.
|
addNewRow, advanceCurrRowOrSelection, advanceRowSelection, applyEnhancedConfigClient, calcDown, cellStartsWith, cleanupEditor, clearWidget, config, createEditingFillIn, createEditor, currentFocus, dcGetRow, dcGetRowData, dcGetRowIndex, defaultFocus, deselectAll, deselectFocusedRow, deselectSelectedRow, destroy, displayErrorMessage, executePendingRefresh, finishStopEdit, fireDefaultAction, fireValueChanged, focusTraversable, generateQuestionMarks, getActiveEditor, getActiveFillIn, getActiveToggleBox, getCachedRowNumber, getCachedRowNumber, getCachedRowNumberWithIntermediate, getCacheSize, getCacheSizeWithIntermediate, getCellText, getCellTextNoError, getColumnCfg, getColumnCount, getColumns, getColumnText, getColumnValue, getCurrentColumn, getCurrentRow, getCurrentRowAsSelected, getDisplayFormat, getDown, getEdgeExistingRow, getEditorValue, getFirstExistingRow, getFocusedRow, getFocusedWidget, getIdsOfColumnWidgets, getInvisibleColumns, getLabelVar, getLastAvailableSelectedRow, getLastExistingRow, getLegacyWidget, getMaximalSelectedRowIndex, getModel, getNewRowsBefore, getNextColumn, getPageSize, getPrevColumn, getRepositionedRow, getRowDisplayTriggerId, getRows, getRows, getScreenBufferForTrigger, getScrollRow, getSelectedRowIndex, getSelectedRowIndex, getSelectedRowIndexes, getSelectedRowsCount, getValue, getValue, getViewportRow, getViewportRow, getVisibleColumnCfg, getVisibleColumnCount, getVisibleColumns, goDown, goDown, goDownWithSelection, goUp, goUp, goUpWithSelection, handleTabKey, hasFocusable, hasFocusable, incrementalScroll, incrementalScroll, initialize, initQueryAssigned, insertEditingRow, insertRow, invokeLeaveCellTrigger, invokeRowEntryTrigger, invokeRowLeaveTrigger, isAggressiveCurrentRowSelection, isConditionalReposition, isCurrentRowInView, isCurrentRowModified, isEditing, isEditorFillIn, isEditorModified, isEditorToggleBox, isEditPossible, isFirstBrowseRow, isFocusedRowSelected, isModified, isNewEditingRowOutOfTheView, isNewRow, isNewRow, isOnePageScrollingMode, isRefreshedOnEnable, isRightAligned, isRightAligned, isRowInView, isRowSelected, isSavingRow, isSelectedRowAvailable, isSelectionMultiple, isViewportEdge, leaveRow, moveColumn, nextFocus, nextNewRowNumber, notifyBrowseScrolled, notifyKeyPressedInEditor, onFocusGained, onFocusLost, onKeyPressed, onKeyTyped, ordinalToVisible, parentFrameViewed, populateColumnsCache, prevFocus, processEvent, queryClosed, queryRepositioned, refresh, refreshAfterDeletion, refreshCurrentRow, refreshScrollRow, refreshScrollRow, refreshScrollRow, refreshScrollRow, refreshScrollRow, releaseCurrentRow, removeFromSelection, renderCell, requestFocus, resetColumnsCache, scrollToCurrentRow, scrollToEditableRow, scrollToRow, scrollToRow, scrollToRow, scrollToRow, scrollToRow, scrollToRow, scrollToRow, scrollToSelectedRow, selectAll, selectFocusedRow, selectNextRow, selectPreviousRow, selectRow, setColumnValue, setCurrentColumn, setCurrentRow, setCurrentRow, setEditorReadOnly, setEditorValue, setEnabled, setHighlighted, setIntermediateRows, setReadOnly, setSelectionMultiple, show, startEdit, startEdit, startEdit, startEdit, stopEdit, stopEdit, stopEdit, switchCurrentRowSelection, switchToNextCell, undoValue, undoValue, updateColumn, updateLabelsHeight, updateMaxDataGuess, valid, validateEditorValue, visibleToOrdinal
minimumSize
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, cycleFocus, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, height, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, normalizeZOrder, onWidgetAdded, onWidgetRemoved, prepareWidgets, processKeyEvent, reflectAncestorChange, reflectLocationChange, remove, removeContainerStateListener, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, isCurrent, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setHidden, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, defaultMousePtr, displayPhysicalLocation, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, isCurrent, isDirectManipulable, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setHidden, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, supportsCustomMousePointer, topLevelWindow, window
private static final int DEFAULT_CHUI_DOWN
private BrowseImpl.LabelColumnRenderer rndrLabels
private BrowseImpl.DataColumnRenderer rndrData
private BrowseImpl.SpaceColumnRenderer rndrSpace
protected double ilPageWidth
protected double ilRightSpaceWidth
protected double separatorLen
public BrowseImpl(WidgetId id, BrowseConfig cfg)
id
- The widget's ID.cfg
- Configuration data.public void drawCaret()
drawCaret
in interface Widget<ChuiOutputManager>
drawCaret
in class Browse<ChuiOutputManager>
public void draw()
draw
in interface Widget<ChuiOutputManager>
draw
in class Browse<ChuiOutputManager>
public void doLayout()
doLayout
in interface Container<ChuiOutputManager>
doLayout
in class Browse<ChuiOutputManager>
public void setSize(double width, double height)
setSize
in interface Container<ChuiOutputManager>
setSize
in class AbstractContainer<ChuiOutputManager>
width
- The width component of the new size.height
- The height component of the new size.java.lang.IllegalArgumentException
- When new size is not large enough.public void afterConfigUpdate(BrowseConfig beforeUpdate)
afterConfigUpdate
in interface ConfigOwner<BrowseConfig>
afterConfigUpdate
in class Browse<ChuiOutputManager>
beforeUpdate
- Config reference capturing the config state before
the owner's config was modified.public void setDown(int down)
down
- Number of data rows.public void notifyColumnsUpdated()
notifyColumnsUpdated
in class Browse<ChuiOutputManager>
private int getAvailableWidth()
protected void initEditorConfig(BaseConfig cfg)
initEditorConfig
in class Browse<ChuiOutputManager>
cfg
- Editor fill-in config.protected void addEditor(Widget editor)
addEditor
in class Browse<ChuiOutputManager>
editor
- Editor widget.public boolean hasRowMarkers()
BrowseWidget.hasRowMarkers()
.hasRowMarkers
in class Browse<ChuiOutputManager>
true
if the browse has row markers drawn.protected void columnToView(int visibleColumnIndex)
columnToView
in class Browse<ChuiOutputManager>
visibleColumnIndex
- 0-based index of the column among the visible columns.protected boolean isFirstLastRowCopyQuirk()
isFirstLastRowCopyQuirk
in class Browse<ChuiOutputManager>
true
private void renderAbstractLine(BrowseImpl.ColumnRenderer renderer, int rowIdx)
renderer
- Implementation of various rendering's parts.rowIdx
- The screen index of the row currently being displayedprivate void printSpaces(int width, Color color)
width
- Number of spaces.color
- Drawing color.private ChuiCellAttributes getCellAttr(int rowIndex, int columnIndex)
rowIndex
- 0-based row index.columnIndex
- 0-based column index.null
if there is
no such cell.