name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_VDateField_setReadonly_rdh
/** * Sets whether this widget should be read-only or not. * * @param readonly * {@code true} if read-only, {@code false} otherwise */ public void setReadonly(boolean readonly) { this.readonly = readonly; }
3.26
framework_VDateField_setDefaultDate_rdh
/** * Set the default date using a map with date values. * * @see #setCurrentDate(Map) * @param defaultValues * a map from resolutions to date values * @since 8.1.2 */ public void setDefaultDate(Map<R, Integer> defaultValues) {setDefaultDate(getDate(defaultValues));}
3.26
framework_VDateField_sendBufferedValues_rdh
/** * Sends the {@link #bufferedDateString} and {@link #bufferedResolutions} to * the server, and clears their values. * * @since 8.2 */ public void sendBufferedValues() { rpc.update(bufferedDateString, bufferedResolutions.entrySet().stream().collect(Collectors.toMap(entry -> entry.getKey().name(), entry -> en...
3.26
framework_VDateField_sendBufferedValuesWithDelay_rdh
/** * Puts the {@link #bufferedDateString} and {@link #bufferedResolutions} * changes into the rpc queue and clears their values. * <p> * Note: The value will not be sent to the server immediately. It will be * sent when a non {@link com.vaadin.shared.annotations.Delayed} annotated * rpc is triggered. * </p> * ...
3.26
framework_VDateField_setShowISOWeekNumbers_rdh
/** * Sets whether ISO 8601 week numbers should be shown in the date selector * or not. ISO 8601 defines that a week always starts with a Monday so the * week numbers are only shown if this is the case. * * @param showISOWeekNumbers * {@code true} if week number should be shown, {@code false} * otherwise */...
3.26
framework_VDateField_getResolutions_rdh
/** * Returns all available resolutions for the field in the ascending order * (which is the same as order of enumeration ordinals). * <p> * The method uses {@link #doGetResolutions()} to make sure that the order * is the correct one. * * @see #doGetResolutions() * @return stream of all available resolutions in...
3.26
framework_VDateField_getId_rdh
/** * Returns the connector id that corresponds with this widget. * * @return the connector id * @deprecated This method is not used by the framework code anymore. */ @Deprecatedpublic String getId() { return connector.getConnectorId(); }
3.26
framework_GridAlignment_buildLayout_rdh
/** * Build Layout for test */ private void buildLayout() { layout.setColumns(3); layout.setRows(3); for (int i = 0; i < components.length; i++) { layout.addComponent(components[i]); layout.setComponentAlignment(components[i], alignments[i]); } }
3.26
framework_FileResource_setBufferSize_rdh
/** * Sets the size of the download buffer used for this resource. * * @param bufferSize * the size of the buffer in bytes. */ public void setBufferSize(int bufferSize) {this.bufferSize = bufferSize; }
3.26
framework_FileResource_setCacheTime_rdh
/** * Sets the length of cache expiration time. This gives the adapter the * possibility cache streams sent to the client. The caching may be made in * adapter or at the client if the client supports caching. Zero or negative * value disables the caching of this stream. * * @param cacheTime * the cache time in...
3.26
framework_FileResource_setSourceFile_rdh
/** * Sets the source file. * * @param sourceFile * the source file to set. */ private void setSourceFile(File sourceFile) { this.sourceFile = sourceFile; }
3.26
framework_ScrollbarBundle_setScrollPos_rdh
/** * Sets the scroll position of the scrollbar in the axis the scrollbar is * representing. * <p> * <em>Note:</em> Even though {@code double} values are used, they are * currently only used as integers as large {@code int} (or small but fast * {@code long}). This means, all values are truncated to zero decimal ...
3.26
framework_ScrollbarBundle_setOffsetSizeAndScrollSize_rdh
/** * Sets the length of the scrollbar and the amount of pixels the scrollbar * needs to be able to scroll through. * * @param offsetPx * the length of the scrollbar in pixels * @param scrollPx * the number of pixels the scrollbar should be able...
3.26
framework_ScrollbarBundle_setLocked_rdh
/** * Locks or unlocks the scrollbar bundle. * <p> * A locked scrollbar bundle will refuse to scroll, both programmatically * and via user-triggered events. * * @param isLocked * <code>true</code> to lock, <code>false</code> to unlock */ public void setLocked(boolean isLocked) { this.isLocked = isLocked; ...
3.26
framework_ScrollbarBundle_setStylePrimaryName_rdh
/** * Sets the primary style name. * * @param primaryStyleName * The primary style name to use */ public void setStylePrimaryName(String primaryStyleName) { root.setClassName(primaryStyleName + "-scroller"); }
3.26
framework_ScrollbarBundle_addVisibilityHandler_rdh
/** * Adds handler for the scrollbar handle visibility. * * @param handler * the {@link VisibilityHandler} to add * @return {@link HandlerRegistration} used to remove the handler */ public HandlerRegistration addVisibilityHandler(final VisibilityHandler handler) { return getHandlerManager().addHandler(Visib...
3.26
framework_ScrollbarBundle_showsScrollHandle_rdh
/** * Checks whether the scrollbar's handle is visible. * <p> * In other words, this method checks whether the contents is larger than * can visually fit in the element. * * @return <code>true</code> if the scrollbar's handle is visible */ public boolean showsScrollHandle() { return (getScrollSize() - getO...
3.26
framework_ScrollbarBundle_getHandlerManager_rdh
/** * Returns the handler manager for this scrollbar bundle. * * @return the handler manager */ protected HandlerManager getHandlerManager() { if (handlerManager == null) { handlerManager = new HandlerManager(this);} return handlerManager; }
3.26
framework_ScrollbarBundle_setScrollSize_rdh
/** * Sets the amount of pixels the scrollbar needs to be able to scroll * through. * * @param px * the number of pixels the scrollbar should be able to scroll * through * @see #setOffsetSizeAndScrollSize(double, double) */public final void setScrollSize(final double px) { boolean v7 = px <= getOffsetSi...
3.26
framework_ScrollbarBundle_updateScrollPosFromDom_rdh
/** * This is a method that JSNI can call to synchronize the object state from * the DOM. */ private final void updateScrollPosFromDom() { /* TODO: this method probably shouldn't be called from Escalator's JSNI, but probably could be handled internally by this listening to its own element. Would clean up...
3.26
framework_ScrollbarBundle_m1_rdh
/** * Force the scrollbar to be visible with CSS. In practice, this means to * set either <code>overflow-x</code> or <code>overflow-y</code> to " * <code>scroll</code>" in the scrollbar's direction. * <p> * This method is an IE8 workaround, since it doesn't always show scrollbars * with <code>overflow: auto</code...
3.26
framework_ScrollbarBundle_truncate_rdh
/** * Truncates a double such that no decimal places are retained. * <p> * E.g. {@code trunc(2.3d) == 2.0d} and {@code trunc(-2.3d) == -2.0d}. * * @param num * the double value to be truncated * @return the {@code n...
3.26
framework_ScrollbarBundle_toString_rdh
/** * Event type. */ public static final Type<VisibilityHandler> TYPE = new Type<ScrollbarBundle.VisibilityHandler>() { @Override public String toString() { return "VisibilityChangeEvent";}
3.26
framework_ScrollbarBundle_recalculateMaxScrollPos_rdh
/** * Calculates and sets maximum scroll position based on the current scroll * size and the scrollbar's length. */ public void recalculateMaxScrollPos() { double scrollSize = getScrollSize(); double offsetSize = getOffsetSize(); maxScrollPos = Math.max(0, scrollSize - offsetSize); // make sure that ...
3.26
framework_ScrollbarBundle_setOffsetSize_rdh
/** * Sets the length of the scrollbar. * * @param px * the length of the scrollbar in pixels * @see #setOffsetSizeAndScrollSize(double, double) */ public final void setOffsetSize(final double px) { boolean newOffsetSizeIsGreaterThanScrollSize = px > getScrollSize();boolean offsetSizeBecomesGreaterThanScr...
3.26
framework_ScrollbarBundle_addScrollHandler_rdh
/** * Adds a scroll handler to the scrollbar bundle. * * @param handler * the handler to add * @return the registration object for the handler registration */ public HandlerRegistration addScrollHandler(final ScrollHandler handler) { return getHandlerManager().addHandler(ScrollEvent.TYPE, handler); }
3.26
framework_ScrollbarBundle_getScrollPos_rdh
/** * Gets the scroll position of the scrollbar in the axis the scrollbar is * representing. * * @return the new scroll position in pixels */ public final double getScrollPos() { int internalScrollPos = internalGetScrollPos(); assert Math.abs(internalScrollPos - toInt32(scrollPos)) <= 1 : ((("calculat...
3.26
framework_ScrollbarBundle_setScrollPosByDelta_rdh
/** * Modifies the scroll position of this scrollbar by a number of pixels. * <p> * <em>Note:</em> Even though {@code double} values are used, they are * currently only used as integers as large {@code int} (or small but fast * {@code long}). This means, all values are truncated to zero decimal * places. * * @p...
3.26
framework_ScrollbarBundle_getScrollbarThickness_rdh
/** * Gets the scrollbar's thickness. * <p> * This value will differ from the value in the DOM, if the thickness was * set to 0 with {@link #setScrollbarThickness(double)}, as the scrollbar is * then treated as "invisible." * * @return the scrollbar...
3.26
framework_VAbstractTextualDate_setISODate_rdh
/** * Sets the value of the date field as a locale independent ISO date * (yyyy-MM-dd'T'HH:mm:ss or yyyy-MM-dd depending on whether this is a date * field or a date and time field). * * @param isoDate * the date to set in ISO8601 format, or null to clear the date * value * @since 8.1 */ public void setISOD...
3.26
framework_VAbstractTextualDate_setPlaceholder_rdh
/** * Sets the placeholder for this textual date input. * * @param placeholder * the placeholder to set, or {@code null} to clear */ public void setPlaceholder(String placeholder) { if (placeholder != null) {text.getElement().setAttribute("placeholder", placeholder); } else { text.getElement().r...
3.26
framework_VAbstractTextualDate_getISODate_rdh
/** * Gets the value of the date field as a locale independent ISO date * (yyyy-MM-dd'T'HH:mm:ss or yyyy-MM-dd depending on whether this is a date * field or a date and time field). * * @return the current date in ISO8601 format, or null if no date is set * @since 8.1 */ public String getISODate() { Date dat...
3.26
framework_VAbstractTextualDate_checkGroupFocus_rdh
/** * Checks if the group focus has changed, and sends to the server if needed. * * @param textFocus * the focus of the {@link #text} * @since 8.3 */ pr...
3.26
framework_VAbstractTextualDate_setFormatString_rdh
/** * Sets the date format string to use for the text field. * * @param formatString * the format string to use, or {@code null} to force re-creating * the format string from the locale the next time it is needed * @since 8.1 */ public void setFormatString(String formatString) { this.formatStr = formatSt...
3.26
framework_VAbstractTextualDate_buildDate_rdh
/** * Updates the text field according to the current date (provided by * {@link #getDate()}). Takes care of updating text, enabling and disabling * the field, setting/removing readonly status and updating readonly styles. * <p> * For internal use only. May be removed or replaced in the future. * <p> * TODO: Spl...
3.26
framework_VAbstractTextualDate_cleanFormat_rdh
/** * Clean date format string to make it suitable for * {@link #getFormatString()}. * * @see #getFormatString() * @param format * date format string * @return cleaned up string */protected String cleanFormat(String format) { // Remove unsupported patterns // TODO support for 'G', era designator (use...
3.26
framework_VAbstractTextualDate_getFormatString_rdh
/** * Gets the date format string for the current locale. * * @return the format string */ public String getFormatString() { if (formatStr == null) {setFormatString(createFormatString()); } return formatStr; }
3.26
framework_VAbstractTextualDate_updateBufferedResolutions_rdh
/** * Updates {@link VDateField#bufferedResolutions bufferedResolutions} before * sending a response to the server. * <p> * The method can be overridden by subclasses to provide a custom logic for * date variables to avoid overriding the {@link #onChange(ChangeEvent)} * method. * * <p> * Note that this method ...
3.26
framework_VaadinPortletRequest_getPortletRequest_rdh
/** * Gets the original, unwrapped portlet request. * * @return the unwrapped portlet request */public PortletRequest getPortletRequest() { return getRequest(); }
3.26
framework_ViewBeforeLeaveEvent_navigate_rdh
/** * Performs the navigation which triggered the event in the first place. */ public void navigate() { if (navigateRun) { throw new IllegalStateException("navigate() can only be called once"); } action.run(); navigateRun = true; } /** * Checks if the navigate command has been executed. * ...
3.26
framework_BeanValidationBinder_getRequiredConfigurator_rdh
/** * Gets field required indicator configuration logic. * * @see #setRequiredConfigurator(RequiredFieldConfigurator) * @return required indicator configurator, may be {@code null} */ public RequiredFieldConfigurator getRequiredConfigurator() { return requiredConfigurator; }
3.26
framework_BeanValidationBinder_setRequiredConfigurator_rdh
/** * Sets a logic which allows to configure require indicator via * {@link HasValue#setRequiredIndicatorVisible(boolean)} based on property * descriptor. * <p> * Required indicator configuration will not be used at all if * {@code configurator} is null. * <p> * By default the {@link RequiredFieldConfigurator#D...
3.26
framework_BeanValidationBinder_findBeanType_rdh
/** * Finds the bean type containing the property the given definition refers * to. * * @param beanType * the root beanType * @param definition * the definition for the property * @return the bean type containing the given property */ @SuppressWarnings({ "rawtypes" }) private Class<?> findBeanType(Class<BE...
3.26
framework_CompositeErrorMessage_addErrorMessage_rdh
/** * Adds a error message into this composite message. Updates the level * field. * * @param error * the error message to be added. Duplicate errors are ignored. */ private void addErrorMessage(ErrorMessage error) { if ((error != null) && (!getCauses().contains(error))) {addCause(error); if (error....
3.26
framework_CompositeErrorMessage_toString_rdh
/** * Returns a comma separated list of the error messages. * * @return String, comma separated list of error messages. */ @Override public String toString() { String retval = "["; int pos = 0; for (ErrorMessage errorMessage : getCauses()) { if (pos > 0) { retval += ","; } ...
3.26
framework_EncodeUtil_rfc5987Encode_rdh
/** * Encodes the given string to UTF-8 <code>value-chars</code> as defined in * RFC5987 for use in e.g. the <code>Content-Disposition</code> HTTP header. * * @param value * the string to encode, not <code>null</code> * @return the encoded string */ public static String rfc5987Encode(String value) { String...
3.26
framework_ConnectorFocusAndBlurHandler_removeHandlers_rdh
/** * Remove all handlers from the widget and the connector. */ public void removeHandlers() { if (focusRegistration != null) { focusRegistration.removeHandler(); } if (blurRegistration != null) { blurRegistration.removeHandler(); } if (stateChangeRegistration != null) { st...
3.26
framework_ItemClickListener_itemClick_rdh
/** * Invoked when this listener receives a item click event from a Grid to * which it has been added. * * @param event * the received event, not null */ public void itemClick(Grid.ItemClick<T> event) { }
3.26
framework_JsonDecoder_decodeValue_rdh
/** * Decode a JSON array with two elements (type and value) into a client-side * type, recursively if necessary. * * @param jsonValue * JSON value with encoded data * @param connection * reference to the current ApplicationConnection * @return decoded value (does not contain JSON types) */ public static O...
3.26
framework_VPanel_setCaption_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void setCaption(String text, boolean captionAsHtml) { if (captionAsHtml) {captionText.setInnerHTML(text); } else { captionText.setInnerText(text); }}
3.26
framework_VPanel_m0_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void m0(String iconUri, ApplicationConnection client) { if (icon != null) { captionNode.removeChild(icon.getElement()); } icon = client.getIcon(iconUri); if (icon != null) { ...
3.26
framework_VPanel_setFocus_rdh
/** * Sets the keyboard focus on the Panel. * * @param focus * Should the panel have focus or not. */ public void setFocus(boolean focus) { if (focus) { getContainerElement().focus(); } else { getContainerElement().blur(); } }
3.26
framework_StringDecorator_group_rdh
/** * Groups a string by surrounding it in parenthesis. * * @param str * the string to group * @return the grouped string */ public String group(String str) { return ("(" + str) + ")"; }
3.26
framework_StringDecorator_quote_rdh
/** * Surround a string with quote characters. * * @param str * the string to quote * @return the quoted string */ public String quote(Object str) { return (quoteStart + str) + quoteEnd; }
3.26
framework_MonthGrid_setRangeSelect_rdh
/** * Disable or enable possibility to select ranges. */ public void setRangeSelect(boolean b) { rangeSelectDisabled = !b;}
3.26
framework_SliderElement_getValue_rdh
/** * Get value of the slider * * Warning! This method cause slider popup to appear on the screen. To hide * this popup just focus any other element on the page. */ public String getValue() { WebElement popupElem = findElement(By.vaadin("#popup")); return popupElem.getAttribute("textContent"); }
3.26
framework_StringToByteConverter_getFormat_rdh
/** * Returns the format used by * {@link #convertToPresentation(Byte, Class, Locale)} and * {@link #convertToModel(String, Class, Locale)}. * * @param locale * The locale to use * @return A NumberFormat instance */ @Override protected NumberFormat getFormat(Locale ...
3.26
framework_VAbstractSplitPanel_showDraggingCurtain_rdh
/** * Used in FF to avoid losing mouse capture when pointer is moved on an * iframe. */ private void showDraggingCurtain() { if (!isDraggingCurtainRequired()) { return;} if (draggingCurtain == null) { draggingCurtain = DOM.createDiv(); draggingCurtain.getStyle().setPosition(Position.ABSOLUTE); draggingCurtain.getSty...
3.26
framework_VAbstractSplitPanel_updateSizes_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void updateSizes() { if (!isAttached()) { return; } switch (orientation) { case HORIZONTAL : horizontalOrientationUpdateSizes();break; case VERTICAL : verticalOrientationUpdateSizes(); break; default : throw new IllegalStateException("Ne...
3.26
framework_VAbstractSplitPanel_getFirstWidget_rdh
/** * Returns the widget in the first region, if any. * * @return the widget in the first region, or {@code null} if not set */ public Widget getFirstWidget() { return firstChild; }
3.26
framework_VAbstractSplitPanel_setStylenames_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void setStylenames() {final String splitterClass = CLASSNAME + (orientation == Orientation.HORIZONTAL ? "-hsplitter" : "-vsplitter"); final String firstContainerClass = CLASSNAME + "-first-container";final String secondContainerClass = C...
3.26
framework_VAbstractSplitPanel_onMouseDown_rdh
/** * Handle initiating content resize and moving of the split position when * clicking the splitter with a mouse. If the click targets any other * element, the split position is locked, or this split panel is not * enabled, nothing is done. * * @param event * the browser event */ public void onMouseDown(Even...
3.26
framework_VAbstractSplitPanel_onMouseUp_rdh
/** * Handle concluding the content resize when dragging the splitter with a * mouse. This should only be called if resizing has been successfully * initialized via a mouse down event. * * @param event * the browser event */ public void onMouseUp(Event event) { DOM.releaseCapture(getElement()); hideDraggingCur...
3.26
framework_VAbstractSplitPanel_makeScrollable_rdh
/** * Ensures the panels are scrollable e.g. after style name changes * <p> * For internal use only. May be removed or replaced in the future. */ public void makeScrollable() { if (touchScrollHandler == null) { touchScrollHandler = TouchScrollDelegate.enableTouchScrolling(this); }touchScrollHandler.addElement(first...
3.26
framework_VAbstractSplitPanel_setSplitPosition_rdh
/** * Sets the position of the splitter element. * * @param pos * the required position as either percentage or pixels */ public void setSplitPosition(String pos) { setSplitPosition(pos, true); }
3.26
framework_VAbstractSplitPanel_isDraggingCurtainRequired_rdh
/** * A dragging curtain is required in Gecko and Webkit. * * @return true if the browser requires a dragging curtain */ private boolean isDraggingCurtainRequired() { return BrowserInfo.get().isGecko() || BrowserInfo.get().isWebkit(); }
3.26
framework_VAbstractSplitPanel_setLocked_rdh
/** * For internal use only. May be removed or replaced in the future. * * @param newValue * {@code true} if split position should be locked, {@code false} * otherwise */ public void setLocked(boolean newValue) { if (locked != newValue) { locked = newValue;splitterSize = -1; setStylenames(); } }
3.26
framework_VAbstractSplitPanel_setSecondWidget_rdh
/** * For internal use only. May be removed or replaced in the future. * * @param w * the widget to set to the second region or {@code null} to * remove previously set widget */ public void setSecondWidget(Widget w) { if (secondChild == w) { return; } if (secondChild != null) { secondChild.removeFromParent();...
3.26
framework_VAbstractSplitPanel_setFirstWidget_rdh
/** * For internal use only. May be removed or replaced in the future. * * @param w * the widget to set to the first region or {@code null} to * remove previously set widget */public void setFirstWidget(Widget w) { if (firstChild == w) { return; } if (firstChild != null) { firstChild.removeFromParent(); } if ...
3.26
framework_VAbstractSplitPanel_getSecondWidget_rdh
/** * Returns the widget in the second region, if any. * * @return the widget in the second region, or {@code null} if not set */ public Widget getSecondWidget() { return secondChild; }
3.26
framework_VAbstractSplitPanel_setPositionReversed_rdh
/** * For internal use only. May be removed or replaced in the future. * * @param reversed * {@code true} if split position should be measured from the * second region, {@code false} (default) if from the the first * region */ public void setPositionReversed(boolean reversed) { if (positionReversed != reve...
3.26
framework_VAbstractSplitPanel_constructDom_rdh
/** * Constructs the DOM structure for this widget. */ protected void constructDom() { DOM.appendChild(splitter, DOM.createDiv());// for styling DOM.appendChild(getElement(), wrapper); wrapper.getStyle().setPosition(Position.RELATIVE); wrapper.getStyle().setWidth(100, Unit.PCT); wrapper.getStyle().setHeight(100, Un...
3.26
framework_VAbstractSplitPanel_setEnabled_rdh
/** * Sets this split panel enabled. * * @param enabled * {@code true} if enabled, {@code false} if disabled */ public void setEnabled(boolean enabled) { this.enabled = enabled; }
3.26
framework_VAbstractSplitPanel_convertToPercentage_rdh
/** * Converts given split position string (in pixels or percentage) to a float * percentage value. * * @param pos * @return */ private float convertToPercentage(String pos) { if (pos.endsWith("px")) { float pixelPosition = Float.parseFloat(pos.substring(0, pos.length() - 2)); int offsetLength = (orientation == ...
3.26
framework_VAbstractSplitPanel_isEnabled_rdh
/** * Returns whether this split panel is enabled or not. * * @return {@code true} if enabled, {@code false} if disabled */ public boolean isEnabled() { return enabled; }
3.26
framework_VAbstractSplitPanel_getSecondContainer_rdh
/** * Gets the second region's container element. * * @since 7.5.1 * @return the container element */ protected Element getSecondContainer() { return secondContainer; }
3.26
framework_VAbstractSplitPanel_getFirstContainer_rdh
/** * Gets the first region's container element. * * @since 7.5.1 * @return the container element */ protected Element getFirstContainer() { return firstContainer; }
3.26
framework_VAbstractSplitPanel_convertToPositionUnits_rdh
/** * Converts given string to the same units as the split position is. * * @param pos * position to be converted * @return converted position string */private String convertToPositionUnits(String pos) { if ((position.indexOf("%") != (-1)) && (pos.indexOf("%") == (-1))) { // position is in percentage, pos in p...
3.26
framework_VAbstractSplitPanel_onMouseMove_rdh
/** * Handle updating the splitter position when dragging the splitter with a * mouse. This should only be called if content resizing has been * successfully initialized via a mouse down event. * * @param event * the browser event */ public void onMouseMove(Event event) { switch (orientation) { case HORIZONTAL...
3.26
framework_VAbstractSplitPanel_convertToPixels_rdh
/** * Converts given split position string (in pixels or percentage) to a * floating point pixel value. * * @param pos * @return */ private float convertToPixels(String pos) { float posAsFloat; if (pos.indexOf("%") > 0) { posAsFloat = Math.round((Float.parseFloat(pos.substring(0, pos.length() - 1)) / 100) * (ori...
3.26
framework_VAbstractSplitPanel_hideDraggingCurtain_rdh
/** * Hides dragging curtain */ private void hideDraggingCurtain() { if (draggingCurtain != null) { wrapper.removeChild(draggingCurtain); draggingCurtain = null; } }
3.26
framework_AbstractSplitPanelConnector_handleSingleComponentMove_rdh
/** * Handles the case when there is only one child component and that * component is moved between first <-> second. This does not trigger a * hierarchy change event as the list of children contains the same * component in both cases. */ private void handleSingleComponentMove() { if (getChildComponents().size...
3.26
framework_GridConnector_detailsOpened_rdh
/** * Inform LazyDetailsScroller that a details row has opened on a row. * * @param rowIndex * index of row with details now open */ public void detailsOpened(int rowIndex) { if (targetRow == rowIndex) { getWidget().scrollToRow(targetRow, destination); disableScroller.run(); } }
3.26
framework_GridConnector_getRowKey_rdh
/** * Gets the row key for a row object. * * @param row * the row object * @return the key for the given row */ public String getRowKey(JsonObject row) { final Object key = dataSource.getRowKey(row); assert key instanceof String : ((("Internal key was not a String but a " + key.getClass().getSimpleName()) + " (...
3.26
framework_GridConnector_setRenderer_rdh
/** * Sets a new renderer for this column object * * @param rendererConnector * a renderer connector object */ public void setRenderer(AbstractGridRendererConnector<Object> rendererConnector) { setRenderer(rendererConnector.getRenderer()); this.rendererConnector = rendererConnector; }
3.26
framework_GridConnector_purgeRemovedColumns_rdh
/** * Removes any orphan columns that has been removed from the state from the * grid */ private void purgeRemovedColumns() { // Get columns still registered in the state Set<String> columnsInState = new HashSet<String>(); for (GridColumnState columnState : getState().columns) { columnsInState.add(columnState.id); ...
3.26
framework_GridConnector_getId_rdh
/** * Fetches id from the row object that corresponds with the given * rowIndex. * * @since 7.6.1 * @param rowIndex * the index of the row for which to fetch the id * @return id of the row if such id exists, {@code null} otherwise */ private String getId(int rowIndex) {...
3.26
framework_GridConnector_updateColumnsFromState_rdh
/** * Update columns from the current state. */ private void updateColumnsFromState() { this.columnsUpdatedFromState = true; final List<Column<?, JsonObject>> columns = new ArrayList<Column<?, JsonObject>>(getState().columns.size()); for (String columnId : getState().columnOrder) { for (GridColumnState state : getSta...
3.26
framework_GridConnector_getColumnErrors_rdh
/** * Creates a concatenation of all columns errors for Editor. * * @since 7.6 * @return displayed error string */ private String getColumnErrors() { List<String> errors = new ArrayList<String>(); for (Grid.Column<?, JsonObject> c : getWidget().getColumns()) { if (!(c instanceof CustomGridColumn)) { continue; } St...
3.26
framework_GridConnector_getDetailsListener_rdh
/** * Gets the listener used by this connector for tracking when row detail * visibility changes. * * @since 7.5.0 * @return the used details listener */ public DetailsListener getDetailsListener() { return detailsListener; }
3.26
framework_TableScroll_initProperties_rdh
// set up the properties (columns) private void initProperties(Table table) { for (int i = 0; i < COLUMNS; i++) { table.addContainerProperty("property" + i, String.class, "some value"); } }
3.26
framework_TableScroll_fillTable_rdh
// fill the table with some random data private void fillTable(Table table) { initProperties(table); for (int i = 0; i < ROWS; i++) { String[] line = new String[COLUMNS]; for (int j = 0; j < COLUMNS; j++) {line[j] = (("col=" + j) + " row=") + i; } table...
3.26
framework_VColorPickerGradient_setCursor_rdh
/** * Sets the latest coordinates for pressed-down mouse cursor and updates the * cross elements. * * @param x * x-coordinate * @param y * y-coordinate */ public void setCursor(int x, int y) { cursorX = x; cursorY = y; if (x >= 0) { lowercross.getElement().getStyle().setWidth(x, Unit.PX)...
3.26
framework_VColorPickerGradient_setBGColor_rdh
/** * Sets the given css color as the background. * * @param bgColor * the color to set */ public void setBGColor(String bgColor) { if (bgColor == null) { background.getElement().getStyle().clearBackgroundColor(); } else { background.getElement().getStyle().set...
3.26
framework_VColorPickerGradient_m0_rdh
/** * Returns the latest x-coordinate for pressed-down mouse cursor. * * @return the latest x-coordinate */ public int m0() { return cursorX; }
3.26
framework_FocusElementPanel_getFocusElement_rdh
/** * * @return the focus element */ public Element getFocusElement() { return focusElement.cast();}
3.26
framework_Page_setLocation_rdh
/** * Navigates this page to the given URI. The contents of this page in the * browser is replaced with whatever is returned for the given URI. * <p> * This method should not be used to start downloads, as the client side * will assume the browser will navigate away when opening the URI. Use one * of the {@code P...
3.26
framework_Page_getUri_rdh
/** * Get the new URI. * * @return the new uri */ public String getUri() { return uri; }
3.26
framework_Page_m5_rdh
/** * Opens the given url in a window with the given name. Equivalent to * {@link #open(String, String, boolean) open} (url, windowName, true) . * <p> * The supplied {@code windowName} is used as the target name in a * window.open call in the client. This means that special values such as * "_blank", "_self", "_t...
3.26
framework_Page_paintContent_rdh
/** * Paints the open request. Should be painted inside the window. * * @param target * the paint target * @throws PaintException * if the paint operation fails */ private void paintContent(PaintTarget target) throws PaintException { target.startTag("open"); target.addAttribute("src", f1); if ...
3.26