name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_LegacyWindow_addComponent_rdh | /**
* Adds a component to this UI. The component is not added directly to the
* UI, but instead to the content container ({@link #getContent()}).
*
* This method should only be called when the content is a
* {@link ComponentContainer} (default {@link VerticalLayout} or explicitly
* set).
*
* @param component
*... | 3.26 |
framework_LegacyWindow_open_rdh | /**
* Opens the given resource in a window with the given size, border and
* name. For more information on the meaning of {@code windowName}, see
* {@link #open(Resource, String)}.
* <p>
* As of Vaadin 7.0.0, the functionality for opening a Resource in a Page
* has been replaced with similar methods based on a St... | 3.26 |
framework_AbstractDateFieldElement_setISOValue_rdh | /**
* Sets the value of the date field as a ISO8601 compatible string
* (yyyy-MM-dd or yyyy-MM-dd'T'HH:mm:ss depending on whether the element
* supports time).
*
* @param isoDateValue
* the date in ISO-8601 format
* @since 8.1.0
*/
protected void setISOValue(String isoDateValue) {
getCommandExecutor().exe... | 3.26 |
framework_AbstractDateFieldElement_getISOValue_rdh | /**
* Gets the value of the date field as a ISO8601 compatible string
* (yyyy-MM-dd or yyyy-MM-dd'T'HH:mm:ss depending on whether the element
* supports time).
*
* @return the date in ISO-8601 format
* @since 8.1.0
*/
protected String getISOValue() {
return ((String) (getCommandExecutor().executeScript("retu... | 3.26 |
framework_DataCommunicator_removeDataGenerator_rdh | /**
* Removes a data generator from this data communicator. If there is no such
* data generator, does nothing.
*
* @param generator
* the data generator to remove, not null
*/
public void removeDataGenerator(DataGenerator<T> generator) {
Objects.requireNonNull(generator, "generator cannot be null");
generators... | 3.26 |
framework_DataCommunicator_getMaximumAllowedRows_rdh | /**
* Get the maximum allowed rows to be fetched in one query.
*
* @return Maximum allowed rows for one query.
* @since 8.14.1
*/
protected int getMaximumAllowedRows() {
return f0;
} | 3.26 |
framework_DataCommunicator_cleanUp_rdh | /**
* Executes the data destruction for dropped data that is not sent to
* the client. This method takes most recently sent data objects in a
* collection. Doing the clean up like this prevents the
* {@link ActiveDataHandler} from creating new keys for rows that were
* dropped but got re-requested by the client-si... | 3.26 |
framework_DataCommunicator_m1_rdh | /**
* Sets the {@link QuerySortOrder}s to use with backend sorting.
*
* @param sortOrder
* list of sort order information to pass to a query
* @param immediateReset
* {@code true} if an internal reset should be performed
* immediately after updating the comparator (unless full reset
* is already pending... | 3.26 |
framework_DataCommunicator_onDropRows_rdh | /**
* Triggered when rows have been dropped from the client side cache.
*
* @param keys
* the keys of the rows that have been dropped
* @since 8.0.6
*/
protected void onDropRows(JsonArray keys) {
for (int i = 0; i < keys.length(); ++i) {
handler.dropActiveData(keys.getString(i));
}
} | 3.26 |
framework_DataCommunicator_getDroppedData_rdh | /**
* Returns all dropped data mapped by their id from DataProvider.
*
* @return map of ids to dropped data objects
* @since 8.6.0
*/
protected Map<Object, T> getDroppedData() {
Function<T, Object> getId = getDataProvider()::getId;
return droppedData.stream().map(getKeyMapper()::get).collect(Collectors.... | 3.26 |
framework_DataCommunicator_getActiveDataHandler_rdh | /**
* Returns the active data handler.
*
* @return the active data handler
* @since 8.0.6
*/
protected ActiveDataHandler getActiveDataHandler() {
return handler;
} | 3.26 |
framework_DataCommunicator_getInMemorySorting_rdh | /**
* Returns the {@link Comparator} to use with in-memory sorting.
*
* @return comparator used to sort data
* @since 8.0.6
*/
public Comparator<T> getInMemorySorting() {
return inMemorySorting;
} | 3.26 |
framework_DataCommunicator_createRpc_rdh | /**
* Creates a {@link DataRequestRpc} used with this {@link DataCommunicator}.
* <p>
* This method is called from the constructor.
*
* @return data request rpc implementation
*/
protected DataRequestRpc createRpc() {
return new SimpleDataRequestRpc();
} | 3.26 |
framework_DataCommunicator_setFilter_rdh | /**
* Sets the filter for this DataCommunicator. This method is used by user
* through the consumer method from {@link #setDataProvider} and should not
* be called elsewhere.
*
* @param filter
* the filter
* @param <F>
* the filter type
* @since 8.1
*/
protected <F> void setFilter(F filter) {
this.filter ... | 3.26 |
framework_DataCommunicator_getUpdatedData_rdh | /**
* Returns the currently set updated data.
*
* @return the set of data that should be updated on the next response
* @since 8.0.6
*/
protected Set<T> getUpdatedData() {
return updatedData;
} | 3.26 |
framework_DataCommunicator_getBackEndSorting_rdh | /**
* Returns the {@link QuerySortOrder} to use with backend sorting.
*
* @return an unmodifiable list of sort order information to pass to a query
* @since 8.0.6
*/public List<QuerySortOrder> getBackEndSorting() {
return Collections.unmodifiableList(backEndSorting);
} | 3.26 |
framework_DataCommunicator_refresh_rdh | /**
* Informs the DataProvider that a data object has been updated.
*
* @param data
* updated data object; not {@code null}
*/
public void refresh(T data) {
Objects.requireNonNull(data, "DataCommunicator can not refresh null object");
Object id = getDataProvider().getId(data);
// ActiveDataHandler has always th... | 3.26 |
framework_DataCommunicator_m0_rdh | /**
* Adds given objects as currently active objects.
*
* @param dataObjects
* collection of new active data objects
*/
public void m0(Stream<T> dataObjects) {
dataObjects.map(getKeyMapper()::key).filter(key -> !activeData.contains(key)).forEach(activeData::add);
} | 3.26 |
framework_DataCommunicator_addDataGenerator_rdh | /**
* Adds a data generator to this data communicator. Data generators can be
* used to insert custom data to the rows sent to the client. If the data
* generator is already added, does nothing.
*
* @param generator
* the data generator to add, not null
*/
public void addDataGenerator(DataGenerator<T> generato... | 3.26 |
framework_DataCommunicator_setInMemorySorting_rdh | /**
* Sets the {@link Comparator} to use with in-memory sorting.
*
* @param comparator
* comparator used to sort data
*/
public void setInMemorySorting(Comparator<T> comparator) {
setInMemorySorting(comparator, true);
} | 3.26 |
framework_DataCommunicator_setMinPushSize_rdh | /**
* Set minimum size of data which will be sent to the client when data
* source is set.
* <p>
* Server doesn't send all data from data source to the client. It sends
* some initial chunk of data (whose size is determined as minimum between
* {@code size} parameter of this method and data size). Client decides
... | 3.26 |
framework_DataCommunicator_getKeyMapper_rdh | /**
* Gets the {@link DataKeyMapper} used by this {@link DataCommunicator}. Key
* mapper can be used to map keys sent to the client-side back to their
* respective data objects.
*
* @return key mapper
*/
public DataKeyMapper<T> getKeyMapper() {
return keyMapper;
} | 3.26 |
framework_DataCommunicator_sendDataToClient_rdh | /**
* Send the needed data and updates to the client side.
*
* @param initial
* {@code true} if initial data load, {@code false} if not
* @since 8.0.6
*/
protected void sendDataToClient(boolean initial) {
if (getDataProvider() == null) {
return;
}
... | 3.26 |
framework_DataCommunicator_getFilter_rdh | /**
* Get the object used for filtering in this data communicator.
*
* @return the filter object of this data communicator
* @since 8.0.6
*/
protected Object getFilter() {
return filter; } | 3.26 |
framework_DataCommunicator_getDataObject_rdh | /**
* Creates the JsonObject for given data object. This method calls all data
* generators for it.
*
* @param data
* data object to be made into a json object
* @return json object representing the data object
*/
protected JsonObject getDataObject(T data) {
JsonObject dataObject = Json.createObject();
for (D... | 3.26 |
framework_DataCommunicator_m2_rdh | /**
* Sets a new {@code DataProvider} and refreshes all the internal
* structures.
*
* @param dataProvider
* @since 8.1
*/
protected void m2(DataProvider<T, ?> dataProvider) {
detachDataProviderListener();
dropAllData();
this.dataProvider = dataProvider;
getKeyMapper().setIdentifierGetter(dataProvider::getId);
... | 3.26 |
framework_DataCommunicator_dropAllData_rdh | /**
* Drops all data associated with this data communicator.
*/
protected void
dropAllData() {
for (DataGenerator<T> g : generators) {
g.destroyAllData();
}
handler.destroyAllData();
} | 3.26 |
framework_DataCommunicator_onRequestRows_rdh | /**
* Request the given rows to be available on the client side.
*
* @param firstRowIndex
* the index of the first requested row
* @param numberOfRows
* the number of requested rows
* @param firstCachedRowIndex
* the index of the first cached row
* @param cacheSize
* the number of cached rows
* @sinc... | 3.26 |
framework_DataCommunicator_dropActiveData_rdh | /**
* Marks a data object identified by given key string to be dropped.
*
* @param key
* key string
*/
public void dropActiveData(String key) {
if
(activeData.contains(key)) {
droppedData.add(key);
}
} | 3.26 |
framework_DataCommunicator_pushData_rdh | /**
* Sends given collection of data objects to the client-side.
*
* @param firstIndex
* first index of pushed data
* @param data
* data objects to send as an iterable
*/
protected void pushData(int firstIndex, List<T> data) {
JsonArray dataArray = Json.createArray();
int i = 0;
for (T item : data) {
da... | 3.26 |
framework_DataCommunicator_fetchItemsWithRange_rdh | /**
* Fetches a list of items from the DataProvider.
*
* @param offset
* the starting index of the range
* @param limit
* the max number of results
* @return the list of items in given range
* @since 8.1
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public List<T> fetchItemsWithRange(int offset, int li... | 3.26 |
framework_DataCommunicator_reset_rdh | /**
* Method for internal reset from a change in the component, requiring a
* full data update.
*/
public void reset() {
// Only needed if a full reset is not pending.
if (!reset) {
if (getParent() instanceof ComboBox) {beforeClientResponse(true);
}
// Soft reset through client-side re-request.
getCl... | 3.26 |
framework_DataCommunicator_setDataProvider_rdh | /**
* Sets the current data provider for this DataCommunicator.
* <p>
* The returned consumer can be used to set some other filter value that
* should be included in queries sent to the data provider. It is only valid
* until another data provider is set.
*
* @param dataProvider
* the data provider to set, no... | 3.26 |
framework_DataCommunicator_createKeyMapper_rdh | /**
* Creates a {@link DataKeyMapper} to use with this DataCommunicator.
* <p>
* This method is called from the constructor.
*
* @param identifierGetter
* has to return a unique key for every bean, and the returned
* key has to follow general {@code hashCode()} and
* {@code equals()} contract, see {@link ... | 3.26 |
framework_DataCommunicator_setMaximumAllowedRows_rdh | /**
* Set the maximum allowed rows to be fetched in one query.
*
* @param maximumAllowedRows
* Maximum allowed rows for one query.
* @since */
public void setMaximumAllowedRows(int maximumAllowedRows) {
this.maximumAllowedRows = maximumAllowedRows;
} | 3.26 |
framework_DataCommunicator_setBackEndSorting_rdh | /**
* Sets the {@link QuerySortOrder}s to use with backend sorting.
*
* @param sortOrder
* list of sort order information to pass to a query
*/
public void setBackEndSorting(List<QuerySortOrder> sortOrder) {
m1(sortOrder, true);
} | 3.26 |
framework_DataCommunicator_getDataProvider_rdh | /**
* Gets the current data provider from this DataCommunicator.
*
* @return the data provider
*/
public DataProvider<T, ?> getDataProvider() {
return dataProvider;
} | 3.26 |
framework_DataCommunicator_beforeClientResponse_rdh | /**
* Initially and in the case of a reset all data should be pushed to the
* client.
*/
@Overridepublic void beforeClientResponse(boolean initial) {
super.beforeClientResponse(initial);
if (initial && getPushRows().isEmpty()) {
// Make sure rows are pushed when component is attached.
setPush... | 3.26 |
framework_DataCommunicator_dropData_rdh | /**
* Drops data objects identified by given keys from memory. This will invoke
* {@link DataGenerator#destroyData} for each of those objects.
*
* @param droppedKeys
* collection of dropped keys
*/
private void
dropData(Collection<String> droppedKeys)
{
for (String key : droppedKeys) {
assert key != null ... | 3.26 |
framework_DataCommunicator_getPushRows_rdh | /**
* Get the current range of rows to push in the next response.
*
* @return the range of rows to push
* @since 8.0.6
*/
protected Range getPushRows() {
return pushRows;
} | 3.26 |
framework_Notification_getStyle_rdh | /**
*
* @since 7.2
* @return the style name for this notification type.
*/
public String getStyle() {
return style;} | 3.26 |
framework_Notification_m1_rdh | /**
* Gets the icon part of the notification message.
*
* @return The message icon
*/
public Resource m1() {
return getResource("icon");
} | 3.26 |
framework_Notification_setCaption_rdh | /**
* Sets the caption part of the notification message.
*
* @param caption
* The message caption
*/
public void setCaption(String caption) {
getState().caption = caption;
} | 3.26 |
framework_Notification_addCloseListener_rdh | /**
* Adds a CloseListener to the Notification.
*
* @param listener
* the CloseListener to add, not {@code null}
* @since 8.2
*/
public Registration addCloseListener(CloseListener listener) {
return addListener(Notification.CloseEvent.class,
listener, CLOSE_METHOD);
} | 3.26 |
framework_Notification_m0_rdh | /**
* Gets the caption part of the notification message.
*
* @return The message caption
*/
public String m0() {
return getState(false).caption;
} | 3.26 |
framework_Notification_show_rdh | /**
* Shows a notification message the current page. The position and behavior
* of the message depends on the type, which is one of the basic types
* defined in {@link Notification}, for instance
* Notification.TYPE_WARNING_MESSAGE.
*
* The caption is rendered as plain text with HTML automatically escaped.
*
*... | 3.26 |
framework_Notification_getDescription_rdh | /**
* Gets the description part of the notification message.
*
* @return The message description
*/
public String getDescription() { return getState(false).description;
} | 3.26 |
framework_Notification_setHtmlContentAllowed_rdh | /**
* Sets whether html is allowed in the caption and description. If set to
* true, the texts are passed to the browser as html and the developer is
* responsible for ensuring no harmful html is used. If set to false, the
* texts are passed to the browser as plain text.
*
* @param htmlContentAllowed
* true if... | 3.26 |
framework_Notification_getNotification_rdh | /**
* Gets the Notification.
*
* @return The Notification
*/
public Notification getNotification() {
return ((Notification) (getSource()));
} | 3.26 |
framework_Notification_setIcon_rdh | /**
* Sets the icon part of the notification message.
*
* @param icon
* The desired message icon
*/
public void setIcon(Resource icon) {
setResource("icon", icon);
}
/**
* Gets the delay before the notification disappears.
*
* @return the delay in milliseconds, {@value #DELAY_FOREVER} | 3.26 |
framework_Notification_getPosition_rdh | /**
* Gets the position of the notification message.
*
* @return The position
*/
public Position getPosition() {
return getState(false).position;
} | 3.26 |
framework_Notification_m2_rdh | /**
* Closes (hides) the notification.
* <p>
* If the notification is not shown, does nothing.
*
* @since 8.4
*/
public void m2() {
close(false);
} | 3.26 |
framework_Notification_setStyleName_rdh | /**
* Sets the style name for the notification message.
*
* @param styleName
* The desired style name
*/
public void setStyleName(String styleName) {getState().styleName = styleName;
} | 3.26 |
framework_Notification_close_rdh | /**
* Closes (hides) the notification.
* <p>
* If the notification is not shown, does nothing.
*
* @param userOriginated
* <code>true</code> if the notification was closed because the
* user clicked on it, <code>false</code> if the notification was
* closed from the server
* @since 8.4
*/
protected void... | 3.26 |
framework_Notification_setDescription_rdh | /**
* Sets the description part of the notification message.
*
* @param description
* The message description
*/
public void setDescription(String description) {
getState().description = description;
} | 3.26 |
framework_Notification_setPosition_rdh | /**
* Sets the position of the notification message.
*
* @param position
* The desired notification position, not {@code null}
*/
public void setPosition(Position position) {
if
(position == null) {
throw new IllegalArgumentException("Position can not be null");}
getState().position = positio... | 3.26 |
framework_TestBenchElementRightClick_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 j = 0; j < COLUMNS; j++) {
line[j] = (("col=" + j) + " row=") + i;
}
table.addItem(line, null);
}
} | 3.26 |
framework_TestBenchElementRightClick_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_GridSingleSelect_addSingleSelectionListener_rdh | /**
* Adds a single selection listener that is called when the value of this
* select 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 addSingleSelectionListener(SingleSelectionL... | 3.26 |
framework_GridSingleSelect_setSelectedItem_rdh | /**
* Sets the current selection to the given item, or clears selection if
* given {@code null}.
*
* @param item
* the item to select or {@code null} to clear selection
*/
public void setSelectedItem(T item) {model.setSelectedItem(item);
} | 3.26 |
framework_GridSingleSelect_addSelectionListener_rdh | /**
* Adds a generic listener to this selection model, accepting both single
* and multiselection events.
* <p>
* Use {@link #addSingleSelectionListener(SingleSelectionListener)} for more
* specific single selection event.
*
* @see #addSingleSelectionListener(SingleSelectionListener)
* @param listener
* the ... | 3.26 |
framework_GridSingleSelect_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_GridSingleSelect_setUserSelectionAllowed_rdh | /* Generic SelectionModel API */
/**
* 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
* selecti... | 3.26 |
framework_GridSingleSelect_setDeselectAllowed_rdh | /* API for SingleSelectionModel *//**
* Sets whether it's allowed to deselect the selected row through the UI.
* Deselection is allowed by default.
*
* @param deselectAllowed
* <code>true</code> if the selected row can be deselected
* without selecting another row instead; otherwise
* <code>false</code>.
... | 3.26 |
framework_GridSingleSelect_getFirstSelectedItem_rdh | /**
* Get first selected data item.
*
* @return the first selected item.
*/
public Optional<T> getFirstSelectedItem()
{
return model.getFirstSelectedItem();
} | 3.26 |
framework_GridSingleSelect_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_GridSingleSelect_setValue_rdh | /* SingleSelect implementation */
@Override
public void setValue(T value)
{
model.asSingleSelect().setValue(value);
} | 3.26 |
framework_ButtonRenderer_setHtmlContentAllowed_rdh | /**
* Sets whether the data should be rendered as HTML (instead of text).
* <p>
* By default everything is rendered as text.
*
* @param htmlContentAllowed
* <code>true</code> to render as HTML, <code>false</code> to
* render as text
* @since 8.0.3
*/
public void setHtmlContentAllowed(boolean htmlContentAl... | 3.26 |
framework_AbstractBeanContainer_setBeanIdResolver_rdh | /**
* Sets the resolver that finds the item id for a bean, or null not to use
* automatic resolving.
*
* Methods that add a bean without specifying an id must not be called if no
* resolver has been set.
*
* Note that methods taking an explicit id can be used whether a resolver
* has been defined or not.
*
* ... | 3.26 |
framework_AbstractBeanContainer_addListener_rdh | /**
*
* @deprecated As of 7.0, replaced by {@link #addPropertySetChangeListener}
*/
@Deprecated
@Overridepublic void addListener(Container.PropertySetChangeListener listener) {
addPropertySetChangeListener(listener);
} | 3.26 |
framework_AbstractBeanContainer_removeAllValueChangeListeners_rdh | /**
* Remove this contains as a listener for all the properties in the given
* {@link Item}.
*
* @param item
* The {@link Item} that contains the properties
*/
private void removeAllValueChangeListeners(Item item) {
for (Object propertyId : item.getItemPropertyIds()) {
removeValueChangeListener(it... | 3.26 |
framework_AbstractBeanContainer_addValueChangeListener_rdh | /**
* Make this container listen to the given property provided it notifies
* when its value changes.
*
* @param item
* The {@link Item} that contains the property
* @param propertyId
* The id of the property
*/
private void add... | 3.26 |
framework_AbstractBeanContainer_addBean_rdh | /**
* Adds a bean to the container using the bean item id resolver to find its
* identifier.
*
* A bean id resolver must be set before calling this method.
*
* @see #addItem(Object, Object)
* @param bean
* the bean to add
* @return BeanItem<BEANTYPE> item added or null
* @throws IllegalStateException
* i... | 3.26 |
framework_AbstractBeanContainer_addItemAfter_rdh | /**
* Adds the bean after the given bean.
*
* @see Container.Ordered#addItemAfter(Object, Object)
*/
protected BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId, IDTYPE newItemId, BEANTYPE bean) {
if (!validateBean(bean)) {
return
null;
}
return internalAddItemAfter(previousItemId, newItemId, createBean... | 3.26 |
framework_AbstractBeanContainer_addBeanAt_rdh | /**
* Adds a bean at a specified (filtered view) position in the container
* using the bean item id resolver to find its identifier.
*
* A bean id resolver must be set before calling this method.
*
* @see #addItemAfter(Object, Object, Object)
* @param index
* the index (in the filtered view) at which to add t... | 3.26 |
framework_AbstractBeanContainer_getBeanIdResolver_rdh | /**
* Returns the resolver that finds the item ID for a bean.
*
* @return resolver used or null if automatic item id resolving is disabled
*/
public BeanIdResolver<IDTYPE, BEANTYPE> getBeanIdResolver() {
return beanIdResolver;
} | 3.26 |
framework_AbstractBeanContainer_m1_rdh | /**
* Adds a nested container property for the container, e.g.
* "manager.address.street".
*
* All intermediate getters must exist and should return non-null values
* when the property value is accessed. If an intermediate getter returns
* null, a null value will be returned.
*
* @see NestedMethodProperty
* @p... | 3.26 |
framework_AbstractBeanContainer_validateBean_rdh | /**
* Check that a bean can be added to the container (is of the correct type
* for the container).
*
* @param bean
* @return */
private boolean validateBean(BEANTYPE bean) {
return (bean != null) && getBeanType().isAssignableFrom(bean.getClass());
} | 3.26 |
framework_AbstractBeanContainer_addItem_rdh | /**
* Adds the bean to the Container.
*
* Note: the behavior of this method changed in Vaadin 6.6 - now items are
* added at the very end of the unfiltered container and not after the last
* visible item if filtering is used.
*
* @see Container#addItem(Object)
*/
protected BeanItem<BEANTYPE> addItem(IDTYPE item... | 3.26 |
framework_AbstractBeanContainer_addBeanAfter_rdh | /**
* Adds a bean to the container after a specified item identifier, using the
* bean item id resolver to find its identifier.
*
* A bean id resolver must be set before calling this method.
*
* @see #addItemAfter(Object, Object, Object)
* @param previousItemId
* the identifier of the bean after which this be... | 3.26 |
framework_AbstractBeanContainer_addItemAt_rdh | /**
* Adds a new bean at the given index.
*
* The bean is used both as the item contents and as the item identifier.
*
* @param index
* Index at which the bean should be added.
* @param newItemId
* The item id for the bean to add to the container.
* @param bean
* The bean to add to the container.
* @re... | 3.26 |
framework_AbstractBeanContainer_createBeanItem_rdh | /**
* Create a BeanItem for a bean using pre-parsed bean metadata (based on
* {@link #getBeanType()}).
*
* @param bean
* @return created {@link BeanItem} or null if bean is null
*/protected BeanItem<BEANTYPE> createBeanItem(BEANTYPE bean) {
return bean == null ? null : new BeanItem<BEANTYPE>(bean, model);
} | 3.26 |
framework_AbstractBeanContainer_addAll_rdh | /**
* Adds all the beans from a {@link Collection} in one operation using the
* bean item identifier resolver. More efficient than adding them one by
* one.
*
* A bean id resolver must be set before calling this method.
*
* Note: the behavior of this method changed in Vaadin 6.6 - now items are
* added at the v... | 3.26 |
framework_AbstractBeanContainer_createBeanPropertyResolver_rdh | /**
* Create an item identifier resolver using a named bean property.
*
* @param propertyId
* property identifier, which must map to a getter in BEANTYPE
* @return created resolver
*/
protected BeanIdResolver<IDTYPE, BEANTYPE> createBeanPropertyResolver(Object propertyId) {
return new PropertyBasedBeanIdRes... | 3.26 |
framework_AbstractBeanContainer_getBeanType_rdh | /**
* Returns the type of beans this Container can contain.
*
* This comes from the bean type constructor parameter, and bean metadata
* (including container properties) is based on this.
*
* @return */
public Class<? super BEANTYPE> getBeanType() {
return type;
} | 3.26 |
framework_AbstractBeanContainer_addNestedContainerBean_rdh | /**
* Adds a nested container properties for all sub-properties of a named
* property to the container. The named property itself is removed from the
* model as its subproperties are added.
*
* All intermediate getters must exist and should return non-null values
* when the property value is accessed. If an inter... | 3.26 |
framework_ComponentSizeValidator_formHasNonRelativeWidthComponent_rdh | /**
* Comparability form component which is defined in the different jar.
*
* TODO : Normally this logic shouldn't be here. But it means that the whole
* this class has wrong design and implementation and should be refactored.
*/
private static boolean
formHasNonRelativeWidthComponent(Component form) {
HasComponen... | 3.26 |
framework_ComponentSizeValidator_validateComponentRelativeSizes_rdh | /**
* Recursively checks given component and its subtree for invalid layout
* setups. Prints errors to std err stream.
*
* @param component
* component to check
* @return set of first level errors found
*/
public static List<InvalidLayout> validateComponentRelativeSizes(Component component, List<InvalidLayout>... | 3.26 |
framework_ComponentSizeValidator_isForm_rdh | /**
* Comparability form component which is defined in the different jar.
*
* TODO : Normally this logic shouldn't be here. But it means that the whole
* this class has wrong design and implementation and should be refactored.
*/
private static boolean isForm(Component component)
{
if (!(component instanceof HasC... | 3.26 |
framework_ReportUsage_main_rdh | // for testing only
public static void main(String[] args) {
report();
} | 3.26 |
framework_DragStartEvent_getComponent_rdh | /**
* Returns the drag source component where the dragstart event occurred.
*
* @return Component which is dragged.
*/
@Override@SuppressWarnings("unchecked")
public T getComponent() {return ((T) (super.getComponent()));
} | 3.26 |
framework_MouseEventDetailsBuilder_buildMouseEventDetails_rdh | /**
* Construct a {@link MouseEventDetails} object from the given event.
*
* @param evt
* The event to use as a source for the details
* @param relativeToElement
* The element whose position
* {@link MouseEventDetails#getRelativeX()} and
* {@link MouseEventDetails#getRelativeY()} are relative to.
* @re... | 3.26 |
framework_DragAndDropHandler_onDragStartOnDraggableElement_rdh | /**
* This method can be called to trigger drag and drop on any grid element
* that can be dragged and dropped.
*
* @param dragStartingEvent
* the drag triggering event, usually a {@link Event#ONMOUSEDOWN}
* or {@link Event#ONTOUCHSTART} event on the draggable element
* @param callback
* the callback that... | 3.26 |
framework_HasValue_clear_rdh | /**
* Resets the value to the empty one.
* <p>
* This is just a shorthand for resetting the value, see the methods
* {@link #setValue(Object)} and {@link #getEmptyValue()}.
*
* @see #setValue(Object)
* @see #getEmptyValue()
*/
public default void clear() {
setValue(getEmptyValue());
} | 3.26 |
framework_HasValue_getOldValue_rdh | /**
* Returns the value of the source before this value change event
* occurred.
*
* @return the value previously held by the source of this event
*/
public V getOldValue() {
return oldValue;
} | 3.26 |
framework_HasValue_getOptionalValue_rdh | /**
* Returns the current value of this object, wrapped in an {@code Optional}.
* <p>
* The {@code Optional} will be empty if the value is {@code null} or
* {@code isEmpty()} returns {@code true}.
*
* @return the current value, wrapped in an {@code Optional}
*/
public default Optional<V> getOptionalValue()
{
... | 3.26 |
framework_HasValue_getValue_rdh | /**
* Returns the new value that triggered this value change event.
*
* @return the new value
*/public V getValue() {
return value;
} | 3.26 |
framework_HasValue_getComponent_rdh | /**
* Returns the component.
*
* @return the component, not null
*/
public Component getComponent() {
return component;
} | 3.26 |
framework_CSSInjectWithColorpicker_createEditor_rdh | /**
* Creates a text editor for visually editing text
*
* @param text
* The text editor
* @return */
private Component createEditor(String text) {
Panel editor = new Panel("Text Editor");
editor.setWidth("580px");
VerticalLayout
panelContent = new VerticalLayout();
panelContent.setSpacing(... | 3.26 |
framework_CSSInjectWithColorpicker_createTextColorSelect_rdh | /**
* Create a text color selction dialog
*/
private Component createTextColorSelect() { // Colorpicker for changing text color
ColorPicker
textColor = new
ColorPicker("Color", Color.BLACK);
textColor.setWidth("110px");
textColor.setCaption("Color");
textColor.addValueChangeListener(event -> {... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.