name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_VScrollTable_getNaturalColumnWidth_rdh | /**
* Detects the natural minimum width for the column of this header cell.
* If column is resized by user or the width is defined by server the
* actual width is returned. Else the natural min width is returned.
*
* @param columnIndex
* column index hint, if -1 (unknown) it will be detected
* @return */
publ... | 3.26 |
framework_VScrollTable_moveCell_rdh | /**
* Swap cells when the column are dragged.
*
* @param oldIndex
* The old index of the cell
* @param newIndex
* The new index of the cell
*/
public void moveCell(int oldIndex, int newIndex) {
final FooterCell hCell = getFooterCell(oldIndex);
final Element cell = hCell.getElement();visibleCells.remove(oldIn... | 3.26 |
framework_VScrollTable_setCacheRateFromUIDL_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void setCacheRateFromUIDL(UIDL uidl) {
setCacheRate(uidl.hasAttribute("cr") ? uidl.getDoubleAttribute("cr") : CACHE_RATE_DEFAULT);
} | 3.26 |
framework_VScrollTable_saveNaturalColumnWidthIfNotSaved_rdh | /**
* Saves natural column width if it hasn't been saved already.
*
* @param columnIndex
* @since 7.3.9
*/
protected void saveNaturalColumnWidthIfNotSaved(int columnIndex) {
if (naturalWidth < 0) {
// This is recently revealed column. Try to detect a proper
// value (greater of header and data cols)
final int hw ... | 3.26 |
framework_VScrollTable_moveFocusUp_rdh | /**
* Moves the selection one step up
*
* @return Returns true if succeeded
*/
private boolean moveFocusUp() {
return moveFocusUp(0);
} | 3.26 |
framework_VScrollTable_deselectAll_rdh | /**
* Deselects all items.
*/ public void deselectAll() {
for (Widget w : scrollBody) {
VScrollTableRow row = ((VScrollTableRow) (w));
if (row.isSelected()) {
row.toggleSelection();
}
}
// still ensure all selects are removed from (not necessary rendered)
selectedRowKeys.clear();
selectedRowRanges.clear();
// also no... | 3.26 |
framework_VScrollTable_sendSelectedRows_rdh | /**
* Sends the selection to the server if it has been changed since the last
* update/visit.
*
* @param immediately
* set to true to immediately send the rows
*/
protected void sendSelectedRows(boolean immediately) {
// Don't send anything if selection has not changed
if (!selectionChanged)
{
... | 3.26 |
framework_VScrollTable_getHierarchyColumnIndex_rdh | /**
* This method exists for the needs of {@link VTreeTable} only. Not part of
* the official API, <b>extend at your own risk</b>. May be removed or
* replaced in the future.
*
* @return index of TreeTable's hierarchy column, or -1 if not applicable
*/
protected int getHierarchyColumnIndex() {
return -1;
} | 3.26 |
framework_VScrollTable_getHTML_rdh | /**
* Override default method to distinguish on/off columns
*/
@Override
public String getHTML() {final StringBuilder buf = new StringBuilder();
buf.append("<span class=\"");
if (collapsed) {
buf.append("v-off");
} else {
buf.append("v-on");
}
if (noncollapsible) {
buf.append(" v-disabled");
}
buf.append("\">");
buf.... | 3.26 |
framework_VScrollTable_setIndex_rdh | /**
* Sets the index of the row in the whole table. Currently used just
* to set even/odd classname
*
* @param indexInWholeTable
*/
private void setIndex(int indexInWholeTable) {
index = indexInWholeTable;
boolean isOdd = (indexInWholeTable % 2) == 0;
// Inverted logic to be backwards compatible with earlier 6.4... | 3.26 |
framework_VScrollTable_setRowFocus_rdh | /**
* Moves the selection head to a specific row.
*
* @param row
* The row to where the selection head should move
* @return Returns true if focus was moved successfully, else false
*/
public boolean setRowFocus(VScrollTableRow row) {
if (!isSelectable()) {
return false;
}
// Remove previous selection
if ((focu... | 3.26 |
framework_VScrollTable_getMaxIndent_rdh | /**
* This method exists for the needs of {@link VTreeTable} only. May be
* removed or replaced in the future.<br>
* <br>
* Returns the maximum indent of the hierarcyColumn, if applicable.
*
* @see VScrollTable#getHierarchyColumnIndex()
* @return maximum indent in pixels
*/
protected int getMaxIndent() {
return... | 3.26 |
framework_VScrollTable_setProperTabIndex_rdh | /**
* Sets the proper tabIndex for scrollBodyPanel (the focusable elemen in the
* component).
* <p>
* If the component has no explicit tabIndex a zero is given (default
* tabbing order based on dom hierarchy) or -1 if the component does not
* need to gain focus. The component needs no focus if it has no scrollaba... | 3.26 |
framework_VScrollTable_updateTotalRows_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void updateTotalRows(UIDL uidl) {
int newTotalRows = uidl.getIntAttribute("totalrows");
if (newTotalRows != getTotalRows()) {
if (scrollBody != null) {
if (getTotalRows() == 0) {tHead.clear();
tFoot.m11();
... | 3.26 |
framework_VScrollTable_getNavigationEndKey_rdh | /**
* Get the key the moves the selection to the end of the table. By default
* this is the End key but by overriding this you can change the key to
* whatever you want.
*
* @return */
protected int getNavigationEndKey() {
return KeyCodes.KEY_END;
} | 3.26 |
framework_VScrollTable_ensureFocus_rdh | /**
* Ensure the component has a focus.
*
* TODO the current implementation simply always calls focus for the
* component. In case the Table at some point implements focus/blur
* listeners, this method needs to be evolved to conditionally call
* focus only if not currently focused.
*/
protected void ensureFocus(... | 3.26 |
framework_VScrollTable_selectLastRenderedRowInViewPort_rdh | /**
* Selects the last row visible in the table
* <p>
* For internal use only. May be removed or replaced in the future.
*
* @param focusOnly
* Should the focus only be moved to the last row
*/
public void selectLastRenderedRowInViewPort(boolean focusOnly) {
int v49 = firstRowInViewPort + getFullyVisibleRo... | 3.26 |
framework_VScrollTable_m12_rdh | /**
* Gets a footer cell which represents the given columnId.
*
* @param cid
* The columnId
* @return The cell
*/
public FooterCell m12(String cid) {
return availableCells.get(cid);
} | 3.26 |
framework_VScrollTable_getColumnAlignments_rdh | /**
* Returns column alignments for visible columns.
*/
public char[] getColumnAlignments() {
final char[] aligns = new char[visibleCells.size()];
int colIndex = 0;
for (Widget w : visibleCells) {
aligns[colIndex++] = ((HeaderCell) (w)).getAlign();
}
return aligns;
} | 3.26 |
framework_VScrollTable_willHaveScrollbars_rdh | /**
* Note: this method is not part of official API although declared as
* protected. Extend at your own risk.
*
* @return true if content area will have scrollbars visible.
*/
protected boolean willHaveScrollbars()
{
if (isDynamicHeight()) {
if (pageLength < totalRows) {
return true;
}
} else {
int fakeheight =... | 3.26 |
framework_VScrollTable_m4_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void m4(UIDL uidl) {
int oldPageLength = pageLength;if (uidl.hasAttribute("pagelength")) {
pageLength = uidl.getIntAttribute("pagelength");
} else
{
// pagelength is "0" meaning scrolling is turned off
pageLength = totalRows;
}
if ((ol... | 3.26 |
framework_VScrollTable_onScroll_rdh | /**
* This method has logic which rows needs to be requested from server when
* user scrolls.
*/
@Override
public void onScroll(ScrollEvent event)
{
// Do not handle scroll events while there is scroll initiated from
// server side which is not yet executed (#11454)
if (isLazyScrollerActive()) {
return;
}
f10 = scro... | 3.26 |
framework_VScrollTable_toggleShiftSelection_rdh | /**
* Is called when a user clicks an item when holding SHIFT key down.
* This will select a new range from the last focused row
*
* @param deselectPrevious
* Should the previous selected range be deselected
*/
private void toggleShiftSelection(boolean deselectPrevious) {
/* Ensures that we are in multiselect m... | 3.26 |
framework_VScrollTable_updateDragMode_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void updateDragMode(UIDL uidl) {
dragmode = (uidl.hasAttribute("dragmode")) ? uidl.getIntAttribute("dragmode") : 0;
if (BrowserInfo.get().isIE()) {
if (dragmode > 0) {
getElement().setPropertyJSO("onselectstart", getPreventTextSelec... | 3.26 |
framework_VScrollTable_fireHeaderClickedEvent_rdh | /**
* Fires a header click event after the user has clicked a column header
* cell
*
* @param event
* The click event
*/
private void fireHeaderClickedEvent(Event event) {
if (client.hasEventListeners(VScrollTable.this, TableConstants.HEADER_CLICK_EVENT_ID)) {
MouseEventDetails details = MouseEventDetailsBuild... | 3.26 |
framework_VScrollTable_m0_rdh | /**
* Cancels the current context touch timeout.
*/
public void m0() {
if (contextTouchTimeout != null) {contextTouchTimeout.cancel();
contextTouchTimeout = null;
}
touchStart = null;
} | 3.26 |
framework_VScrollTable_getNavigationPageUpKey_rdh | /**
* Get the key the moves the selection one page up in the table. By default
* this is the Page Up key but by overriding this you can change the key to
* whatever you want.
*
* @return */
protected int getNavigationPageUpKey() {
return KeyCodes.KEY_PAGEUP;
} | 3.26 |
framework_VScrollTable_getBorderWidth_rdh | /**
*
* @return border left + border right
*/
private int getBorderWidth() {
if (f9 < 0) {
f9 = WidgetUtil.measureHorizontalPaddingAndBorder(scrollBodyPanel.getElement(), 2);
if (f9 < 0) {
f9 = 0;}
}
return f9;
} | 3.26 |
framework_VScrollTable_isSelected_rdh | /**
* Has the row been selected?
*
* @return Returns true if selected, else false
*/
public boolean isSelected() {
return selected;} | 3.26 |
framework_VScrollTable_getActions_rdh | /* Returns columns as Action array for column select popup */
@Override
public Action[] getActions() {
Object[] cols;
if (columnReordering && (columnOrder != null)) {
cols = columnOrder;
} else {
// if columnReordering is disabled, we need different way to get
// all available columns
cols = visibleColOrder;
cols = new... | 3.26 |
framework_VScrollTable_isNavigationKey_rdh | /**
*
* @param keyCode
* @return true if the given keyCode is used by the table for navigation
*/
private boolean isNavigationKey(int keyCode) {
return (((((((keyCode == getNavigationUpKey()) || (keyCode == getNavigationLeftKey())) || (keyCode == getNavigationRightKey())) || (keyCode == getNavigationDownKey())) || ... | 3.26 |
framework_VScrollTable_updateColumnProperties_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void updateColumnProperties(UIDL uidl) {
updateColumnOrder(uidl);
updateCollapsedColumns(uidl);
UIDL vc = uidl.getChildByTagName("visiblecolumns");
if (vc != null) {
tHead.updateCellsFromUIDL(vc);
tFoot.m13(vc);
}
updateHeader(uidl.getS... | 3.26 |
framework_VScrollTable_restoreRowVisibility_rdh | /**
* Restore row visibility which is set to "none" when the row is
* rendered (due a performance optimization).
*/
private void restoreRowVisibility() {
for (Widget row : renderedRows) {
row.getElement().getStyle().setProperty("visibility", "");
}
} | 3.26 |
framework_VScrollTable_refreshContent_rdh | /**
* Sends request to refresh content at this position.
*/
public void refreshContent() {
isRequestHandlerRunning = true;
int first = ((int) (firstRowInViewPort - (pageLength * cacheRate)));
int reqRows = ((int) (((2 * pageLength) * cacheRate) + pageLength));
if (first < 0) {
reqRows = reqRows + first;
first = 0;}
s... | 3.26 |
framework_VScrollTable_updateFooter_rdh | /**
* Updates footers.
* <p>
* Update headers whould be called before this method is called!
* </p>
*
* @param strings
*/
private void updateFooter(String[] strings) {
if (strings == null) {
return;
}
// Add dummy column if row headers are present
int colIndex = 0;
if (showRowHeaders) {
tFoot.enableColumn(f0, c... | 3.26 |
framework_VScrollTable_isBefore_rdh | /**
* Makes a check based on indexes whether the row is before the
* compared row.
*
* @param row1
* @return true if this rows index is smaller than in the row1
*/
public boolean isBefore(VScrollTableRow row1) {
return getIndex() < row1.getIndex();
} | 3.26 |
framework_VScrollTable_hideScrollPositionAnnotation_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void
hideScrollPositionAnnotation() {
if (scrollPositionElement != null) {
scrollPositionElement.getStyle().setDisplay(Display.NONE);
}
} | 3.26 |
framework_VScrollTable_getFooterCell_rdh | /**
* Gets a footer cell by using a column index.
*
* @param index
* The index of the column
* @return The Cell
*/
public FooterCell getFooterCell(int index) {
if (index < visibleCells.size()) {
return ((FooterCell) (visibleCells.get(index)));
} else {
return null;
}
} | 3.26 |
framework_VScrollTable_showContextMenu_rdh | /**
* Handles context menu for table body
*/private ContextMenuOwner contextMenuOwner = new ContextMenuOwner() {
@Override
public void showContextMenu(Event event) {
int left = WidgetUtil.getTouchOrMouseClientX(event);
int v12 = WidgetUtil.getTouchOrMouseClientY(event);
boolean v13 = h... | 3.26 |
framework_VScrollTable_setAlign_rdh | /**
* Set alignment of the text in the cell.
*
* @param c
* The alignment which can be ALIGN_CENTER, ALIGN_LEFT,
* ALIGN_RIGHT
*/
public void setAlign(char c) {
if (f6 != c) {
switch (c) {
case ALIGN_CENTER :
captionContainer.getStyle().setTextAlign(TextAlign.CENTER);
break;
case ALIGN_RIGHT :
captionContaine... | 3.26 |
framework_VScrollTable_setHorizontalScrollPosition_rdh | /**
* Set the horizontal position in the cell in the footer. This is done
* when a horizontal scrollbar is present.
*
* @param scrollLeft
* The value of the leftScroll
*/
public void setHorizontalScrollPosition(int scrollLeft) {
hTableWrapper.setScrollLeft(scrollLeft);
} | 3.26 |
framework_VScrollTable_getWidthWithIndent_rdh | /**
* This method exists for the needs of {@link VTreeTable} only.
*
* Returns the pixels width of the header cell. This includes the
* indent, if applicable.
*
* @return The width in pixels
*/
protected int getWidthWithIndent() {
if ((scrollBody != null) && isHierarchyColumn()) {
int maxIndent = scrollBody.getM... | 3.26 |
framework_VScrollTable_toggleSelection_rdh | /**
* Toggle the selection of the row.
*/
public void toggleSelection() {
selected = !selected;
selectionChanged = true;
if (selected) {
selectedRowKeys.add(String.valueOf(rowKey));
addStyleName("v-selected");
} else {
removeStyleName("v-selected");
selectedRowKeys.remove(String.valueOf(rowKey));
}
} | 3.26 |
framework_VScrollTable_updateSortingProperties_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void updateSortingProperties(UIDL uidl) {
oldSortColumn = sortColumn;
if (uidl.hasVariable("sortascending")) {
sortAscending = uidl.getBooleanVariable("sortascending");
sortColumn = uidl.getStringVariable("sortcolumn");
}
} | 3.26 |
framework_VScrollTable_updateFirstVisibleRow_rdh | // Updates first visible row for the case we cannot wait
// for onScroll
private void updateFirstVisibleRow() {
scrollTop = scrollBodyPanel.getScrollPosition();
firstRowInViewPort = calcFirstRowInViewPort();
int maxFirstRow = totalRows - pageLength;
if ((firstRowInViewPort > maxFirstRow) && (maxFirstRow >= 0)) {
firs... | 3.26 |
framework_VScrollTable_getPreviousRow_rdh | /**
* Returns the previous row from the given row
*
* @param row
* The row to calculate from
* @return The previous row or null if no row exists
*/
private VScrollTableRow getPreviousRow(VScrollTableRow row,
int offset) {
final Iterator<Widget> it = scrollBody.iterator();
final Iterator<Widget> offsetIt = scr... | 3.26 |
framework_VScrollTable_updateFirstVisibleAndScrollIfNeeded_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void updateFirstVisibleAndScrollIfNeeded(UIDL uidl) {
firstvisible = (uidl.hasVariable("firstvisible")) ? uidl.getIntVariable("firstvisible") : 0;
firstvisibleOnLastPage = (uidl.hasVariable("firstvisibleonlastpage")) ? uidl.getIntVariabl... | 3.26 |
framework_VScrollTable_sizeInit_rdh | /**
* Run only once when component is attached and received its initial
* content. This function:
*
* * Syncs headers and bodys "natural widths and saves the values.
*
* * Sets proper width and height
*
* * Makes deferred request to get some cache rows
*
* For internal use only. May be removed or replaced in ... | 3.26 |
framework_VScrollTable_discardRowsOutsideCacheWindow_rdh | /**
* Updates the internal cache by unlinking rows that fall outside of the
* caching window.
*/
protected void discardRowsOutsideCacheWindow() {
int firstRowToKeep
= ((int) (firstRowInViewPort - (pageLength * cacheRate)));
int lastRowToKeep =
((int) ((firstRowInViewPort + pageLength) + (pageLength * cacheRate)));... | 3.26 |
framework_VScrollTable_getRenderedRowByKey_rdh | /**
* Get a rendered row by its key.
*
* @param key
* The key to search with
* @return */
public VScrollTableRow getRenderedRowByKey(String key) {
if (scrollBody != null) {
for (Widget w : scrollBody) {
VScrollTableRow r = ((VScrollTableRow) (w));
if (r.m16().equals(key)) {
return r;
}
}
}
return null;
} | 3.26 |
framework_VScrollTable_setWidth_rdh | /**
* Sets the width of the cell. This width should not include any
* possible indent modifications that are present in
* {@link VScrollTableBody#getMaxIndent()}.
*
* @param w
* The width of the cell
* @param ensureDefinedWidth
* Ensures that the given width is not recalculated
*/
public void setWidth(int ... | 3.26 |
framework_VScrollTable_calculateMaxIndent_rdh | /**
* This method exists for the needs of {@link VTreeTable} only. May be
* removed or replaced in the future.<br>
* <br>
* Calculates the maximum indent of the hierarcyColumn, if applicable.
*/
protected void calculateMaxIndent()
{
// NOP
} | 3.26 |
framework_VScrollTable_instructServerToForgetPreviousSelections_rdh | /**
* Used in multiselect mode when the client side knows that all selections
* are in the next request.
*/
private void instructServerToForgetPreviousSelections() {
client.updateVariable(paintableId, "clearSelections", true, false);
} | 3.26 |
framework_VScrollTable_setColWidth_rdh | /**
* Sets the content width of a column.
*
* Due IE limitation, we must set the width to a wrapper elements inside
* table cells (with overflow hidden, which does not work on td
* elements).
*
* To get this work properly crossplatform, we will also set the width
* of td.
*
* @param colIndex
* The column I... | 3.26 |
framework_VScrollTable_getCellExtraWidth_rdh | /**
* Method to return the space used for cell paddings + border.
*/
private int getCellExtraWidth() {
if (cellExtraWidth < 0) {
detectExtrawidth();
}
return cellExtraWidth;
} | 3.26 |
framework_VScrollTable_isFocusable_rdh | /**
* Can the Table be focused?
*
* @return True if the table can be focused, else false
*/
public boolean isFocusable() {
if ((scrollBody != null) && enabled) {
return !(((!m23()) && (!hasVerticalScrollbar())) && (!isSelectable()));
}
return false;
} | 3.26 |
framework_VScrollTable_handleCaptionEvent_rdh | /**
* Handles a event on the captions.
*
* @param event
* The event to handle
*/
protected void handleCaptionEvent(Event event) {
if ((event.getTypeInt() == Event.ONMOUSEUP) || (event.getTypeInt() == Event.ONDBLCLICK)) {
fireFooterClickedEvent(event);
}
} | 3.26 |
framework_VScrollTable_setExpandRatio_rdh | /**
* Sets the expand ratio of the cell.
*
* @param floatAttribute
* The expand ratio
*/
public void setExpandRatio(float floatAttribute) {
expandRatio = floatAttribute;
} | 3.26 |
framework_VScrollTable_initializeRows_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void initializeRows(UIDL uidl, UIDL rowData) {
if (scrollBody != null) {
scrollBody.removeFromParent();
}
// Without this call the scroll position is messed up in IE even after
// the lazy scroller has set the scroll position to the firs... | 3.26 |
framework_VScrollTable_prepareRow_rdh | /**
* This method is used to instantiate new rows for this table. It
* automatically sets correct widths to rows cells and assigns correct
* client reference for child widgets.
*
* This method can be called only after table has been initialized
*
* @param uidl
*/
private VScrollTableRow prepareRow(UIDL uidl) {
... | 3.26 |
framework_VScrollTable_getColIndexByKey_rdh | /**
* Gives correct column index for given column key ("cid" in UIDL).
*
* @param colKey
* @return column index of visible columns, -1 if column not visible
*/
private int getColIndexByKey(String colKey) {
// return 0 if asked for rowHeaders
if (f0.equals(colKey)) {
return 0;
}for (int i = 0; i < visibleColOrder.l... | 3.26 |
framework_VScrollTable_setContainerHeight_rdh | /**
* Fix container blocks height according to totalRows to avoid
* "bouncing" when scrolling
*/
private void setContainerHeight() {
fixSpacers();
container.getStyle().setHeight(measureRowHeightOffset(totalRows), Unit.PX);
} | 3.26 |
framework_VScrollTable_getColKey_rdh | /**
* Returns the column key of the column.
*
* @return The column key
*/
public String getColKey() {
return cid;
} | 3.26 |
framework_VScrollTable_rowKeyIsSelected_rdh | /**
* Checks if the row represented by the row key has been selected
*
* @param key
* The generated row key
*/
private boolean rowKeyIsSelected(int rowKey) {
// Check single selections
if (selectedRowKeys.contains("" + rowKey)) {
return true;
}
// Check range selections
for (SelectionRange r : selectedRowRange... | 3.26 |
framework_VScrollTable_run_rdh | /**
* Check for column widths, and available width, to see if we can fix
* column widths "optimally". Doing this lazily to avoid expensive
* calculation when resizing is not yet finished.
*/
@Overridepublic void run() {
if (scrollBody == null) {
// Try again later if we get here before scrollBody has been
// inital... | 3.26 |
framework_VScrollTable_getNextRow_rdh | /**
* Returns the next row to the given row
*
* @param row
* The row to calculate from
* @return The next row or null if no row exists
*/
private VScrollTableRow getNextRow(VScrollTableRow row, int offset) {final Iterator<Widget> it = scrollBody.iterator();
while (it.hasNext()) {
VScrollTableRow r = ((VScrollTa... | 3.26 |
framework_VScrollTable_m13_rdh | /**
* Updates the cells contents when updateUIDL request is received.
*
* @param uidl
* The UIDL
*/
public void m13(UIDL uidl) {
HashSet<String> updated = new HashSet<String>();
for (Object child : uidl) {
final UIDL col = ((UIDL) (child));final String cid = col.getStringAttribute("cid");
updated.add(cid);
Stri... | 3.26 |
framework_VScrollTable_handleBodyContextMenu_rdh | /**
* Handles a context menu event on table body.
*
* @param left
* left position of the context menu
* @param top
* top position of the context menu
* @return true if a context menu was shown, otherwise false
*/
private boolean handleBodyContextMenu(int left, int top) {
if (enabled &&
(bodyActionKe... | 3.26 |
framework_VScrollTable_fireFooterClickedEvent_rdh | /**
* Fires a footer click event after the user has clicked a column footer
* cell
*
* @param event
* The click event
*/
private void fireFooterClickedEvent(Event event) {
if (client.hasEventListeners(VScrollTable.this, TableConstants.FOOTER_CLICK_EVENT_ID)) {
MouseEventDetails details = MouseEventDetailsBuild... | 3.26 |
framework_VScrollTable_ensureRowIsVisible_rdh | /**
* Ensures that the row is visible
*
* @param row
* The row to ensure is visible
*/
private void ensureRowIsVisible(VScrollTableRow row) {
if (BrowserInfo.get().isTouchDevice())
{
// Skip due to android devices that have broken scrolltop will may
// get odd scrolling here.
return;
}
/* FIXME The next line doe... | 3.26 |
framework_VScrollTable_updateRowsInBody_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/public void updateRowsInBody(UIDL partialRowUpdates) {
if (partialRowUpdates == null) {
return;
} int firstRowIx = partialRowUpdates.getIntAttribute("firsturowix");
int count = partialRowUpdates.getIntAttribute("numurows");
scrollBody.unlinkRows... | 3.26 |
framework_VScrollTable_removeCell_rdh | /**
* Remove a cell by using the columnId.
*
* @param colKey
* The columnId to remove
*/
public void removeCell(String
colKey) {
final FooterCell c = m12(colKey);
remove(c);
} | 3.26 |
framework_VScrollTable_m1_rdh | /**
* Fires a column resize event which sends the resize information to the
* server.
*
* @param columnId
* The columnId of the column which was resized
* @param originalWidth
* The width in pixels of the column before the resize event
* @param newWidth
* The width in pixels of the column after the resiz... | 3.26 |
framework_VScrollTable_isInViewPort_rdh | /**
* Detects whether row is visible in tables viewport.
*
* @return */
public boolean isInViewPort() {int absoluteTop = getAbsoluteTop();
int absoluteBottom = absoluteTop + getOffsetHeight();
int viewPortTop = scrollBodyPanel.getAbsoluteTop();
int viewPortBottom = viewPortTop + scrollBodyPanel.getOffsetHeight();
... | 3.26 |
framework_VScrollTable_isScrollPositionVisible_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public boolean isScrollPositionVisible() {
return (scrollPositionElement != null) && (!scrollPositionElement.getStyle().getDisplay().equals(Display.NONE.toString()));
} | 3.26 |
framework_VScrollTable_handleClickEvent_rdh | /**
* If there are registered click listeners, sends a click event and
* returns true. Otherwise, does nothing and returns false.
*
* @param event
* @param targetTdOrTr
* @param immediate
* Whether the event is sent immediately
* @return Whether a click event was sent
*/
private boolean handleClickEvent(Ev... | 3.26 |
framework_VScrollTable_updatePageLength_rdh | /**
* Determines the pagelength when the table height is fixed.
*/
public void updatePageLength() {
// Only update if visible and enabled
if ((!isVisible()) || (!enabled)) {
return;
}
if (scrollBody == null) {
return;
}
if (isDynamicHeight()) {
return;
}
int rowHeight = ((int) (Math.round(scrollBody.getRowHeight()))... | 3.26 |
framework_VScrollTable_updateWidth_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void updateWidth() {
if (!isVisible()) {
/* Do not update size when the table is hidden as all column widths
will be set to zero and they won't be recalculated when the table
is set visible again (until the size changes again)
*/return;... | 3.26 |
framework_SQLUtil_escapeSQL_rdh | /**
* Escapes different special characters in strings that are passed to SQL.
* Replaces the following:
*
* <list>
* <li>' is replaced with ''</li>
* <li>\x00 is removed</li>
* <li>\ is replaced with \\</li>
* <li>" is replaced with \"</li>
* <li>\x1a is removed</li> </list>
*
* Also note! The escaping done ... | 3.26 |
framework_LegacyPaint_paint_rdh | /**
* <p>
* Paints the Paintable into a UIDL stream. This method creates the UIDL
* sequence describing it and outputs it to the given UIDL stream.
* </p>
*
* <p>
* It is called when the contents of the component should be painted in
* response to the component first being shown or having been altered so
* tha... | 3.26 |
framework_MethodProperty_getSetters_rdh | /**
* Returns a list of all setters found in the beanType or its parent class
*
* @param beanType
* The type to check
* @param getters
* Set that will be filled with names of getters.
* @return A list of setter methods from the class and its parents
*/
private static ... | 3.26 |
framework_DefaultFieldGroupFieldFactory_anyField_rdh | /**
*
* @since 7.4
* @param fieldType
* the type of the field
* @return true if any AbstractField can be assigned to the field
*/
protected boolean anyField(Class<?> fieldType) {
return (fieldType == Field.class) || (fieldType == AbstractField.class);
} | 3.26 |
framework_DefaultFieldGroupFieldFactory_populateWithEnumData_rdh | /**
* Populates the given select with all the enums in the given {@link Enum}
* class. Uses {@link Enum}.toString() for caption.
*
* @param select
* The select to populate
* @param enumClass
* The Enum class to use
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected void populateWithEnumData(Abstra... | 3.26 |
framework_DefaultFieldGroupFieldFactory_anySelect_rdh | /**
*
* @since 7.4
* @param fieldType
* the type of the field
* @return true if any AbstractSelect can be assigned to the field
*/
@SuppressWarnings("rawtypes")
protected boolean anySelect(Class<? extends Field> fieldType) {
return anyField(fieldType) || (fieldType == AbstractSelect.class);
} | 3.26 |
framework_DefaultFieldGroupFieldFactory_get_rdh | /**
* Gets the singleton instance.
*
* @since 7.4
* @return the singleton instance
*/
public static DefaultFieldGroupFieldFactory get() {
return INSTANCE;
} | 3.26 |
framework_DropIndexCalculator_alwaysDropToEnd_rdh | /**
* A handler for calculating the index of the dropped items on the drop target
* grid.
*
* @author Vaadin Ltd
* @since 8.2
* @see GridRowDragger
* @param <T>
* the bean type
*/
@FunctionalInterfacepublic interface DropIndexCalculator<T> extends Serializable {
/**
* Returns a calculator for always... | 3.26 |
framework_PasswordFieldElement_getValue_rdh | /**
* Return value of the password element.
*
* @since 8.0
* @return value of the password element
*/
@Overridepublic String getValue() {
return getAttribute("value");
} | 3.26 |
framework_DragAndDropService_handleDragRequest_rdh | /**
* Handles a drag/move request from the VDragAndDropManager.
*
* @param dropTarget
* @param variables
*/
private void handleDragRequest(DropTarget dropTarget, Map<String, Object> variables) {
lastVisitId = ((Integer) (variables.get("visitId")));
acceptCriterion = dropTarget.getDropHandler().getAcceptCri... | 3.26 |
framework_DragAndDropService_constructDragDropDetails_rdh | /**
* Construct DragDropDetails based on variables from client drop target.
* Uses DragDropDetailsTranslator if available, otherwise a default
* DragDropDetails implementation is used.
*
* @param dropTarget
* @param variables
* @return */
@SuppressWarnings("unchecked")
private TargetDetails constructDragDropDet... | 3.26 |
framework_DragAndDropService_handleDropRequest_rdh | /**
* Handles a drop request from the VDragAndDropManager.
*
* @param dropTarget
* @param variables
*/
private void handleDropRequest(DropTarget dropTarget, Map<String, Object> variables) {
DropHandler dropHandler = dropTarget.getDropHandler();
if (dropHandler == null) {
// No dropHandler returned ... | 3.26 |
framework_DateResolution_getResolutionsLowerThan_rdh | /**
* Returns the resolutions that are lower than the given resolution,
* starting from the given resolution. In other words passing DAY to this
* methods returns HOUR,MINUTE,SECOND.
*
* @param r
* The resolution to start from
* @return An iterable for the resolutions lower than r
*/
public static List<DateRe... | 3.26 |
framework_DateResolution_getResolutionsHigherOrEqualTo_rdh | /**
* Returns the resolutions that are higher or equal to the given resolution,
* starting from the given resolution. In other words passing DAY to this
* methods returns DAY,MONTH,YEAR
*
* @param r
* The resolution to start from
* @return An iterable for the resolutions higher or equal to r
*/
public static... | 3.26 |
framework_LegacyWindow_replaceComponent_rdh | /**
* This implementation replaces a component in the content container (
* {@link #getContent()}) instead of in the actual UI.
*
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
*/
public void replaceComponent(Component ... | 3.26 |
framework_LegacyWindow_removeListener_rdh | /**
* Removes a {@link BrowserWindowResizeListener} from this UI. The listener
* will no longer be notified when the browser window is resized.
*
* @param resizeListener
* the listener to remove
* @deprecated As of 7.0, use the similarly named api in Page instead
*/
@Deprecated
public void removeListener(Brows... | 3.26 |
framework_LegacyWindow_removeAllComponents_rdh | /**
* This implementation removes the components from the content container (
* {@link #getContent()}) instead of from the actual UI.
*
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
*/
public void removeAllComponents()... | 3.26 |
framework_LegacyWindow_getBrowserWindowWidth_rdh | /**
* Gets the last known width of the browser window in which this UI resides.
*
* @return the browser window width in pixels
* @deprecated As of 7.0, use the similarly named api in Page instead
*/
@Deprecated
public int getBrowserWindowWidth() {
return getPage().getBrowserWindowWidth();
} | 3.26 |
framework_LegacyWindow_getBrowserWindowHeight_rdh | /**
* Gets the last known height of the browser window in which this UI
* resides.
*
* @return the browser window height in pixels
* @deprecated As of 7.0, use the similarly named api in Page instead
*/
@Deprecated
public int getBrowserWindowHeight() {
return
getPage().getBrowserWindowHeight();
} | 3.26 |
framework_LegacyWindow_removeComponent_rdh | /**
* This implementation removes the component from the content container (
* {@link #getContent()}) instead of from the actual UI.
*
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
*/
public void removeComponent(Compon... | 3.26 |
framework_LegacyWindow_setContent_rdh | /**
* Set the content of the window. For a {@link LegacyWindow}, the content
* must be a {@link ComponentContainer}.
*
* @param content
*/
@Override
public void setContent(Component content) {
if (!(content instanceof ComponentContainer)) {
throw new IllegalArgumentException("The content of a LegacyW... | 3.26 |
framework_LegacyWindow_setName_rdh | /**
* Sets the unique name of the window. The name of the window is used to
* uniquely identify it inside the application.
* <p>
* The name also determines the URL that can be used for direct access to a
* window. All windows can be accessed through
* {@code http://host:port/app/win} where {@code http://host:port... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.