name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_DeclarativeTestUI_getComponent_rdh
/** * Get access to the declaratively created component. This method typecasts * the component to the receiving type; if there's a mismatch between what * you expect and what's written in the design, this will fail with a * ClassCastException. * * @return a Vaadin component */ @SuppressWarnings("unchecked") publ...
3.26
framework_GridLayoutDetailsRowResize_setup_rdh
/** * Tests that details row resizes along with the contents properly. * * @author Vaadin Ltd */ @SuppressWarnings("deprecation")public class GridLayoutDetailsRowResize extends SimpleGridUI { @Overrideprotected void setup(VaadinRequest request) { final Grid<Person> grid = createGrid(); grid.setS...
3.26
framework_VCalendarAction_getActionEndDate_rdh
/** * Get the date and time when the action ends. * * @return */ public Date getActionEndDate() { return actionEndDate; }
3.26
framework_VCalendarAction_getActionStartDate_rdh
/** * Get the date and time when the action starts. * * @return */ public Date getActionStartDate() {return actionStartDate; }
3.26
framework_VCalendarAction_setActionStartDate_rdh
/** * Set the date when the actions start. * * @param actionStartDate * The date and time when the action starts */ public void setActionStartDate(Date actionStartDate) { this.actionStartDate = actionStartDate; }
3.26
framework_VCalendarAction_setActionEndDate_rdh
/** * Set the date and time when the action ends. * * @param actionEndDate * The date and time when the action ends */ public void setActionEndDate(Date actionEndDate) { this.actionEndDate = actionEndDate; }
3.26
framework_FlyweightCell_getColumn_rdh
/** * Returns the column index of the cell. * * @return the column index */ public int getColumn() { m0(); return column; }
3.26
framework_FlyweightCell_getElement_rdh
/** * Returns the element of the cell. Can be either a <code>TD</code> element * or a <code>TH</code> element. * * @return the element */ public TableCellElement getElement() { m0(); return element; }
3.26
framework_FlyweightCell_setElement_rdh
/** * Sets the DOM element for this FlyweightCell, either a <code>TD</code> or * a <code>TH</code>. It is the caller's responsibility to actually insert * the given element to the document when needed. * * @param element * the element corresponding to this cell, cannot be null */ public void setElement(TableCe...
3.26
framework_FlyweightCell_getRow_rdh
/** * Returns the row index of the cell. * * @return the row index */ public int getRow() { m0(); return row.getRow(); }
3.26
framework_FlyweightCell_getColSpan_rdh
/** * Return the colspan attribute of the element of the cell. * * @return the colspan attribute */ public int getColSpan() {m0(); return element.getPropertyInt(COLSPAN_ATTR); }
3.26
framework_FlyweightCell_setColSpan_rdh
/** * Set the colspan attribute for the element of the cell. * * @param numberOfCells * spanned cell count, must be at least 1 */ public void setColSpan(final int numberOfCells) { if (numberOfCells < 1) { throw new IllegalArgumentException("Number of cells should be more than 0"); } /* - ...
3.26
framework_FlyweightCell_m0_rdh
/** * Asserts that the flyweight cell has properly been set up before trying to * access any of its data. */ private void m0() { assert currentIterator != null : (("FlyweightCell was not properly " + "initialized. This is either a bug in Grid/Escalator ") + "or a Cell reference has been stored and reused ") + ...
3.26
framework_UniqueSerializable_hashCode_rdh
/** * A base class for generating an unique object that is serializable. * <p> * This class is abstract but has no abstract methods to force users to create * an anonymous inner class. Otherwise each instance will not be unique. * * @author Vaadin Ltd * @since 6.8.0 */public abstract class UniqueSerializable im...
3.26
framework_MouseEventDetails_getName_rdh
/** * Returns a human readable text representing the button. * * @return */ public String getName() { return name; }
3.26
framework_LogSection_setLimit_rdh
/** * Sets the log row limit. * * @param limit * The limit */ public void setLimit(int limit) { this.limit = limit; applyLimit(); // TODO should be persisted }
3.26
framework_LogSection_setScrollLock_rdh
/** * Activates or deactivates scroll lock * * @param locked */ void setScrollLock(boolean locked) { if (locked && (scrollTimer != null)) { scrollTimer.cancel(); scrollTimer = null; } else if ((!locked) && (scrollTimer == null)) { scrollTimer = new Timer() { @Override ...
3.26
framework_LogSection_maybeScroll_rdh
/** * Schedules a scoll if scroll lock is not active. */ private void maybeScroll() { if (scrollTimer != null) { scrollTimer.cancel(); scrollTimer.schedule(SCROLL_DELAY); } }
3.26
framework_LogSection_resetTimer_rdh
/** * Resets the timer and inserts a log row indicating this. */ private void resetTimer() { int sinceStart = VDebugWindow.getMillisSinceStart(); int sinceReset = VDebugWindow.resetTimer(); Element row = DOM.createDiv(); row.addClassName(VDebugWindow.STYLENAME + "-reset"); row.setInnerHTML(Icon.RE...
3.26
framework_LogSection_addRow_rdh
/** * Adds a row to the log, applies the log row limit by removing old rows if * needed, and scrolls new row into view if scroll lock is not active. * * @param level * @param msg * @return */ private Element addRow(Level level, String msg) { int sinceReset = VDebugWindow.getMillisSinceReset(); int since...
3.26
framework_LogSection_toggleScrollLock_rdh
/** * Toggles scroll lock, writes state to persistent storage. */ void toggleScrollLock() { setScrollLock(scrollTimer != null); Storage storage = Storage.getLocalStorageIfSupported(); if (storage == null) { return; } VDebugWindow.writeState(storage, "log-scrollLock", scrollTimer == null); ...
3.26
framework_LogSection_getLimit_rdh
/** * Gets the current log row limit. * * @return */ public int getLimit() { // TODO should be read from persistent storage return limit; }
3.26
framework_HierarchicalDataCommunicator_getParentIndex_rdh
/** * Returns parent index for the row or a negative value. * * @param item * the item to find the parent of * @return the parent index or a negative value for top-level items */ public Integer getParentIndex(T item) { return mapper.getParentIndex(item); }
3.26
framework_HierarchicalDataCommunicator_isExpanded_rdh
/** * Returns whether given item is expanded. * * @param item * the item to test * @return {@code true} if item is expanded; {@code false} if not */ public boolean isExpanded(T item) { return mapper.isExpanded(item); }
3.26
framework_HierarchicalDataCommunicator_doCollapse_rdh
/** * Collapses the given item and removes its sub-hierarchy. Calling this * method will have no effect if the row is already collapsed. The index is * provided by the client-side or calculated from a full data request. * {@code syncAndRefresh} indicates whether the changes should be * synchronised to the client a...
3.26
framework_HierarchicalDataCommunicator_doExpand_rdh
/** * Expands the given item at given index. Calling this method will have no * effect if the row is already expanded. The index is provided by the * client-side or calculated from a full data request. * * @param item * the item to expand * @param index * the index of the item * @see #expand(Object) * @de...
3.26
framework_HierarchicalDataCommunicator_getHierarchyMapper_rdh
/** * Returns the {@code HierarchyMapper} used by this data communicator. * * @return the hierarchy mapper used by this data communicator */ protected HierarchyMapper<T, ?> getHierarchyMapper() { return mapper; }
3.26
framework_HierarchicalDataCommunicator_setDataProvider_rdh
/** * Set the current hierarchical data provider for this communicator. * * @param dataProvider * the data provider to set, must extend * {@link HierarchicalDataProvider}, not <code>null</code> * @param initialFilter * the initial filter value to use, or <code>null</code> to not * use any initial filter...
3.26
framework_HierarchicalDataCommunicator_hasChildren_rdh
/** * Returns whether given item has children. * * @param item * the item to test * @return {@code true} if item has children; {@code false} if not */ public boolean hasChildren(T item) { return mapper.hasChildren(item); }
3.26
framework_HierarchicalDataCommunicator_expand_rdh
/** * Expands the given item at the given index. Calling this method will have * no effect if the item is already expanded. * * @param item * the item to expand * @param index * the index of the item */ public void expand(T item, Integer index) { doExpand(item, index, true); }
3.26
framework_HierarchicalDataCommunicator_setItemCollapseAllowedProvider_rdh
/** * Sets the item collapse allowed provider for this * HierarchicalDataCommunicator. The provider should return {@code true} for * any item that the user can collapse. * <p> * <strong>Note:</strong> This callback will be accessed often when sending * data to the client. The callback should not do any costly ope...
3.26
framework_HierarchicalDataCommunicator_m0_rdh
/** * Collapses the given item and removes its sub-hierarchy. Calling this * method will have no effect if the row is already collapsed. * * @param item * the item to collapse * @param index * the index of the item */ public void m0(T item, Integer index) { doCollapse(item, index, true); }
3.26
framework_VButton_onClick_rdh
/* ALL BELOW COPY-PASTED FROM GWT CustomButton */ /** * Called internally when the user finishes clicking on this button. The * default behavior is to fire the click event to listeners. Subclasses that * override {@link #onClickStart()} should override this method to restore * the normal widget display. * <p> * T...
3.26
framework_VButton_isTargetInsideButton_rdh
/** * Check if the event occurred over an element which is part of this button */ private boolean isTargetInsideButton(Event event) { Element to = event.getRelatedTarget(); return getElement().isOrHasChild(DOM.eventGetTarget(event)) && ((to == null) || (!getElement().isOrHasChild(to))); }
3.26
framework_VButton_setEnabled_rdh
/** * Sets whether this button is enabled. * * @param enabled * <code>true</code> to enable the button, <code>false</code> to * disable it */ @Override public final v...
3.26
framework_VButton_cleanupCaptureState_rdh
/** * Resets internal state if this button can no longer service events. This * can occur when the widget becomes detached or disabled. */ private void cleanupCaptureState() { if (isCapturing || isFocusing) { DOM.releaseCapture(getElement()); isCapturing = false; isFocusing = false; ...
3.26
framework_BootstrapHandler_getUriResolver_rdh
/** * Gets the URI resolver to use for bootstrap resources. * * @return the URI resolver * @since 8.1 */ public BootstrapUriResolver getUriResolver() { if (uriResolver == null) { uriResolver = new BootstrapUriResolver(this); } return uriResolver; }
3.26
framework_BootstrapHandler_getWidgetsetInfo_rdh
/** * Gets information about the widgetset to use. * * @return the widgetset which will be loaded */ public WidgetsetInfo getWidgetsetInfo() { if (widgetsetInfo == null) { widgetsetInfo = getWidgetsetForUI(this); } return widgetsetInfo; }
3.26
framework_BootstrapHandler_getBootstrapResponse_rdh
/** * Gets the bootstrap response object. * * @return the bootstrap response object */ public BootstrapFragmentResponse getBootstrapResponse() { return bootstrapResponse; }
3.26
framework_BootstrapHandler_getThemeName_rdh
/** * Override if required. * * @param context * @return */ public String getThemeName(BootstrapContext context) { UICreateEvent event = new UICreateEvent(context.getRequest(), context.getUIClass()); return context.getBootstrapResponse().getUIProvider().getTheme(event); }
3.26
framework_BootstrapHandler_getPushMode_rdh
/** * Gets the push mode to use. * * @return the desired push mode */ public PushMode getPushMode() { if (pushMode == null) { UICreateEvent event = new UICreateEvent(getRequest(), getUIClass()); pushMode = getBootstrapResponse().getUIProvider().getPushMode(event); if (pushMode == null) { pushMod...
3.26
framework_BootstrapHandler_getApplicationParameters_rdh
/** * Gets the application parameters specified by the BootstrapHandler. * * @return the application parameters which will be written on the page */ public JsonObject getApplicationParameters() { if (applicationParameters == null) { applicationParameters = BootstrapHandler.this.getApplicationParameters(this); ...
3.26
framework_BootstrapHandler_getAppId_rdh
/** * Gets the application id. * * The application id is defined by * {@link VaadinService#getMainDivId(VaadinSession, VaadinRequest, Class)} * * @return the application id */ public String getAppId() { if (appId == null) { appId = getRequest().getService().getMainDivId(getSession(), getRequest(), getUIClass...
3.26
framework_BootstrapHandler_getThemeUri_rdh
/** * Get the URI for the application theme. * * A portal-wide default theme is fetched from the portal shared resource * directory (if any), other themes from the portlet. * * @param context * @param themeName * @return */ public String getThemeUri(BootstrapContext context, String themeName) { VaadinRequest v...
3.26
framework_BootstrapHandler_getWidgetsetName_rdh
/** * * @return returns the name of the widgetset to use * @deprecated use {@link #getWidgetsetInfo()} instead */ @Deprecated public String getWidgetsetName() { return getWidgetsetInfo().getWidgetsetName(); }
3.26
framework_BootstrapHandler_setupMainDiv_rdh
/** * Method to write the div element into which that actual Vaadin application * is rendered. * <p> * Override this method if you want to add some custom html around around * the div element into which the actual Vaadin application will be * rendered. * * @param context * @throws IOException */ private void ...
3.26
framework_BootstrapHandler_getResponse_rdh
/** * Gets the Vaadin/HTTP response. * * @return the Vaadin/HTTP response */ public VaadinResponse getResponse() { return response; }
3.26
framework_BootstrapHandler_findAndEscapeThemeName_rdh
/** * Do not override. * * @param context * @return */ public String findAndEscapeThemeName(BootstrapContext context) { String v83 = getThemeName(context); if (v83 == null) { VaadinRequest request = context.getRequest(); v83 = request.getService().getConfiguredTheme(request); } // XSS preventation, theme names s...
3.26
framework_ValueChangeHandler_scheduleValueChange_rdh
/** * Called whenever a change in the value has been detected. Schedules a * value change to be sent to the server, depending on the current value * change mode. * <p> * Note that this method does not consider the {@link ValueChangeMode#BLUR} * mode but assumes that {@link #sendValueChange()} is called directly f...
3.26
framework_ValueChangeHandler_setValueChangeTimeout_rdh
/** * Sets the value change timeout to use. * * @see ValueChangeMode * @param valueChangeTimeout * the value change timeout */ public void setValueChangeTimeout(int valueChangeTimeout) { this.valueChangeTimeout = valueChangeTimeout; } /** * Checks whether the value change is scheduled for sending. * * @...
3.26
framework_QuerySortOrder_m0_rdh
/** * Creates a new query sort builder with given sorting using descending sort * direction. * * @param by * the string to sort by * @return the query sort builder */ public static QuerySortOrderBuilder m0(String by) {return new QuerySortOrderBuilder().thenDesc(by); }
3.26
framework_QuerySortOrder_asc_rdh
/** * Creates a new query sort builder with given sorting using ascending sort * direction. * * @param by * the string to sort by * @return the query sort builder */ public static QuerySortOrderBuilder asc(String by) { return new QuerySortOrderBuilder().thenAsc(by); }
3.26
framework_QuerySortOrder_getSorted_rdh
/** * Gets sorting information. * * @return sorting entity, usually field id */ @Override public String getSorted() { return super.getSorted(); }
3.26
framework_VScrollTable_getRequiredHeight_rdh
/** * * @return the height of scrollable body, subpixels ceiled. */ public int getRequiredHeight() { return (preSpacer.getOffsetHeight() + postSpacer.getOffsetHeight()) + WidgetUtil.getRequiredHeight(table); }
3.26
framework_VScrollTable_buildCaptionHtmlSnippet_rdh
/** * Helper function to build html snippet for column or row headers. * * @param uidl * possibly with values caption and icon * @return html snippet containing possibly an icon + caption text */ protected String buildCaptionHtmlSnippet(UIDL uidl) { String s = (uidl.hasAttribute("caption")) ? uidl.getStringAttr...
3.26
framework_VScrollTable_disableBrowserIntelligence_rdh
/** * Disable browser measurement of the table width. */ public void disableBrowserIntelligence() { hTableContainer.getStyle().setWidth(WRAPPER_WIDTH, Unit.PX); }
3.26
framework_VScrollTable_getNavigationRightKey_rdh
/** * Get the key that scroll to the right on the table. By default it is the * right arrow key but by overriding this you can change the key to whatever * you want. * * @return The keycode of the key */ protected int getNavigationRightKey() { return KeyCodes.KEY_RIGHT; }
3.26
framework_VScrollTable_getNavigationDownKey_rdh
/** * Get the key that moves the selection head downwards. By default it is the * down arrow key but by overriding this you can change the key to whatever * you want. * * @return The keycode of the key */ protected int getNavigationDownKey() {return KeyCodes.KEY_DOWN; }
3.26
framework_VScrollTable_isDefinedWidth_rdh
/** * Detects if width is fixed by developer on server side or resized to * current width by user. * * @return true if defined, false if "natural" width */ public boolean isDefinedWidth() { return definedWidth && (width >= 0); }
3.26
framework_VScrollTable_setText_rdh
/** * Sets the text of the footer. * * @param footerText * The text in the footer */ public void setText(String footerText) { if ((footerText == null) || footerText.equals("")) { footerText = "&nbsp;"; }DOM.setInnerHTML(captionContainer, footerText); }
3.26
framework_VScrollTable_updateBody_rdh
/** * For internal use only. May be removed or replaced in the future. * * @param uidl * which contains row data * @param firstRow * first row in data set * @param reqRows * amount of rows in data set */ public void updateBody(UIDL uidl, int firstRow, int reqRows) { int oldIndent = scrollBody.getMaxInden...
3.26
framework_VScrollTable_handleTouchEvent_rdh
/** * Special handler for touch devices that support native scrolling * * @return Whether the event was handled by this method. */ private boolean handleTouchEvent(final Event event) { boolean touchEventHandled = false; if (enabled && HAS_NATIVE_TOUCH_SCROLLLING) { touchContextProvider.handleTouchEvent(event); fin...
3.26
framework_VScrollTable_setUndefinedWidth_rdh
/** * Sets the width to undefined. */ public void setUndefinedWidth() { definedWidth = false; setWidth(-1, false); }
3.26
framework_VScrollTable_onBrowserEvent_rdh
/* React on click that occur on content cells only */ @Overridepublic void onBrowserEvent(final Event event) { final boolean touchEventHandled = handleTouchEvent(event); if (enabled && (!touchEventHandled)) { final int type = event.getTypeInt(); final Element targetTdOrTr = getEventTargetTdOrTr(event); if (type == Ev...
3.26
framework_VScrollTable_getContentAreaBorderHeight_rdh
/** * * @return border top + border bottom of the scrollable area of table */ private int getContentAreaBorderHeight() { if (contentAreaBorderHeight < 0) { scrollBodyPanel.getElement().getStyle().setOverflow(Overflow.HIDDEN); int oh = scrollBodyPanel.getOffsetHeight(); int ch = scrollBodyPanel.getElement().getProper...
3.26
framework_VScrollTable_isSelectable_rdh
/** * For internal use only. May be removed or replaced in the future. */ public boolean isSelectable() { return selectMode.getId() > SelectMode.NONE.getId(); }
3.26
framework_VScrollTable_resizeSortedColumnForSortIndicator_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void resizeSortedColumnForSortIndicator() { // Force recalculation of the captionContainer element inside the header // cell to accommodate for the size of the sort arrow. HeaderCell sortedHeader = tHead.getHeaderCell(sortColumn); if (s...
3.26
framework_VScrollTable_getNavigationStartKey_rdh
/** * Get the key the moves the selection to the beginning of the table. By * default this is the Home key but by overriding this you can change the * key to whatever you want. * * @return */ protected int getNavigationStartKey() { return KeyCodes.KEY_HOME; }
3.26
framework_VScrollTable_getHeaderPadding_rdh
/** * Returns the extra space that is given to the header column when column * width is determined by header text. * * @return extra space in pixels */ private int getHeaderPadding() { return scrollBody.getCellExtraWidth(); }
3.26
framework_VScrollTable_resizeCaptionContainer_rdh
/** * Makes room for the sorting indicator in case the column that the * header cell belongs to is sorted. This is done by resizing the width * of the caption container element by the correct amount */ public void resizeCaptionContainer(int rightSpacing) { int captionContainerWidth = (width - colResizeWidget.getOff...
3.26
framework_VScrollTable_disableAutoColumnWidthCalculation_rdh
/** * Disables the automatic calculation of all column widths by forcing * the widths to be "defined" thus turning off expand ratios and such. */ public void disableAutoColumnWidthCalculation(HeaderCell source) {for (HeaderCell cell : availableCells.values()) { cell.disableAutoWidthCalculation(); } // fire column ...
3.26
framework_VScrollTable_removeRowFromUnsentSelectionRanges_rdh
/** * Removes a key from a range if the key is found in a selected range * * @param key * The key to remove */ private void removeRowFromUnsentSelectionRanges(VScrollTableRow row) {Collection<SelectionRange> newRanges = null; for (Iterator<SelectionRange> iterator = selectedRowRanges.iterator(); iterator.hasNext...
3.26
framework_VScrollTable_selectSelectedRows_rdh
/** * For internal use only. May be removed or replaced in the future. */ public boolean selectSelectedRows(UIDL uidl) { boolean v33 = false; if (uidl.hasVariable("selected")) { final Set<String> selectedKeys = uidl.getStringArrayVariableAsSet("selected"); // Do not update focus if there is a single selected row // t...
3.26
framework_VScrollTable_addAndRemoveRows_rdh
/** * Inserts rows in the table body or removes them from the table body based * on the commands in the UIDL. * <p> * For internal use only. May be removed or replaced in the future. * * @param partialRowAdditions * the UIDL containing row updates. */ public void addAndRemoveRows(UIDL partialRowAdditions) { i...
3.26
framework_VScrollTable_getNavigationLeftKey_rdh
/** * Get the key that scrolls to the left in the table. By default it is the * left arrow key but by overriding this you can change the key to whatever * you want. * * @return The keycode of the key */ protected int getNavigationLeftKey() { return KeyCodes.KEY_LEFT; }
3.26
framework_VScrollTable_getHeaderCell_rdh
/** * Get's HeaderCell by it's column Key. * * Note that this returns HeaderCell even if it is currently collapsed. * * @param cid * Column key of accessed HeaderCell * @return HeaderCell */ public HeaderCell getHeaderCell(String cid) { return availableCells.get(cid); }
3.26
framework_VScrollTable_focusRowFromBody_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void focusRowFromBody() { if (selectedRowKeys.size() == 1) { // try to focus a row currently selected and in viewport String selectedRowKey = selectedRowKeys.iterator().next(); if (selectedRowKey != null) { VScrollT...
3.26
framework_VScrollTable_updateActionMap_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void updateActionMap(UIDL mainUidl) { UIDL actionsUidl = mainUidl.getChildByTagName("actions"); if (actionsUidl == null) { return; } for (final Object child : actionsUidl) { final UIDL action = ((UIDL) (child)); final String key =...
3.26
framework_VScrollTable_setFooterCell_rdh
/** * Set a footer cell for a specified column index. * * @param index * The index * @param cell * The footer cell */ public void setFooterCell(int index, FooterCell cell) { if (cell.isEnabled()) { // we're moving the cell DOM.removeChild(tr, cell.getElement()); orphan(cell);visibleCells.remove(cell); } if...
3.26
framework_VScrollTable_ensureCacheFilled_rdh
/** * Ensure we have the correct set of rows on client side, e.g. if the * content on the server side has changed, or the client scroll position * has changed since the last request. */ protected void ensureCacheFilled() { /** * Fixes cache issue #13576 where unnecessary rows are fetched */ if (isLazyScrollerActi...
3.26
framework_VScrollTable_getNavigationPageDownKey_rdh
/** * Get the key the moves the selection one page down in the table. By * default this is the Page Down key but by overriding this you can change * the key to whatever you want. * * @return */protected int getNavigationPageDownKey() { return KeyCodes.KEY_PAGEDOWN; }
3.26
framework_VScrollTable_onUnregister_rdh
/** * * @since 7.2.6 */ public void onUnregister() { if (addCloseHandler != null) { addCloseHandler.removeHandler(); } }
3.26
framework_VScrollTable_m3_rdh
/** * Selects a row where the current selection head is * * @param ctrlSelect * Is the selection a ctrl+selection * @param shiftSelect * Is the selection a shift+selection * @return Returns truw */ private void m3(boolean ctrlSelect, boolean shiftSelect) { if (focusedRow != null) { // Arrows mo...
3.26
framework_VScrollTable_getNavigationUpKey_rdh
/** * Get the key that moves the selection head upwards. By default it is the * up arrow key but by overriding this you can change the key to whatever * you want. * * @return The keycode of the key */ protected int getNavigationUpKey() { return KeyCodes.KEY_UP; }
3.26
framework_VScrollTable_updateHeight_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void updateHeight() { setContainerHeight(); if (initializedAndAttached) { updatePageLength(); } triggerLazyColumnAdjustment(false); /* setting height may affect wheter the component has scrollbars -> needs scrolling or not */ setPrope...
3.26
framework_VScrollTable_isWorkPending_rdh
/* Return true if component need to perform some work and false otherwise. */ @Override public boolean isWorkPending() { return lazyAdjustColumnWidths.isRunning(); }
3.26
framework_VScrollTable_getNavigationSelectKey_rdh
/** * Get the key that selects an item in the table. By default it is the space * bar key but by overriding this you can change the key to whatever you * want. * * @return */ protected int getNavigationSelectKey() { return CHARCODE_SPACE; }
3.26
framework_VScrollTable_isEnabled_rdh
/** * Is the cell enabled? * * @return True if enabled else False */ public boolean isEnabled() { return getParent() != null; }
3.26
framework_VScrollTable_getColWidth_rdh
/** * Returns the width available for column content. * * @param columnIndex * @return */ public int getColWidth(int columnIndex) { if (tBodyMeasurementsDone) { if (renderedRows.isEmpty()) { // no rows yet rendered return 0; } for (Widget row : renderedRows) { if (!(row instanceof VScrollTableGeneratedRow)) { Tabl...
3.26
framework_VScrollTable_getWidth_rdh
/** * Returns the pixels width of the footer cell. * * @return The width in pixels */ public int getWidth() { return width; }
3.26
framework_VScrollTable_m2_rdh
/** * Non-immediate variable update of column widths for a collection of * columns. * * @param columns * the columns to trigger the events for. */ private void m2(Collection<HeaderCell> columns) { String[] newSizes = new String[columns.size()]; int ix = 0; for (HeaderCell cell : columns) { n...
3.26
framework_VScrollTable_isSignificantMove_rdh
/** * Calculates how many pixels away the user's finger has traveled. This * reduces the chance of small non-intentional movements from canceling * the long press detection. * * @param event * the Event for which to check the move distance * @return true if this is considered an intentional move by the user *...
3.26
framework_VScrollTable_getExpandRatio_rdh
/** * Returns the expand ratio of the cell. * * @return The expand ratio */ public float getExpandRatio() { return expandRatio; }
3.26
framework_VScrollTable_m14_rdh
/** * Enable browser measurement of the table width. */ public void m14() { hTableContainer.getStyle().clearWidth(); }
3.26
framework_VScrollTable_moveFocusDown_rdh
/** * Moves the focus one step down * * @return Returns true if succeeded */ private boolean moveFocusDown() {return moveFocusDown(0); }
3.26
framework_VScrollTable_getMinWidth_rdh
/** * Returns the smallest possible cell width in pixels. * * @param includeIndent * - width should include hierarchy column indent if * applicable (VTreeTable only) * @param includeCellExtraWidth * - width should include paddings etc. * @return */private int getMinWidth(boolean includeIndent, boolean in...
3.26
framework_VScrollTable_handleNavigation_rdh
/** * Handles the keyboard events handled by the table. * * @param keycode * The key code received * @param ctrl * Whether {@code CTRL} was pressed * @param shift * Whether {@code SHIFT} was pressed * @return true if the navigation event was handled */ protected boolean handleNavigation(int keycode, boo...
3.26
framework_VScrollTable_insertRows_rdh
/** * Inserts rows as provided in the rowData starting at firstIndex. * * @param rowData * @param firstIndex * @param rows * the number of rows * @return a list of the rows added. */ protected List<VScrollTableRow> insertRows(UIDL rowData, int firstIndex, int rows) { aligns = tHead.getColumnAlignments(); fin...
3.26
framework_VScrollTable_selectFirstRenderedRowInViewPort_rdh
/** * Selects the first 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 first row */ public void selectFirstRenderedRowInViewPort(boolean focusOnly) { int index = firstRowInViewPort; VScrollTableRow f...
3.26
framework_VScrollTable_updateMaxIndent_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void updateMaxIndent() { int oldIndent = scrollBody.getMaxIndent(); scrollBody.calculateMaxIndent(); if (oldIndent != scrollBody.getMaxIndent()) { // indent updated, headers might need adjusting triggerLazyColumnAdjustment(true);...
3.26