name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_Navigator_getStateParameterMap_rdh
/** * Returns the current navigation state reported by this Navigator's * {@link NavigationStateManager} as Map<String, String> where each key * represents a parameter in the state. The state parameter separator * character needs to be specified with the separator. * * @param separator * the string (typically ...
3.26
framework_Navigator_init_rdh
/** * Initializes a navigator created with the no arguments constructor. * <p> * When a custom navigation state manager is not needed, use null to create * a default one based on URI fragments. * <p> * Navigation is automatically ...
3.26
framework_Navigator_addView_rdh
/** * Registers a view class for a view name. * <p> * Registering another view with a name that is already registered * overwrites the old registration of the same type. * <p> * A new view instance is created every time a view is requested. * * @param viewName * String that identifies a view (not null nor em...
3.26
framework_Navigator_getViewName_rdh
/** * Get the view name for this provider. * * @return view name for this provider */ public String getViewName() { return viewName; }
3.26
framework_Navigator_runAfterLeaveConfirmation_rdh
/** * Triggers {@link View#beforeLeave(ViewBeforeLeaveEvent)} for the current * view with the given action. * <p> * This method is typically called by * {@link #navigateTo(View, String, String)} but can be called from * application code when you want to e.g. show a confirmation dialog ...
3.26
framework_Navigator_m3_rdh
/** * Registers a view that is displayed when no other view matches the * navigation state. This implicitly sets an appropriate error view provider * and overrides any previous {@link #setErrorProvider(ViewProvider)} call. * * @param view * The View that should be used as the error view. */ public void m3(fina...
3.26
framework_Navigator_navigateTo_rdh
/** * Navigates to a view and initialize the view with given parameters. * <p> * The view string consists of a view name optionally followed by a slash * and a parameters part that is passed as-is to the view. ViewProviders are * used to find and create the correct type of view. * <p> * If multiple providers ret...
3.26
framework_Navigator_setErrorProvider_rdh
/** * Registers a view provider that is queried for a view when no other view * matches the navigation state. An error view provider should match any * navigation state, but could return different views for different states. * Its <code>getViewName(String navigationState)</code> should return * <code>navigationSta...
3.26
framework_Navigator_performNavigateTo_rdh
/** * Internal method for activating a view, setting its parameters and calling * listeners. * <p> * Invoked after the current view has confirmed that leaving is ok. * <p> * This method also verifies that the user is allowed to perform the * navigation operation. * * @param view * view to activate * @param...
3.26
framework_ContainerOrderedWrapper_removeFromOrderWrapper_rdh
/** * Removes the specified Item from the wrapper's internal hierarchy * structure. * <p> * Note : The Item is not removed from the underlying Container. * </p> * * @param id * the ID of the Item to be removed from the ordering. */private void removeFromOrderWrapper(Object id) { if (id != null) { ...
3.26
framework_ContainerOrderedWrapper_addToOrderWrapper_rdh
/** * Registers the specified Item after the specified itemId in the wrapper's * internal ordering. The underlying container is not modified. Given item * id must be in the container, or must be null. * * @param id * the ID of the Item to be added to the ordering. * @param previousItemId * the Id of the pre...
3.26
framework_ContainerOrderedWrapper_updateOrderWrapper_rdh
/** * Updates the wrapper's internal ordering information to include all Items * in the underlying container. * <p> * Note : If the contents of the wrapped container change without the * wrapper's knowledge, this method needs to be called to update the * ordering information of the Items. * </p> */ public void ...
3.26
framework_ContainerOrderedWrapper_addItem_rdh
/** * Registers a new Item by its ID to the underlying container and to the * ordering. * * @param itemId * the ID of the Item to be created. * @return the added Item or <code>null</code> if the operation failed * @throws UnsupportedOperationException * if the addItem is not supported. */ @Override public ...
3.26
framework_AbstractSelectTestCase_itemClick_rdh
/* COMMANDS END */ @Override public void itemClick(ItemClickEvent event) { String type = event.getButtonName();if (event.isDoubleClick()) { type += " double-click"; } else { type += " click"; } String target = "source: " + event.getSource(); target += (((", client: [" + event.getClientX()) + ",") + event.getClientY(...
3.26
framework_ColorUtil_getHSLAPatternColor_rdh
/** * Parses {@link Color} from matched HSLA {@link Matcher}. * * @param matcher * {@link Matcher} matching HSLA pattern with named regex groups * {@code hue}, {@code saturation}, {@code light}, and * {@code alpha} * @return {@link Color} parsed from {@link Matcher} */ public static Color getHSLAPatternCo...
3.26
framework_ColorUtil_getRGBAPatternColor_rdh
/** * Parses {@link Color} from matched RGBA {@link Matcher}. * * @param matcher * {@link Matcher} matching RGBA pattern with named regex groups * {@code red}, {@code green}, {@code blue}, and {@code alpha} * @return {@link Color} parsed from {@link Matcher} */ public stat...
3.26
framework_ColorUtil_getHSLPatternColor_rdh
/** * Parses {@link Color} from matched HSL {@link Matcher}. * * @param matcher * {@link Matcher} matching HSL pattern with named regex groups * {@code hue}, {@code saturation}, and {@code light} * @return {@link Color} parsed from {@link Matcher} */ public static Color getHSLPatternColor(Matcher matcher) { ...
3.26
framework_ColorUtil_stringToColor_rdh
/** * Parses {@link Color} from any of the following {@link String} inputs: * <br> * - RGB hex (e.g. "#FFAA00"), {@link #HEX_PATTERN}<br> * - RGB "function" (e.g. "rgb(128,0,255)"), {@link #RGB_PATTERN}<br> * - RGBA "function" (e.g. "rgba(50,50,50,0.2)"), {@link #RGBA_PATTERN}<br> * - HSL "function" (e.g. "hsl(50...
3.26
framework_Range_intersects_rdh
/** * Checks whether this range and another range are at least partially * covering the same values. * * @param other * the other range to check against * @return <code>true</code> if this and <code>other</code> intersect */ public boolean intersects(final Range other) { return (getStart() < other.getEn...
3.26
framework_Range_endsAfter_rdh
/** * Checks whether this range ends after the end of another range. * * @param other * the other range to compare against * @return <code>true</code> if this range ends after the <code>other</code> */ public boolean endsAfter(final Range other) { return getEnd() > other.getEnd(); }
3.26
framework_Range_combineWith_rdh
/** * Combines two ranges to create a range containing all values in both * ranges, provided there are no gaps between the ranges. * * @param other * the range to combine with this range * @return the combined range * @throws IllegalArgumentException * if the two ranges aren't connected */ public Range com...
3.26
framework_Range_getEnd_rdh
/** * Returns the <em>exclusive</em> end point of this range. * * @return the end point of this range */ public int getEnd() { return end; }
3.26
framework_Range_contains_rdh
/** * Checks whether an integer is found within this range. * * @param integer * an integer to test for presence in this range * @return <code>true</code> if <code>integer</code> is in this range */ public boolean contains(final int integer) { return (getStart() <= integer) && (integer < getEnd()); }
3.26
framework_Range_expand_rdh
/** * Creates a range that is expanded the given amounts in both ends. * * @param startDelta * the amount to expand by in the beginning of the range * @param endDelta * the amount to expand by in the end of the range * @return an expanded range * @throws IllegalArgumentException * if the new range would ...
3.26
framework_Range_restrictTo_rdh
/** * Limits this range to be within the bounds of the provided range. * <p> * This is basically an optimized way of calculating * <code>{@link #partitionWith(Range)}[1]</code> without the overhead of * defining the parts that do not overlap. * <p> * If the two ranges do not intersect, an empty range is returned...
3.26
framework_Range_offsetBy_rdh
/** * Get a range that is based on this one, but offset by a number. * * @param offset * the number to offset by * @return a copy of this range, offset by <code>offset</code> */ public Range offsetBy(final int offset) { if (offset == 0) { return this; ...
3.26
framework_Range_between_rdh
/** * Creates a range between two integers. * <p> * The range start is <em>inclusive</em> and the end is <em>exclusive</em>. * So, a range "between" 0 and 5 represents the numbers 0, 1, 2, 3 and 4, * but not 5. * * @param start * the start of the the range, inclusive * @param end * the end of the range, e...
3.26
framework_Range_withOnly_rdh
/** * Creates a range object representing a single integer. * * @param integer * the number to represent as a range * @return the range represented by <code>integer</code> */ public static Range withOnly(final int integer) { return new Range(integer, integer + 1); }
3.26
framework_TableElementContextMenu_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 v3 = 0; v3 < COLUMNS; v3++) { line[v3] = (("col=" + v3) + " row=") + i; } table.addItem...
3.26
framework_TableElementContextMenu_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_ListSelectElement_deselectByText_rdh
/** * Deselects the option(s) with the given text. * * @param text * the text of the option */ public void deselectByText(String text) { if (isReadOnly()) { throw new ReadOnlyException(); } select.deselectByVisibleText(text); if (isPhantomJS() && select.isMultiple()) { // Phantom ...
3.26
framework_ListSelectElement_getValue_rdh
/** * Return value of the list select element. * * @return value of the list select element */ public String getValue() { return select.getFirstSelectedOption().getText(); }
3.26
framework_ListSelectElement_selectByText_rdh
/** * Selects the option with the given text. * <p> * For a ListSelect in multi select mode, adds the given option(s) to the * current selection. * * @param text * the text of the option */ public void selectByText(String text) { if (isReadOnly()) { throw new ReadOnlyException(); } select....
3.26
framework_ListSelectElement_getSelectElement_rdh
/** * Gets the {@code <select>} element inside the component. * * @return the select element inside the component * @since 8.1.1 */ public WebElement getSelectElement() { return selectElement; }
3.26
framework_ListSelectElement_getOptions_rdh
/** * Gets a list of the texts shown for all options. * * @return a list of option texts */ public List<String> getOptions() {List<String> options = new ArrayList<String>(); for (WebElement webElement : select.getOptions()) { options.add(webElement.getText()); } return options; }
3.26
framework_CheckBoxElement_clear_rdh
/** * Clears the check box, setting unchecked value. The check box is unchecked * by sending a click event on it. */ @Override public void clear() { if (isChecked()) { click(); } }
3.26
framework_Calc_calculate_rdh
// Calculator "business logic" implemented here to keep the example // minimal private double calculate(char requestedOperation) { if (('0' <= requestedOperation) && (requestedOperation <= '9')) { if (current == null) { current = 0.0; }current = (current * 10) + Double.parseDouble("" + r...
3.26
framework_VErrorMessage_updateErrorLevel_rdh
/** * Sets the correct error level style name for the error message and removes * all previous style names. * * @param errorLevel * error level * @since 8.2 */ public void updateErrorLevel(ErrorLevel errorLevel) { ErrorUtil.setErrorLevelStyle(getStyleElement(), CLASSNAME, errorLevel); }
3.26
framework_VErrorMessage_setOwner_rdh
/** * Set the owner, i.e the Widget that created this {@link VErrorMessage}. * The owner must be set if the {@link VErrorMessage} is created * 'stand-alone' (not within a {@link VOverlay}), or theming might not work * properly. * * @see VOverlay#setOwner(Widget) * @param owner * the owner (creator Widget) */...
3.26
framework_VErrorMessage_showAt_rdh
/** * Shows this error message next to given element. * * @param indicatorElement * @since 7.2 */
3.26
framework_VDragAndDropManager_getCurrentDragApplicationConnection_rdh
/** * Returns the application connection for the current drag source. If there * is no current drag source, returns {@code null} instead. * * @return the application connection, or {@code null} if not found */ protected ApplicationConnection getCurrentDragApplicationConnection() { if (currentDrag == null) ...
3.26
framework_VDragAndDropManager_defer_rdh
/** * Method to que tasks until all dd related server visits are done * * @param command */ private void defer(Command command) { deferredCommand = command; }
3.26
framework_VDragAndDropManager_get_rdh
/** * Returns the current drag and drop manager instance. If one doesn't exist * yet, it's created. * * @return the current drag and drop manager */ public static VDragAndDropManager get() { if (instance == null) { instance = GWT.create(VDragAndDropManager.class); } return instance; }
3.26
framework_VDragAndDropManager_visitServer_rdh
/** * Visits server during drag and drop procedure. Transferable and event type * is given to server side counterpart of DropHandler. * * If another server visit is started before the current is received, the * current is just dropped. TODO consider if callback should have * interrupted() method for cleanup. * ...
3.26
framework_VDragAndDropManager_isDropEnabled_rdh
/** * Checks if the given {@link VHasDropHandler} really is able to accept * drops. */ private static boolean isDropEnabled(VHasDropHandler target) {VDropHandler dh = target.getDropHandler(); return (dh != null) && dh.getConnector().isEnabled(); }
3.26
framework_VDragAndDropManager_updateDragImagePosition_rdh
/** * Updates drag image position. * * @param gwtEvent * the event whose coordinates should be used * @param dragImage * the image to position */ protected void updateDragImagePosition(NativeEvent gwtEvent, Element dragImage) { if ((gwtEvent != null) && (dragImage != null)) { Style style = dragI...
3.26
framework_VDragAndDropManager_startDrag_rdh
/** * This method is used to start Vaadin client side drag and drop operation. * Operation may be started by virtually any Widget. * <p> * Cancels possible existing drag. TODO figure out if this is always a bug * if one is active. Maybe a good and cheap lifesaver thought. * <p> * If possible, method automaticall...
3.26
framework_VDragAndDropManager_setCurrentDropHandler_rdh
/** * If drag and drop operation is not handled by {@link VDragAndDropManager}s * internal handler, this can be used to update current {@link VDropHandler} * . * * @param currentDropHandler * the current drop handler */ public void setCurrentDropHandler(VDropHandler currentDropHandler) { this.currentDropHa...
3.26
framework_ContainerHierarchicalWrapper_fireItemSetChangeIfAbstractContainer_rdh
/** * inform container (if it is instance of AbstractContainer) about the * change in hierarchy (#15421) */private void fireItemSetChangeIfAbstractContainer() { if (container instanceof AbstractContainer) { ((AbstractContainer) (container)).fireItemSetChange(); } }
3.26
framework_ContainerHierarchicalWrapper_addItem_rdh
/** * Adds a new Item by its ID to the underlying container and to the * hierarchy. * * @param itemId * the ID of the Item to be created. * @return the added Item or <code>null</code> if the operation failed. * @throws UnsupportedOperationException * if the addItem is not supported. */ @Override public Ite...
3.26
framework_ContainerHierarchicalWrapper_updateHierarchicalWrapper_rdh
/** * Updates the wrapper's internal hierarchy data to include all Items in the * underlying container. If the contents of the wrapped container change * without the wrapper's knowledge, this method needs to be called to update * the hierarchy information of the Items. ...
3.26
framework_ContainerHierarchicalWrapper_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) { return HierarchicalContainer.removeItemRecursiv...
3.26
framework_ContainerHierarchicalWrapper_addToHierarchyWrapper_rdh
/** * Adds the specified Item specified to the internal hierarchy structure. * The new item is added as a root Item. The underlying container is not * modified. * * @param itemId * the ID of the item to add to the hierarchy. */ private void addToHierarchyWrapper(Object itemId) { roots.add(itemId); }
3.26
framework_ContainerHierarchicalWrapper_removeFromHierarchyWrapper_rdh
/** * Removes the specified Item from the wrapper's internal hierarchy * structure. * <p> * Note : The Item is not removed from the underlying Container. * </p> * * @param itemId * the ID of the item to remove from the hierarchy. */ private void removeFromHierarchy...
3.26
framework_JavaScriptConnectorHelper_removeResizeListener_rdh
// Called from JSNI to remove a listener private void removeResizeListener(Element element, JavaScriptObject callbackFunction) { Map<JavaScriptObject, ElementResizeListener> listenerMap = resizeListeners.get(element); if (listenerMap == null) { return; } ElementResizeListener listener = listener...
3.26
framework_JavaScriptConnectorHelper_addResizeListener_rdh
// Called from JSNI to add a listener private void addResizeListener(Element element, final JavaScriptObject callbackFunction) { Map<JavaScriptObject, ElementResizeListener> v15 = resizeListeners.get(element); if (v15 == null) { v15 = new HashMap<>(); resizeListeners.put(element, v15); } ...
3.26
framework_ComponentRootSetter_canSetRoot_rdh
/** * Checks if the given custom component or composite may accept a root * component. * <p> * For internal use only. * * @param customComponent * the custom component or composite * @return * @since 8.4 */ public static boolean canSetRoot(Component customCompone...
3.26
framework_ComponentRootSetter_setRoot_rdh
/** * Sets the composition root for the given custom component or composite. * <p> * For internal use only. * * @param customComponent * the custom component or composite * @param component * the component to assign as composition root */ public static void setRoot(Component customComponent, Component comp...
3.26
framework_PushAtmosphereHandler_onMessage_rdh
/** * Called when the client sends a message through the push channel * * @param resource */ private void onMessage(AtmosphereResource resource) { pushHandler.onMessage(resource); }
3.26
framework_PushAtmosphereHandler_onConnect_rdh
/** * Called when the client sends the first request (to establish a push * connection) * * @param resource */ private void onConnect(AtmosphereResource resource) {resource.addEventListener(new AtmosphereResourceListener()); pushHandler.onConnect(resource); }
3.26
framework_AbstractClientConnector_getState_rdh
/** * Returns the shared state for this connector. * * @param markAsDirty * true if the connector should automatically be marked dirty, * false otherwise * @return The shared state for this connector. Never null. * @see #getState() */ protected SharedState getState(boolean markAsDirty) { assert (getSe...
3.26
framework_AbstractClientConnector_addExtension_rdh
/** * Add an extension to this connector. This method is protected to allow * extensions to select which targets they can extend. * * @param extension * the extension to add */ protected void addExtension(Extension extension) { ClientConnector previousParent = extension.getParent(); if (equals(previousParent)...
3.26
framework_AbstractClientConnector_addListener_rdh
/** * Registers a new listener with the specified activation method to listen * events generated by this component. If the activation method does not * have any arguments the event object will not be passed to it when it's * called. * * <p> * For more information on the inheritable event mechanism see the * {@l...
3.26
framework_AbstractClientConnector_createState_rdh
/** * Creates the shared state bean to be used in server to client * communication. * <p> * By default a state object of the defined return type of * {@link #getState()} is created. Subclasses can override this method and * return a new instance of the correct state class but this should rarely * be necessary. ...
3.26
framework_AbstractClientConnector_hasListeners_rdh
/** * Checks if the given {@link Event} type is listened for this component. * * @param eventType * the event type to be checked * @return true if a listener is registered for the given event type */ protected boolean hasListeners(Class<?> eventType) { return (eventRouter != null) && eventRouter.hasListeners(ev...
3.26
framework_AbstractClientConnector_isThis_rdh
/** * For internal use only, may be changed or removed in future versions. * <p> * This method must be protected, because otherwise it will not be redefined * by the proxy to actually be called on the underlying instance. * <p> * See #14639 * * @deprecated only defined for framework hacks, do not use. */ @Depr...
3.26
framework_AbstractClientConnector_detach_rdh
/** * {@inheritDoc } * * <p> * The {@link #getSession()} and {@link #getUI()} methods might return * <code>null</code> after this method is called. * </p> */ @Override public void detach() { for (ClientConnector v24 : m1(this)) { v24.detach(); } fireEvent(new DetachEvent(this)); getUI().getConnectorTracker(...
3.26
framework_AbstractClientConnector_markAsDirty_rdh
/* Documentation copied from interface */ @Override public void markAsDirty() { assert (getSession() == null) || getSession().hasLock() : buildLockAssertMessage("markAsDirty()"); UI uI = getUI(); if (uI != null) { uI.getConnectorTracker().markDirty(this); } }
3.26
framework_AbstractClientConnector_addMethodInvocationToQueue_rdh
/** * For internal use: adds a method invocation to the pending RPC call queue. * * @param interfaceName * RPC interface name * @param method * RPC method * @param parameters * RPC all parameters * @since 7.0 */ protected void addMethodInvocationToQueue(String interfaceName, Method method, Object[] para...
3.26
framework_AbstractClientConnector_m0_rdh
/** * * @deprecated As of 7.0, use {@link #markAsDirtyRecursive()} instead */ @Override @Deprecated public void m0() { markAsDirtyRecursive(); }
3.26
framework_AbstractClientConnector_registerRpc_rdh
/** * Registers an RPC interface implementation for this component. * * A component can listen to multiple RPC interfaces, and subclasses can * register additional implementations. * * @since 7.0 * @param implementation * RPC interface implementation. Also used to deduce the type. */ protected <T extends Ser...
3.26
framework_AbstractClientConnector_getSession_rdh
/** * Finds the {@link VaadinSession} to which this connector belongs. If the * connector has not been attached, <code>null</code> is returned. * * @return The connector's session, or <code>null</code> if not attached */ protected VaadinSession getSession() { UI uI = getUI();if (uI == null) { return n...
3.26
framework_AbstractClientConnector_updateDiffstate_rdh
/** * Sets the expected value of a state property so that changes can be * properly sent to the client. This needs to be done in cases where a state * change originates from the client, since otherwise the server-side would * fail to recognize if the value is changed back to its previous value. * * @param propert...
3.26
framework_AbstractClientConnector_getRpcProxy_rdh
/** * Returns an RPC proxy for a given server to client RPC interface for this * component. * * TODO more javadoc, subclasses, ... * * @param rpcInterface * RPC interface type * @since 7.0 */ protected <T extends ClientRpc> T getRpcProxy(final Class<T> rpcInterface) {// create, initialize and return a dyna...
3.26
framework_AbstractClientConnector_m1_rdh
/** * Get an Iterable for iterating over all child connectors, including both * extensions and child components. * * @param connector * the connector to get children for * @return an Iterable giving all child connectors. */ public static Iterable<? extends ClientConnector> m...
3.26
framework_AbstractClientConnector_fireEvent_rdh
/** * Sends the event to all listeners. * * @param event * the Event to be sent to all listeners. */ protected void fireEvent(EventObject event) { if (eventRouter != null) { eventRouter.fireEvent(event); }}
3.26
framework_CollapseEvent_getCollapsedItem_rdh
/** * Get the collapsed item that triggered this event. * * @return the collapsed item */ public T getCollapsedItem() { return collapsedItem; }
3.26
framework_ColumnProperty_isRowIdentifier_rdh
/** * Returns whether or not this property is used as a row identifier. * * @return true if the property is a row identifier, false otherwise. */ public boolean isRowIdentifier() { return isPrimaryKey() || isVersionColumn(); }
3.26
framework_ColumnProperty_getValue_rdh
/** * Returns the current value for this property. To get the previous value * (if one exists) for a modified property use {@link #getOldValue()}. * * @return */ @Override public Object getValue() { if (isModified()) { return changedValue; } return value; }
3.26
framework_ColumnProperty_setOwner_rdh
// LegacyPropertyHelper has been removed in Vaadin 8 public void setOwner(RowItem owner) { if (owner == null) { throw new IllegalArgumentException("Owner can not be set to null."); }if (this.owner != null) { throw new IllegalStateException("ColumnProperties can only be bound once."); } this.owner = owner; }
3.26
framework_ColumnProperty_isReadOnlyChangeAllowed_rdh
/** * Returns whether the read-only status of this property can be changed * using {@link #setReadOnly(boolean)}. * <p> * Used to prevent setting to read/write mode a property that is not allowed * to be written by the underlying database. Also used for values like * VERSION and AUTO_INCREMENT fields that might b...
3.26
framework_DataProvider_fromFilteringCallbacks_rdh
/** * Creates a new data provider that uses filtering callbacks for fetching * and counting items from any backing store. * <p> * The query that is passed to each callback may contain a filter value that * is provided by the component querying for data. * * @param fetchCallback * function that returns a strea...
3.26
framework_DataProvider_ofItems_rdh
/** * Creates a new data provider from the given items. * <p> * The items are copied into a new backing list, so structural changes to * the provided array will not be visible via the created data provider. * * @param <T> * the data item type * @param items * the data items * @return a new list data provi...
3.26
framework_DataProvider_ofCollection_rdh
/** * Creates a new data provider backed by a collection. * <p> * The collection is used as-is. Changes in the collection will be visible * via the created data provider. The caller should copy the collection if * necessary. * * @param <T> * the data item type * @param items * the collection of data, not ...
3.26
framework_DataProvider_fromCallbacks_rdh
/** * Creates a new data provider that uses callbacks for fetching and counting * items from any backing store. * <p> * The query that is passed to each callback will not contain any filter * values. * * @param fetchCallback * function that returns a stream of items from the back end for * a query * @para...
3.26
framework_DataProvider_withConfigurableFilter_rdh
/** * Wraps this data provider to create a data provider that supports * programmatically setting a filter but no filtering through the query. * * @see #withConfigurableFilter(SerializableBiFunction) * @see ConfigurableFilterDataProvider#setFilter(Object) * @return a data provider with a configurable filter, not ...
3.26
framework_DataProvider_fromStream_rdh
/** * Creates a new data provider from the given stream. <b>All items in the * stream are eagerly collected to a list.</b> * <p> * This is a shorthand for using {@link #ofCollection(Collection)} after * collecting the items in the stream to a list with e.g. * {@code stream.collect(Collectors.toList));}. * <p> *...
3.26
framework_DataProvider_withConvertedFilter_rdh
/** * Wraps this data provider to create a data provider that uses a different * filter type. This can be used for adapting this data provider to a filter * type provided by a Component such as ComboBox. * <p> * For example receiving a String from ComboBox and making a Predicate based * on it: * * <pre> * Data...
3.26
framework_DataProvider_getId_rdh
/** * Gets an identifier for the given item. This identifier is used by the * framework to determine equality between two items. * <p> * Default is to use item itself as its own identifier. If the item has * {@link Object#equals(Object)} and {@link Object#hashCode()} implemented * in a way that it can be compared...
3.26
framework_GridKeyDownEvent_getNativeKeyCode_rdh
/** * Gets the native key code. These key codes are enumerated in the * {@link KeyCodes} class. * * @return the key code */ public int getNativeKeyCode() { return getNativeEvent().getKeyCode(); }
3.26
framework_GridKeyDownEvent_isUpArrow_rdh
/** * Is this a up arrow? * * @return whether this is a right arrow key event */ public boolean isUpArrow() { return getNativeKeyCode() == KeyCodes.KEY_UP;}
3.26
framework_GridKeyDownEvent_isArrow_rdh
/** * Does the key code represent an arrow key? * * @param keyCode * the key code * @return if it is an arrow key code */public static boolean isArrow(int keyCode) { switch (keyCode) { case KeyCodes.KEY_DOWN : case KeyCodes.KEY_RIGHT : case KeyCodes.KEY_UP : case KeyCodes.KEY_LEFT...
3.26
framework_AbstractSelect_getItem_rdh
/* Container methods */ /** * Gets the item from the container with given id. If the container does not * contain the requested item, null is returned. * * @param itemId * the item id. * @return the item from the container. */ @Overridepublic Item getItem(Object itemId) { return items.getItem(itemId); }
3.26
framework_AbstractSelect_setItemCaption_rdh
/** * Override the caption of an item. Setting caption explicitly overrides id, * item and index captions. * * @param itemId * the id of the item to be recaptioned. * @param caption * the New caption. */ public void setItemCaption(Object itemId, String caption) { if (itemId != null) { itemCa...
3.26
framework_AbstractSelect_writeItem_rdh
/** * Writes a data source Item to a design. Hierarchical select components * should override this method to recursively write any child items as well. * * @since 7.5.0 * @param design * the element into which to insert the item * @param itemId * the id of the item to write * @param context * the Design...
3.26
framework_AbstractSelect_paintContent_rdh
/* Component methods */ /** * Paints the content of this component. * * @param target * the Paint Event. * @throws PaintException * if the paint operation failed. */ @Override public void paintContent(PaintTarget target) throws PaintException { // Paints select attributes if (isMultiSelect()) { ...
3.26
framework_AbstractSelect_fireItemSetChange_rdh
/** * Fires the item set change event. */ protected void fireItemSetChange() { if ((itemSetEventListeners != null) && (!itemSetEventListeners.isEmpty())) {final Container.ItemSetChangeEvent event = new ItemSetChangeEvent(this); for (Object l : itemSetEventListeners.toArray()) { ((Container.It...
3.26
framework_AbstractSelect_addNewItem_rdh
/** * TODO refine doc * * This is a default class that handles adding new items that are typed by * user to selects container. * * By extending this class one may implement some logic on new item addition * like database inserts. */ @Deprecatedpublic class DefaultNewItemHandler implements NewItemHandler { @...
3.26
framework_AbstractSelect_containsId_rdh
/** * Tests, if the collection contains an item with given id. * * @param itemId * the Id the of item to be tested. */ @Override public boolean containsId(Object itemId) { if (itemId != null) {return items.containsId(itemId); } else { return false; } }
3.26
framework_AbstractSelect_setContainerDataSource_rdh
/* Container.Viewer methods */ /** * Sets the Container that serves as the data source of the viewer. * * As a side-effect the fields value (selection) is set to null due old * selection not necessary exists in new Container. * * @see Container.Viewer#setContainerDataSource(Container) * @param newDataSource * ...
3.26