name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_AbstractConnector_doInit_rdh
/** * Called once by the framework to initialize the connector. * <p> * Note that the shared state is not yet available when this method is * called. * <p> * Connector classes should override {@link #init()} instead of this method. */ @Override public final void doInit(String connectorId, ApplicationConnection c...
3.26
framework_AbstractConnector_unregisterRpc_rdh
/** * Unregisters an implementation for a server to client RPC interface. * * @param <T> * The type of the RPC interface that is being unregistered * @param rpcInterface * RPC interface * @param implementation * implementation to unregister */ protected <T extends ClientRpc> void unregisterRpc(Class<T> r...
3.26
framework_AbstractConnector_registerRpc_rdh
/** * Registers an implementation for a server to client RPC interface. * * Multiple registrations can be made for a single interface, in which case * all of them receive corresponding RPC calls. * * @param rpcInterface * RPC interface * @param implementation * implementation that should receive RPC calls ...
3.26
framework_AbstractConnector_forceStateChange_rdh
/** * Force the connector to recheck its state variables as the variables or * their meaning might have changed. * * @since 7.3 */ public void forceStateChange() { StateChangeEvent event = new FullStateChangeEvent(this); m1(event); }
3.26
framework_VaadinUriResolver_resolveVaadinUri_rdh
/** * Translates a Vaadin URI to a URL that can be loaded by the browser. The * following URI schemes are supported: * <ul> * <li><code>theme://</code> - resolves to the URL of the currently active * theme.</li> * <li><code>published://</code> - resolves to resources on the classpath ...
3.26
framework_VCustomField_setFocusDelegate_rdh
/** * Sets the focusable widget to focus instead of this custom field. * * @param focusDelegate * the widget to delegate focus to */public void setFocusDelegate(final Focusable focusDelegate) { this.focusDelegate = () -> focusDelegate.setFocus(true); }
3.26
framework_SingleSelectionModel_addSelectionListener_rdh
/** * {@inheritDoc } * <p> * Use {@link #addSingleSelectionListener(SingleSelectionListener)} for more * specific single selection event. * * @see #addSingleSelectionListener(SingleSelectionListener) */ @Override public default Registration addSelectionListener(SelectionListener<T> listener) {return addSingleSel...
3.26
framework_FileTypeResolver_getIcon_rdh
/** * Gets the descriptive icon representing a file. First the mime-type for * the given file name is resolved, and then the corresponding icon is * fetched from the internal icon storage. If it is not found the default * icon is returned. * * @param file * the file whose icon is requested. * @return the icon...
3.26
framework_FileTypeResolver_getMIMETypeToIconMapping_rdh
/** * Gets the internal mime-type to icon mapping. * * @return unmodifiable map containing the current mime-type to icon mapping */ public static Map<String, Resource> getMIMETypeToIconMapping() { return Collections.unmodifiableMap(MIME_TO_ICON_MAP); }
3.26
framework_FileTypeResolver_addIcon_rdh
/** * Adds a icon for the given mime-type. If the mime-type also has a * corresponding icon, it is replaced with the new icon. * * @param mimeType * the mime-type whose icon is to be changed. * @param icon * the new icon to be associated with <code>MIMEType</code>. */ public static void addIcon(String mimeT...
3.26
framework_TouchScrollDelegate_moveTransformationToScrolloffset_rdh
/** * Called at the end of scrolling. Moves possible translate values to * scrolltop, causing onscroll event. */private void moveTransformationToScrolloffset() { if (ANDROID_WITH_BROKEN_SCROLL_TOP) { scrolledElement.setPropertyInt("_vScrollTop", finalScrollTop); if (scrollHandler != null) { scrollHandler.onScroll(nu...
3.26
framework_TouchScrollDelegate_stopScrolling_rdh
/** * Forces the scroll delegate to cancels scrolling process. Can be called by * users if they e.g. decide to handle touch event by themselves after all * (e.g. a pause after touch start before moving touch -> interpreted as * long touch/click or drag start). */ public void stopScrolling() { handlerRegistration.r...
3.26
framework_TouchScrollDelegate_getWidget_rdh
/** * * @return The widget this {@link TouchScrollHandler} is connected to. */ protected Widget getWidget() { return f1; }
3.26
framework_TouchScrollDelegate_removeElement_rdh
/** * Unregisters the given element as scrollable. Should be called when a * previously-registered element is removed from the DOM to prevent * memory leaks. */ public void removeElement(Element scrollable) { scrollable.removeClassName(f0); if (requiresDelegate()) { delegate.scrollableElements.remove(scrollable...
3.26
framework_TouchScrollDelegate_addElement_rdh
/** * Registers the given element as scrollable. */ public void addElement(Element scrollable) { scrollable.addClassName(f0); if (requiresDelegate()) { delegate.scrollableElements.add(scrollable); } }
3.26
framework_TouchScrollDelegate_detectScrolledElement_rdh
/** * Detects if a touch happens on a predefined element and the element has * something to scroll. * * @param touch * @return */ private boolean detectScrolledElement(Touch touch) { Element target = touch.getTarget().cast(); for (Element el : scrollableElements) { if (el.isOrHasChild(target) && (el.getScrollHeig...
3.26
framework_TouchScrollDelegate_enableTouchScrolling_rdh
/** * Makes the given elements scrollable, either natively or by using a * TouchScrollDelegate, depending on platform capabilities. * * @param widget * The widget that contains scrollable elements * @param scrollables * The elements inside the widget that should be scrollable * @return A scroll handler for ...
3.26
framework_TouchScrollDelegate_getTimeStamp_rdh
/** * Long calculation are not very efficient in GWT, so this helper method * returns timestamp in double. * * @return */ public static double getTimeStamp() { return Duration.currentTimeMillis(); }
3.26
framework_TouchScrollDelegate_setElements_rdh
/** * Registers the given elements as scrollable, removing previously * registered scrollables from this handler. * * @param scrollables * The elements that should be scrollable */ public void setElements(Element... scrollables) {if (requiresDelegate()) { for (Element e : delegate.scrollableElements) ...
3.26
framework_TouchScrollDelegate_readPositionAndSpeed_rdh
/** * * @param event * @return */ private boolean readPositionAndSpeed(NativeEvent event) { Touch touch = event.getChangedTouches().get(0); lastClientY = touch.getClientY(); int eventIndx = nextEvent++; eventIndx = eventIndx % EVENTS_FOR_SPEED_CALC; eventTimeStamps[eventIndx] = getTimeStamp(); yPositions[eventIndx]...
3.26
framework_TouchScrollDelegate_init_rdh
/** * Attaches the scroll handler to the widget. This method must be called * once before calling any other method in this class. * * @param widget * The widget that contains scrollable elements * @param scrollables * The elements of the widget ...
3.26
framework_TouchScrollDelegate_isMoved_rdh
/** * Has user moved the touch. * * @return */ public boolean isMoved() { return moved;}
3.26
framework_TouchScrollDelegate_translateTo_rdh
/** * Note positive scrolltop moves layer up, positive translate moves layer * down. * * @param duration */ private void translateTo(int duration, final int fromY, final int finalY) { if (duration > 0) { transitionOn = true; momentum = new Animation() { @Override protected void onUpdate(double progress) { lastA...
3.26
framework_PublishedFileHandler_handleRequest_rdh
/** * Writes the connector resource identified by the request URI to the * response. If a published resource corresponding to the URI path is not * found, writes a HTTP Not Found error to the response. */ @Override public boolean handleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) t...
3.26
framework_GridClientColumnRendererConnector_createRenderer_rdh
/** * Creates a a renderer for a {@link Renderers} */private Renderer createRenderer(Renderers renderer) { switch (renderer) { case TEXT_RENDERER : return new TextRenderer(); case WIDGET_RENDERER : return new WidgetRenderer<String, Button>() { @Override public Button createWidget() { ...
3.26
framework_ServletPortletHelper_findLocale_rdh
/** * Helper to find the most most suitable Locale. These potential sources are * checked in order until a Locale is found: * <ol> * <li>The passed component (or UI) if not null</li> * <li>{@link UI#getCurrent()} if defined</li> * <li>The passed session if not null</li> * <li>{@link VaadinSession#getCurrent()} i...
3.26
framework_DateTimeFieldElement_setValue_rdh
/** * Set value of the date field element. * * @param chars * new value of the date field * @throws ReadOnlyException * if the date field is in readonly mode */ public void setValue(CharSequence chars) throws ReadOnlyException { if (isReadOnly()) { throw new ReadOnlyException(); } WebElem...
3.26
framework_DateTimeFieldElement_setDateTime_rdh
/** * Sets the value to the given date and time. * * @param value * the date and time to set. */ public void setDateTime(LocalDateTime value) { setISOValue(value.format(getISOFormatter())); }
3.26
framework_BeanValidator_apply_rdh
/** * Validates the given value as if it were the value of the bean property * configured for this validator. Returns {@code Result.ok} if there are no * JSR-303 constraint violations, a {@code Result.error} of chained * constraint violation messages otherwise. * <p> * Null values are accepted unless the property...
3.26
framework_BeanValidator_createContext_rdh
/** * Creates a simple message interpolation context based on the given * constraint violation. * * @param violation * the constraint violation * @return the message interpolation context */protected Context createContext(ConstraintViolation<?> violation) { return new ContextImpl(violation); }
3.26
framework_BeanValidator_getJavaxBeanValidatorFactory_rdh
/** * Returns the underlying JSR-303 bean validator factory used. A factory is * created using {@link Validation} if necessary. * * @return the validator factory to use */ protected static ValidatorFactory getJavaxBeanValidatorFactory() { return LazyFactoryInitializer.FACTORY; }
3.26
framework_BeanValidator_getJavaxBeanValidator_rdh
/** * Returns a shared JSR-303 validator instance to use. * * @return the validator to use */ public Validator getJavaxBeanValidator() { return getJavaxBeanValidatorFactory().getValidator(); }
3.26
framework_AbstractColorPickerConnector_refreshDefaultCaptionStyle_rdh
/** * Add/remove default caption style. */protected void refreshDefaultCaptionStyle() { if ((getState().showDefaultCaption && ((getState().caption == null) || getState().caption.isEmpty())) && getState().width.isEmpty()) { getWidget().addStyleName(DEFAULT_WIDTH_STYLE); } else { getWidget().rem...
3.26
framework_AbstractColorPickerConnector_getCaption_rdh
/** * Get caption for the color picker widget. * * @return the caption */ protected String getCaption() { if (getState().showDefaultCaption && ((getState().caption == null) || getState().caption.isEmpty())) {return getState().co...
3.26
framework_Buffered_getCause_rdh
/** * Gets the cause of the exception. * * @return The (first) cause for the exception, null if no cause. */@Override public final Throwable getCause() { if (causes.length == 0) { return null; } return causes[0];}
3.26
framework_Buffered_getErrorMessage_rdh
// Intentional change in compatibility package @Override public ErrorMessage getErrorMessage() { // no message, only the causes to be painted UserError error = new UserError(null); // in practice, this was always ERROR in Vaadin 6 unless tweaked in // custom exceptions implementing ErrorMessage err...
3.26
framework_Buffered_getCauses_rdh
/** * Gets all the causes for this exception. * * @return throwables that caused this exception */ public final Throwable[] getCauses() { return causes; }
3.26
framework_UIConnector_getHead_rdh
/** * Internal helper to get the <head> tag of the page * * @since 7.3 * @return the head element */ private HeadElement getHead() { return HeadElement.as(Document.get().getElementsByTagName(HeadElement.TAG).getItem(0)); }
3.26
framework_UIConnector_loadTheme_rdh
/** * Loads the given theme and replaces the given link element with the new * theme link element. * * @param newTheme * The name of the new theme * @param newThemeUrl * The url of the new theme * @param tagToReplace * The link element to replace. If null, then the new link * element is added at the e...
3.26
framework_UIConnector_analyzeLayouts_rdh
/** * Invokes the layout analyzer on the server. * * @since 7.1 */ public void analyzeLayouts() { getRpcProxy(DebugWindowServerRpc.class).analyzeLayouts(); }
3.26
framework_UIConnector_showServerDebugInfo_rdh
/** * Sends a request to the server to print details to console that will help * the developer to locate the corresponding server-side connector in the * source code. * * @since 7.1 * @param serverConnector * the connector to locate */ public void showServerDebugInfo(ServerConnector serverConnector) { getRpcP...
3.26
framework_UIConnector_getSubWindows_rdh
/** * Return a list of current sub-windows. This method is meant for testing * purposes only. * * @return a list of sub-windows */ public List<WindowConnector> getSubWindows() { List<WindowConnector> windows = new ArrayList<>(); for (ComponentConnector child : getChildComponents()) { if (child instanceof WindowCon...
3.26
framework_UIConnector_scrollIntoView_rdh
/** * Tries to scroll the viewport so that the given connector is in view. * * @param componentConnector * The connector which should be visible */ public void scrollIntoView(final ComponentConnector componentConnector) { if (componentConnector == null) { return; } Scheduler.get().scheduleDeferred(() -> componen...
3.26
framework_UIConnector_findStylesheetTag_rdh
/** * Finds a link tag for a style sheet with the given URL * * @since 7.3 * @param url * the URL of the style sheet * @return the link tag or null if no matching link tag was found */ private LinkElement findStylesheetTag(String url) { NodeList<Element> linkTags = getHead().getElementsByTagName(LinkElement.TA...
3.26
framework_UIConnector_getActiveTheme_rdh
/** * Returns the name of the theme currently in used by the UI. * * @since 7.3 * @return the theme name used by this UI */ public String getActiveTheme() { return activeTheme; }
3.26
framework_UIConnector_removeStylesheet_rdh
/** * Internal helper for removing any stylesheet with the given URL * * @since 7.3 * @param url * the url to match with existing stylesheets */ private void removeStylesheet(String url) { NodeList<Element> linkTags = getHead().getElementsByTagName(LinkElement.TAG); for (int i = 0; i < linkTags.getLength(); i+...
3.26
framework_UIConnector_activateTheme_rdh
/** * Activates the new theme. Assumes the theme has been loaded and taken into * use in the browser. * * @since 7.4.3 * @param newTheme * The name of the new theme */ protected void activateTheme(String newTheme) { if (activeTheme != null) { getWidget().getParent().removeStyleName(activeTheme); VOverlay.getOv...
3.26
framework_UIConnector_getThemeUrl_rdh
/** * Internal helper to get the theme URL for a given theme * * @since 7.3 * @param theme * the name of the theme * @return The URL the theme can be loaded from */ private String getThemeUrl(String theme) { String themeUrl = getConnection().translateVaadinUri((((ApplicationConstants.VAADIN_PROTOCOL_PREFIX + "...
3.26
framework_UIConnector_getPageState_rdh
/** * Returns the state of the Page associated with the UI. * <p> * Note that state is considered an internal part of the connector. You * should not rely on the state object outside of the connector who owns it. * If you depend on the state of other connectors you should use their * public API instead of their s...
3.26
framework_UIConnector_init_rdh
/** * Initialize UIConnector and attach UI to RootPanel for rootPanelId * element. * * @param rootPanelId * root panel element id * @param applicationConnection * application connection */ public void init(String rootPanelId, ApplicationConnection applicationConnection) { initConnector(RootPanel.get(rootPan...
3.26
framework_UIConnector_injectCSS_rdh
/** * Reads CSS strings and resources injected by {@link Styles#inject} from * the UIDL stream. * * @param uidl * The uidl which contains "css-resource" and "css-string" tags */ private void injectCSS(UIDL uidl) { /* Search the UIDL stream for CSS resources and strings to be injected. */ for (Object child : ui...
3.26
framework_UIConnector_replaceTheme_rdh
/** * Loads the new theme and removes references to the old theme. * * @since 7.4.3 * @param oldTheme * The name of the old theme * @param newTheme * The name of the new theme * @param oldThemeUrl * The url of the old theme * @param newThemeUrl * The url of the new theme */ protected void replaceThe...
3.26
framework_UIConnector_showServerDesign_rdh
/** * Sends a request to the server to print a design to the console for the * given component. * * @since 7.5 * @param connector * the component connector to output a declarative design for */ public void showServerDesign(ServerConnector connector) {getRpcProxy(DebugWindowServerRpc.class).showServerDesign(con...
3.26
framework_UIConnector_isMobileHTML5DndEnabled_rdh
/** * Returns whether HTML5 DnD extensions {@link DragSourceExtensionConnector} * and {@link DropTargetExtensionConnector} and alike should be enabled for * mobile devices. * <p> * By default, it is disabled. * * @return {@code true} if enabled, {@code false} if not * @since 8.1 */ public boolean isMobileHTML5...
3.26
framework_UIConnector_forceStateChangeRecursively_rdh
/** * Force a full recursive re-check of every connector's state variables. * * @see #forceStateChange() * @since 7.3 * @param connector * the connector which should get recursive forced state change */ protected static void forceStateChangeRecursively(AbstractConnector connector) { connector.forceStateChange(...
3.26
framework_UIConnector_onChildSizeChange_rdh
/** * Ensure the position is calculated correctly. This method should be called * whenever the content's height changes for any reason, in case the change * has been between a relative and non-relative height to either direction. */ protected void onChildSizeChange() { ComponentConnector child = getContent(); if (c...
3.26
framework_DropTargetExtensionConnector_removeDragOverStyle_rdh
/** * Remove the drag over indicator class name from the target element. * <p> * This is triggered on {@link #onDrop(Event) drop}, * {@link #onDragLeave(Event) dragleave} and {@link #onDragOver(Event) * dragover} events pending on whether the drop has happened or if it is not * possible. The drop is not possible ...
3.26
framework_DropTargetExtensionConnector_onDragLeave_rdh
/** * Event handler for the {@code dragleave} event. * <p> * Override this method in case custom handling for the dragleave event is * required. * * @param event * browser event to be handled */ protected void onDragLeave(Event event) { removeDragOverStyle(((NativeEvent) (event))); }
3.26
framework_DropTargetExtensionConnector_sendDropEventToServer_rdh
/** * Initiates a server RPC for the drop event. * * @param types * List of data types from {@code DataTransfer.types} object. * @param data * Map containing all types and corresponding data from the * {@code DataTransfer} object. * @param dropEffect * The desired drop effect. */ protected void sendDr...
3.26
framework_DropTargetExtensionConnector_removeDropListeners_rdh
/** * Removes dragenter, dragover, dragleave and drop event listeners from the * given DOM element. * * @param element * DOM element to remove event listeners from. */ private void removeDropListeners(Element element) { EventTarget target = element.cast(); target.removeEventListener(Event.DRAGENTER,...
3.26
framework_DropTargetExtensionConnector_containsFiles_rdh
/** * Tells if the given array of types contains files. * <p> * According to HTML specification, if any files are being dragged, {@code dataTransfer.types} will contain the string "Files". See * https://html.spec.whatwg.org/multipage/interaction.html#the-datatransfer-interface:dom-datatransfer-types-2 * * @param ...
3.26
framework_DropTargetExtensionConnector_onDrop_rdh
/** * Event handler for the {@code drop} event. * <p> * Override this method in case custom handling for the drop event is * required. If the drop is allowed, the event should prevent default. * * @param event * browser event to be handled */ protected void onDrop(Event event) { NativeEvent nativeEvent = ...
3.26
framework_DropTargetExtensionConnector_onDragOver_rdh
/** * Event handler for the {@code dragover} event. * <p> * Override this method in case custom handling for the dragover event is * required. If the drop is allowed, the event should prevent default. * * @param event * browser event to be handled */protected void onDragOver(Event event) { NativeEvent nat...
3.26
framework_DropTargetExtensionConnector_addDropTargetStyle_rdh
/** * Add class name for the drop target element indicating that data can be * dropped onto it. The class name has the following format: * * <pre> * [primaryStyleName]-droptarget * </pre> * * The added class name is update automatically by the framework when the * primary style name changes. */ protected ...
3.26
framework_DropTargetExtensionConnector_addDragOverStyle_rdh
/** * Add class that indicates that the component is a target while data is * being dragged over it. * <p> * This is triggered on {@link #onDragEnter(Event) dragenter} and * {@link #onDragOver(Event) dragover} events pending if the drop is * possible. The drop is possible if the drop effect for the target and * ...
3.26
framework_DropTargetExtensionConnector_removeDropTargetStyle_rdh
/** * Remove class name from the drop target element indication that data can * be dropped onto it. */ protected void removeDropTargetStyle() { getDropTargetElement().removeClassName(getStylePrimaryName(getDropTargetElement()) + STYLE_SUFFIX_DROPTARGET); }
3.26
framework_DropTargetExtensionConnector_onDragEnter_rdh
/** * Event handler for the {@code dragenter} event. * <p> * Override this method in case custom handling for the dragstart event is * required. If the drop is allowed, the event should prevent default. * * @param event * browser event to be handled */ protected void onDragEnter(Event event) { NativeEvent...
3.26
framework_AcceptCriteriaFactoryGenerator_generateClass_rdh
/** * Generate source code for WidgetMapImpl * * @param logger * Logger object * @param context * Generator context */ private void generateClass(TreeLogger logger, GeneratorContext context) { // get print writer that receives the source code PrintWriter printWriter = context.tryCreate(logger, packa...
3.26
framework_VaadinServletService_getCancelingRelativePath_rdh
/** * Gets a relative path that cancels the provided path. This essentially * adds one .. for each part of the path to cancel. * * @param pathToCancel * the path that should be canceled * @return a relative path that cancels out the provided path segment */ public static String getCancelingRelativePath(Strin...
3.26
framework_VaadinServletService_getServlet_rdh
/** * Retrieves a reference to the servlet associated with this service. Should * be overridden (or otherwise intercepted) if the no-arg constructor is * used to prevent NPEs. * * @return A reference to the VaadinServlet this service is using */ public VaadinServlet getServlet() { return servlet; }
3.26
framework_ConnectorBundleLoader_ensureDeferredBundleLoaded_rdh
/** * Starts loading the deferred bundle if it hasn't already been started. * * @since 8.0.3 */ public void ensureDeferredBundleLoaded() { if (!isBundleLoaded(DEFERRED_BUNDLE_NAME)) { loadBundle(DEFERRED_BUNDLE_NAME, new BundleLoadCallback() { @Override public void loaded() { ...
3.26
framework_ConnectorBundleLoader_notice_rdh
// Not using Vaadin notifications (#14597) private void notice(String productName) { if (notice == null) { notice = new HTML(); notice.addClickHandler(event -> notice.removeFromParent()); notice.addTouchStartHandler(event -> notice....
3.26
framework_ConnectorBundleLoader_getLoadedBundles_rdh
/** * Gets a list of all currently loaded bundle names. * <p> * This method is intended for testing the loading mechanism. * * @return a list of bundles, not <code>null</code> * @since 8.0.3 */ public List<String> getLoadedBundles() { List<String> v13 = new ArrayList<>(); JsArrayString keys = f0.getKeys(...
3.26
framework_EditorErrorGenerator_apply_rdh
/** * Generates an error message from given validation status object. * * @param fieldToColumn * the map of failed fields and corresponding columns * @param status * the binder status object with all failures * @return error message string */ @Override public String apply(Map<Component, Grid.Column<T, ?>> f...
3.26
framework_ErrorLevel_intValue_rdh
/** * Integer representation of error severity for comparison. * * @return integer for error severity */ public int intValue() { return ordinal();}
3.26
framework_EditorSaveEvent_getGrid_rdh
/** * Gets the editors' grid. * * @return the editors' grid */ public Grid<T> getGrid() { return getSource().getGrid(); }
3.26
framework_EditorSaveEvent_getBean_rdh
/** * Gets the bean being edited. * * @return the bean being edited * @since 8.0.3 */ public T getBean() { return bean;}
3.26
framework_ShortcutAction_setModifiers_rdh
/** * When setting modifiers, make sure that modifiers is a valid array AND * that it's sorted. * * @param modifiers * the modifier keys for this shortcut */ private void setModifiers(int... modifiers) { if (modifiers == null) { this.modifiers = new int[0]; } else { this.modifiers = mod...
3.26
framework_ShortcutAction_getModifiers_rdh
/** * Get the {@link ModifierKey}s required for the shortcut to react. * * @return modifier keys for this shortcut */ public int[] getModifiers() { return modifiers; }
3.26
framework_PopupDateField_setTextFieldEnabled_rdh
/** * Enables or disables the text field. By default the text field is enabled. * Disabling it causes only the button for date selection to be active, thus * preventing the user from entering invalid dates. * * See {@link http://dev.vaadin.com/ticket/6790}. * * @param state * <b>true</b> to enable text field,...
3.26
framework_PopupDateField_setAssistiveText_rdh
/** * Set a description that explains the usage of the Widget for users of * assistive devices. * * @param description * String with the description */ public void setAssistiveText(String description) { getState().descriptionForAssistiveDevices = description; }
3.26
framework_PopupDateField_isTextFieldEnabled_rdh
/** * Checks whether the text field is enabled (default) or not. * * @see PopupDateField#setTextFieldEnabled(boolean); * @return <b>true</b> if the text field is enabled, <b>false</b> otherwise. */ public boolean isTextFieldEnabled() { return getState(false).textFieldEnabled;}
3.26
framework_PopupDateField_getInputPrompt_rdh
/** * Gets the current input prompt. * * @see #setInputPrompt(String) * @return the current input prompt, or null if not enabled */public String getInputPrompt() { return inputPrompt; }
3.26
framework_VaadinPortletService_preserveUIOnRefresh_rdh
/** * Always preserve UIs in portlets to make portlet actions work. */ @Override public boolean preserveUIOnRefresh(UIProvider provider, UICreateEvent event) { return true; }
3.26
framework_CalendarDateRange_getEnd_rdh
/** * Get the end date of the date range. * * @return the end Date of the range */ public Date getEnd() { return end; }
3.26
framework_CalendarDateRange_getStart_rdh
/** * Get the start date of the date range. * * @return the start Date of the range */ public Date getStart() { return start; }
3.26
framework_ListDataSource_sort_rdh
/** * Sort entire container according to a {@link Comparator}. * * @param comparator * a comparator object, which compares two data source entries * (beans/pojos) */ public void sort(Comparator<T> comparator) { Collections.sort(ds, comparator); getHandlers().forEach(dch -> dch.dataUpdated(0, ds.size())); }
3.26
framework_ListDataSource_indexOf_rdh
/** * Retrieves the index for given row object. * <p> * <em>Note:</em> This method does not verify that the given row object * exists at all in this DataSource. * * @param row * the row object * @return index of the row; or <code>-1</code> if row is not available */ public int indexOf(T row) { return ds.inde...
3.26
framework_ListDataSource_m0_rdh
/** * Returns a {@link SelectAllHandler} for this ListDataSource. * * @return select all handler */ public SelectAllHandler<T> m0() { return new SelectAllHandler<T>() { @Override public void onSelectAll(SelectAllEvent<T> event) { event.getSelectionModel().select(asList()); } }; }
3.26
framework_RefreshDataProvider_m0_rdh
/** * * @author Vaadin Ltd */public class RefreshDataProvider extends AbstractReindeerTestUI { @Override protected void m0(VaadinRequest request) { Grid<DataObject> grid = new Grid<>(); List<DataObject> data = DataObject.generateObjects(); ListDataProvider<DataObject> dataProvider =...
3.26
framework_HierarchicalContainer_setIncludeParentsWhenFiltering_rdh
/** * Controls how the filtering of the container works. Set this to true to * make filtering include parents for all matched items in addition to the * items themselves. Setting this to false causes the filtering to only * include the matching items and make items with excluded parents into root * items. * * @p...
3.26
framework_HierarchicalContainer_addFilteredChild_rdh
/** * Adds the given childItemId as a filteredChildren for the parentItemId and * sets it filteredParent. * * @param parentItemId * @param childItemId */ private void addFilteredChild(Object parentItemId, Object childItemId) { LinkedList<Object> parentToChildrenList = filteredChildren.get(parentItemId); ...
3.26
framework_HierarchicalContainer_filterIncludingParents_rdh
/** * Scans the itemId and all its children for which items should be included * when filtering. All items which passes the filters are included. * Additionally all items that have a child node that should be included are * also themselves included. * * @param itemId * @param includedItems * @return true if the...
3.26
framework_HierarchicalContainer_moveAfterSibling_rdh
/** * Moves a node (an Item) in the container immediately after a sibling node. * The two nodes must have the same parent in the container. * * @param itemId * the identifier of the moved node (Item) * @param siblingId * the identifier of the reference node (Item), after which the * other node will be loc...
3.26
framework_HierarchicalContainer_addFilteredChildrenRecursively_rdh
/** * Recursively adds all items in the includedItems list to the * filteredChildren map in the same order as they are in the children map. * Starts from parentItemId and recurses down as long as child items that * should be included are found. * * @param parentItemId * The item id to start recurse from. Not a...
3.26
framework_HierarchicalContainer_removeItemRecursively_rdh
/** * Removes the Item identified by given itemId and all its children. * * @see #removeItem(Object) * @param itemId * the identifier of the Item to be removed * @return true if the operation succeeded */ public boolean removeItemRecursively(Object itemId) { disableContentsChangeEvents(); try { ...
3.26
framework_AbstractExtension_internalSetParent_rdh
/** * Actually sets the parent and calls required listeners. * * @since 7.1 * @param parent * The parent to set */ private void internalSetParent(ClientConnector parent) { ClientConnector oldParent = getParent(); // Send a detach event if the component is currently attached if (isAttached()) { ...
3.26
framework_AbstractExtension_getSupportedParentType_rdh
/** * Gets a type that the parent must be an instance of. Override this if the * extension only support certain targets, e.g. if only TextFields can be * extended. * * @return a type that the parent must be an instance of */protected Class<? extends ClientConnector> getSupportedParentType() { return Client...
3.26
framework_AbstractExtension_extend_rdh
/** * Add this extension to the target connector. This method is protected to * allow subclasses to require a more specific type of target. * * @param target * the connector to attach this extension to */ protected void extend(AbstractClientConnector target) { target.addE...
3.26
framework_DeclarativeTestUI_getDesignPath_rdh
/** * Figure out the proper path for the HTML design file */ private String getDesignPath() { Class<?> clazz = getClass(); String designFilePath = null; if (clazz.getAnnotation(DeclarativeTestUI.DeclarativeUI.class).absolutePath()) { designFilePath = ""; } else { // This is rather nast...
3.26