name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_VFilterSelect_reset_rdh
/** * Resets the Select to its initial state */ private void reset() { debug("VFS: reset()"); if (currentSuggestion != null) { String text = currentSuggestion.getReplacementString();m1(text); setSelectedItemIcon(currentSuggestion.getIconUri()); selectedOptionKey = currentSuggestion.key; } else { if ((focused || rea...
3.26
framework_VFilterSelect_selectNextItem_rdh
/** * Selects the next item in the filtered selections. */ public void selectNextItem() { debug("VFS.SP: selectNextItem()"); final int index = menu.getSelectedIndex() + 1; if (menu.getItems().size() > index) { selectItem(menu.getItems().get(index)); } else { selectNextPage(); }}
3.26
framework_VFilterSelect_onClick_rdh
/** * Listener for popupopener. */ @Override public void onClick(ClickEvent event) { debug("VFS: onClick()"); if (textInputEnabled && (event.getNativeEvent().getEventTarget().cast() == tb.getElement())) { // Don't process clicks on the text field if text input is enabled return; } if (enabled && (!readonly)) { // ask...
3.26
framework_VFilterSelect_isScrollActive_rdh
/** * Returns true if the scroll is active on the menu element or if the * menu currently displays the last page with less items then the * maximum visibility (in which case the scroll is not active, but the * scroll is active for any other page in general). * * @since 7.2.6 */ @Override public boolean isScrollA...
3.26
framework_VFilterSelect_inputFieldKeyDown_rdh
/** * Triggered when a key is pressed in the text box * * @param event * The KeyDownEvent */ private void inputFieldKeyDown(KeyDownEvent event) { if (enableDebug) { debug(("VFS: inputFieldKeyDown(" + event.getNativeKeyCode()) + ")"); } switch (event.getNativeKeyCode()) { case KeyCodes.KEY_DOWN : case KeyCodes.KE...
3.26
framework_VFilterSelect_getItemOffsetWidth_rdh
/* Gets the width of one menu item. */ int getItemOffsetWidth() { List<MenuItem> items = getItems(); return (items != null) && (!items.isEmpty()) ? items.get(0).getOffsetWidth() : 0; }
3.26
framework_VFilterSelect_setSelectedItemIcon_rdh
/** * Sets the icon URI of the selected item. The icon is shown on the left * side of the item caption text. Set the URI to null to remove the icon. * * @param iconUri * The URI of the icon */ public void setSelectedItemIcon(String iconUri) { if ((iconUri == null) || iconUri.isEmpty()) { if (selectedItemIcon !=...
3.26
framework_VFilterSelect_getReplacementString_rdh
/** * Get a string that represents this item. This is used in the text box. */ @Override public String getReplacementString() { return caption; }
3.26
framework_VFilterSelect_getDisplayString_rdh
/** * Gets the visible row in the popup as a HTML string. The string * contains an image tag with the rows icon (if an icon has been * specified) and the caption of the item */@Override public String getDisplayString() { final StringBuilder v0 ...
3.26
framework_VFilterSelect_updatePopupPositionOnScroll_rdh
/** * Make the popup follow the position of the ComboBox when the page is * scrolled. */ private void updatePopupPositionOnScroll() { if (!scrollPending) { AnimationScheduler.get().requestAnimationFrame(new AnimationCallback() { public void m0(double timestamp) { if (isShowing()) { leftPositi...
3.26
framework_VFilterSelect_setTextboxText_rdh
/** * Sets the text in the text box. * * @param text * the text to set in the text box */ public void setTextboxText(final String text) { if (enableDebug) { debug(("VFS: setTextboxText(" + text) + ")"); } setText(text); }
3.26
framework_VFilterSelect_setSuggestions_rdh
/** * Sets the suggestions rendered in the menu. * * @param suggestions * The suggestions to be rendered in the menu */ public void setSuggestions(Collection<FilterSelectSuggestion> suggestions) { if (enableDebug) { debug(("VFS.SM: setSuggestions(" + suggestions) + ")"); } clearItems(); boolean isFirstIteration ...
3.26
framework_VFilterSelect_getMainWidth_rdh
/** * Get the width of the select in pixels where the text area and icon has * been included. * * @return The width in pixels */ private int getMainWidth() { return getOffsetWidth(); }
3.26
framework_VFilterSelect_updateReadOnly_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void updateReadOnly() { debug("VFS: updateReadOnly()"); tb.setReadOnly(readonly || (!textInputEnabled)); }
3.26
framework_VFilterSelect_onSuggestionSelected_rdh
/** * Triggered when a suggestion is selected. * * @param suggestion * The suggestion that just got selected. */ public void onSuggestionSelected(FilterSelectSuggestion suggestion) { if (enableDebug) { debug(((("VFS: onSuggestionSelected(" + suggestion.caption) + ": ") + suggestion.key) + ")"); } updateSelectio...
3.26
framework_VFilterSelect_createSuggestionPopup_rdh
/** * This method will create the SuggestionPopup used by the VFilterSelect * instance. It is invoked during the Constructor and should only be * overridden if a custom SuggestionPopup shall be used. The overriding * method cannot use any instance variables. * * @since 7.1.5 * @return SuggestionPopup instance us...
3.26
framework_VFilterSelect_getPreferredHeight_rdh
/* Gets the preferred height of the menu including pageItemsCount items. */ String getPreferredHeight(int pageItemsCount) {if (!currentSuggestions.isEmpty()) { final int pixels = (getPreferredHeight() / currentSuggestions.size()) * pageItemsCount; return pixels + "px"; } else { return ""; } }
3.26
framework_VFilterSelect_asFraction_rdh
/** * Returns the percentage value as a fraction, e.g. 42% -> 0.42 * * @param percentage */ private float asFraction(String percentage) { String trimmed = percentage.trim(); String withoutPercentSign = trimmed.substring(0, trimmed.length() - 1);float asFraction = Float.parseFloat(withoutPercentSign) / 100; return...
3.26
framework_CacheFlushNotifier_removeDeadReferences_rdh
/** * Removes dead references from instance list */ private static void removeDeadReferences() { Reference<? extends SQLContainer> dead = deadInstances.poll(); while (dead != null) { allInstances.remove(dead); dead = deadInstances.poll(); } }
3.26
framework_CacheFlushNotifier_notifyOfCacheFlush_rdh
/** * Iterates through the instances and notifies containers which are * connected to the same table or are using the same query string. * * @param c * SQLContainer that issued the cache flush notification */ public ...
3.26
framework_CacheFlushNotifier_addInstance_rdh
/** * Adds the given SQLContainer to the cache flush notification receiver list * * @param c * Container to add */ public static void addInstance(SQLContainer c) { removeDeadReferences(); if (c != null) { allInstances.add(new WeakReference<SQLContainer>(c, deadInstances)); } }
3.26
framework_MethodInvocation_getLastOnlyTag_rdh
/** * Gets a String tag that is used to uniquely identify previous method * invocations that should be purged from the queue if * <code>{@literal @}Delay(lastOnly = true)</code> is used. * <p> * The returned string should contain at least one non-number char to ensure * it doesn't collide with the keys used for i...
3.26
framework_RowReference_getRow_rdh
/** * Gets the row data object. * * @return the row object */public T getRow() { return row; }
3.26
framework_RowReference_set_rdh
/** * Sets the identifying information for this row. * * @param rowIndex * the index of the row * @param row * the row object * @param element * the element of the row */ public void set(int rowIndex, T row, TableRowElement element) { this.rowIndex = rowIndex; this.row = row; this.element = e...
3.26
framework_RowReference_getGrid_rdh
/** * Gets the grid that contains the referenced row. * * @return the grid that contains referenced row */ public Grid<T> getGrid() { return grid; }
3.26
framework_RowReference_getElement_rdh
/** * Gets the table row element of the row. * * @return the element of the row */ public TableRowElement getElement() { return element; }
3.26
framework_ServerRpcManager_applyInvocation_rdh
/** * Invoke a method in a server side RPC target class. This method is to be * used by the RPC framework and unit testing tools only. * * @param invocation * method invocation to perform */ public void applyInvocation(ServerRpcMethodInvocation invocation) throws RpcInvocationException { Method method = inv...
3.26
framework_ServerRpcManager_getRpcProxy_rdh
/** * Returns an RPC proxy for a given client to server RPC interface for the * given component or extension. * * @param connector * the connector for which to the RPC proxy * @param rpcInterface * the RPC interface type * @return a server RPC handler which can be used to invoke RPC methods * @since 8.0 *...
3.26
framework_ServerRpcManager_getImplementation_rdh
/** * Returns the RPC interface implementation for the RPC target. * * @return RPC interface implementation */ protected T getImplementation() {return implementation; }
3.26
framework_ServerRpcManager_getRpcInterface_rdh
/** * Returns the RPC interface type managed by this RPC manager instance. * * @return RPC interface type */ public Class<T> getRpcInterface() { return rpcInterface; }
3.26
framework_GridMultiSelect_getSelectAllCheckBoxVisibility_rdh
/** * Gets the current mode for the select all checkbox visibility. * * @return the select all checkbox visibility mode * @see SelectAllCheckBoxVisibility * @see #isSelectAllCheckBoxVisible() */ public SelectAllCheckBoxVisibility getSelectAllCheckBoxVisibility() { return model.getSelectAllCheckBoxVisibility()...
3.26
framework_GridMultiSelect_selectItems_rdh
/** * Adds the given items to the set of currently selected items. * <p> * By default this does not clear any previous selection. To do that, use * {@link #deselectAll()}. * <p> * If the all the items were already selected, this is a NO-OP. * <p> * This is a short-hand for {@link #updateSelection(Set, Set)} wit...
3.26
framework_GridMultiSelect_deselectItems_rdh
/** * Removes the given items from the set of currently selected items. * <p> * If the none of the items were selected, this is a NO-OP. * <p> * This is a short-hand for {@link #updateSelection(Set, Set)} with nothing * to select. * * @param items * to remove from selection, not {@code null} */ public void ...
3.26
framework_GridMultiSelect_setSelectAllCheckBoxVisibility_rdh
/** * Sets the select all checkbox visibility mode. * <p> * The default value is {@link SelectAllCheckBoxVisibility#DEFAULT}, which * means that the checkbox is only visible if the grid's data provider is * in- memory. * * @param visibility * the visiblity mode to use * @see SelectAllCheckBoxVisibility */ p...
3.26
framework_GridMultiSelect_getFirstSelectedItem_rdh
/* API for MultiSelectionModelImpl */ /** * Get first selected data item. * * @return the first selected item. */ public Optional<T> getFirstSelectedItem() { return model.getFirstSelectedItem(); }
3.26
framework_GridMultiSelect_setValue_rdh
/* MultiSelect implementation */ @Override public void setValue(Set<T> value) { model.asMultiSelect().setValue(value); }
3.26
framework_GridMultiSelect_deselect_rdh
/** * Selects the given item. Depending on the implementation, may cause other * items to be deselected. If the item is already selected, does nothing. * * @param item * the item to select, not null */ public void deselect(T item) { model.deselect(item); }
3.26
framework_GridMultiSelect_addMultiSelectionListener_rdh
/** * Adds a selection listener that will be called when the selection is * changed either by the user or programmatically. * * @param listener * the value change listener, not {@code null} * @return a registration for the listener */ public Registration addMultiSelectionListener(MultiSelectionListener<T> lis...
3.26
framework_GridMultiSelect_isAllSelected_rdh
/** * Returns whether all items are selected or not. * <p> * This is only {@code true} if user has selected all rows with the select * all checkbox on client side, or if {@link #selectAll()} has been used * from server side. * * @return {@code true} if all selected, {@code false} if not * @since 8.12.0 */ publ...
3.26
framework_GridMultiSelect_select_rdh
/** * Selects the given item. If another item was already selected, that item * is deselected. * * @param item * the item to select */ public void select(T item) {model.select(item); }
3.26
framework_GridMultiSelect_setUserSelectionAllowed_rdh
/** * Sets whether the user is allowed to change the selection. * <p> * The check is done only for the client side actions. It doesn't affect * selection requests sent from the server side. * * @param allowed * <code>true</code> if the user is allowed to change the * selection, <code>false</code> otherwise ...
3.26
framework_GridMultiSelect_addSelectionListener_rdh
/** * Adds a generic listener to this selection model, accepting both single * and multiselection events. * * @param listener * the listener to add * @return a registration handle for removing the listener */ public Registration addSelectionListener(SelectionListener<T> listener) { return model.addSelectio...
3.26
framework_VideoConnector_m0_rdh
/** * A connector class for the Video component. * * @author Vaadin Ltd */@Connect(Video.class)public class VideoConnector extends MediaBaseConnector { @Override public VideoState m0() { return ((VideoState) (super.getState())); }
3.26
framework_RangeValidator_of_rdh
/** * Returns a {@code RangeValidator} comparing values of a {@code Comparable} * type using their <i>natural order</i>. Passing null to either * {@code minValue} or {@code maxValue} means there is no limit in that * direction. Both limits may be null; this can be useful if the limits are * resolved programmatical...
3.26
framework_RangeValidator_apply_rdh
/** * Returns {@code Result.ok} if the value is within the specified bounds, * {@code Result.error} otherwise. If null is passed to {@code apply}, the * behavior depends on the used comparator. */ @Override public ValidationResult apply(T value, ValueContext context) { return toResult(value, m1(value)); }
3.26
framework_RangeValidator_setMinValue_rdh
/** * Sets the minimum value of the range. Use * {@link #setMinValueIncluded(boolean)} to control whether this value is * part of the range or not. * * @param minValue * the minimum value */ public void setMinValue(T minValue) { this.minValue = minValue; }
3.26
framework_RangeValidator_m0_rdh
/** * Sets whether the minimum value is part of the accepted range. * * @param minValueIncluded * true if the minimum value should be part of the range, false * otherwise */ public void m0(boolean minValueIncluded) { this.minValueIncluded = minValueIncluded; }
3.26
framework_RangeValidator_setMaxValue_rdh
/** * Sets the maximum value of the range. Use * {@link #setMaxValueIncluded(boolean)} to control whether this value is * part of the range or not. * * @param maxValue * the maximum value */ public void setMaxValue(T maxValue) { this.maxValue = maxValue; }
3.26
framework_RangeValidator_isMaxValueIncluded_rdh
/** * Returns whether the maximum value is part of the accepted range. * * @return true if the maximum value is part of the range, false otherwise */ public boolean isMaxValueIncluded() {return maxValueIncluded; }
3.26
framework_RangeValidator_m1_rdh
/** * Returns whether the given value lies in the valid range. * * @param value * the value to validate * @return true if the value is valid, false otherwise */ protected boolean m1(T value) { if (value == null) { return true; } if (getMinValue() != null) { int result = compara...
3.26
framework_RangeValidator_getMaxValue_rdh
/** * Gets the maximum value of the range. * * @return the maximum value */ public T getMaxValue() { return maxValue; }
3.26
framework_RangeValidator_setMaxValueIncluded_rdh
/** * Sets whether the maximum value is part of the accepted range. * * @param maxValueIncluded * true if the maximum value should be part of the range, false * otherwise */ public void setMaxValueIncluded(boolean maxValueIncluded) { this.maxValueIncluded = maxValueIncluded; }
3.26
framework_TableRowElement_getCell_rdh
/** * Returns cell from current row by index. Returns the same element as * $(TableElement.class).first().getCell(row, col). * * @see com.vaadin.testbench.elements.TableElement#getCell(int, int) * @param col * column index * @return cell from current row by index. */ public TestBenchElement getCell(int col) {...
3.26
framework_ChildFocusAwareFlowPanel_focusFirstEnabledChild_rdh
/** * Put focus in the first child Widget that can be focused and is not * disabled. */ public void focusFirstEnabledChild() { for (int i = 0; i < getWidgetCount(); i++) { Widget widget = getWidget(i); if (!(widget instanceof FocusWidget)) { continue; } FocusWidget fo...
3.26
framework_ProgressBarElement_getValue_rdh
/** * Returns the value of the progress bar. * * @return */ public double getValue() { WebElement indicator = findElement(By.className("v-progressbar-indicator")); String width = getStyleAttribute(indicator, "width"); if (!width.endsWith("%")) { return 0; } return Double.parseDou...
3.26
framework_DragAndDropWrapper_getVerticalDropLocation_rdh
/** * * @return a detail about the drags vertical position over the wrapper. */ public VerticalDropLocation getVerticalDropLocation() { return VerticalDropLocation.valueOf(((String) (getData("verticalLocation")))); }
3.26
framework_DragAndDropWrapper_getMouseDownEvent_rdh
/** * * @return the mouse down event that started the drag and drop operation */ public MouseEventDetails getMouseDownEvent() { return MouseEventDetails.deSerialize(((String) (getData("mouseDown")))); }
3.26
framework_DragAndDropWrapper_getAbsoluteTop_rdh
/** * * @return the absolute position of wrapper on the page */ public Integer getAbsoluteTop() { return ((Integer) (getData("absoluteTop"))); }
3.26
framework_DragAndDropWrapper_getDraggedComponent_rdh
/** * The component in wrapper that is being dragged or null if the * transferable is not a component (most likely an html5 drag). * * @return */ public Component getDraggedComponent() { Component object = ((Component) (getData("component"))); return object; }
3.26
framework_DragAndDropWrapper_setDragImageComponent_rdh
/** * Sets the component that will be used as the drag image. Only used when * wrapper is set to {@link DragStartMode#COMPONENT_OTHER} * * @param dragImageComponent */ public void setDragImageComponent(Component dragImageComponent) { this.dragImageComponent = dragImageComponent; markAsDirty(); }
3.26
framework_DragAndDropWrapper_getDragImageComponent_rdh
/** * Gets the component that will be used as the drag image. Only used when * wrapper is set to {@link DragStartMode#COMPONENT_OTHER} * * @return <code>null</code> if no component is set. */ public Component getDragImageComponent() { return dragImageComponent; }
3.26
framework_DragAndDropWrapper_getAbsoluteLeft_rdh
/** * * @return the absolute position of wrapper on the page */ public Integer getAbsoluteLeft() {return ((Integer) (getData("absoluteLeft"))); }
3.26
framework_DragAndDropWrapper_setHTML5DataFlavor_rdh
/** * Sets data flavors available in the DragAndDropWrapper is used to start an * HTML5 style drags. Most commonly the "Text" flavor should be set. * Multiple data types can be set. * * @param type * the string identifier of the drag "payload". E.g. "Text" or * "text/html" * @param value * the value */ ...
3.26
framework_DragAndDropWrapper_disposeStreamVariable_rdh
/** * Calling this method has no effect. DD files are receive only once * anyway. */ @Override public void disposeStreamVariable() { }
3.26
framework_CvalChecker_setLicenseProvider_rdh
/* Change the license provider, only used in tests. */ final CvalChecker setLicenseProvider(CvalServer p) { provider = p; return this; }
3.26
framework_CvalChecker_parseJson_rdh
/* used in tests */ static CvalInfo parseJson(String json) { if (json == null) { return null; } try { JsonObject v12 = JsonUtil.parse(json); return new CvalInfo(v12); } catch (JsonException e) { return null; } }
3.26
framework_CvalChecker_deleteCache_rdh
/* used in tests */ static void deleteCache(String productName) { Preferences p = Preferences.userNodeForPackage(CvalChecker.CvalInfo.class); p.remove(productName); }
3.26
framework_CvalChecker_computeLicenseName_rdh
/** * Given a product name returns the name of the file with the license key. * * Traditionally we have delivered license keys with a name like * 'vaadin.touchkit.developer.license' but our database product name is * 'vaadin-touchkit' so we have to replace '-' by '.' to maintain * compatibility. */ static final ...
3.26
framework_CvalChecker_cacheLicenseInfo_rdh
/* used in tests */ static void cacheLicenseInfo(CvalInfo info) {if (info != null) { Preferences v10 = Preferences.userNodeForPackage(CvalChecker.CvalInfo.class); if (info.toString().length() > Preferences.MAX_VALUE_LENGTH) { // This should never happen since MAX_VALUE_LENGTH is big ...
3.26
framework_CvalChecker_validateProduct_rdh
/** * Validate whether there is a valid license key for a product. * * @param productName * for example vaadin-touchkit * @param productVersion * for instance 4.0.1 * @return CvalInfo Server response or cache response if server is offline * @throws InvalidCvalException * when there is no a valid license ...
3.26
framework_CvalChecker_m0_rdh
/* Get the GWT firstLaunch timestamp. */ String m0() { try { Class<?> clz = Class.forName("com.google.gwt.dev.shell.CheckForUpdates"); return Preferences.userNodeForPackage(clz).get("firstLaunch", "-"); } catch (ClassNotFoundException e) { return "-"; } }
3.26
framework_ValidationResult_ok_rdh
/** * Returns a successful result. * * @return the successful result */ public static ValidationResult ok() { return new SimpleValidationResult(null, null); } /** * Creates the validation result which represent an error with the given * {@code errorMessage}. * * @param errorMessage * error message, not ...
3.26
framework_FocusableFlexTable_setFocus_rdh
/** * Sets the keyboard focus to the panel. * * @param focus * Should the panel have keyboard focus. If true the keyboard * focus will be moved to the */ public void setFocus(boolean focus) { if (focus) { FocusImpl.getFocusImplForPanel().focus(getElement()); } else { FocusImpl.getFocusImplForPanel().b...
3.26
framework_VRichTextToolbar_updateStatus_rdh
/** * Updates the status of all the stateful buttons. */ @SuppressWarnings("deprecation") private void updateStatus() { if (basic != null) { bold.setDown(basic.isBold()); italic.setDown(basic.isItalic()); underline.setDown(basic.isUnderlined()); subscript.setDown(basic.isSubscript()); f1.setDown(basic.isSuperscript(...
3.26
framework_DefaultConnectionStateHandler_hideDialog_rdh
/** * Called when the reconnect dialog should be hidden. */ protected void hideDialog() { reconnectDialog.setReconnecting(false); reconnectDialog.hide(); }
3.26
framework_DefaultConnectionStateHandler_getConnection_rdh
/** * Returns the connection this handler is connected to. * * @return the connection for this handler */ protected ApplicationConnection getConnection() { return connection; }
3.26
framework_DefaultConnectionStateHandler_isDialogVisible_rdh
/** * Checks if the reconnect dialog is visible to the user. * * @return true if the user can see the dialog, false otherwise */ protected boolean isDialogVisible() { return reconnectDialog.isVisible(); }
3.26
framework_DefaultConnectionStateHandler_doReconnect_rdh
/** * Re-sends the payload to the server (if not null) or re-sends a heartbeat * request immediately. * * @param payload * the payload that did not reach the server, null if the problem * was detected by a heartbeat */ protected void doReconnect(JsonObject payload) { if (!connection.isApplicationRunning()) ...
3.26
framework_DefaultConnectionStateHandler_getDialogTextGaveUp_rdh
/** * Gets the text to show in the reconnect dialog after giving up (reconnect * limit reached). * * @param reconnectAttempt * The number of the current reconnection attempt * @return The text to show in the reconnect dialog after giving up */ protected String getDialogTextGaveUp(int reconnectAttempt) { return...
3.26
framework_DefaultConnectionStateHandler_scheduleReconnect_rdh
/** * Called after a problem occurred. * * This method is responsible for re-sending the payload to the server (if * not null) or re-send a heartbeat request at some point * * @param payload * the payload that did not reach the server, null if the problem * was detected by a heartbeat */ protected void sch...
3.26
framework_DefaultConnectionStateHandler_showDialog_rdh
/** * Called when the reconnect dialog should be shown. This is typically when * N seconds has passed since a problem with the connection has been * detected */ protected void showDialog() { reconnectDialog.setReconnecting(true); reconnectDialog.show(connection); // We never want to show loading indicator and recon...
3.26
framework_DefaultConnectionStateHandler_getDialogText_rdh
/** * Gets the text to show in the reconnect dialog. * * @param reconnectAttempt * The number of the current reconnection attempt * @return The text to show in the reconnect dialog */ protected String getDialogText(int reconnectAttempt) { return getConfiguration().dialogText.replace("{0}", reconnectAttempt + ""...
3.26
framework_DefaultConnectionStateHandler_handleRecoverableError_rdh
/** * Called whenever an error occurs in communication which should be handled * by showing the reconnect dialog and retrying communication until * successful again. * * @param type * The type of failure detected * @param payload * The message which did not reach the server, or null if no * message was i...
3.26
framework_DefaultConnectionStateHandler_m0_rdh
/** * Called whenever a reconnect attempt fails to allow updating of dialog * contents. */protected void m0() { reconnectDialog.setText(getDialogText(reconnectAttempt)); }
3.26
framework_DefaultConnectionStateHandler_m1_rdh
/** * Ensures the reconnect dialog does not popup some time from now */ private void m1() { if (dialogShowTimer.isRunning()) { dialogShowTimer.cancel(); }}
3.26
framework_DefaultConnectionStateHandler_giveUp_rdh
/** * Called when we should give up trying to reconnect and let the user decide * how to continue. */ protected void giveUp() { reconnectionCause = null; endRequest(); m1(); if (!isDialogVisible()) { // It SHOULD always be visible at this point, unless you have a // really strange configuration (grace time l...
3.26
framework_SQLContainer_updateOffsetAndCache_rdh
/** * Determines a new offset for updating the row cache. The offset is * calculated from the given index, and will be fixed to match the start of * a page, based on the value of pageLength. * * @param index * Index of the item that was requested, but not found in cache */ private void updateOffsetAndCache(int...
3.26
framework_SQLContainer_removeReference_rdh
/** * Removes the reference pointing to the given SQLContainer. * * @param refdCont * Target SQLContainer of the reference * @return true if successful, false if the reference did not exist */ public boolean removeReference(SQLContainer refdCont) { if (refdCont == null) { throw new IllegalArgumentException("Ref...
3.26
framework_SQLContainer_m1_rdh
/** * Refreshes the container. If <code>setSizeDirty</code> is * <code>false</code>, assumes that the current size is up to date. This is * used in {@link #updateCount()} to refresh the contents when we know the * size was just updated. * * @param setSizeDirty */ private void m1(boolean setSizeDirty) { if (setSi...
3.26
framework_SQLContainer_updateCount_rdh
/** * Fetches new count of rows from the data source, if needed. */ private void updateCount() { if ((!sizeDirty) && (new Date().getTime() < (sizeUpdated.getTime() + f1))) { return; } try { try { queryDelegate.setFilters(filters); } catch (UnsupportedOperationException e) { getLogger().log(Level.FINE, "The query dele...
3.26
framework_SQLContainer_addContainerFilter_rdh
/** * {@inheritDoc } */ public void addContainerFilter(Object propertyId, String filterString, boolean ignoreCase, boolean onlyMatchPrefix) { if ((propertyId == null) || (!propertyIds.contains(propertyId))) { return; } /* Generate Filter -object */ String v26 = (onlyMatchPrefix) ? filterString + "%" : ("%" + filterSt...
3.26
framework_SQLContainer_addReference_rdh
/** * *************************************** */ /** * Referencing mechanism implementation * */ /** * *************************************** */ /** * Adds a new reference to the given SQLContainer. In addition to the * container you must provide the column (property) names used for the * reference in both th...
3.26
framework_SQLContainer_sort_rdh
/** * ******************************************** */ /** * Methods from interface Container.Sortable * */ /** * ******************************************** */ @Override public void sort(Object[] propertyId, boolean[] ascending) { sorters.clear(); if ((propertyId == null) || (propertyId.length == 0)) { refresh()...
3.26
framework_SQLContainer_getItemIds_rdh
/** * NOTE! Do not use this method if in any way avoidable. This method doesn't * (and cannot) use lazy loading, which means that all rows in the database * will be loaded into memory. * * {@inheritDoc } */ @Override public Collection<?> getItemIds() { updateCount(); List<RowId> ids = new ArrayList<RowId>(); R...
3.26
framework_SQLContainer_getItemUnfiltered_rdh
/** * Bypasses in-memory filtering to return items that are cached in memory. * <em>NOTE</em>: This does not bypass database-level filtering. * * @param itemId * the id of the item to retrieve. * @return the item represented by itemId. */ public Item getItemUnfiltered(Object itemId) { if (!cachedItems.contains...
3.26
framework_SQLContainer_isAutoCommit_rdh
/** * Returns status of the auto commit mode. * * @return true if auto commit mode is enabled */ public boolean isAutoCommit() {return autoCommit; }
3.26
framework_SQLContainer_removeContainerFilters_rdh
/** * {@inheritDoc } */ public void removeContainerFilters(Object propertyId) { List<Filter> toRemove = new ArrayList<Filter>(); for (Filter f : filters) { if (f.appliesToProperty(propertyId)) { toRemove.add(f); } } filters.removeAll(toRemove); refresh(); }
3.26
framework_SQLContainer_isColumnIdentifierValid_rdh
/** * Checks is the given column identifier valid to be used with SQLContainer. * Currently the only non-valid identifier is "rownum" when MSSQL or Oracle * is used. This is due to the way the SELECT queries are constructed in * order to implement paging in these databases. * * @param identifier * Column ident...
3.26
framework_SQLContainer_refresh_rdh
/** * *********************************** */ /** * Methods specific to SQLContainer * */ /** * *********************************** */ /** * Refreshes the container - clears all caches and resets size and offset. * Does NOT remove sorting or filtering rules! */ public void refresh() { m1(true); }
3.26
framework_SQLContainer_addItem_rdh
/** * *********************************** */ /** * Methods from interface Container * */ /** * *********************************** */ /** * Note! If auto commit mode is enabled, this method will still return the * temporary row ID assigned for the item. Implement * QueryDelegate.RowIdChangeListener to receive ...
3.26