public class BrowseGuiImpl extends Browse<GuiOutputManager> implements Hoverable, HasOptimalSize
| Modifier and Type | Class and Description |
|---|---|
private class |
BrowseGuiImpl.ColumnSetContainer
Set of arranged columns.
|
private class |
BrowseGuiImpl.ColumnsScrollPane
Scroll pane for the
scrollableColumnSet. |
private class |
BrowseGuiImpl.GearButton
Gear button used for enhanced browse in the bottom right corner.
|
private class |
BrowseGuiImpl.HorizontalColumnScroller
Class for handling horizontal scrolling.
|
private static class |
BrowseGuiImpl.RowClickInfo
Information about mouse click on a browse row.
|
private class |
BrowseGuiImpl.VerticalRowScroller
Class for handling vertical scrolling.
|
Browse.RowLeaveResult, Browse.SelectedRow, Browse.SelectionSet| Modifier and Type | Field and Description |
|---|---|
private BrowseFilterEntryField |
activeFilterEntry
Focused column filter entry field.
|
private static int |
ALLOWED_HIDDEN_CELL_BOTTOM_PART
Part of the cell the can be hidden at bottom.
|
static int |
BORDER_THICKNESS
Width of browse/column border.
|
private GuiFontResolver |
browseFontResolver
Font resolver.
|
private boolean |
browseLayoutMode
true if the browse is in layout mode. |
private CoordinatesConversion |
cc
Coordinates conversion.
|
(package private) static int |
CELL_OFFSET_BOTTOM
Bottom offset for text area in a cell.
|
(package private) static int |
CELL_OFFSET_TOP
Top offset for text area in a cell.
|
private BrowseColumnGuiImpl |
clickStartedEditColumn
Reference to the last browse column which had an editor initiated by a mouse click.
|
private GuiColorResolver |
colorResolver
Browse color resolver.
|
(package private) static int |
COLUMN_RESIZE_AREA_WIDTH
Width of a resize area.
|
private java.lang.String[] |
columnFiltersMappedDataTypes
For enhanced filtering: data types of the fields mapped using
DB-FILTER-FIELD-MAPPING. |
private BrowseConfirmPanel |
confirmPanel
The currently displayed panel with Apply/Reset Sorting/Filtering buttons.
|
(package private) static int |
DATA_OFFSET_RIGHT
Right offset for text area in a cell.
|
private static int |
DEFAULT_DYNAMIC_DOWN_SIZE
Default DOWN value for a dynamic browse.
|
private static int |
DEFAULT_DYNAMIC_WIDTH_CHARS
Default width for a dynamic browse.
|
private BrowseColumnGuiImpl |
draggedColumn
Reference to the column which is being dragged.
|
private boolean |
drawHelpOnRepaint
true if browse widget will draw help string on repaint. |
private boolean |
dynamicFiltersChanged
true if the value of a column filter has been changed. |
private boolean |
dynamicFiltersVisible
true if the line of column filters is displayed. |
private EnhancedBrowseSaveTarget[] |
enhancedResetTargets
Cache of enhanced configuration reset targets for this browse.
|
private EnhancedBrowseSaveTarget[] |
enhancedSaveTargets
Cache of save targets for the current browse.
|
private java.util.List<java.lang.Integer> |
enhancedSortOrder
List defining enhanced sorting order.
|
private ColorRgb |
explicitSeparatorColor
Separator color, explicitly assigned using
SEPARATOR-FGCOLOR attribute. |
private java.lang.Integer |
focusedRow
0-based index of the focused row in the browse model (this can be different from the
selected row due to a mouse drag).
|
private GuiDriver |
gd
Screen driver
|
private static int |
GEAR_BUTTON_SIZE
The size of the gear button in the bottom-right corner (only in enhanced browse)
|
(package private) static int |
H_BAR_THUMB_WIDTH
Width of the thumb of the horizontal scroll bar.
|
boolean |
hadFocusWhenPressed
Indicates if the browse had focus at the time of "mouse pressed" event.
|
private int |
horizontalColumnScrollMax
Maximum for horizontal scrolling in column scrolling mode.
|
private ScrollBarGuiImpl |
horizontalScrollbar
Horizontal scrollbar.
|
private ScrollBarControllerGuiImpl |
horizontalScroller
Horizontal scroller.
|
private int |
hScrollingStep
Horizontal scrolling step for non-COLUMN-SCROLLING mode.
|
private java.util.Map<BrowseColumnGuiImpl,java.util.Map<java.lang.Integer,Hyperlink>> |
hyperlinkWidgets
All hyperlink widgets for the current view.
|
private boolean |
initialRepositionDone
true if initial reposition was done (i.e. |
private java.lang.Long |
lastDragTickSpan
Time span between the last browse mouse drag timer started and the end of the follow-up browse draw
call, in nanoseconds.
|
private java.lang.Long |
lastDragTickStart
Time when the last browse mouse drag timer started, in nanoseconds.
|
private int |
leftDragColumnMouseOffset
Offset from the left edge of the column which is being dragged to the position of the
pointer inside the column.
|
private int |
leftDragColumnOffset
Offset from the left edge of the browse (or the edge of the markers column) to the left
edge of the column which is being dragged.
|
private int |
leftResizeColumnOffset
Offset from the left edge of the browse to the left edge of the contour of the column which
is being resized.
|
private BrowseGuiImpl.ColumnSetContainer |
lockedColumnSet
Content pane for browse columns and data (locked part).
|
private int |
lockedColumnsWidth
Total width of the locked columns.
|
private BrowseColumnGuiImpl |
markersColumn
Markers column (leftmost).
|
private static int |
MAX_SCROLL_ROWS_PER_WHEEL_ROTATION
How many rows is scrolled per one mouse wheel rotation (at maximum).
|
private BrowseColumnGuiImpl |
meColumn
The column that generates the focus events.
|
static int |
MIN_BROWSE_ROWS
Minimum number of rows in a browse.
|
private static int |
MIN_COL_WIDTH_PIXELS
Minimal width of a column, in pixels.
|
static int |
MIN_RESIZE_ROW_HEIGHT
Minimum allowed height of a row during resize.
|
static int |
MOUSE_SCROLL_DELAY_MS
Timer delay for handling mouse dragged event, in milliseconds.
|
private boolean |
mouseFocusGained
If browse gained focus by mouse click rather than other ways.
|
private boolean |
noEdit
If true prevents entering edit mode while updating browse content on enhanced dynamic sort
and filtering.
|
Widget |
oldFocusWhenPressed
The previously focused widget at the time of "mouse pressed" event.
|
private int |
paddedRowHeight
Row height (in pixels) excluding borders and separators.
|
(package private) static int |
RESIZE_LINE_VERTICAL_OFFSET
Top or bottom offset for a column resize contour.
|
private BrowseColumnGuiImpl |
resizedColumn
Reference to the column which is being resized.
|
private int |
rightResizeColumnOffset
Offset from the left edge of the browse to the right edge of the contour of the column which
is being resized.
|
private static int |
ROW_RESIZE_AREA_HEIGHT
Height of a row resize area (of the part with overlaps with a cell).
|
static int |
ROW_RESIZE_BOTTOM_OFFSET
Offset from the bottom of the browse which limits the row height during resizing.
|
BrowseGuiImpl.RowClickInfo |
rowClickInfo
Used to pass click information between
rowClicked(int, MouseEvent) and
rowClickSecondPart(RowClickInfo). |
private java.util.Map<java.lang.Integer,FontDetails> |
rowDisplayFonts
Cached font details (by font number) for fonts used for cells in the ROW-DISPLAY trigger.
|
private BrowseGuiImpl.ColumnSetContainer |
scrollableColumnSet
Content pane for browse columns and data (scrollable part).
|
private ScrollPaneGuiImpl |
scrollPane
Scrollable wrapper for
scrollableColumnSet, used for handling empty (it may be
colored) area between the rightmost column and the vertical scroller. |
private static ColorRgb |
SEPARATOR_DEFAULT_COLOR
Default separator color.
|
private static ColorRgb |
SEPARATOR_DEFAULT_COLOR2
Default separator color if background browse color matches
SEPARATOR_DEFAULT_COLOR. |
private ColorRgb |
separatorColor
Separator color.
|
private static java.lang.String |
SORT_ARROW_DOWN_IMAGE_NAME
Name of the sorting arrow down image.
|
static int |
SORT_ARROW_HEIGHT
Height of a sort arrow displayed on column labels, in pixels.
|
private static java.lang.String |
SORT_ARROW_UP_IMAGE_NAME
Name of the sorting arrow up image.
|
static int |
SORT_ARROW_WIDTH
Width of a sort arrow displayed on column labels, in pixels.
|
static int |
SORT_NUMBER_HEIGHT
Height of a sort number displayed on column labels, in pixels.
|
private static java.lang.String |
SORT_NUMBER_IMAGE_NAME_TEMPLATE
Template of a sorting number image name.
|
static int |
SORT_NUMBER_WIDTH
Width of a sort number displayed on column labels, in pixels.
|
private ImageWrapper |
sortArrowDownImage
Cached sort arrow down image.
|
private ImageWrapper |
sortArrowUpImage
Cached sort arrow up image.
|
private ImageWrapper[] |
sortNumberImages
Cached images of sort numbers.
|
private GuiFontResolver |
titleFontResolver
Font resolver for the browse title font.
|
private int |
titleHeight
Browse title height (without title borders).
|
private BorderedPanelGuiImpl |
titlePanel
Title panel.
|
private int |
totalColumnsWidth
Total columns width.
|
private EnhancedBrowseConfig |
undoConfig
Undo configuration for enhanced browse.
|
private static int |
UP_KEY_BOTTOM_OFFSET_ROWS
When the current row is out of the view below, then if we press UP key, the new current row
becomes
max(1, DOWN - UP_KEY_BOTTOM_OFFSET_ROWS)th row in the viewport
(1-based). |
private ScrollBarGuiImpl |
verticalScrollbar
Vertical scrollbar.
|
private ScrollBarControllerGuiImpl |
verticalScroller
Vertical scroller.
|
private boolean |
wasVisible
Flag indicating the widget was made visible at least once.
|
activeEditor, browseModel, browseStateHandler, CACHE_SIZE, colorCommon, colorCurrent, colorHSep, columnsInUpdate, config, currColumn, currentRowDisplayStrategy, currRowSelected, currRowUpdates, dcData, drawLabels, editedRow, editingExistingRowBefore, hadDraw, hadRowSelected, ilFirstScrollCol, ilLabelsHeight, initialRow, inRowLeaveTrigger, insertingRow, insertRowInfo, intermediateDcData, keepEditingColumn, lastRowSelected, layoutNotificationSent, navigable, NEW_ROWS_NUMERATION_START, originalHeight, originalWidth, pendingExtraRowFetch, pendingRowLeaveSave, pseudoFocus, queryClosed, rcLabels, rowCountAssessment, savingRow, scrollColumn, selectedRowIndices, separatorQuirklisteners, location, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
BrowseGuiImpl(WidgetId id,
BrowseConfig cfg)
Constructs the Browse widget.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateDirectManipulation()
Activates direct manipulation engine for this widget.
|
protected void |
addEditor(Widget editor)
Add editor widget to the browse.
|
private void |
adjustLockedColumnsPanel()
Set the width of the
lockedColumnSet panel according to
lockedColumnsWidth. |
void |
afterConfigUpdate(BrowseConfig beforeUpdate)
The method is called after the configuration associated with the
owner changes.
|
void |
applyEnhancedConfigClient()
Run client-side part of the code which should be executed after an enhanced configuration is applied to
the browse.
|
(package private) boolean |
beforeColumnHeaderPressed()
Perform actions which should happen when a header of a column is pressed.
|
private void |
buildPanels(boolean allowColumnFit)
Create column panels and widgets.
|
private void |
cacheTextMetrics(FontDetails font,
java.lang.String text,
java.lang.Integer windowId)
Cache metric of the given text.
|
private int |
calcDown()
Calculate DOWN value.
|
int |
calcDown(int rowHeightPixels)
Calculate DOWN value for the browse basing on the given row height.
|
private int |
calcExplicitRowHeight()
Calculate explicit row height basing on the ROW-HEIGHT-CHARS.
|
private int |
calcImplicitBrowseHeightNoScrollbar()
Get browse native height if it is not specified explicitly (based on explicit or implicit
DOWN value).
|
private int |
calcImplicitRowHeight()
Calculate implicit row height basing on the font height.
|
private int |
calcRowHeight()
Calculate row height basing on the ROW-HEIGHT-CHARS or font height.
|
private int |
calcTitleHeight()
Calculate title height.
|
(package private) void |
changeColumnVisibility(int columnOrdinal,
boolean visible)
Change visibility of the column.
|
protected void |
cleanupEditor(Widget editor)
Clean up editor widget.
|
protected java.util.Map<FontDetails,java.util.Set<java.lang.String>> |
collectColumnTexts(BrowseColumnGuiImpl column,
java.util.Map<FontDetails,java.util.Set<java.lang.String>> texts)
Collect texts of all cells in the given column in the current view and add them to the
specified map.
|
protected void |
columnToView(int visibleColumnIndex)
Setups scrolling to fully (as possible) show the given column.
|
protected ComboBox |
createEditingComboBox(boolean useValue,
BaseDataType value)
Create combo-box editor widget for the current column.
|
protected ToggleBox |
createEditingToggleBox(boolean useValue,
BaseDataType value)
Create toggle-box editor widget for the current column.
|
protected Widget |
createEditor(boolean useValue,
BaseDataType value)
Create editor widget for the current column.
|
private void |
createLockedColumnsSet()
Create and initialize locked columns set (if it wasn't created before).
|
private void |
createMarkersColumn()
Create markers (leftmost) column if it doesn't exist yet.
|
private void |
createTitlePanel()
Create title panel.
|
Widget<GuiOutputManager> |
currentFocus()
Returns the same as
getDefaultFocus() because focus placement
inside BROWSE can't be switched from initial component until subcomponent
creation or deletion. |
void |
deactivateDirectManipulation()
Deactivates direct manipulation engine for this widget.
|
void |
destroy()
Destroy this widget.
|
(package private) void |
destroyConfirmPanel()
Destroy the Apply/Reset Sorting/Filtering panel.
|
void |
doLayout()
Lay out the browse.
|
void |
doLayout(boolean allowColumnFit)
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.
|
boolean |
drawRowAsAlternating(int viewportRowIndex)
Returns
true if the given row is drawn with alternating color in case of row
striping. |
boolean |
drawRowAsSelected(int viewportRowIndex)
Returns
true if the specified row is drawn as selected. |
private static void |
enhancedConfigErrorMessage(java.lang.String message)
Helper function for displaying errors related to enhanced browse configuration.
|
private boolean |
fitLastColumn(boolean allowRefreshOnDownChange)
Fit the last column if FIT-LAST-COLUMN attribute is set.
|
int |
fixupNoLabelsY(int y)
Get Y coordinate minus possible labels height.
|
(package private) void |
focusRow(int viewportRowIndex)
Focuses a row.
|
GuiColorResolver |
getBrowseColorResolver()
Get browse color resolver.
|
int |
getBrowseColumnY()
Get value of
column.Y attribute for the columns of this browse: vertical offset of the
current row from the top of the browse, in pixels. |
(package private) FontDetails |
getBrowseFont()
Get browse font.
|
(package private) FontDetails |
getBrowseLabelFont()
Get browse labels font.
|
static GuiCellAttributes |
getCellAttr(BrowseRow[] rowCache,
int viewportIndex,
int columnOrdinal)
Get attribute container for the given cell from the specified row cache.
|
GuiCellAttributes |
getCellAttr(int viewportIndex,
int columnOrdinal)
Get attribute container for the given cell.
|
GuiCellAttributes |
getCellAttrWithIntermediate(int viewportIndex,
int columnOrdinal)
Get attribute container for the given cell from the cache containing intermediate rows
(
Browse.intermediateDcData), if it is available, or normat cache (Browse.dcData)
otherwise. |
java.lang.String |
getCellText(int viewportIndex,
int columnOrdinal)
Get text of the cell.
|
java.lang.String |
getCellTextWithIntermediate(BrowseColumnGuiImpl column,
int viewportIndex)
Get text of the cell from the cache containing intermediate rows
(
Browse.intermediateDcData), if it is available, or normal cache (Browse.dcData) |
BaseDataType |
getCellValue(int viewportIndex,
int columnOrdinal)
Get value of the cell.
|
BaseDataType |
getCellValueWithIntermediate(BrowseColumnGuiImpl column,
int viewportIndex)
Get value of the cell from the cache containing intermediate rows
(
Browse.intermediateDcData), if it is available, or normal cache (Browse.dcData) |
BrowseColumnGuiImpl |
getClickStartedEditColumn()
Get reference to the last browse column which had an editor initiated by a mouse click.
|
private static BrowseColumnGuiImpl |
getColumn(BrowseColumnConfig[] columns,
int index)
Get the browse column with the specific index in the given array.
|
BrowseColumnGuiImpl |
getColumn(int columnOrdinal)
Get the browse column with the specific index.
|
java.lang.String |
getColumnFilterMappedDataType(int columnIndex)
For enhanced filtering: get data type of the field mapped using
DB-FILTER-FIELD-MAPPING
for the given column. |
private int |
getColumnOffset(int visibleColumnIndex)
Get offset of the column from the left edge of the viewport or from the right edge of
the last locked column if there are locked columns (if the is scroll pane is on its initial
position).
|
private java.lang.String |
getComboBoxCellText(java.lang.String cellText,
int columnOrdinal)
Get text of the cell for the combo-box column.
|
protected int |
getCurrentEditorX()
Get X coordinate for the current editor (relatively to the containing column set).
|
protected int |
getCurrentEditorY()
Get Y coordinate for the current editor (relatively to the containing column set).
|
BrowseColumnGuiImpl |
getCurrentMarkersColumn()
Obtain the current marker column.
|
protected int |
getEditorCursorOffset()
Return the cursor offset from the left bound of the current in-cell editor.
|
private static int |
getEffectiveMinColumnWidth()
Get minimum visual width of a column (data width + offsets).
|
EnhancedBrowseSaveTarget[] |
getEnhancedBrowseResetTargets()
Get enhanced browse configuration reset targets available for the current browse and the
current user.
|
EnhancedBrowseSaveTarget[] |
getEnhancedBrowseSaveTargets()
Get save targets for an enhanced browse configuration, which are available for the current
user.
|
ColorRgb |
getExplicitSeparatorColor()
Get the color that corresponds
SEPARATOR-FGCOLOR attribute. |
integer |
getFocusedRow()
Implements the FOCUSED-ROW attribute getter.
|
int |
getHorizontalScrollingPosition()
Get position of the horizontal scroll bar.
|
int |
getLabelLinesNum()
Number of lines in the labels area (matches the number of lines in the tallest multi-line
label).
|
int |
getLabelsAreaHeight()
Get height of the labels area (in pixels), including borders.
|
int |
getLabelsHeight()
Get height of the labels area (in pixels), excluding borders.
|
int |
getLabelsHeightNoEnhancements()
Get height of the labels area (in pixels), excluding borders and FWD enhancements located in
the labels area, like column filters.
|
java.lang.Long |
getLastDragTickSpan()
Returns time span between the last browse mouse drag timer started and the end of the follow-up browse
draw call, in nanoseconds.
|
protected int |
getLeftColumnContourLimit()
Returns the left limit for the resize column contour (relative to browse).
|
(package private) int |
getLeftConfirmPanelOffset(BrowseConfirmPanel panel)
Get the left offset of the Apply/Reset Sorting/Filtering panel relatively to the browse's
left edge, in pixels.
|
(package private) int |
getLockedColumnsWidth()
Get total width of the locked columns,
|
private Point |
getLockedPaneLocation()
Get locked panel location.
|
java.lang.Integer |
getMouseDragFocusedRow()
Get the currently focused row during mouse drag.
|
java.lang.String |
getMousePointerImpl()
Get the MOUSE-POINTER attribute
|
private int |
getMouseScrollPageSize()
Get page size used for row scrolling caused by mouse drag.
|
double |
getOptimalWidth()
Returns optimal size.
|
protected int |
getPageSize()
Get page size used for Page Up / Page Down.
|
NativePoint |
getPortableMouseEventCoordinates(NativePoint point)
Get a point to represent the LAST-EVENT:X and LAST-EVENT:Y coordinates.
|
(package private) java.lang.String |
getReportTitle()
Get Report Title specified for this browse in the enhanced configuration.
|
protected int |
getRightColumnContourLimit()
Returns the right limit for the resize column contour (relative to browse).
|
int |
getRowByCoordinates(int y)
Get viewport index of the row which corresponds given vertical position.
|
FontDetails |
getRowDisplayFont(int font)
Get cached font details for a font set for a cell in the ROW-DISPLAY trigger.
|
int |
getRowHeight()
Get row height (in pixels), excluding borders and separators.
|
BrowseColumnGuiImpl.ResizeArea |
getRowResizeArea(NativePoint browseColumnPoint)
If the pointer is currently positioned over a row resize area, return that area.
|
Widget |
getScrollableColumnSet()
Get the scrollable column widget.
|
private int |
getScrollbarThickness(ScrollBar.Orientation orientation)
Get thickness (width or height) of the corresponding scroll bar.
|
ScrollPaneGuiImpl |
getScrollPane()
Gets scrollpane container to draw something in coordinates related to it.
|
private NativeDimension |
getScrollPaneDimension()
Get scroll pane dimension.
|
private Point |
getScrollPaneLocation()
Get scroll panel location.
|
private int |
getSearchColumn()
Get the search column, i.e.
|
ColorRgb |
getSeparatorColor()
Get separator color.
|
private static ScrollPaneGuiImpl.ShowBars |
getShowBars(boolean horizontal,
boolean vertical)
Get
ScrollPaneGuiImpl.ShowBars option which corresponds given visibility of the
scroll bars. |
ImageWrapper |
getSortArrowImage(boolean ascending)
Get cached sorting arrow image.
|
ImageWrapper |
getSortNumImage(int num)
Get image of the given sort number.
|
int |
getTitleHeight()
Get the height of the title, if any.
|
(package private) int |
getTopConfirmPanelOffset()
Get the top offset of the Apply/Reset Sorting/Filtering panel relatively to the browse's
top edge, in pixels.
|
int |
getTopRowOffset(int viewportIndex)
Get top offset of the row (relatively to the place where label drawing starts).
|
int |
getTopYforRow(int rowNdx)
Gets vertical position of the given row related to the browse column vertical start.
|
int |
getTotalColumnsWidth()
Get the total width of the columns of this browse widget.
|
NativeRectangle |
getViewportBoundedRectangle()
Get viewport bounded rectangle.
|
NativeDimension |
getViewportDimension()
Get viewport dimension.
|
protected BrowseColumnGuiImpl |
getVisibleColumn(int visibleColumnIndex)
Get the visible browse column with the specific index.
|
(package private) void |
handleEnhancedSortingColumnClick(BrowseColumnGuiImpl clickedColumn)
Handle the mouse click which is supposed to alter enhanced sorting order.
|
private void |
handleFilterEntriesVisibilityChange(boolean show)
This functions contains the common code for showing/hiding the line of the column filter
entry fields.
|
protected void |
handleTabKey()
Handle TAB key press.
|
boolean |
hasFocus()
Check if widget has focus.
|
private boolean |
hasGearButton()
Test if this browse should have a gear button in the bottom-right corner.
|
private boolean |
hasHyperlinkedColumns()
Returns
true if there is at least one visible column with hyperlinks. |
boolean |
hasTitle()
Determines if this browse has title.
|
(package private) void |
hideFilteringEntries()
Hide the line of the column filter entry fields.
|
protected void |
initEditorConfig(BaseConfig cfg)
Initialize editor widget config.
|
void |
initialize(WidgetId id,
BrowseConfig wcfg)
Replacement API for the logic which should exist in the widget's c'tor, but the logic
can't be executed as it depends on the widget being registered into the official registry.
|
protected boolean |
isAggressiveCurrentRowSelection()
Returns
true if the current row of the single-selection browse is selected on
FOCUS-GAINED and some other events. |
boolean |
isBelowLastRow(java.awt.event.MouseEvent evt)
Determines if the the browse event position is below the last row with data (if number of data rows is
less than
DOWN). |
(package private) boolean |
isColumnDrag()
Returns
true if a column is being dragged. |
boolean |
isColumnMovable()
Returns
true if columns are movable. |
boolean |
isColumnResizable()
Returns
true if columns are resizable. |
(package private) boolean |
isColumnResize()
Returns
true if a column is being resized. |
(package private) boolean |
isConfirmPanelDisplayed()
Returns
true if the Apply/Reset Sorting/Filtering panel is displayed. |
static boolean |
isCtrlModifier(java.awt.event.MouseEvent e)
Returns
true if CTRL key was held down when a mouse button was pressed. |
boolean |
isCurrentEditingColumn(BrowseColumnGuiImpl column)
Returns
true if the given column is the current column and editing is in
progress. |
boolean |
isDirectManipulationRequired()
Checks if direct manipulation feature must be installed or removed in GUI mode.
|
boolean |
isDrawnAsFocused()
Check if the browse should be drawn as a focused widget.
|
boolean |
isDroppable()
Checks if the given widget is able to be the target of the drop operation.
|
(package private) boolean |
isDynamicFiltersChanged()
Returns
true if the value of a column filter has been changed. |
(package private) boolean |
isEnhancedFilteringAllowed()
Returns
true if enhanced filtering is allowed for this browse. |
(package private) boolean |
isFilteringFieldsDisplayed()
Returns
true if the line of column filtering fields is displayed. |
(package private) static boolean |
isFilterValueUnknown(BaseDataType value)
Determines if the specified value represents the "value not set" case for a column filter.
|
boolean |
isLabelsVisible()
Determine if the labels area is visible.
|
(package private) boolean |
isLastLockedColumnResizeArea(java.awt.event.MouseEvent e)
Returns
true if the mouse pointer is positioned over the resize area after the
right edge of the last locked column. |
boolean |
isLayoutMode()
Returns
true if browse layout mode is active. |
protected boolean |
isNoEdit()
Checks if entering edit mode is prevented while updating browse content on enhanced dynamic sort
and filtering.
|
(package private) boolean |
isPerformLayout()
Return
true if browse layout needs to be performed. |
protected boolean |
isRefreshedOnEnable()
Determines if browse refreshed on browse widget enabling.
|
boolean |
isRowResizable()
Returns
true if rows are resizable. |
static boolean |
isShiftModifier(java.awt.event.MouseEvent e)
Returns
true if SHIFT key was held down when a mouse button was pressed. |
(package private) boolean |
isSortConfirmPanelDisplayed()
Returns
true if the Apply/Reset Sorting panel is displayed. |
protected void |
layoutHyperlinks()
Perform layout for all hyperlinks (determine their size, position etc.).
|
protected int[] |
mouseActions()
Sub-classes will override this to return a list of mouse actions on which the widget
responds.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Notification of a mouse clicked event occurred for this widget.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Notification of a mouse dragged event occurred for this widget.
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Notification of a mouse wheel moved event occurred for this widget.
|
void |
moveColumn(int srcIndex,
int destIndex)
Implements the client side of the MOVE-COLUMN() widget method.
|
private static void |
moveColumnInArray(java.lang.Object[] array,
int srcIndex,
int destIndex)
Repositions the element in the array.
|
private boolean |
needsColumnFit()
Returns
true if last column should be fit according to FIT-LAST-COLUMN or
NO-EMPTY-SPACE option. |
private boolean |
needsHorizontalScrollbar()
Returns
true if horizontal scrollbar is needed (i.e. |
protected void |
notifyBrowseScrolled()
Notify that the browse has been scrolled (i.e.
|
void |
notifyColumnsUpdated(boolean refreshData)
Notify the browse that some columns have been added to it or visibility of columns has been
changed.
|
void |
onFocusGained(FocusEvent event)
Handle situation when
Browse widget receives the focus. |
void |
onFocusLost(FocusEvent event)
Handle situation when
Browse widget loses the focus. |
void |
onKeyPressed(KeyInput event)
Process key event.
|
protected java.util.Map<FontDetails,java.util.Set<java.lang.String>> |
prepareHyperlinks()
Create hyperlink widgets without performing layout: destroy all old hyperlink widgets from
the old browse view and create new widgets for the current view.
|
(package private) void |
processComboSystemKey(KeyInput keyEvent)
Process the action associated with the given key in an independent drawing bracket.
|
void |
processDirectManipulationEvent(DirectManipulationEvent event)
Process direct manipulation event.
|
void |
processEvent(Event evt)
Intercept special events.
|
void |
queryRepositioned(boolean repositionError,
int targetRepositionRow)
Notify the browse that the underlying query has been repositioned..
|
private void |
rebuildColumns()
Re-initiate column widgets.
|
void |
refresh(boolean deleteCurrentRowMode)
Refresh the browse cache and redisplay the browse.
|
private void |
refreshAfterDownChange()
Refresh browse data after DOWN value has been changed.
|
protected void |
refreshColumnAttributes(BrowseColumnConfig config,
CellAttributes attributes)
Refresh column attributes which are cell-specific (like @BGCOLOR@ or @FGCOLOR@) for the
specific column, with the cell data from the rows cache.
|
void |
requestFocus(boolean force)
Request focus.
|
void |
requestFocus(boolean force,
boolean mouse)
Request focus.
|
protected void |
resetColumnsCache()
Reset cached information about columns.
|
boolean |
resetEnhancedConfig(EnhancedBrowseSaveTarget resetTarget)
Reset (delete) an enhanced configuration at the certain level for this browse.
|
protected void |
resetFitLastColumnExplicitWidth(BrowseColumnGuiImpl currentColumn)
Reset a flag (
BrowseColumn.config.fixedWidth) which controls if the width of the last
column was set explicitly and therefore shouldn't be fit if browse has FIT-LAST-COLUMN
enabled. |
(package private) void |
resetPressedColumns(boolean trigger)
Set all column in non-pressed state.
|
(package private) void |
resetPressedColumns(int keepPressedIndex)
Set all column in non-pressed state except one column specified.
|
ColorRgb |
resolveColor(int columnValue,
EnhancedColor columnEhValue,
int browseValue,
EnhancedColor browseEhValue,
boolean fg,
boolean label)
Resolve color basing on input parameters.
|
private void |
resolveColors()
Resolve colors.
|
void |
resolveFonts()
Resolve fonts for browse and its columns.
|
(package private) void |
rowClicked(int visibleColumnIndex,
java.awt.event.MouseEvent e)
Handle row clicks.
|
(package private) void |
rowClickSecondPart(BrowseGuiImpl.RowClickInfo clickInfo)
Second part of row click handling.
|
boolean |
saveEnhancedConfig(EnhancedBrowseSaveTarget saveTarget)
Save the current enhanced browse configuration using the specified save target.
|
protected void |
scrollToColumn(int visibleColumnIndex)
Setups scrolling to fully (as possible) show the given column.
|
protected void |
scrollToEditableRow()
Scroll to the editable row if it is out of the view.
|
private void |
searchByKey(char searchChar)
Perform search by key: find the row which starts with the given character.
|
(package private) void |
setActiveFilterEntry(BrowseFilterEntryField activeFilterEntry,
boolean changeFocus,
boolean displayFilterConfirmPanelIfNeeded)
Set or reset the focused column filter entry field.
|
private void |
setColumnScrolling(boolean columnScrolling)
Set COLUMN-SCROLLING or non-COLUMN-SCROLLING modes.
|
private void |
setCurrentSingleRowSelected()
Select current row for single-selection case.
|
(package private) void |
setDynamicFiltersChanged(boolean changed)
Sets the flag that indicates that the value of a column filter has been changed.
|
protected void |
setEditorCursorOffset(int cursorOffset)
Set the cursor offset for the current in-cell editor, if there's an active editor and it is of
a type which has a cursor.
|
void |
setEnabled(boolean enabled)
Enable/disable widget.
|
void |
setIntermediateRows(BrowseRow[] rows)
Set "intermediate" rows (i.e.
|
void |
setLastDragTickStart()
Set the time when the last browse mouse drag timer started to the current time.
|
(package private) void |
setMouseActionColumn(BrowseColumnGuiImpl col)
Register column that will generate next focus events.
|
void |
setMouseDragFocusedRow(java.lang.Integer row)
Set the currently focused row during mouse drag.
|
void |
setMousePointerName(java.lang.String name)
Set the MOUSE-POINTER attribute
|
void |
setReadOnly(boolean readOnly)
Set READ-ONLY attribute.
|
void |
setSize(double width,
double height)
Set container size.
|
private void |
setSizeImpl(double width,
double height)
Set browse size.
|
void |
show()
Show widget.
|
(package private) void |
showConfirmPanel(boolean addSorting,
boolean addFiltering)
Show Apply/Reset Sorting/Filtering confirm panel.
|
(package private) void |
showFilteringEntries()
Show the line of the column filter entry fields.
|
private void |
showHorizontalScrollbar(boolean show)
Show or hide horizontal scrollbar.
|
protected Menu |
showPopupMenu(BrowseColumnGuiImpl column,
java.awt.event.MouseEvent e,
java.lang.Runnable dismissHandler)
Show browse popop menu on mouse right-click.
|
Menu |
showPopupMenu(java.awt.event.MouseEvent e,
java.lang.Runnable dismissHandler)
The method shows the popup menu for this widget.
|
(package private) void |
startColumnDrag(BrowseColumnGuiImpl column,
int leftDragColumnMouseOffset)
Start column dragging.
|
(package private) void |
startColumnResize(int visibleColumnIndex)
Start column resizing.
|
protected boolean |
startEdit(WidgetId prevFocus,
boolean updateSelection,
boolean useValue,
BaseDataType value,
boolean sendEntry)
Creates an editor for the current cell and adds it to the browse.
|
protected void |
startEditOnFocusGained(Widget prevFocus)
Starts editing for the editable browse on focus gained event.
|
void |
startLayoutMode()
Start browse layout mode.
|
(package private) void |
stopColumnDrag(java.awt.event.MouseEvent e)
Stop column dragging.
|
(package private) void |
stopColumnResize()
Stop column resizing.
|
void |
stopLayoutMode(boolean undo,
EnhancedBrowseSaveTarget saveTarget)
Stop browse layout mode.
|
(package private) int |
stretchColumns(boolean dryRun)
Resizes visible columns to utilize all the available width of the columns container.
|
boolean |
supportsCustomMousePointer()
Check if the widget supports LOAD-MOUSE-POINTER() method
|
java.lang.String |
toString()
Returns a string representation of the browse.
|
private void |
triggerScrollNotify()
Trigger
SCROLL-NOTIFY event. |
private void |
updateBrowseDimensions()
Update browse width and height without actual layout.
|
void |
updateCellAttribute(BrowseRow[] rowCache,
int columnOrdinal,
CellAttributes.AttributeType attribute)
Update value of the given attribute in the attribute container for the given cell.
|
void |
updateCellAttribute(int columnOrdinal,
CellAttributes.AttributeType attribute)
Update value of the given attribute in the attribute container for the given cell.
|
protected boolean |
updateColumn(int columnOrdinal,
BaseDataType var)
Update specified cell in current row.
|
private void |
updateColumnSetsHeight()
Update height of scrollable and locked column sets in order to to match the viewport height.
|
(package private) void |
updateColumnsOnResize()
Performs necessary operations after width of a column has been updated.
|
(package private) void |
updateDynamicFiltering(boolean reset)
Re-open the query with the current values of the dynamic filters.
|
(package private) void |
updateDynamicSorting(boolean reset)
Re-open the query with the current dynamic sorting order.
|
private void |
updateEditorAfterColumnModification()
Update editor after column moving or resizing.
|
(package private) void |
updateEnhancedFont(EnhancedBrowseParameter param,
FontDetails font)
Set the new enhanced font for this browse, which includes recalculation of row and label
heights and recalculation of column widths for the columns with implicit width.
|
private void |
updateHorizontalColumnScrollMax()
Update maximum for horizontal scrolling in column scrolling mode.
|
protected void |
updateLabelsHeight()
Update height of the labels area.
|
private void |
updateLabelsVisible()
Update value of the
Browse.drawLabels attribute which defines if the labels area is
visible. |
(package private) void |
updateReportTitle(java.lang.String reportTitle)
Set the new Report Title in the enhanced configuration for this browse.
|
private void |
updateRowHeight()
Update row height.
|
private void |
updateVerticalScrollbarVisibility()
Show or hide vertical scrollbar depending on (NO-)SCROLLBAR-VERTICAL flag state.
|
Window |
window()
Get ancestor Window for this widget.
|
acceptTrigger, addNewRow, advanceCurrRowOrSelection, advanceRowSelection, cellStartsWith, checkChuiRowInView, checkDeleteEntryRowIndex, clearWidget, completeTrigger, conditionalPendingExtraRowFetch, config, createEditingFillIn, dcGetRow, dcGetRowData, dcGetRowIndex, defaultFocus, deselectAll, deselectFocusedRow, deselectSelectedRow, displayErrorMessage, executePendingRefresh, finishStopEdit, fireDefaultAction, fireValueChanged, focusTraversable, generateQuestionMarks, getActiveComboBox, getActiveEditor, getActiveFillIn, getActiveToggleBox, getCachedRowNumber, getCachedRowNumber, getCachedRowNumberWithIntermediate, getCacheSize, getCacheSizeWithIntermediate, getCellText, getCellTextNoError, getColumnCfg, getColumnCount, getColumns, getColumnText, getColumnValue, getCurrentColumn, getCurrentRow, getCurrentRowAsSelected, getDisplayFormat, getDown, getEdgeExistingRow, getEditorConfig, getEditorValue, getFirstExistingRow, getFocusedWidget, getIdsOfColumnWidgets, getInvisibleColumns, getLabelVar, getLastAvailableSelectedRow, getLastExistingRow, getMaximalSelectedRowIndex, getModel, getNewRowsBefore, getNextColumn, getNumberForLastRow, getPrevColumn, getRepositionedRow, getRowDisplayTriggerId, getRows, getRows, getScreenBufferForTrigger, getScrollRow, getSelectedRowIndex, getSelectedRowIndex, getSelectedRowIndexes, getSelectedRowsCount, getTextAlign, getTextAlign, getValue, getValue, getValue, getViewportRow, getViewportRow, getVisibleColumnCfg, getVisibleColumnCount, getVisibleColumns, goDown, goDown, goDownWithSelection, goUp, goUp, goUpWithSelection, hasFocusable, hasFocusable, hasRowMarkers, hasRows, incrementalScroll, incrementalScroll, initQueryAssigned, insertEditingRow, insertRow, insertRowSecondPart, invokeLeaveCellTrigger, invokeRowEntryTrigger, invokeRowEntryTrigger, invokeRowLeaveTrigger, isConditionalReposition, isCurrentRowInView, isCurrentRowModified, isEditing, isEditorComboBox, isEditorFillIn, isEditorModified, isEditorToggleBox, isEditPossible, isFirstBrowseRow, isFirstLastRowCopyQuirk, isFocusedRowSelected, isInColumnEntryTrigger, isInsertingRow, isModified, isNewEditingRowOutOfTheView, isNewRow, isNewRow, isOnePageScrollingMode, isRowInView, isRowSelected, isSavingRow, isSelectedRowAvailable, isSelectionMultiple, isViewportEdge, leaveRow, leaveRow, leaveRow, needsInsertRowContinueOnEntry, nextFocus, nextNewRowNumber, notifyColumnsUpdated, notifyKeyPressedInEditor, onKeyTyped, ordinalToVisible, parentFrameViewed, populateColumnsCache, prevFocus, queryClosed, refreshAfterDeletion, refreshColumnsAttributes, refreshCurrentRow, refreshScrollRow, refreshScrollRow, refreshScrollRow, refreshScrollRow, refreshScrollRow, releaseCurrentRow, removeFromSelection, requestFocus, resetColUpdatesInCurrentRow, resetFirstEditing, rowEntryCreated, rowEntryDeleted, scrollToCurrentRow, scrollToRow, scrollToRow, scrollToRow, scrollToRow, scrollToRow, scrollToRow, scrollToRow, scrollToSelectedRow, selectAll, selectFocusedRow, selectNextRow, selectPreviousRow, selectRow, setColumnValue, setCurrentColumn, setCurrentColumnId, setCurrentRow, setCurrentRow, setCurrentRowSelected, setEditorReadOnly, setEditorValue, setHighlighted, setKeepEditingColumn, setSelectionMultiple, startEdit, startEdit, startEdit, startEdit, startEdit, startTrigger, stopEdit, stopEdit, stopEdit, stopEdit, switchCurrentRowSelection, switchToNextCell, toggleSelectedRows, triggerOffEnd, triggerOffEnd, undoValue, undoValue, updateMaxDataGuess, valid, validateEditorValue, visibleToOrdinalminimumSizeadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, cycleFocus, deregisterSelectedWidget, detach, dimension, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, height, insets, lastFocus, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, processKeyEvent, reflectAncestorChange, reflectLocationChanged, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setPhysicalDimensionInt, setSize, setTabItemList, setWidth, startSizeChange, swap, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged, width_setHidden, _setVisible, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, debug, disable, disableTooltip, displayPhysicalLocation, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setHidden, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, sync, topLevelWindow, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealizedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwidgetsAsListacceptsEscAsAnyKey, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, defaultMousePtr, displayPhysicalLocation, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setHidden, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, systemFocusGrabbed, topLevelWindow, unregisterWidgetListener, validateDisplayValuestatic final int CELL_OFFSET_TOP
static final int CELL_OFFSET_BOTTOM
public static final int BORDER_THICKNESS
static final int H_BAR_THUMB_WIDTH
static final int DATA_OFFSET_RIGHT
public static final int SORT_ARROW_WIDTH
public static final int SORT_ARROW_HEIGHT
public static final int SORT_NUMBER_WIDTH
public static final int SORT_NUMBER_HEIGHT
public static final int MIN_BROWSE_ROWS
public static final int MIN_RESIZE_ROW_HEIGHT
public static final int ROW_RESIZE_BOTTOM_OFFSET
public static final int MOUSE_SCROLL_DELAY_MS
static final int COLUMN_RESIZE_AREA_WIDTH
BrowseColumnGuiImpl enum ResizeArea for more
information.static final int RESIZE_LINE_VERTICAL_OFFSET
private static final int ALLOWED_HIDDEN_CELL_BOTTOM_PART
private static final ColorRgb SEPARATOR_DEFAULT_COLOR
private static final ColorRgb SEPARATOR_DEFAULT_COLOR2
SEPARATOR_DEFAULT_COLOR.private static final int DEFAULT_DYNAMIC_DOWN_SIZE
private static final int DEFAULT_DYNAMIC_WIDTH_CHARS
private static final java.lang.String SORT_ARROW_UP_IMAGE_NAME
private static final java.lang.String SORT_ARROW_DOWN_IMAGE_NAME
private static final java.lang.String SORT_NUMBER_IMAGE_NAME_TEMPLATE
private static final int UP_KEY_BOTTOM_OFFSET_ROWS
max(1, DOWN - UP_KEY_BOTTOM_OFFSET_ROWS)th row in the viewport
(1-based).private static final int MAX_SCROLL_ROWS_PER_WHEEL_ROTATION
private static final int ROW_RESIZE_AREA_HEIGHT
private static final int MIN_COL_WIDTH_PIXELS
private static final int GEAR_BUTTON_SIZE
private EnhancedBrowseSaveTarget[] enhancedSaveTargets
private java.lang.String[] columnFiltersMappedDataTypes
DB-FILTER-FIELD-MAPPING.
They are used in column filters. E.g. if a column has DB-FILTER-FIELD-MAPPING set to
"some-table.some-date-field", data type from this column would be "date". Array elements correspond
browse columns. If a column doesn't have DB-FILTER-FIELD-MAPPING set, corresponding array
element is null.private EnhancedBrowseSaveTarget[] enhancedResetTargets
private GuiDriver gd
private GuiFontResolver titleFontResolver
private GuiFontResolver browseFontResolver
private BrowseGuiImpl.ColumnSetContainer scrollableColumnSet
lockedColumnSet to scrollableColumnSet or vice
versa.private BrowseGuiImpl.ColumnSetContainer lockedColumnSet
lockedColumnSet to scrollableColumnSet or vice
versa. This field can be null.private ScrollPaneGuiImpl scrollPane
scrollableColumnSet, used for handling empty (it may be
colored) area between the rightmost column and the vertical scroller.
See BrowseGuiImpl.ColumnsScrollPane for more information.private GuiColorResolver colorResolver
private int titleHeight
private CoordinatesConversion cc
private ColorRgb separatorColor
private ColorRgb explicitSeparatorColor
SEPARATOR-FGCOLOR attribute.
Can be null.private int paddedRowHeight
paddedRowHeight =
config.rowHeightPixels + CELL_OFFSET_TOP + CELL_OFFSET_BOTTOM.private BorderedPanelGuiImpl titlePanel
private int totalColumnsWidth
private int lockedColumnsWidth
private int hScrollingStep
private BrowseColumnGuiImpl markersColumn
private ScrollBarGuiImpl horizontalScrollbar
private ScrollBarGuiImpl verticalScrollbar
private int horizontalColumnScrollMax
private boolean mouseFocusGained
private ScrollBarControllerGuiImpl verticalScroller
private ScrollBarControllerGuiImpl horizontalScroller
private BrowseColumnGuiImpl draggedColumn
private BrowseColumnGuiImpl resizedColumn
private int leftDragColumnMouseOffset
private int leftDragColumnOffset
private int leftResizeColumnOffset
private int rightResizeColumnOffset
private ImageWrapper sortArrowUpImage
private ImageWrapper sortArrowDownImage
private ImageWrapper[] sortNumberImages
private boolean initialRepositionDone
true if initial reposition was done (i.e. reposition on opening of the first
assigned query). Used in handling of the selection state of the first row on initial display
of a single-selection browse.private boolean browseLayoutMode
true if the browse is in layout mode.private EnhancedBrowseConfig undoConfig
private java.util.Map<BrowseColumnGuiImpl,java.util.Map<java.lang.Integer,Hyperlink>> hyperlinkWidgets
private BrowseColumnGuiImpl meColumn
private BrowseFilterEntryField activeFilterEntry
private BrowseConfirmPanel confirmPanel
private boolean noEdit
private java.lang.Integer focusedRow
private java.lang.Long lastDragTickStart
BrowseColumnGuiImpl.handleDragTimer().private java.lang.Long lastDragTickSpan
BrowseColumnGuiImpl.handleDragTimer() and draw().private java.util.List<java.lang.Integer> enhancedSortOrder
private boolean dynamicFiltersVisible
true if the line of column filters is displayed.private boolean dynamicFiltersChanged
true if the value of a column filter has been changed.private boolean drawHelpOnRepaint
true if browse widget will draw help string on repaint.private java.util.Map<java.lang.Integer,FontDetails> rowDisplayFonts
private BrowseColumnGuiImpl clickStartedEditColumn
private boolean wasVisible
public boolean hadFocusWhenPressed
public Widget oldFocusWhenPressed
public BrowseGuiImpl.RowClickInfo rowClickInfo
rowClicked(int, MouseEvent) and
rowClickSecondPart(RowClickInfo).public BrowseGuiImpl(WidgetId id, BrowseConfig cfg)
Call initialize(com.goldencode.p2j.ui.WidgetId, com.goldencode.p2j.ui.BrowseConfig) to finish the widget initialization.
id - The widget's ID.cfg - Browse config,static boolean isFilterValueUnknown(BaseDataType value)
value - Value to check.true if the given value represents the "value not set" case for a
column filter.public void initialize(WidgetId id, BrowseConfig wcfg)
This API is called after the widget is created and added to the registry.
initialize in interface WidgetWithConfig<BrowseConfig>initialize in class Browse<GuiOutputManager>id - The widget's ID.wcfg - The config used to initialize this widget.public void setSize(double width,
double height)
setSize in interface Container<GuiOutputManager>setSize in class AbstractContainer<GuiOutputManager>width - New width.height - New height.public void afterConfigUpdate(BrowseConfig beforeUpdate)
The implemented logic must be idempotent - the method must produce the same results if executed once or multiple times not relying on any particular call sequence or related state. This is necessary so that the method can be repeated or retried as often as necessary without causing unintended effects
afterConfigUpdate in interface ConfigOwner<BrowseConfig>afterConfigUpdate in class Browse<GuiOutputManager>beforeUpdate - Config reference capturing the config state before
the owner's config was modified.public void setReadOnly(boolean readOnly)
setReadOnly in class Browse<GuiOutputManager>readOnly - New value for the attribute.public GuiCellAttributes getCellAttr(int viewportIndex, int columnOrdinal)
viewportIndex - 0-based row index in the viewport.columnOrdinal - 0-based column index.public void updateCellAttribute(int columnOrdinal,
CellAttributes.AttributeType attribute)
columnOrdinal - 0-based column index.attribute - Attribute to be updated in the row data.public void updateCellAttribute(BrowseRow[] rowCache, int columnOrdinal, CellAttributes.AttributeType attribute)
rowCache - Cache of rows: Browse.dcData or Browse.intermediateDcData.columnOrdinal - 0-based column index.attribute - Attribute to be updated in the row data.protected void refreshColumnAttributes(BrowseColumnConfig config, CellAttributes attributes)
refreshColumnAttributes in class Browse<GuiOutputManager>config - Column config to be updated.attributes - Cell attributes data from the rows cache.protected void startEditOnFocusGained(Widget prevFocus)
startEditOnFocusGained in class Browse<GuiOutputManager>prevFocus - Previously focused widget or null.public GuiCellAttributes getCellAttrWithIntermediate(int viewportIndex, int columnOrdinal)
Browse.intermediateDcData), if it is available, or normat cache (Browse.dcData)
otherwise.viewportIndex - 0-based row index in the viewport.columnOrdinal - 0-based column index.public static GuiCellAttributes getCellAttr(BrowseRow[] rowCache, int viewportIndex, int columnOrdinal)
rowCache - Cache of rows: Browse.dcData or Browse.intermediateDcData.viewportIndex - 0-based row index in the viewport.columnOrdinal - 0-based column index.public void notifyColumnsUpdated(boolean refreshData)
notifyColumnsUpdated in class Browse<GuiOutputManager>refreshData - true to refresh row data, false to only update UI.public void setIntermediateRows(BrowseRow[] rows)
BrowseWidget.getRows(int, int, boolean, int, ScreenBuffer[], RowDisplayStrategy)),
so these rows can be drawn if a pause occurs in ROW-DISPLAY trigger.setIntermediateRows in class Browse<GuiOutputManager>rows - Rows to set.public void mouseClicked(java.awt.event.MouseEvent e)
If the widget is not already focused, it forces the focus to it. After the focus was received, it computes the caret location, based on the mouse position over the widget's content.
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenermouseWheelMoved in class AbstractWidget<GuiOutputManager>e - The mouse event.public int getTitleHeight()
public void doLayout()
doLayout in interface Container<GuiOutputManager>doLayout in class Browse<GuiOutputManager>public void doLayout(boolean allowColumnFit)
allowColumnFit - Allow column fitting due to FIT-LAST-COLUMN.public int getRowHeight()
public int getLabelsHeight()
public int getLabelsHeightNoEnhancements()
public int getLabelsAreaHeight()
public int getLabelLinesNum()
public void drawCaret()
drawCaret in interface Widget<GuiOutputManager>drawCaret in class Browse<GuiOutputManager>public void draw()
draw in interface Widget<GuiOutputManager>draw in class Browse<GuiOutputManager>public void destroy()
destroy in interface Widget<GuiOutputManager>destroy in class Browse<GuiOutputManager>public void onFocusGained(FocusEvent event)
Browse widget receives the focus.
When a help string is defined for the browse it will be displayed on the status line. This method also sets the selected attribute on.
onFocusGained in interface FocusListeneronFocusGained in class Browse<GuiOutputManager>event - Reference to the event.public void onFocusLost(FocusEvent event)
Browse widget loses the focus.
This method clears the focused flag.
onFocusLost in interface FocusListeneronFocusLost in class Browse<GuiOutputManager>event - Reference to the event.public void requestFocus(boolean force)
requestFocus in interface Widget<GuiOutputManager>requestFocus in class AbstractContainer<GuiOutputManager>force - When true the method will set focus on this widget unconditionally.public void requestFocus(boolean force,
boolean mouse)
requestFocus in interface Widget<GuiOutputManager>requestFocus in class Browse<GuiOutputManager>force - When true the method will set focus on this widget unconditionally.mouse - If true then the focus request was caused by a mouse event.public void processDirectManipulationEvent(DirectManipulationEvent event)
processDirectManipulationEvent in interface Widget<GuiOutputManager>processDirectManipulationEvent in class AbstractWidget<GuiOutputManager>event - Event to process.public void setEnabled(boolean enabled)
setEnabled in interface Widget<GuiOutputManager>setEnabled in class Browse<GuiOutputManager>enabled - New enabled state.Widget.setEnabled(boolean)int stretchColumns(boolean dryRun)
dryRun - When true the method will not modify the browse layout, it will only calculate
the total data width of the visible columns and return the result.public void activateDirectManipulation()
activateDirectManipulation in class AbstractWidget<GuiOutputManager>public void deactivateDirectManipulation()
deactivateDirectManipulation in class AbstractWidget<GuiOutputManager>public boolean isDirectManipulationRequired()
isDirectManipulationRequired in class AbstractWidget<GuiOutputManager>TRUE if direct manipulation is need to be installed,
FALSE if direct manipulation is need to be removed.public int getRowByCoordinates(int y)
y - Vertical position (in native units in browse coordinates) that is supposed to be
within one of the viewport rows.-1 if position is higher than the first row or can be more
than the index of the last row if position is lower than the last row.public boolean isBelowLastRow(java.awt.event.MouseEvent evt)
DOWN).evt - Mouse event.true if the the browse event position is below the last row with data.public int fixupNoLabelsY(int y)
y - Vertical position (in native units in browse coordinates) that is supposed to be
within one of the viewport rows.public BrowseColumnGuiImpl.ResizeArea getRowResizeArea(NativePoint browseColumnPoint)
browseColumnPoint - Coordinates of the mouse pointer relatively the column being hovered.BrowseColumnGuiImpl.ResizeArea.UPPER if the pointer is positioned over the
upper row resize area of a cell. BrowseColumnGuiImpl.ResizeArea.LOWER if the
pointer is positioned over the lower row resize area of a cell. null
otherwise.public ScrollPaneGuiImpl getScrollPane()
public int getTopYforRow(int rowNdx)
rowNdx - 0-base row index to compute the Y coordinate.public ImageWrapper getSortArrowImage(boolean ascending)
ascending - true to return soring arrow for ascending sorting (arrow up).
false to return soring arrow for descending sorting (arrow down).public ImageWrapper getSortNumImage(int num)
num - Sort number, from 1 to 9.public boolean supportsCustomMousePointer()
supportsCustomMousePointer in interface Widget<GuiOutputManager>supportsCustomMousePointer in class AbstractWidget<GuiOutputManager>true if the widget supports
LOAD-MOUSE-POINTER() methodpublic boolean drawRowAsAlternating(int viewportRowIndex)
true if the given row is drawn with alternating color in case of row
striping.viewportRowIndex - 0-based index of the target row in the viewport.true if the given row is drawn with alternating color in case of row
striping.void updateEnhancedFont(EnhancedBrowseParameter param, FontDetails font)
param - Type of the font to set. Can be EnhancedBrowseParameter.CELLS_FONT or
EnhancedBrowseParameter.LABEL_FONT.font - Font to set.void updateReportTitle(java.lang.String reportTitle)
reportTitle - Report Title to set.protected int getLeftColumnContourLimit()
protected int getRightColumnContourLimit()
protected int[] mouseActions()
MouseEvent codes and P2J specific
MouseEvt actions.mouseActions in class AbstractWidget<GuiOutputManager>protected void handleTabKey()
handleTabKey in class Browse<GuiOutputManager>protected void scrollToEditableRow()
scrollToEditableRow in class Browse<GuiOutputManager>protected void resetColumnsCache()
resetColumnsCache in class Browse<GuiOutputManager>public GuiColorResolver getBrowseColorResolver()
public ColorRgb getSeparatorColor()
public ColorRgb getExplicitSeparatorColor()
SEPARATOR-FGCOLOR attribute. null if the
attribute is not set.SEPARATOR-FGCOLOR attribute.public int getTopRowOffset(int viewportIndex)
viewportIndex - 0-based index of the row in the viewport.public FontDetails getRowDisplayFont(int font)
font - Font number.int getTopConfirmPanelOffset()
int getLeftConfirmPanelOffset(BrowseConfirmPanel panel)
panel - Apply/Reset Sorting/Filtering panel for which the offset is calculated.public boolean isDrawnAsFocused()
true is if the browse should be drawn as a focused widget.void setActiveFilterEntry(BrowseFilterEntryField activeFilterEntry, boolean changeFocus, boolean displayFilterConfirmPanelIfNeeded)
activeFilterEntry - Focused column filter entry field to set or null if there is no focused
entry field.changeFocus - true to perform browse-internal focus change.displayFilterConfirmPanelIfNeeded - true to display filtering confirm panel if it is necessary (if a filter
value has been changed).boolean isSortConfirmPanelDisplayed()
true if the Apply/Reset Sorting panel is displayed.boolean isConfirmPanelDisplayed()
true if the Apply/Reset Sorting/Filtering panel is displayed.void showConfirmPanel(boolean addSorting,
boolean addFiltering)
addSorting - If the panel is not displayed, show the panel that confirms sorting. Otherwise
switches the panel type from "filtering" to "filtering and sorting".addFiltering - If the panel is not displayed, show the panel that confirms filtering. Otherwise
switches the panel type from "sorting" to "filtering and sorting".void destroyConfirmPanel()
void handleEnhancedSortingColumnClick(BrowseColumnGuiImpl clickedColumn)
clickedColumn - The column that was clicked.public boolean isLabelsVisible()
true if the labels area is visible.boolean isPerformLayout()
true if browse layout needs to be performed.boolean isEnhancedFilteringAllowed()
true if enhanced filtering is allowed for this browse.boolean isFilteringFieldsDisplayed()
true if the line of column filtering fields is displayed.boolean isDynamicFiltersChanged()
true if the value of a column filter has been changed.void setDynamicFiltersChanged(boolean changed)
changed - Value of the flag to set.void showFilteringEntries()
void hideFilteringEntries()
public NativeDimension getViewportDimension()
public NativeRectangle getViewportBoundedRectangle()
public ColorRgb resolveColor(int columnValue, EnhancedColor columnEhValue, int browseValue, EnhancedColor browseEhValue, boolean fg, boolean label)
columnValue - Column-specific color number.columnEhValue - Column-specific enhanced color.browseValue - Browse-specific color number.browseEhValue - Browse-specific enhanced color.fg - true if it is a foreground color. false if it is a
background color.label - true if it is a label color. false if it is a cell color.public java.lang.String toString()
toString in class AbstractWidget<GuiOutputManager>void startColumnDrag(BrowseColumnGuiImpl column, int leftDragColumnMouseOffset)
column - Column which is being dragged.leftDragColumnMouseOffset - Offset from the left edge of the column which is being dragged to the position of the
pointer inside the column.void stopColumnDrag(java.awt.event.MouseEvent e)
void startColumnResize(int visibleColumnIndex)
visibleColumnIndex - Index of the column which is being resized (among the visible columns).void stopColumnResize()
void updateColumnsOnResize()
boolean isColumnDrag()
true if a column is being dragged.true if a column is being dragged.boolean isColumnResize()
true if a column is being resized.true if a column is being resized.boolean isLastLockedColumnResizeArea(java.awt.event.MouseEvent e)
true if the mouse pointer is positioned over the resize area after the
right edge of the last locked column.e - Mouse event.true if the mouse pointer is positioned over the resize area after the
right edge of the last locked column.int getLockedColumnsWidth()
boolean beforeColumnHeaderPressed()
true if the header can be pressed, false otherwise.void changeColumnVisibility(int columnOrdinal,
boolean visible)
columnOrdinal - 0-based column ordinal (among all columns).visible - true if the column should be visible. false if the column
should be hidden.FontDetails getBrowseFont()
FontDetails getBrowseLabelFont()
java.lang.String getReportTitle()
null
if there is no Report Title specified.protected void columnToView(int visibleColumnIndex)
columnToView in class Browse<GuiOutputManager>visibleColumnIndex - 0-based index of the column among the visible columns.protected void scrollToColumn(int visibleColumnIndex)
visibleColumnIndex - 0-based index of the column among the visible columns.protected boolean startEdit(WidgetId prevFocus, boolean updateSelection, boolean useValue, BaseDataType value, boolean sendEntry)
startEdit in class Browse<GuiOutputManager>prevFocus - The previous focused widget, which will lose focus.updateSelection - For multi-selection browse: if true, current row becomes the only
selected row.useValue - Use the specified value for the editor instead of getting it from the browse cache.value - Value to use in the editor. Can be null (valid value). Set
useValue to true if you want to use this parameter.sendEntry - Its true value permits to emit the row-entry event.true if editing was on and ENTRY triggered allowed it to stop.protected Widget createEditor(boolean useValue, BaseDataType value)
createEditor in class Browse<GuiOutputManager>useValue - Use the specified value for the editor instead of getting it from the browse cache.value - Value to use in the editor. Can be null (valid value). Set
useValue to true if you want to use this parameter.protected ToggleBox createEditingToggleBox(boolean useValue, BaseDataType value)
useValue - Use the specified value for the editor instead of getting it from the browse cache.value - Value to use in the editor. Can be null (valid value). Set
useValue to true if you want to use this parameter.protected ComboBox createEditingComboBox(boolean useValue, BaseDataType value)
useValue - Use the specified value for the editor instead of getting it from the browse cache.value - Value to use in the editor. Can be null (valid value). Set
useValue to true if you want to use this parameter.protected void initEditorConfig(BaseConfig cfg)
initEditorConfig in class Browse<GuiOutputManager>cfg - Editor widget config.protected void addEditor(Widget editor)
addEditor in class Browse<GuiOutputManager>editor - Editor widget.protected void cleanupEditor(Widget editor)
cleanupEditor in class Browse<GuiOutputManager>editor - Editor widget.protected boolean isAggressiveCurrentRowSelection()
true if the current row of the single-selection browse is selected on
FOCUS-GAINED and some other events.isAggressiveCurrentRowSelection in class Browse<GuiOutputManager>protected int getPageSize()
getPageSize in class Browse<GuiOutputManager>protected boolean isNoEdit()
isNoEdit in class Browse<GuiOutputManager>true if entering edit mode is allowed.protected void updateLabelsHeight()
updateLabelsHeight in class Browse<GuiOutputManager>protected void notifyBrowseScrolled()
notifyBrowseScrolled in class Browse<GuiOutputManager>protected java.util.Map<FontDetails,java.util.Set<java.lang.String>> prepareHyperlinks()
layoutHyperlinks(). Layout should be performed after we
got text metrics for the hyperlinks.protected java.util.Map<FontDetails,java.util.Set<java.lang.String>> collectColumnTexts(BrowseColumnGuiImpl column, java.util.Map<FontDetails,java.util.Set<java.lang.String>> texts)
column - Column containing texts to be collected.texts - Map into which collected texts are added, keyed by fonts which are used for drawing
specific texts. If null, a new map is created for the collected texts
(if there are any texts to collect).protected void layoutHyperlinks()
prepareHyperlinks(). Layout should be performed after we
got text metrics for the hyperlinks.protected int getCurrentEditorY()
protected int getCurrentEditorX()
protected boolean isRefreshedOnEnable()
isRefreshedOnEnable in class Browse<GuiOutputManager>falsepublic Menu showPopupMenu(java.awt.event.MouseEvent e, java.lang.Runnable dismissHandler)
AbstractWidget.resolvePopupMenuId().showPopupMenu in class AbstractWidget<GuiOutputManager>e - The related mouse event that caused a popup to be shown.dismissHandler - When not null, the runnable instance is executed when the popup menu is dismissed, regardless
whether an item is chosen or not.null if no popup is resolved for this widget.protected Menu showPopupMenu(BrowseColumnGuiImpl column, java.awt.event.MouseEvent e, java.lang.Runnable dismissHandler)
column - Column which was right-clicked or null if the browse was clicked outside
of the columns area.e - Mouse event.dismissHandler - When not null, the runnable instance is executed when the popup menu is dismissed,
regardless whether an item is chosen or not.protected boolean updateColumn(int columnOrdinal,
BaseDataType var)
updateColumn in class Browse<GuiOutputManager>columnOrdinal - 0-based index of the cell to update.var - New value of the cell.true if column value was changed.void processComboSystemKey(KeyInput keyEvent)
This must be called only in the context of widget-level event processing.
keyEvent - The key to be processed.private void handleFilterEntriesVisibilityChange(boolean show)
private void cacheTextMetrics(FontDetails font, java.lang.String text, java.lang.Integer windowId)
font - The font used to draw the given text.text - Text which metrics should be cached.windowId - ID of the parent window. Can be null if there is no need to select a
window.private void updateRowHeight()
private void updateLabelsVisible()
Browse.drawLabels attribute which defines if the labels area is
visible.private int calcTitleHeight()
private boolean hasGearButton()
true if the gear button should be displayed.private void createTitlePanel()
private void buildPanels(boolean allowColumnFit)
allowColumnFit - Allow column fitting due to FIT-LAST-COLUMN.private void createLockedColumnsSet()
private void rebuildColumns()
public int getTotalColumnsWidth()
public Widget getScrollableColumnSet()
public integer getFocusedRow()
getFocusedRow in class Browse<GuiOutputManager>public Widget<GuiOutputManager> currentFocus()
getDefaultFocus() because focus placement
inside BROWSE can't be switched from initial component until subcomponent
creation or deletion.currentFocus in interface Container<GuiOutputManager>currentFocus in class Browse<GuiOutputManager>Container.currentFocus()public boolean hasFocus()
true.hasFocus in interface Widget<GuiOutputManager>true if widget has focus.private void adjustLockedColumnsPanel()
lockedColumnSet panel according to
lockedColumnsWidth.private boolean fitLastColumn(boolean allowRefreshOnDownChange)
allowRefreshOnDownChange - true to allow browse data refresh if DOWN has been changed during
column fitting.true if width of the last column was updated in order to fit it in the
view.private boolean needsColumnFit()
true if last column should be fit according to FIT-LAST-COLUMN or
NO-EMPTY-SPACE option.private void updateBrowseDimensions()
private int calcImplicitBrowseHeightNoScrollbar()
public BrowseColumnGuiImpl getCurrentMarkersColumn()
null.null if not yet created.private void createMarkersColumn()
private int calcDown()
public int calcDown(int rowHeightPixels)
calcDown in class Browse<GuiOutputManager>rowHeightPixels - Row height in pixels.private Point getScrollPaneLocation()
private Point getLockedPaneLocation()
private NativeDimension getScrollPaneDimension()
private int calcRowHeight()
private int calcImplicitRowHeight()
private int calcExplicitRowHeight()
public boolean hasTitle()
true if this browse has title.private void resolveColors()
public void resolveFonts()
protected BrowseColumnGuiImpl getVisibleColumn(int visibleColumnIndex)
visibleColumnIndex - 0-based index of the column among the visible columns.public BrowseColumnGuiImpl getColumn(int columnOrdinal)
columnOrdinal - 0-based index of the column among all columns (i.e. column ordinal).private static BrowseColumnGuiImpl getColumn(BrowseColumnConfig[] columns, int index)
columns - Array of column configurations.index - 0-based index of the column in the given array.private int getScrollbarThickness(ScrollBar.Orientation orientation)
orientation - Target scroll bar.public java.lang.String getCellTextWithIntermediate(BrowseColumnGuiImpl column, int viewportIndex)
Browse.intermediateDcData), if it is available, or normal cache (Browse.dcData)column - The column the target cell belongs to.viewportIndex - 0-based index of the target row in the viewport the target cell belongs to.public BaseDataType getCellValueWithIntermediate(BrowseColumnGuiImpl column, int viewportIndex)
Browse.intermediateDcData), if it is available, or normal cache (Browse.dcData)column - The column the target cell belongs to.viewportIndex - 0-based index of the target row in the viewport the target cell belongs to.public boolean drawRowAsSelected(int viewportRowIndex)
true if the specified row is drawn as selected.viewportRowIndex - 0-based index of the target row in the viewport.true if the specified row is drawn as selected.public BaseDataType getCellValue(int viewportIndex, int columnOrdinal)
viewportIndex - 0-based index of the target row in the viewport the target cell belongs to.columnOrdinal - 0-based index of the column the target cell belongs to.public boolean isCurrentEditingColumn(BrowseColumnGuiImpl column)
true if the given column is the current column and editing is in
progress.column - Column to check.public java.lang.String getCellText(int viewportIndex,
int columnOrdinal)
viewportIndex - 0-based index of the target row in the viewport the target cell belongs to.columnOrdinal - 0-based index of the column the target cell belongs to.public BrowseColumnGuiImpl getClickStartedEditColumn()
null.public static boolean isCtrlModifier(java.awt.event.MouseEvent e)
true if CTRL key was held down when a mouse button was pressed.e - Mouse event.true if CTRL key was held down when a mouse button was pressed.void setMouseActionColumn(BrowseColumnGuiImpl col)
BrowseColumnGuiImpl is reponsible for resetting meColumn back to
null.col - The new column to be registered or null for unregister process.void focusRow(int viewportRowIndex)
viewportRowIndex - The row which should be focused. This can be -1 or greater than the cacheSize -
in this case, scrolling will be triggered.public void setMouseDragFocusedRow(java.lang.Integer row)
row - 0-based index of the currently focused row during mouse drag in the browse model, or
null if drag has finished.public java.lang.Integer getMouseDragFocusedRow()
null if drag is not performed.void rowClicked(int visibleColumnIndex,
java.awt.event.MouseEvent e)
visibleColumnIndex - 0-based index of the clicked column among the visible columns. If -1 then the
whole row is selected as in read-only mode.e - Original mouse event.void rowClickSecondPart(BrowseGuiImpl.RowClickInfo clickInfo)
rowClicked(int, MouseEvent).clickInfo - Information about the click.void resetPressedColumns(boolean trigger)
trigger - If true and a column was in pressed state, raise END-SEARCH event.void resetPressedColumns(int keepPressedIndex)
keepPressedIndex - The column index to keep pressed state.void updateDynamicSorting(boolean reset)
reset - true to reset dynamic sorting order and hide sorting arrows and sorting
numbers.void updateDynamicFiltering(boolean reset)
reset - true to reset dynamic filters and hide the filter fields.private java.lang.String getComboBoxCellText(java.lang.String cellText,
int columnOrdinal)
cellText - Original text of the cell as if the column is not a combo-box column.columnOrdinal - 0-based ordinal of the target column.cellText is
returned. If the column is a combo-box column, then combo-box item values are
replaced with item descriptions and returned. If there is no matching value, the
original cellText is returnedpublic static boolean isShiftModifier(java.awt.event.MouseEvent e)
true if SHIFT key was held down when a mouse button was pressed.e - Mouse event.true if SHIFT key was held down when a mouse button was pressed.private int getMouseScrollPageSize()
private void setColumnScrolling(boolean columnScrolling)
columnScrolling - true for COLUMN-SCROLLING mode, false for
non-COLUMN-SCROLLING mode,private void showHorizontalScrollbar(boolean show)
show - true to show, false to hide.private void updateVerticalScrollbarVisibility()
private static ScrollPaneGuiImpl.ShowBars getShowBars(boolean horizontal, boolean vertical)
ScrollPaneGuiImpl.ShowBars option which corresponds given visibility of the
scroll bars.horizontal - true if horizontal scroll bar is visible.vertical - true if vertical scroll bar is visible.ScrollPaneGuiImpl.ShowBars option which corresponds given visibility of
the scroll bars.private void setCurrentSingleRowSelected()
private void searchByKey(char searchChar)
BrowseWidget.getRows(char, int, int, int, int, ScreenBuffer[]) for more
information.searchChar - Character to be searched for.private int getSearchColumn()
false, then it is the first column. If
ALLOW-COLUMN-SEARCHING is true then it is the pressed column.-1 if there is no column to
search.public Window window()
window in interface Widget<GuiOutputManager>window in class AbstractWidget<GuiOutputManager>null if the widget is not yet attached to a Window.public void onKeyPressed(KeyInput event)
onKeyPressed in interface KeyListeneronKeyPressed in class Browse<GuiOutputManager>event - Reference to keyboard event.public void processEvent(Event evt)
processEvent in interface Widget<GuiOutputManager>processEvent in class Browse<GuiOutputManager>evt - Event to process.Widget.processEvent(Event)public void queryRepositioned(boolean repositionError,
int targetRepositionRow)
queryRepositioned in class Browse<GuiOutputManager>repositionError - For reposition mode - if an error has happened during reposition.targetRepositionRow - For reposition mode - row used as the target for reposition. If it was deleted,
reposition with fetching may end up on a different row.public void show()
show in interface Widget<GuiOutputManager>show in class Browse<GuiOutputManager>public void refresh(boolean deleteCurrentRowMode)
refresh in class Browse<GuiOutputManager>deleteCurrentRowMode - true if this function is used for update on DELETE-CURRENT-ROW.
false if this function is used for update on REFRESH.public NativePoint getPortableMouseEventCoordinates(NativePoint point)
getPortableMouseEventCoordinates in class AbstractWidget<GuiOutputManager>point - The point (relative to the window's top-left corner) for which the coordinates for
the portable mouse events are needed.null if such an event can't be raised.public void setMousePointerName(java.lang.String name)
setMousePointerName in interface Hoverablename - the attribute valuepublic java.lang.String getMousePointerImpl()
getMousePointerImpl in interface Hoverablepublic void moveColumn(int srcIndex,
int destIndex)
Repositions a column in a browse widget.
moveColumn in class Browse<GuiOutputManager>srcIndex - 0-based position of the column to be moved (column ordinal).destIndex - 0-based position to which the column is moved (column ordinal).public void applyEnhancedConfigClient()
applyEnhancedConfigClient in class Browse<GuiOutputManager>public boolean isDroppable()
isDroppable in interface Widget<GuiOutputManager>TRUE if this widget can be droppable at this time,
FALSE otherwise.public int getHorizontalScrollingPosition()
public void startLayoutMode()
public void stopLayoutMode(boolean undo,
EnhancedBrowseSaveTarget saveTarget)
undo - false to commit changes. true to undo them.saveTarget - Save target (if configuration is applied to "all browses" / "specific browse" and
"all users" / "current user").public boolean saveEnhancedConfig(EnhancedBrowseSaveTarget saveTarget)
saveTarget - Save target (if configuration is applied to "all browses" / "specific browse" and
"all users" / "current user").true on success.public boolean resetEnhancedConfig(EnhancedBrowseSaveTarget resetTarget)
resetTarget - Defines the level at which the configuration will be reset.true on success.public EnhancedBrowseSaveTarget[] getEnhancedBrowseSaveTargets()
public java.lang.String getColumnFilterMappedDataType(int columnIndex)
DB-FILTER-FIELD-MAPPING
for the given column.columnIndex - 0-based index of the target column among all columns (i.e. column ordinal).DB-FILTER-FIELD-MAPPING set, null is returned.public EnhancedBrowseSaveTarget[] getEnhancedBrowseResetTargets()
public boolean isLayoutMode()
true if browse layout mode is active.isLayoutMode in class Browse<GuiOutputManager>true if browse layout mode is active.public boolean isColumnMovable()
true if columns are movable.true if columns are movable.public boolean isRowResizable()
true if rows are resizable.true if rows are resizable.public boolean isColumnResizable()
true if columns are resizable.true if columns are resizable.public double getOptimalWidth()
getOptimalWidth in interface HasOptimalSizepublic int getBrowseColumnY()
column.Y attribute for the columns of this browse: vertical offset of the
current row from the top of the browse, in pixels. The value is the same for all columns in the browse.getBrowseColumnY in class Browse<GuiOutputManager>column.Y attribute for the columns of this browse.public void setLastDragTickStart()
public java.lang.Long getLastDragTickSpan()
protected int getEditorCursorOffset()
getEditorCursorOffset in class Browse<GuiOutputManager>-1 if there's no active editor, or the editor is not of
a type which has a cursor.protected void setEditorCursorOffset(int cursorOffset)
setEditorCursorOffset in class Browse<GuiOutputManager>cursorOffset - 0-based cursor offset from the left bound of the editor.protected void resetFitLastColumnExplicitWidth(BrowseColumnGuiImpl currentColumn)
BrowseColumn.config.fixedWidth) which controls if the width of the last
column was set explicitly and therefore shouldn't be fit if browse has FIT-LAST-COLUMN
enabled. Calling this function re-enables auto fit.currentColumn - Column which width/visibility is being adjusted. null if a browse property is being
adjusted.private static void moveColumnInArray(java.lang.Object[] array,
int srcIndex,
int destIndex)
array - Target array.srcIndex - 0-based position of the element to be moved.destIndex - 0-based position to which the element is moved.private int getColumnOffset(int visibleColumnIndex)
visibleColumnIndex - 0-based index of the column among the visible columns.private void updateColumnSetsHeight()
private void updateEditorAfterColumnModification()
private void updateHorizontalColumnScrollMax()
horizontalColumnScrollMax.private static int getEffectiveMinColumnWidth()
private boolean hasHyperlinkedColumns()
true if there is at least one visible column with hyperlinks.private void setSizeImpl(double width,
double height)
width - New width.height - New height.private static void enhancedConfigErrorMessage(java.lang.String message)
message - Message to display.private boolean needsHorizontalScrollbar()
true if horizontal scrollbar is needed (i.e. if the total width of all columns is
more than the viewport width).true if horizontal scrollbar is needed.private void refreshAfterDownChange()
private void triggerScrollNotify()
SCROLL-NOTIFY event.