name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_Calendar_fireRangeSelect_rdh
/** * Fires an event range selected event. The event is fired when a user * highlights an area in the calendar. The highlighted areas start and end * dates are returned as arguments. * * @param from * The start date and time of the highlighted area * @param to * The end date and time of the highlighted area...
3.26
framework_Calendar_setEventSortOrder_rdh
/** * Sets sort order for events. By default sort order is * {@link EventSortOrder#DURATION_DESC}. * * @param order * sort strategy for events */ public void setEventSortOrder(EventSortOrder order) { if (order == null) { getState().eventSortOrder = EventSortOrder.DURATION_DESC; } else { getState().event...
3.26
framework_Calendar_setTimeFormat_rdh
/** * Example: <code>setTimeFormat(TimeFormat.Format12H);</code><br> * Set to null, if you want the format being defined by the locale. * * @param format * Set 12h or 24h format. Default is defined by the locale. */ public void setTimeFormat(TimeFormat format) { f0 = format; markAsDirty(); }
3.26
framework_Calendar_autoScaleVisibleHoursOfDay_rdh
/** * Sets the displayed start and end time to fit all current events that were * retrieved from the last call to getEvents(). * <p> * If no events exist, nothing happens. * <p> * <b>NOTE: triggering this method only does this once for the current * events - events that are not in the current visible range, are ...
3.26
framework_Calendar_getStartOfDay_rdh
/** * Calculates the end time of the day using the given calendar and date * * @param date * @param calendar * the calendar instance to be used in the calculation. The given * instance is unchanged in this operation. * @return the given date, with time set to the end of the day */ private static Date getSta...
3.26
framework_Calendar_fireWeekClick_rdh
/** * Fires event when a week was clicked in the calendar. * * @param week * The week that was clicked * @param year * The year of the week */ protected void fireWeekClick(int week, int year) { fireEvent(new WeekClick(this, week, year)); }
3.26
framework_Calendar_getWeeklyCaptionFormat_rdh
/** * Gets the date caption format for the weekly view. * * @return The pattern used in caption of dates in weekly view. */ public String getWeeklyCaptionFormat() { return weeklyCaptionFormat;}
3.26
framework_Calendar_initCalendarWithLocale_rdh
/** * Initialize the java calendar instance with the current locale and * timezone. */ private void initCalendarWithLocale() { if (timezone != null) { currentCalendar = Calendar.getInstance(timezone, getLocale()); } else { currentCalendar = Calendar.getInstance(getLocale()); } if (cus...
3.26
framework_Calendar_getEventProvider_rdh
/** * * @return the {@link CalendarEventProvider} currently used */ public CalendarEventProvider getEventProvider() { return calendarEventProvider; }
3.26
framework_Calendar_setEventCaptionAsHtml_rdh
/** * Sets whether the event captions are rendered as HTML. * <p> * If set to true, the captions are rendered in the browser as HTML and the * developer is responsible for ensuring no harmful HTML is used. If set to * false, the caption is rendered in the browser as plain text. * <p> * The default is false, i.e....
3.26
framework_Calendar_cacheMinMaxTimeOfDay_rdh
/** * Stores the minimum and maximum time-of-day in minutes for the events. * * @param events * A list of calendar events. Can be <code>null</code>. */ private void cacheMinMaxTimeOfDay(List<CalendarEvent> events) { minTimeInMinutes = null; maxTimeInMinutes = null; if (events != null) { for...
3.26
framework_Calendar_fireNavigationEvent_rdh
/** * Fires an event when the user selecing moving forward/backward in the * calendar. * * @param forward * True if the calendar moved forward else backward is assumed. */ protected void fireNavigationEvent(boolean forward) { if (forward) { fireEvent(new ForwardEvent(this)); } else { fireEvent(new BackwardEvent...
3.26
framework_Calendar_getLastVisibleHourOfDay_rdh
/** * Returns the last visible hour in the week view. Returns the hour using a * 24h time format */ public int getLastVisibleHourOfDay() { return lastHour; }
3.26
framework_Calendar_getDropHandler_rdh
/** * Get the currently active drop handler. */ @Override public DropHandler getDropHandler() {return dropHandler; }
3.26
framework_Calendar_setTimeZone_rdh
/** * Set time zone that this component will use. Null value sets the default * time zone. * * @param zone * Time zone to use */ public void setTimeZone(TimeZone zone) { timezone = zone; if (!currentCalendar.getTimeZone().equals(zone)) { if (zone == null) { zone = TimeZone.getDefault(); } cu...
3.26
framework_Calendar_getStartDate_rdh
/** * Gets the calendar's start date. * * @return First visible date. */ public Date getStartDate() { if (startDate == null) { currentCalendar.set(Calendar.MILLISECOND, 0); currentCalendar.set(Calendar.SECOND, 0); currentCalendar.set(Calendar.MINUTE, 0); currentCalendar.set(Cale...
3.26
framework_BasicWeekClickHandler_setDates_rdh
/** * Set the start and end dates for the event. * * @param event * The event that the start and end dates should be set * @param start * The start date * @param end * The end date */ protected void setDates(WeekClick event, Date start, Date end) { event.getComponent().setStartDate(start); event....
3.26
framework_JSR356WebsocketInitializer_initAtmosphereForVaadinServlet_rdh
/** * Initializes Atmosphere for use with the given Vaadin servlet * <p> * For JSR 356 websockets to work properly, the initialization must be done * in the servlet context initialization phase. * * @param servletRegistration ...
3.26
framework_JSR356WebsocketInitializer_init_rdh
/** * Initializes Atmosphere for use with Vaadin servlets found in the given * context. * <p> * For JSR 356 websockets to work properly, the initialization must be done * in the servlet context initialization phase. * * @param servletContext * The servlet context */ public void init(ServletContext servletCon...
3.26
framework_SystemError_getHtmlMessage_rdh
/** * Returns the message of the error in HTML. * * Note that this API may change in future versions. */ protected String getHtmlMessage() {// TODO wrapping div with namespace? See the old code: // target.addXMLSection("div", message, // "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"); StringBuild...
3.26
framework_Highlight_show_rdh
/** * Highlight the given {@link Element} using the given color. * <p> * Pass the returned highlight {@link Element} to {@link #hide(Element)} to * remove this particular highlight. * </p> * * @param element * Element to highlight * @param color * Color of highlight * @return Highlight element */ static...
3.26
framework_Highlight_hide_rdh
/** * Hides the given highlight. * * @param highlight * Highlight to hide */ static void hide(Element highlight) { if ((highlight != null) && (highlight.getParentElement() != null)) { highlight.getParentElement().removeChild(highlight); highlights.remove(highlight); } }
3.26
framework_Highlight_m0_rdh
/** * Highlights the {@link Widget} for the given {@link ComponentConnector} * using the given color. * <p> * Pass the returned {@link Element} to {@link #hide(Element)} to remove * this particular highlight. * </p> * * @param connector * ComponentConnector * @param color * Color of highlight * @return ...
3.26
framework_VRichTextArea_getSanitizedValue_rdh
/** * Browsers differ in what they return as the content of a visually empty * rich text area. This method is used to normalize these to an empty * string. See #8004. * * @return cleaned html string */ public String getSanitizedValue() { ...
3.26
framework_VRichTextArea_setValue_rdh
/** * Sets the value of the text area. * * @param value * The text value, as HTML */ public void setValue(String value) { if (rta.isAttached()) { rta.setHTML(value); } else { html.setHTML(value); } ...
3.26
framework_VRichTextArea_addBlurHandler_rdh
/** * Adds a blur handler to the component. * * @param blurHandler * the blur handler to add */ public void addBlurHandler(BlurHandler blurHandler) { blurHandlers.put(blurHandler, rta.addBlurHandler(blurHandler)); }
3.26
framework_VRichTextArea_removeBlurHandler_rdh
/** * Removes a blur handler. * * @param blurHandler * the handler to remove */ public void removeBlurHandler(BlurHandler blurHandler) { HandlerRegistration registration = blurHandlers.remove(blurHandler); if (registration != null) { registration.remove...
3.26
framework_VRichTextArea_getValue_rdh
/** * Gets the value of the text area. * * @return the value as HTML */ public String getValue() { if (rta.isAttached()) { return rta.getHTML(); } else { return html.getHTML(); } }
3.26
framework_VRichTextArea_swapEditableArea_rdh
/** * Swaps html to rta and visa versa. */ private void swapEditableArea() { String value = getValue(); if (html.isAttached()) { if (isReadOnly() || (!isEnabled())) { return; } fp.remove(html); if (BrowserInfo.get().isWebkit()) { fp.remove(formatter)...
3.26
framework_PortletListenerNotifier_synchronizedHandleRequest_rdh
/** * Fires portlet request events to any {@link PortletListener}s registered * to the given session using * {@link VaadinPortletSession#addPortletListener(PortletListener)}. The * PortletListener method corresponding to the request type is invoked. */ @Override public boolean synchronizedHandleRequest(VaadinSessi...
3.26
framework_VContextMenu_showAt_rdh
/** * Shows context menu at given location IF it contain at least one item. * * @param left * @param top */ public void showAt(int left, int top) { final Action[] actions = actionOwner.getActions(); if ((actions == null) || (actions.length == 0)) {// Only show if there really are actions retu...
3.26
framework_VContextMenu_ensureHidden_rdh
/** * Hides context menu if it is currently shown by given action owner. * * @param actionOwner */ public void ensureHidden(ActionOwner actionOwner) { if (this.actionOwner == actionOwner) { hide(); } }
3.26
framework_SelectorPath_hasId_rdh
/** * Finds out if the given query fragment has a defined id * * @param fragment * Query fragment * @return true if has id */ private boolean hasId(String fragment) { for (SelectorPredicate v9 : SelectorPredicate.extractPredicates(fragment)) { if (v9.getName()...
3.26
framework_SelectorPath_getNameWithCount_rdh
/** * Get variable name with counter for given component name. * * @param name * Component name * @return name followed by count */ protected String getNameWithCount(String name) { if (!counter.containsKey(name)) { counter.put(name, 0); } counter.put(name, counter.get(name) + 1); name += counter.get(name); ...
3.26
framework_SelectorPath_generateJavaVariable_rdh
/** * Generate Java variable assignment from given selector fragment * * @param pathFragment * Selector fragment * @return piece of java code */ private String generateJavaVariable(String pathFragment) { // Get element type and predicates from fragment List<SelectorPredicate> predicates = SelectorPredicate.extr...
3.26
framework_SelectorPath_getComponentName_rdh
/** * Returns the name of the component described by given query fragment. * * @param fragment * Query fragment * @return Class part of fragment */ protected String getComponentName(String fragment) { return fragment.split("\\[")[0]; }
3.26
framework_SelectorPath_getLegacyLocatorQuery_rdh
/** * Generates a legacy locator for SelectorPath. * * @return String containing Java code for element search and assignment */ private String getLegacyLocatorQuery() { String name; if (!path.isEmpty()) { String[] frags = path.split("/"); name = getComponentName(frags[frags.length - 1]).subs...
3.26
framework_SelectorPath_getNameFromPredicates_rdh
/** * Get variable name based on predicates. Fallback to elementType * * @param predicates * Predicates related to element * @param elementType * Element type * @return name for Variable */ private String getNameFromPredicates(List<SelectorPredicate> predicates, String elementType) { String name = elementTy...
3.26
framework_VDateTimeCalendarPanel_setTimeChangeListener_rdh
/** * The time change listener is triggered when the user changes the time. * * @param listener * the listener to use */ public void setTimeChangeListener(TimeChangeListener listener) { timeChangeListener = listener; }
3.26
framework_VDateTimeCalendarPanel_isTimeSelectorNeeded_rdh
/** * Do we need the time selector * * @return True if it is required */ private boolean isTimeSelectorNeeded() { return getResolution().compareTo(DateTimeResolution.DAY) < 0; }
3.26
framework_BasicEventMoveHandler_setDates_rdh
/** * Set the start and end dates for the event. * * @param event * The event that the start and end dates should be set * @param start * The start date * @param end * The end date */ protected void setDates(EditableCalendarEvent event, Date start, Date end) { event.setStart(start); event.setEnd(...
3.26
framework_TreeGridDropTarget_addTreeGridDropListener_rdh
/** * Attaches drop listener for the current drop target. * {@link TreeGridDropListener#drop(TreeGridDropEvent)} is called when drop * event happens on the client side. * * @param listener * Listener to handle drop event. * @return Handle to be used to remove this listener. */ public Registration addTreeGridD...
3.26
framework_FocusUtil_getTabIndex_rdh
/** * Gets the widget's position in the tab index. * * @param focusable * The widget * @return the widget's tab index */ public static int getTabIndex(Widget focusable) { assert (focusable != null) && (focusable.getElement() != null) : "Can't getTabIndex for a widget without an element"; return focu...
3.26
framework_FocusUtil_focusOnFirstFocusableElement_rdh
/** * Moves the focus to the first focusable child of given parent element. * * @param parent * the parent element * @since 8.1.7 */ public static void focusOnFirstFocusableElement(Element parent) { Element[] v0 = getFocusableChildren(parent); if (v0.length == 0) { return; } // find ...
3.26
framework_FocusUtil_setFocus_rdh
/** * Explicitly focus/unfocus the given widget. Only one widget can have focus * at a time, and the widget that does will receive all keyboard events. * * @param focusable * the widget to focus/unfocus * @param focus * whether this widget should take focus or release it */ public static void setFocus(Widge...
3.26
framework_FocusUtil_setTabIndex_rdh
/** * Sets the widget's position in the tab index. If more than one widget has * the same tab index, each such widget will receive focus in an arbitrary * order. Setting the tab index to <code>-1</code> will cause the widget to * be removed from the tab order. * * @param focusable * The widget * @param tabInd...
3.26
framework_FocusUtil_focusOnLastFocusableElement_rdh
/** * Moves the focus to the last focusable child of given parent element. * * @param parent * the parent element * @since 8.1.7 */ public static void focusOnLastFocusableElement(Element parent) { Element[] focusableChildren = getFocusableChildren(parent); if (focusableChildren.length > 0) { fo...
3.26
framework_FocusUtil_setAccessKey_rdh
/** * Sets the access key property. * * @param focusable * The widget for which we want to set the access key. * @param key * The access key to set */ public static void setAccessKey(Widget focusable, char key) { assert (focusable != null) && (focusable.getElement() != null) : "Can't setAccessKey for a w...
3.26
framework_Criterion_setKey_rdh
/** * Sets the key of the payload to be compared. * * @param key * key of the payload to be compared */ public void setKey(String key) { this.key = key; }
3.26
framework_Criterion_setOperator_rdh
/** * Sets the comparison operator. * * @param operator * comparison operator */ public void setOperator(ComparisonOperator operator) { this.operator = operator; } /** * Compares this criterion's value to the given payload's value and returns * whether the result matches the criterion's operator. The comp...
3.26
framework_Criterion_setValueType_rdh
/** * Sets the type of the payload value to be compared. * * @param valueType * type of the payload to be compared */ public void setValueType(Payload.ValueType valueType) { this.valueType = valueType; }
3.26
framework_Criterion_getValue_rdh
/** * Gets the value of the payload to be compared. * * @return value of the payload to be compared */public String getValue() { return value; }
3.26
framework_Criterion_getOperator_rdh
/** * Gets the comparison operator. * * @return operator to be used when comparing payload value with criterion */ public ComparisonOperator getOperator() { return operator; }
3.26
framework_Criterion_getValueType_rdh
/** * Gets the type of the payload value to be compared. * * @return type of the payload value to be compared */ public ValueType getValueType() { return valueType; }
3.26
framework_Criterion_setValue_rdh
/** * Sets the value of the payload to be compared. * * @param value * value of the payload to be compared */ public void setValue(String value) { this.value = value; }
3.26
framework_Potus_getTookOffice_rdh
/** * * @return the tookOffice */ public Date getTookOffice() { return tookOffice; }
3.26
framework_Potus_setLeftOffice_rdh
/** * * @param leftOffice * the leftOffice to set */ public void setLeftOffice(Date leftOffice) { this.leftOffice = leftOffice; }
3.26
framework_Potus_m0_rdh
/** * * @param tookOffice * the tookOffice to set */public void m0(Date tookOffice) { this.tookOffice = tookOffice; }
3.26
framework_Potus_getFirstName_rdh
/** * * @return the firstName */ public String getFirstName() { return firstName; }
3.26
framework_Potus_setParty_rdh
/** * * @param party * the party to set */ public void setParty(String party) { this.party = party; }
3.26
framework_Potus_getLeftOffice_rdh
/** * * @return the leftOffice */ public Date getLeftOffice() { return leftOffice; }
3.26
framework_Potus_setFirstName_rdh
/** * * @param firstName * the firstName to set */ public void setFirstName(String firstName) { this.firstName = firstName; }
3.26
framework_Potus_getLastName_rdh
/** * * @return the lastName */ public String getLastName() { return lastName; }
3.26
framework_Potus_getParty_rdh
/** * * @return the party */ public String getParty() { return party; }
3.26
framework_BasicEventProvider_containsEvent_rdh
/** * Does this event provider container this event. * * @param event * The event to check for * @return If this provider has the event then true is returned, else false */ public boolean containsEvent(BasicEvent event) { return eventList.contains(event); }
3.26
framework_BasicEventProvider_fireEventSetChange_rdh
/** * Fires a eventsetchange event. The event is fired when either an event is * added or removed to the event provider */ protected void fireEventSetChange() { EventSetChangeEvent event = new EventSetChangeEvent(this); for (EventSetChangeListener listener : listeners) { listener.eventSetChange(event...
3.26
framework_GridSelectionAllowedEvent_isSelectionAllowed_rdh
/** * Gets selection allowed value. * * @return {@code true} if selection is allowed, {@code false} otherwise */ public boolean isSelectionAllowed() { return f0; }
3.26
framework_CheckBoxGroup_m0_rdh
/** * Gets the item description generator. * * @return the item description generator * @since 8.2 */public DescriptionGenerator<T> m0() { return descriptionGenerator; }
3.26
framework_CheckBoxGroup_setHtmlContentAllowed_rdh
/** * Sets whether html is allowed in the item captions. If set to true, the * captions are passed to the browser as html and the developer is * responsible for ensuring no harmful html is used. If set to false, the * content is passed to the browser as plain text. * * @param htmlContentAllowed * true if the c...
3.26
framework_CheckBoxGroup_setItemDescriptionGenerator_rdh
/** * Sets the description generator that is used for generating descriptions * for items. Description is shown as a tooltip when hovering on * corresponding element. If the generator returns {@code null}, no tooltip * is shown. * * @param descriptionGenerator * the item description generator to set, not {@cod...
3.26
framework_AbstractErrorMessage_toString_rdh
/* Documented in superclass */ @Override public String toString() { return getMessage(); }
3.26
framework_ResourceWriter_write_rdh
/** * Writes a JSON object containing registered resources. * * @param ui * The {@link UI} whose resources to write. * @param writer * The {@link Writer} to use. * @param target * The {@link JsonPaintTarget} containing the resources. * @throws IOException */ public void write(UI ui, Writer writer, JsonP...
3.26
framework_AbstractInMemoryContainer_addFilter_rdh
/** * Adds a container filter and re-filter the view. * * The filter must implement Filter and its sub-filters (if any) must also * be in-memory filterable. * * This can be used to implement * {@link Filterable#addContainerFilter(Container.Filter)} and optionally * also * {@link SimpleFilterable#addContainerFi...
3.26
framework_AbstractInMemoryContainer_getIdByIndex_rdh
// Container.Indexed @Override public ITEMIDTYPE getIdByIndex(int index) { return getVisibleItemIds().get(index); }
3.26
framework_AbstractInMemoryContainer_internalRemoveAllItems_rdh
// removing items /** * Removes all items from the internal data structures of this class. This * can be used to implement {@link #removeAllItems()} in subclasses. * * No notification is sent, the caller has to fire a suitable item set * change notification. */ protected void internalRemoveAllItems() { // Rem...
3.26
framework_AbstractInMemoryContainer_fireItemsAdded_rdh
/** * Notify item set change listeners that items has been added to the * container. * * @param firstPosition * position of the first visible added item in the view * @param firstItemId * id of the first visible added item * @param numberOfItems * the number of visible added items */ protected void fire...
3.26
framework_AbstractInMemoryContainer_getItemSorter_rdh
// sorting /** * Returns the ItemSorter used for comparing items in a sort. See * {@link #setItemSorter(ItemSorter)} for more information. * * @return The ItemSorter used for comparing two items in a sort. */ protected ItemSorter getItemSorter() { return itemSorter; }
3.26
framework_AbstractInMemoryContainer_setFilteredItemIds_rdh
/** * Internal helper method to set the internal list of filtered item * identifiers. Should not be used outside this class except for * implementing clone(), may disappear from future versions. * * @param filteredItemIds */ @Deprecated protected void setFilteredItemIds(List<ITEMIDTYPE> filteredItemIds) { thi...
3.26
framework_AbstractInMemoryContainer_filterAll_rdh
// internal methods // Filtering support /** * Filter the view to recreate the visible item list from the unfiltered * items, and send a notification if the set of visible items changed in any * way. */ protected void filterAll() { if (doFilterContainer(!getFilters().isEmpty())) { fireItemSetChange(); ...
3.26
framework_AbstractInMemoryContainer_internalAddItemAt_rdh
/** * Add an item at a given (visible after filtering) item index, and perform * filtering. An event is fired if the filtered view changes. * * @param index * position where to add the item (visible/view index) * @param newItemId * @param item * new item to add * @param filter * true to perform filterin...
3.26
framework_AbstractInMemoryContainer_internalAddAt_rdh
/** * Adds the bean to all internal data structures at the given position. * Fails if an item with itemId is already in the container. Returns a the * item if it was added successfully, null otherwise. * * <p> * Caller should initiate filtering after calling this method. * </p> * * For internal use only - subc...
3.26
framework_AbstractInMemoryContainer_getSortablePropertyIds_rdh
/** * Returns the sortable property identifiers for the container. Can be used * to implement {@link Sortable#getSortableContainerPropertyIds()}. */ protected Collection<?> getSortablePropertyIds() { LinkedList<Object> sortables = new LinkedList<Object>(); for (Object propertyId : getContainerPropertyIds()) ...
3.26
framework_AbstractInMemoryContainer_isPropertyFiltered_rdh
/** * Checks if there is a filter that applies to a given property. * * @param propertyId * @return true if there is an active filter for the property */protected boolean isPropertyFiltered(Object propertyId) { if (getFilters().isEmpty() || (propertyId == null)) { return false; } for (final Fi...
3.26
framework_AbstractInMemoryContainer_setAllItemIds_rdh
/** * Internal helper method to set the internal list of all item identifiers. * Should not be used outside this class except for implementing clone(), * may disappear from future versions. * * @param allItemIds */ @Deprecated protected void setAllItemIds(List<ITEMIDTYPE> allItemIds) { this.allItemIds = allIt...
3.26
framework_AbstractInMemoryContainer_m0_rdh
// methods that are unsupported by default, override to support @Overridepublic Object m0(int index) throws UnsupportedOperationException { throw new UnsupportedOperationException("Adding items not supported. Override the relevant addItem*() methods if required as specified in AbstractInMemoryContainer javadoc."); }
3.26
framework_AbstractInMemoryContainer_getFilteredItemIds_rdh
/** * Internal helper method to get the internal list of filtered item * identifiers. Should not be used outside this class except for * implementing clone(), may disappear from future versions - use * {@link #getVisibleItemIds()} in other contexts. * * @return List<ITEMIDTYPE> */ protected List<ITEMIDTYPE> getF...
3.26
framework_AbstractInMemoryContainer_sortContainer_rdh
/** * Sort base implementation to be used to implement {@link Sortable}. * * Subclasses should call this from a public * {@link #sort(Object[], boolean[])} method when implementing Sortable. * * @see Container.Sortable#sort(java.lang.Object[], boolean[]) */ protected void sortContainer(Object[] propertyId, boole...
3.26
framework_AbstractInMemoryContainer_internalAddItemAtEnd_rdh
/** * Add an item at the end of the container, and perform filtering if * necessary. An event is fired if the filtered view changes. * * @param newItemId * @param item * new item to add * @param filter * true to perform filtering and send event after adding the * item, false to skip these operations for ...
3.26
framework_AbstractInMemoryContainer_isFiltered_rdh
/** * Returns true is the container has active filters. * * @return true if the container is currently filtered */ protected boolean isFiltered() { return filteredItemIds != null; }
3.26
framework_AbstractInMemoryContainer_getFirstVisibleItem_rdh
/** * Returns the item id of the first visible item after filtering. 'Null' is * returned if there is no visible items. * <p> * For internal use only. * * @since 7.4 * @return item id of the first visible item */ protected ITEMIDTYPE getFirstVisibleItem() { if (!getVisibleItemIds().isEmpty()) { retu...
3.26
framework_AbstractInMemoryContainer_fireItemsRemoved_rdh
/** * Notify item set change listeners that items has been removed from the * container. * * @param firstPosition * position of the first visible removed item in the view prior * to removal * @param firstItemId * id of the first visible removed item, of type {@link Object} * to satisfy {@link Container...
3.26
framework_AbstractInMemoryContainer_internalAddItemAfter_rdh
/** * Add an item after a given (visible) item, and perform filtering. An event * is fired if the filtered view changes. * * The new item is added at the beginning if previousItemId is null. * * @param previousItemId * item id of a visible item after which to add the new item, or * null to add at the beginn...
3.26
framework_AbstractInMemoryContainer_fireItemAdded_rdh
// item set change notifications /** * Notify item set change listeners that an item has been added to the * container. * * @since 7.4 * @param position * position of the added item in the view * @param itemId * id of the added item * @param item * the added item */ protected void fireItemAdded(int pos...
3.26
framework_AbstractInMemoryContainer_hasContainerFilters_rdh
/** * Returns true if any filters have been applied to the container. * * @return true if the container has filters applied, false otherwise * @since 7.1 */ protected boolean hasContainerFilters() { return !getContainerFilters().isEmpty(); }
3.26
framework_AbstractInMemoryContainer_removeAllFilters_rdh
/** * Remove all container filters for all properties and re-filter the view. * * This can be used to implement * {@link Filterable#removeAllContainerFilters()}. */ protected void removeAllFilters() { if (getFilters().isEmpty()) { return; } getFilters().clear(); filterAll(); }
3.26
framework_AbstractInMemoryContainer_removeFilters_rdh
/** * Remove all container filters for a given property identifier and * re-filter the view. This also removes filters applying to multiple * properties including the one identified by propertyId. * * This can be used to implement * {@link Filterable#removeContainerFilters(Object)}. * * @param propertyId * @re...
3.26
framework_AbstractInMemoryContainer_setItemSorter_rdh
/** * Sets the ItemSorter used for comparing items in a sort. The * {@link ItemSorter#compare(Object, Object)} method is called with item ids * to perform the sorting. A default ItemSorter is used if this is not * explicitly set. * * @param itemSorter * The ItemSorter used for comparing two items in a sort (no...
3.26
framework_AbstractInMemoryContainer_m2_rdh
/** * Remove a specific container filter and re-filter the view (if necessary). * * This can be used to implement * {@link Filterable#removeContainerFilter(Container.Filter)} . */ protected void m2(Filter filter) { for (Iterator<Filter> iterator = getFilters().iterator(); iterator.hasNext();) { Filter ...
3.26
framework_AbstractInMemoryContainer_nextItemId_rdh
// Container.Ordered @Override public ITEMIDTYPE nextItemId(Object itemId) { int index = indexOfId(itemId); if ((index >= 0) && (index < (size() - 1))) { return getIdByIndex(index + 1); } else { // out of bounds return null; } }
3.26
framework_AbstractInMemoryContainer_doFilterContainer_rdh
/** * Filters the data in the container and updates internal data structures. * This method should reset any internal data structures and then repopulate * them so {@link #getItemIds()} and other methods only return the filtered * items. * * @param hasFilters * true if filters has been set for the container, f...
3.26