name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_VaadinResponse_setNoCacheHeaders_rdh
/** * Sets all conceivable headers that might prevent a response from being * stored in any caches. * * @since 8.3.2 */ public default void setNoCacheHeaders() { // no-store to disallow storing even if cache would be revalidated // must-revalidate to not use stored value even if someone asks for it set...
3.26
framework_GlobalResourceHandler_register_rdh
/** * Registers a resource to be served with a global URL. * <p> * A {@link ConnectorResource} registered for a {@link LegacyComponent} will * be set to be served with a global URL. Other resource types will be * ignored and thus not served by this handler. * * @param resource * the resource to register * @p...
3.26
framework_GlobalResourceHandler_unregisterConnector_rdh
/** * Notifies this handler that resources registered for the given connector * can be released. * * @param connector * the connector for which any registered resources can be * released. */ public void unregisterConnector(ClientConnector connector) { Set<Resource> set = usedResources.remove(connector); if (...
3.26
framework_SizeWithUnit_parseStringSize_rdh
/** * Returns an object whose numeric value and unit are taken from the string * s. Null or empty string will produce {-1,Unit#PIXELS}. An exception is * thrown if s specifies a number without a unit. * * @param s * the string to be parsed * @return an object containing the parsed value and unit */ public sta...
3.26
framework_SizeWithUnit_getUnit_rdh
/** * Returns the unit stored in this object. * * @return the unit of this (value, unit) pair */ public Unit getUnit() { return unit; }
3.26
framework_PureGWTTestApplication_addChildMenu_rdh
/** * Adds a child menu entry to this menu. The title for this entry is * taken from the Menu object argument. * * @param m * another Menu object */ public void addChildMenu(Menu m) { menubar.addItem(m.title, m.menubar); children.add(m); }
3.26
framework_PureGWTTestApplication_addMenuCommand_rdh
/** * Connect an item to the menu structure * * @param cmd * a scheduled command; see google's docs * @param menupath * path to the item */ public void addMenuCommand(String title, ScheduledCommand cmd, String... menupath) { Menu m = createMenuPath(menupath); m.addCommand(new Command(title, cmd)); ...
3.26
framework_PureGWTTestApplication_getTestedWidget_rdh
/** * Gets the tested widget. * * @return tested widget */ public T getTestedWidget() { return testedWidget; }
3.26
framework_PureGWTTestApplication_createMenuPath_rdh
/** * Create a menu path, if one doesn't already exist, and return the last * menu in the series. * * @param path * a varargs list or array of strings describing a menu path, * e.g. "File", "Recent", "User Files", which would result in the * File menu having a submenu called "Recent" which would have a * ...
3.26
framework_PureGWTTestApplication_addCommand_rdh
/** * Adds a command item to the menu. When the entry is clicked, the * command is executed. * * @param cmd * a command object. */ public void addCommand(Command cmd) { menubar.addItem(cmd.title, cmd.command); items.add(cmd); } /** * Tests for the existence of a {@link Command}
3.26
framework_PureGWTTestApplication_getCommand_rdh
/** * Gets a reference to a {@link Command} item that is the direct child * of this level of menu. * * @param title * the command's title * @return a command, if found in this menu level, otherwise nu...
3.26
framework_PropertyFormatter_valueChange_rdh
/** * Listens for changes in the datasource. * * This should not be called directly. */ @Override public void valueChange(Property.ValueChangeEvent event) { fireValueChange(); }
3.26
framework_PropertyFormatter_setPropertyDataSource_rdh
/** * Sets the specified Property as the data source for the formatter. * * * <p> * Remember that new data sources getValue() must return objects that are * compatible with parse() and format() methods. * </p> * * @param newDataSource * the new data source Propert...
3.26
framework_PropertyFormatter_isReadOnly_rdh
/** * Reflects the read-only status of the datasource. */ @Override public boolean isReadOnly() { return dataSource == null ? false : dataSource.isReadOnly(); }
3.26
framework_PropertyFormatter_setReadOnly_rdh
/** * Sets the Property's read-only mode to the specified status. * * @param newStatus * the new read-only status of the Property. */ @Override public void setReadOnly(boolean newStatus) { if (dataSource != null) { dataSource.setReadOnly(newStatus); } }
3.26
framework_PropertyFormatter_readOnlyStatusChange_rdh
/** * Listens for changes in the datasource. * * This should not be called directly. */ @Override public void readOnlyStatusChange(Property.ReadOnlyStatusChangeEvent event) { fireReadOnlyStatusChange(); }
3.26
framework_BasicForwardHandler_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(ForwardEvent event, Date start, Date end) { event.getComponent().setStartDate(start); e...
3.26
framework_XhrConnection_send_rdh
/** * Sends an asynchronous UIDL request to the server using the given URI. * * @param payload * The URI to use for the request. May includes GET parameters * @throws RequestException * if the request could not be sent */ public void send(JsonObject payload) {RequestBuilder rb = new RequestBuilder(RequestBui...
3.26
framework_XhrConnection_setPayload_rdh
/** * Sets the payload which was sent to the server. * * @param payload * the payload which was sent to the server */ public void setPayload(JsonObject payload) { this.payload = payload; }
3.26
framework_XhrConnection_setConnection_rdh
/** * Sets the application connection this instance is connected to. Called * internally by the framework. * * @param connection * the application connection this instance is connected to */public void setConnection(ApplicationConnection connection) { this.connection = connection; connection.addHandler...
3.26
framework_XhrConnection_getUri_rdh
/** * Retrieves the URI to use when sending RPCs to the server. * * @return The URI to use for server messages. */ protected String getUri() { String uri = connection.translateVaadinUri((ApplicationConstants.APP_PROTOCOL_PREFIX + ApplicationConstants.UIDL_PATH) + '/'); uri = SharedUtil.addGetParameters(ur...
3.26
framework_XhrConnection_setRequestStartTime_rdh
/** * Sets the relative time (see {@link Profiler#getRelativeTimeMillis()}) * when the request was sent. * * @param requestStartTime * the relative time when the request was sent */ private void setRequestStartTime(double requestStartTime) { this.requestStartTime = requestStartTime; }
3.26
framework_RendererCellReference_m0_rdh
/** * Sets the colspan attribute of the element of this cell. * * @param numberOfCells * the number of columns that the cell should span */ public void m0(int numberOfCells) { cell.setColSpan(numberOfCells); }
3.26
framework_RendererCellReference_getColSpan_rdh
/** * Gets the colspan attribute of the element of this cell. * * @return the number of columns that the cell should span */ public int getColSpan() { return cell.getColSpan(); }
3.26
framework_RendererCellReference_getElement_rdh
/** * Returns the element of the cell. Can be either a <code>TD</code> element * or a <code>TH</code> element. * * @return the element of the cell */ @Override public TableCellElement getElement() { return cell.getElement(); }
3.26
framework_RendererCellReference_set_rdh
/** * Sets the identifying information for this cell. * * @param cell * the flyweight cell to reference * @param columnIndex * the index of the column in the grid, including hidden cells * @param column * the column to reference */ public void set(FlyweightCell cell, int columnIndex, Grid.Column<?, ?> co...
3.26
framework_VColorPickerGrid_updateColor_rdh
/** * Updates the changed colors within the grid based on the given x- and * y-coordinates. Nothing happens if any of the parameters is null or the * parameter lengths don't match. * <p> * For internal use only. May be renamed or removed in a future release. * * @param changedColor * the changed colors * @pa...
3.26
framework_VColorPickerGrid_getSelectedX_rdh
/** * Returns currently selected x-coordinate of the grid. * * @return the selected x-coordinate */ public int getSelectedX() { return selectedX; }
3.26
framework_VColorPickerGrid_getSelectedY_rdh
/** * Returns currently selected y-coordinate of the grid. * * @return the selected y-coordinate */ public int getSelectedY() { return selectedY; } /** * Checks whether the colors have been successfully updated at least once. * <p> * For internal use only. May be renamed or removed in a future release. * ...
3.26
framework_VColorPickerGrid_updateGrid_rdh
/** * Updates the row and column count and creates a new grid based on them. * The new grid replaces the old grid if one existed. * <p> * For internal use only. May be renamed or removed in a future release. * * @param rowCount * how many rows the grid should have * @param columnCount * how many columns th...
3.26
framework_VDebugWindow_applyPositionAndSize_rdh
/** * Applies the appropriate instance variables for width, height, x, y * depending on if the window is minimized or not. * * If the value is negative, the window is positioned that amount of pixels * from the right/bottom instead of left/top. * * Finally, the position is bounds-checked so that the window is no...
3.26
framework_VDebugWindow_m1_rdh
/** * Called when the window is initialized. */public void m1() { show(); /* Finalize initialization when all entry points have had the chance to e.g. register new sections. */ Scheduler.get().scheduleFinally(() -> { readStoredState(); Window.addResizeHandler(new ResizeHandler() { Timer t = new Timer() { ...
3.26
framework_VDebugWindow_setMinimized_rdh
/** * Sets whether or not the window is minimized. * * @param minimized */ private void setMinimized(boolean minimized) { this.f2 = minimized; tabs.setVisible(!minimized); content.setVisible(!minimized); sectionHead.setVisible(!minimized); menu.setVisible(!minimized); applyPositionAndSize(); }
3.26
framework_VDebugWindow_getTimingTooltip_rdh
/** * Gets a nicely formatted string with timing information suitable for * display in tooltips. * * @param sinceStart * @param sinceReset * @return */ static String getTimingTooltip(int sinceStart, int sinceReset) { String title = formatDuration(sinceStart) + " since start"; title += (", &#10; " + formatDuratio...
3.26
framework_VDebugWindow_resetTimer_rdh
/** * Resets the timer. * * @return Milliseconds elapsed since the timer was last reset. */ static int resetTimer() { int sinceLast = lastReset.elapsedMillis(); lastReset = null; return sinceLast; }
3.26
framework_VDebugWindow_setFontSize_rdh
/** * Sets the font size in use. * * @param size */ private void setFontSize(int size) { removeStyleDependentName("size" + fontSize); fontSize = size; addStyleDependentName("size" + size); }
3.26
framework_VDebugWindow_getMillisSinceStart_rdh
/** * Gets the milliseconds since application start. * * @return */ static int getMillisSinceStart() { return START.elapsedMillis(); }
3.26
framework_VDebugWindow_writeStoredState_rdh
/** * Writes the persistent state to localStorage. */ private void writeStoredState() { if (isClosed()) { return; } Storage storage = Storage.getLocalStorageIfSupported(); if (storage == null) { return; } writeState(storage, STORAGE_FULL_X, fullX); writeState(storage, ST...
3.26
framework_VDebugWindow_meta_rdh
/** * Called when the result from analyzeLayouts is received. * * @param ac * @param meta */public void meta(ApplicationConnection ac, ValueMap meta) { if (isClosed()) { return; } for (Section v28 : sections) { v28.meta(ac, meta); } }
3.26
framework_VDebugWindow_uidl_rdh
/** * Called when a response is received. * * @param ac * @param uidl */ public void uidl(ApplicationConnection ac, ValueMap uidl) { if (isClosed()) { return; } for (Section s : sections) { s.uidl(ac, uidl); } }
3.26
framework_VDebugWindow_getOverlayContainer_rdh
/** * Gets the container element for this window. The debug window is always * global to the document and not related to any * {@link ApplicationConnection} in particular. * * @return The global overlay container element. */ @Override public Element getOverlayContainer() { return RootPanel.get().getElement(); }
3.26
framework_VDebugWindow_readPositionAndSize_rdh
/** * Reads position and size from the DOM to local variables (which in turn * can be stored to localStorage) */ private void readPositionAndSize() { int x = getPopupLeft(); int fromRight = (Window.getClientWidth() - x) - getOffsetWidth(); if (fromRight < x) { x -= Window.getClientWidth(); } int y = getPopupTop()...
3.26
framework_VDebugWindow_getMillisSinceReset_rdh
/** * Gets the milliseconds since last {@link #resetTimer()} call. * * @return */ static int getMillisSinceReset() { if (lastReset == null) { lastReset = new Duration(); }return lastReset.elapsedMillis(); }
3.26
framework_VDebugWindow_get_rdh
/** * Gets the {@link #VDebugWindow()} singleton instance. * * @return */ public static VDebugWindow get() { if (instance == null) { instance = GWT.create(VDebugWindow.class); } return instance; }
3.26
framework_VDebugWindow_getFontSize_rdh
/** * Gets the font size currently in use. * * @return */ private int getFontSize() { return fontSize; }
3.26
framework_VDebugWindow_readStoredState_rdh
/** * Reads the stored state from localStorage. */ private void readStoredState() { Storage storage = Storage.getLocalStorageIfSupported(); if (storage == null) { return; } fullX = readState(storage, STORAGE_FULL_X, -510); fullY = readState(storage, STORAGE_FULL_Y, -230); fullW = rea...
3.26
framework_VDebugWindow_resetStoredState_rdh
/** * Resets (clears) the stored state from localStorage. */ private void resetStoredState() { Storage storage = Storage.getLocalStorageIfSupported(); if (storage == null) { return; } // note: length is live for (int i = 0; i < storage.getLength();) { String key = storage.key(i)...
3.26
framework_VDebugWindow_toggleMinimized_rdh
/** * Toggles the window between minimized and full states. */ private void toggleMinimized() { setMinimized(!f2); writeStoredState(); }
3.26
framework_VDebugWindow_addSection_rdh
/** * Adds the given {@link Section} as a tab in the {@link VDebugWindow} UI. * {@link Section#getTabButton()} is called to obtain a button which is used * tab. * * @param section */ public void addSection(final Section section) { Button b = section.getTabButton(); b.addClickHandler(event -> { activateSection(sec...
3.26
framework_VDebugWindow_close_rdh
/** * Closes the window and stops visual logging. */ public void close() { // TODO disable even more if (mouseDownHandler != null) { mouseDownHandler.removeHandler(); mouseMoveHandler.removeHandler(); mouseDownHandler = null; mouseMoveHandler = null; } Highlight.hideAll...
3.26
framework_VDebugWindow_activateSection_rdh
/** * Activates the given {@link Section} * * @param section */ void activateSection(Section section) { if ((section != null) && (section != activeSection)) { Highlight.hideAll(); // remove old stuff if (activeSection != null) { activeSection.hide();content.remove(activeSection.getContent()); sectionHead.re...
3.26
framework_VDebugWindow_addHandles_rdh
/** * Adds dummy handle elements to the bottom corners that might have * scrollbars that interfere with resizing on some platforms. * * @since 7.1 */ private void addHandles() { Element el = DOM.createDiv(); el.setClassName(((VDebugWindow.STYLENAME + "-handle ") + VDebugWindow.STYLENAME) + "-handle-sw");...
3.26
framework_VDebugWindow_formatDuration_rdh
/** * Formats the given milliseconds as hours, minutes, seconds and * milliseconds. * * @param ms * @return */ static String formatDuration(int ms) { NumberFormat fmt = NumberFormat.getFormat("00"); String seconds = fmt.format((ms / 1000) % 60); String minutes = fmt.format((ms / (1000 * 60)) % 60); String hours...
3.26
framework_EditorImpl_doClose_rdh
/** * Handles clean up for closing the Editor. */ protected void doClose() { edited = null; for (Component v11 : columnFields.values()) { removeComponentFromGrid(v11); } columnFields.clear(); getState().columnFields.clear(); }
3.26
framework_EditorImpl_doEdit_rdh
/** * Handles editor component generation and adding them to the hierarchy of * the Grid. * * @param bean * the edited item; can't be {@code null} */ protected void doEdit(T bean) { Objects.requireNonNull(bean, "Editor can't edit null"); if (!isEnabled()) { throw new IllegalStateException("Editing is not al...
3.26
framework_VNativeSelect_getSelect_rdh
/** * * @return the root select widget */ public ListBox getSelect() { return getOptionsContainer(); }
3.26
framework_GAEVaadinServlet_cleanDatastore_rdh
/** * This will look at the timestamp and delete expired persisted Vaadin and * appengine sessions from the datastore. * * TODO Possible improvements include: 1. Use transactions (requires entity * groups - overkill?) 2. Delete one-at-a-time, catch possible exception, * continue w/ next. */ private void cleanDat...
3.26
framework_GAEVaadinServlet_getMaxInactiveIntervalSeconds_rdh
/** * Returns the maximum inactive time for a session. This is used for * handling the expiration of session related information in caches etc. * * @param session * @return inactive timeout in seconds, greater than zero */ protected int getMaxInactiveIntervalSeconds(final HttpSession session) { int interval ...
3.26
framework_GAEVaadinServlet_cleanSession_rdh
/** * Removes the ApplicationContext from the session in order to minimize the * data serialized to datastore and memcache. * * @param request */private void cleanSession(VaadinServletRequest request) { // Should really be replaced with a session storage API... WrappedSession wrappedSession = request.getW...
3.26
framework_CssLayout_iterator_rdh
/** * Gets the component container iterator for going trough all the components * in the container. * * @return the Iterator of the components inside the container. */ @Override public Iterator<Component> iterator() { return Collections.unmodifiableCollection(components).iterator(); }
3.26
framework_CssLayout_getCss_rdh
/** * Returns styles to be applied to given component. Override this method to * inject custom style rules to components. * * <p> * Note that styles are injected over previous styles before actual child * rendering. Previous styles are not cleared, but overridden. * * <p> * Note that one most often achieves be...
3.26
framework_CssLayout_removeComponent_rdh
/** * Removes the component from this container. * * @param c * the component to be removed. */ @Override public void removeComponent(Component c) { components.remove(c); super.removeComponent(c); }
3.26
framework_CssLayout_m0_rdh
/** * Adds a component into this container. The component is added to the left * or on top of the other components. * * @param c * the component to be added. */ public void m0(Component c) { // If c is already in this, we must remove it before proceeding // see ticket #7668 if (equals(c.getParent()...
3.26
framework_CssLayout_getComponent_rdh
/** * Returns the component at the given position. * * @param index * The position of the component. * @return The component at the given index. * @throws IndexOutOfBoundsException * If the index is out of range. */ public Component getComponent(int index) throws IndexOutOfBoundsException { return component...
3.26
framework_CssLayout_replaceComponent_rdh
/* Documented in superclass */@Override public void replaceComponent(Component oldComponent, Component newComponent) { // Gets the locations int oldLocation = -1; int newLocation = -1; int location = 0; for (final Component component : components) { if (component == oldComponent) { oldLocation = location...
3.26
framework_CssLayout_getComponentCount_rdh
/** * Gets the number of contained components. Consistent with the iterator * returned by {@link #getComponentIterator()}. * * @return the number of contained components */ @Override public int getComponentCount() { return components.size(); }
3.26
framework_CssLayout_addComponent_rdh
/** * Adds a component into indexed position in this container. * * @param c * the component to be added. * @param index * the index of the component position. The components currently * in and after the position are shifted forwards. */ public void addComponent(Com...
3.26
framework_CssLayout_getComponentIndex_rdh
/** * Returns the index of the given component. * * @param component * The component to look up. * @return The index of the component or -1 if the component is not a child. */ public int getComponentIndex(Component component) { return components.indexOf(component); }
3.26
framework_FocusableGrid_m0_rdh
/** * Focus the panel. */ @Override public void m0() {setFocus(true); }
3.26
framework_FocusableGrid_setFocus_rdh
/** * Sets/Removes the keyboard focus to the panel. * * @param focus * If set to true then the focus is moved to the panel, if set to * false the focus is removed */ public void setFocus(boolean focus) { if (focus) { FocusImpl.getFocusImplForPanel().focus(getElement()); } else { Focus...
3.26
framework_PointerEventSupport_getNativeEventName_rdh
/** * * @param eventType * @return the native event name of the given event */ public static String getNativeEventName(EventType eventType) { return IMPL.getNativeEventName(eventType); }
3.26
framework_TextAreaElement_getValue_rdh
/** * Return value of the field element. * * @since 8.0 * @return value of the field element */ @Override public String getValue() {return getAttribute("value"); }
3.26
framework_GridSortOrder_asc_rdh
/** * Creates a new grid sort builder with given sorting using ascending sort * direction. * * @param by * the column to sort by * @param <T> * the grid type * @return the grid sort builder */ public static <T> GridSortOrderBuilder<T> asc(Column<T, ?> by) { return new GridSortOrderBuilder<T>().thenAsc...
3.26
framework_GridSortOrder_getSorted_rdh
/** * Gets the column this sorting information is attached to. * * @return the column being sorted */ @Override public Column<T, ?> getSorted() { return super.getSorted(); }
3.26
framework_GridSortOrder_desc_rdh
/** * Creates a new grid sort builder with given sorting using descending sort * direction. * * @param by * the column to sort by * @param <T> * the grid type * @return the grid sort builder */ public static <T> GridSortOrderBuilder<T> desc(Column<T, ?> by) { return new GridSortOrderBuilder<T>().thenD...
3.26
framework_AbstractMedia_getSources_rdh
/** * * @return The sources pointed to in this media. */ public List<Resource> getSources() { List<Resource> sources = new ArrayList<>(); for (URLReference v10 : getState(false).sources) { sources.add(((ResourceReference) (v10)).getResource()); }return sources; }
3.26
framework_AbstractMedia_setAltText_rdh
/** * Sets the alternative text to be displayed if the browser does not support * HTML5. This text is rendered as HTML if * {@link #setHtmlContentAllowed(boolean)} is set to true. With HTML * rendering, this method can also be used to implement fallback to a * flash-based player, see the <a href= * "https://devel...
3.26
framework_AbstractMedia_setSource_rdh
/** * Sets a single media file as the source of the media component. * * @param source */ public void setSource(Resource source) { clearSources(); addSource(source); }
3.26
framework_AbstractMedia_setShowControls_rdh
/** * Sets whether or not the browser should show native media controls. * * @param showControls */ public void setShowControls(boolean showControls) { getState().showControls = showControls;}
3.26
framework_AbstractMedia_setPreload_rdh
/** * Sets the preload attribute that is intended to provide a hint to the * browser how the media should be preloaded. Valid values are 'none', * 'metadata', 'preload', see the <a href= * "https://developer.mozilla.org/en/docs/Web/HTML/Element/video#attr-preload"> * Mozilla Developer Network</a> for details. * ...
3.26
framework_AbstractMedia_setHtmlContentAllowed_rdh
/** * Set whether the alternative text ({@link #setAltText(String)}) is * rendered as HTML or not. * * @param htmlContentAllowed */ public void setHtmlContentAllowed(boolean htmlContentAllowed) { getState().htmlContentAllowed = htmlContentAllowed; } /** * * @return true if the alternative text ({@link #setAlt...
3.26
framework_AbstractMedia_isMuted_rdh
/** * * @return true if the audio is muted. */ public boolean isMuted() { return getState(false).muted; }
3.26
framework_AbstractMedia_isAutoplay_rdh
/** * * @return true if the media is set to automatically start playback. */ public boolean isAutoplay() { return getState(false).autoplay; }
3.26
framework_AbstractMedia_play_rdh
/** * Starts playback of the media. */ public void play() { getRpcProxy(MediaControl.class).play(); }
3.26
framework_AbstractMedia_getPreload_rdh
/** * * @return the configured media preload value * @since 7.7.11 */ public PreloadMode getPreload() { return getState(false).preload; }
3.26
framework_AbstractMedia_setAutoplay_rdh
/** * Sets whether the media is to automatically start playback when enough * data has been loaded. * * @param autoplay */ public void setAutoplay(boolean autoplay) { getState().autoplay = autoplay; }
3.26
framework_AbstractMedia_isShowControls_rdh
/** * * @return true if the browser is to show native media controls. */ public boolean isShowControls() { return getState(false).showControls; }
3.26
framework_AbstractMedia_isLoop_rdh
/** * * @return true if looping is enabled * @since 7.7.11 */ public boolean isLoop() { return getState(false).loop; }
3.26
framework_AbstractMedia_setMuted_rdh
/** * Set whether to mute the audio or not. * * @param muted */ public void setMuted(boolean muted) { getState().muted = muted; }
3.26
framework_AbstractMedia_addSource_rdh
/** * Adds an alternative media file to the sources list. Which of the sources * is used is selected by the browser depending on which file formats it * supports. See * <a href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> * for a table of formats supported by different browsers. * * @param sour...
3.26
framework_AbstractMedia_pause_rdh
/** * Pauses the media. */ public void pause() { getRpcProxy(MediaControl.class).pause(); }
3.26
framework_IndexedContainer_removeItemProperty_rdh
/** * Indexed container does not support removing properties. Remove * properties at container level. See * {@link IndexedContainer#removeContainerProperty(Object)} * * @see Item#removeProperty(Object) */ @Override public boolean removeItemProperty(Object id) throws UnsupportedOperationException { throw new U...
3.26
framework_IndexedContainer_addItemAt_rdh
/** * {@inheritDoc } * <p> * The item ID is generated from a sequence of Integers. The id of the first * added item is 1. */ @Override public Object addItemAt(int index) { // Creates a new id final Object id = generateId(); // Adds the Item into container addItemAt(index, id); return id; }
3.26
framework_IndexedContainer_getType_rdh
/** * Gets the type of a Property stored in the list. * * @param propertyId * the ID of the Property. * @return Type of the requested Property */ @Override public Class<?> getType(Object propertyId) { return types.get(propertyId); }
3.26
framework_IndexedContainer_addItemAfter_rdh
/** * {@inheritDoc } * <p> * The item ID is generated from a sequence of Integers. The id of the first * added item is 1. */ @Override public Object addItemAfter(Object previousItemId) { // Creates a new id final Object id = generateId(); if (addItemAfter(previousItemId, id) != null) { return ...
3.26
framework_IndexedContainer_removeSinglePropertyChangeListener_rdh
/** * Removes a previously registered single Property change listener. * * @param propertyId * the ID of the Property to remove. * @param itemId * the ID of the Item. ...
3.26
framework_IndexedContainer_addItemProperty_rdh
/** * IndexedContainerItem does not support adding new properties. Add * properties at container level. See * {@link IndexedContainer#addContainerProperty(Object, Class, Object)} * * @see Item#addProperty(Object, Property) */ @Override public boolean addItemProperty(Object id, Property property) throws Unsuppor...
3.26
framework_IndexedContainer_addSinglePropertyChangeListener_rdh
/** * Adds new single Property change listener. * * @param propertyId * the ID of the Property to add. * @param itemId * the ID of the Item . * @param listener * the listener to be added. */ private void addSinglePropertyChangeListener(Object propertyId, Object itemId, Property.ValueChangeListener listen...
3.26
framework_IndexedContainer_toString_rdh
/** * Gets the <code>String</code> representation of the contents of the * Item. The format of the string is a space separated catenation of the * <code>String</code> representations of the values of the Properties * contained by the Item. * * @return <code>String</code> representation of the Item contents */@Ov...
3.26
framework_IndexedContainer_generateId_rdh
/** * Generates an unique identifier for use as an item id. Guarantees that the * generated id is not currently used as an id. * * @return */ private Serializable generateId() { Serializable id; do { id = Integer.valueOf(nextGeneratedItemId++); } while (items.containsKey(id) ); return id; }
3.26