name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_IndexedContainer_addItem_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 addItem() {// Creates a new id
final Object id = generateId();
// Adds the Item into container
addItem(id);
return id;
} | 3.26 |
framework_IndexedContainer_firePropertyValueChange_rdh | /**
* Sends a Property value change event to all interested listeners.
*
* @param source
* the IndexedContainerProperty object.
*/
private void firePropertyValueChange(IndexedContainerProperty source) {
// Sends event to listeners listening all value changes
if (propertyValueChangeListeners != null) {
... | 3.26 |
framework_IndexedContainer_hashCode_rdh | // LegacyPropertyHelper has been removed in Vaadin 8
/**
* Calculates a integer hash-code for the Property that's unique inside
* the Item containing the Property. Two different Properties inside the
* same Item contained in the same list always have different
* hash-codes, though Properties in different Items may ... | 3.26 |
framework_IndexedContainer_addDefaultValues_rdh | /**
* Helper method to add default values for items if available
*
* @param t
* data table of added item
*/
private void addDefaultValues(Map<Object, Object> t) {
if (defaultPropertyValues != null) {
for (Object key : defaultPropertyValues.keySet()) {
t.put(key, defaultPropertyValues.g... | 3.26 |
framework_TextArea_getRows_rdh | /**
* Gets the number of rows in the text area.
*
* @return number of explicitly set rows.
*/
public int getRows() {
return getState(false).rows;
} | 3.26 |
framework_TextArea_setRows_rdh | /**
* Sets the number of rows in the text area.
*
* @param rows
* the number of rows for this text area.
*/
public void setRows(int rows) {
if (rows < 0) {
rows =
0;
}
getState().rows = rows;
} | 3.26 |
framework_TextArea_setWordwrap_rdh | /**
* Sets the text area's word-wrap mode on or off.
*
* @param wordwrap
* the boolean value specifying if the text area should be in
* word-wrap mode.
*/
public void setWordwrap(boolean wordwrap) {
getState().wordwrap = wordwrap;
} | 3.26 |
framework_ComponentTestCase_createActions_rdh | /**
* Method that creates the "actions" shown in the upper part of the screen.
* Override this only if you do not want the default actions. Custom actions
* can be added through #createCustomActions();
*
* @return A List with actions to which more actions can be added.
*/
protecte... | 3.26 |
framework_ComponentTestCase_createCustomActions_rdh | /**
* Override to provide custom actions for the test case.
*
* @param actions
* Array with default actions. Add custom actions to this. Never
* null.
*/
protected void createCustomActions(List<Component> actions) {
} | 3.26 |
framework_FreeformQuery_getCount_rdh | /**
* This implementation of getCount() actually fetches all records from the
* database, which might be a performance issue. Override this method with a
* SELECT COUNT(*) ... query if this is too slow for your needs.
*
* {@inheritDoc }
*/
@Override
public int getCount() throws SQLException {
// First try the... | 3.26 |
framework_FreeformQuery_containsRowWithKey_rdh | /**
* This implementation of the containsRowWithKey method rewrites existing
* WHERE clauses in the query string. The logic is, however, not very
* complex and some times can do the Wrong Thing<sup>TM</sup>. For the
* situations where this logic is not enough, you can implement the
* getContainsRowQueryString meth... | 3.26 |
framework_SassLinker_writeFromInputStream_rdh | /**
* Writes the contents of an InputStream out to a file.
*
* @param contents
* @param tempfile
* @throws IOException
*/private void writeFromInputStream(InputStream contents, File tempfile) throws IOException {
// write the inputStream to a FileOutputStream
OutputStream out = new FileOutputStream(temp... | 3.26 |
framework_SassLinker_createTempDir_rdh | /**
* Create folder in temporary space on disk.
*
* @param partialPath
* @return */
private File createTempDir(String partialPath) {
String baseTempPath = System.getProperty("java.io.tmpdir");
File tempDir = new File((baseTempPath + File.separator) + partialPath);
if (!tempDir.exists()) {
tempD... | 3.26 |
framework_EmbeddedThemeResource_setup_rdh | /**
* Tests that {@link Embedded} uses correct theme when the theme is set with
* {@link #setTheme(String)}, and also updates correctly if theme is changed
* later. {@link Image} is used as the baseline for correct behavior.
*
* @author Vaadin Ltd
*/public class EmbeddedThemeResource extends AbstractReindeerTestU... | 3.26 |
framework_ReflectTools_getMethod_rdh | /**
* Returns the first non-synthetic method of the specified
* {@code listenerClass}, which must have single method in the source-code.
*
* This is needed, to remove the synthetic methods added if the class is
* instrumented.
*
* @param listenerClass
* The {@link Class} of the listener, which has a single me... | 3.26 |
framework_ReflectTools_getJavaFieldValue_rdh | /**
* Returns the value of the java field that is assignable to the property
* type.
* <p>
* Uses getter if a getter for the correct return type is present, otherwise
* tries to access even private fields directly. If the java field is not
* assignable to the property type throws an IllegalArgumentException.
*
... | 3.26 |
framework_ReflectTools_convertPrimitiveType_rdh | /**
*
* @since 7.4
*/
public static Class<?> convertPrimitiveType(Class<?> type) {
// Gets the return type from get method
if (type.isPrimitive()) {
if (type.equals(Boolean.TYPE)) {type = Boolean.class;
} else if (type.equals(Integer.TYPE)) {
type = Integer.class;
} else... | 3.26 |
framework_ReflectTools_findCommonBaseType_rdh | /**
* Finds the most specific class that both provided classes extend from.
*
* @param a
* one class to get the base type for, not <code>null</code>
* @param b
* another class to get the base type for, not <code>null</code>
* @return the most specific base class, not <code>null</code>
* @since 8.0
*/
publi... | 3.26 |
framework_ReflectTools_setJavaFieldValue_rdh | /**
* Sets the value of a java field.
* <p>
* Uses setter if present, otherwise tries to access even private fields
* directly.
*
* @param object
* The object containing the field
* @param field
* The field we want to set the value for
* @param value
* The value to set
* @throws IllegalAccessException... | 3.26 |
framework_ReflectTools_findMethod_rdh | /**
* Locates the method in the given class. Returns null if the method is not
* found. Throws an ExceptionInInitializerError if there is a problem
* locating the method as this is mainly called from static blocks.
*
* @param cls
* Class that contains the method
* @param methodN... | 3.26 |
framework_ReflectTools_createInstance_rdh | /**
* Creates a instance of the given class with a no-arg constructor.
* <p>
* Catches all exceptions which might occur and wraps them in a
* {@link IllegalArgumentException} with a descriptive error message hinting
* of what might be wrong with the class that could not be instantiated.
*
* @param cls
* the c... | 3.26 |
framework_ReflectTools_checkClassAccessibility_rdh | /**
* Makes a check whether the provided class is externally accessible for
* instantiation (e.g. it's not inner class (nested and not static) and is
* not a local class).
*
* @param cls
* type to check
*/
private static void checkClassAccessibility(Class<?> cls) {
if (cls.isMemberClass() && (!Modifier.isS... | 3.26 |
framework_SuperTextAreaConnector_getState_rdh | // @DelegateToWidget will not work with overridden state
@Overridepublic SuperTextAreaState getState() {
return ((SuperTextAreaState) (super.getState()));
} | 3.26 |
framework_FlyweightRow_unattached_rdh | /**
* Creates a new iterator of unattached flyweight cells. A cell is
* unattached if it does not have a corresponding
* {@link FlyweightCell#getElement() DOM element} attached to the row
* element.
*
* @param cells
* the collection of cells to iterate
*/
public static CellIterator unattached(final Collection... | 3.26 |
framework_FlyweightRow_removeCells_rdh | /**
* Removes cell representations (i.e. removed columns) from the indicated
* cell range and updates the subsequent indexing.
*
* @param index
* start index of the range
* @param numberOfColumns
* length of the range
*/
public void removeCells(final int index, final int numberOfColumns) {
cells.subList... | 3.26 |
framework_FlyweightRow_getCells_rdh | /**
* Returns a subrange of flyweight cells for the client code to render. The
* cells get their associated {@link FlyweightCell#getElement() elements}
* from the row element.
* <p>
* Precondition: each cell has a corresponding element in the row
*
* @param offset
* the index of the first cell to return
* @p... | 3.26 |
framework_FlyweightRow_assertSetup_rdh | /**
* Asserts that the flyweight row has properly been set up before trying to
* access any of its data.
*/
private void assertSetup() {
assert ((element != null) && (row != BLANK)) && (columnWidths != null) : ((("Flyweight row was not " + "properly initialized. Make sure the setup-method is ") + "called befor... | 3.26 |
framework_FlyweightRow_addCells_rdh | /**
* Adds cell representations (i.e. new columns) for the indicated cell range
* and updates the subsequent indexing.
*
* @param index
* start index of the range
* @param numberOfColumns
* length of the range
*/
public void addCells(final int index, final int numberOfColumns) {
for (int i = 0; i < numb... | 3.26 |
framework_FlyweightRow_setSkipNext_rdh | /**
* Sets the number of cells to skip when {@link #next()} is called the
* next time. Cell hiding is also handled eagerly in this method.
*
* @param colspan
* the number of cells to skip on next invocation of
* {@link #next()}
*/
public void setSkipNext(final int colspan)
{assert colspan > 0 : "Number of ce... | 3.26 |
framework_FlyweightRow_m0_rdh | /**
* Creates a new iterator of attached flyweight cells. A cell is
* attached if it has a corresponding {@link FlyweightCell#getElement()
* DOM element} attached to the row element.
*
* @param cells
* the collection of cells to iterate
*/
public static CellIterator m0(final Collection<FlyweightCell> cells) {r... | 3.26 |
framework_FlyweightRow_teardown_rdh | /**
* Tear down the state of the Row.
* <p>
* This is an internal check method, to prevent retrieving uninitialized
* data by calling {@link #getRow()}, {@link #getElement()} or
* {@link #getCells()} at an improper time.
* <p>
* This should only be used with asserts ("
* <code>assert flyweightRow.teardown()</co... | 3.26 |
framework_FlyweightRow_setup_rdh | /**
* Configure this FlyweightRow for the current use. This method is expected
* to be called multiple times during the Grid's life-cycle.
*
* @param e
* the root element for this row
* @param row
* the row index
* @param columnWidths
... | 3.26 |
framework_FlyweightRow_getUnattachedCells_rdh | /**
* Returns a subrange of unattached flyweight cells. Unattached cells do not
* have {@link FlyweightCell#getElement() elements} associated. Note that
* FlyweightRow does not keep track of whether cells in actuality have
* corresponding DOM elements or not; it is the caller's responsibility to
* invoke this meth... | 3.26 |
framework_PanelConnector_hasCaption_rdh | /**
* Detects if caption div should be visible.
*
* @return {@code true} if caption div should be shown
*/
protected boolean hasCaption() {
return (getState().caption != null) && (!getState().caption.isEmpty());
} | 3.26 |
framework_ColorPickerPopup_setHistoryVisible_rdh | /**
* Sets the visibility of the History.
*
* @param visible
* {@code true} to show the history, {@code false} to hide it
*/
public void setHistoryVisible(boolean visible) {
historyContainer.setVisible(visible);
resize.setVisible(visible);
} | 3.26 |
framework_ColorPickerPopup_setRGBTabVisible_rdh | /**
* Sets the RGB tab visibility.
*
* @param visible
* The visibility of the RGB tab
*/
public void setRGBTabVisible(boolean visible) {
if (visible && (!isTabVisible(rgbTab))) {
tabs.addTab(rgbTab, "RGB", null);
checkIfTabsNeeded();
} else if ((!visible) && isTabVisible(rgbTab)) {
tabs.removeComp... | 3.26 |
framework_ColorPickerPopup_createSelectTab_rdh | /**
* Creates the select tab.
*
* @return the component
*/
private Component
createSelectTab() {
VerticalLayout selLayout = new VerticalLayout();
selLayout.setMargin(new MarginInfo(false, false, true, false));
selLayout.addComponent(selPreview);
selLayout.addStyleName("seltab");
colorSelect = ne... | 3.26 |
framework_ColorPickerPopup_setHSVTabVisible_rdh | /**
* Sets the HSV tab visibility.
*
* @param visible
* The visibility of the HSV tab
*/
public void setHSVTabVisible(boolean visible) {
if
(visible && (!isTabVisible(hsvTab))) {
tabs.addTab(hsvTab, "HSV", null);
checkIfTabsNeeded();
} else if ((!visible) && isTabVisible(hsvTab)) {
tabs.removeCompone... | 3.26 |
framework_ColorPickerPopup_setValue_rdh | /**
* Sets the value of this object. If the new value is not equal to
* {@code getValue()}, fires a {@link ValueChangeEvent}. Throws
* {@code NullPointerException} if the value is null.
*
* @param color
* the new value, not {@code null}
* @throws NullPointerException
* if {@code color} is {@code null}
*/
@... | 3.26 |
framework_ColorPickerPopup_getColorHistory_rdh | /**
* Gets the color history.
*
* @return the color history
*/
public List<Color> getColorHistory() {
return Collections.unmodifiableList(history.getHistory());
} | 3.26 |
framework_ColorPickerPopup_m0_rdh | /**
* Creates the RGB tab.
*
* @return the component
*/
private Component m0(Color color) {
VerticalLayout rgbLayout = new VerticalLayout();
rgbLayout.setMargin(new MarginInfo(false, false, true, false));
rgbLayout.addComponent(f1);
rgbLayout.setStyleName("rgbtab");
// Add the RGB color gradient... | 3.26 |
framework_ColorPickerPopup_setSwatchesTabVisible_rdh | /**
* Sets the visibility of the Swatches tab.
*
* @param visible
* The visibility of the Swatches tab
*/
public void setSwatchesTabVisible(boolean visible) {if (visible && (!isTabVisible(swatchesTab))) {
tabs.addTab(swatchesTab, "Swatches", null);
checkIfTabsNeeded();
} else if ((!visible) && isTabVisib... | 3.26 |
framework_ColorPickerPopup_isTabVisible_rdh | /**
* Checks the visibility of the given tab
*
* @param tab
* The tab to check
* @return true if tab is visible, false otherwise
*/
private boolean isTabVisible(Component tab) {
for (Component child : tabs) {
if (child == tab) {
return true;
}
}
return false;
} | 3.26 |
framework_ColorPickerPopup_checkIfTabsNeeded_rdh | /**
* Checks if tabs are needed and hides them if not
*/
private void checkIfTabsNeeded() {
tabs.setTabsVisible(tabs.getComponentCount() > 1);
} | 3.26 |
framework_ColorPickerPopup_createHSVTab_rdh | /**
* Creates the hsv tab.
*
* @return the component
*/
private Component createHSVTab(Color color) {
VerticalLayout hsvLayout = new VerticalLayout();
hsvLayout.setMargin(new MarginInfo(false, false, true, false));
hsvLayout.addComponent(hsvPreview);
hsvLayout.setStyleName("hsvtab");
// Add the... | 3.26 |
framework_ColorPickerPopup_setPreviewVisible_rdh | /**
* Sets the preview visibility.
*
* @param visible
* {@code true} to show the preview, {@code false} to hide it
*/
public void setPreviewVisible(boolean visible) {
hsvPreview.setVisible(visible);
f1.setVisible(visible);
selPreview.setVisible(visible);
} | 3.26 |
framework_VTransferable_getVariableMap_rdh | /**
* This helper method should only be called by {@link VDragAndDropManager}.
*
* @return data in this Transferable that needs to be moved to server.
*/
Map<String, Object> getVariableMap() {
return variables;
} | 3.26 |
framework_VTransferable_m0_rdh | /**
* Stores any type of named data that can be useful during the DnD
* operation.
*
* @param dataFlavor
* the identifier for the data object, should not be {@code null}
* @param value
* the data to store, should not be {@code null}
*/
public void m0(String dataFlavor, Object value) {
variables.put(data... | 3.26 |
framework_VTransferable_setDragSource_rdh | /**
* Sets the component currently being dragged or from which the transferable
* is created (e.g. a tree which node is dragged).
* <p>
* The server side counterpart of the component may implement
* {@link DragSource} interface if it wants to translate or complement the
* server side instance of this Transferable... | 3.26 |
framework_VTransferable_getData_rdh | /**
* Returns previously saved data that is referred to by the given
* identifier.
*
* @param dataFlavor
* the identifier for the data object
* @return the data object, or {@code null} if not found
* @see #setData(String, Object)
*/
public Object getData(String dataFlavor) {
return variables.get(dataFlavo... | 3.26 |
framework_TabSheetElement_closeTab_rdh | /**
* Closes the given tab if it is closable.
*
* @param tabCell
* The tab to be closed
*/
private void closeTab(WebElement tabCell) {
try {
tabCell.findElement(byClosable).click();
// Going further causes a StaleElementReferenceException.
return;
} catch (NoSuchElementException e... | 3.26 |
framework_TabSheetElement_openTab_rdh | /**
* Opens the given tab by clicking its caption text or icon. If the tab has
* neither text caption nor icon, clicks at a fixed position.
*
* @param tabCell
* The tab to be opened.
*/
private void openTab(WebElement tabCell) {
// Open the tab by clicking its caption text if it exists.
List<WebElement>... | 3.26 |
framework_TabSheetElement_getTabCaption_rdh | /**
* Returns the caption text of the given tab. If the tab has no caption,
* returns null.
*
* @param tabCell
* A web element representing a tab, as given by
* findElements(byTabCell).get(index).
* @return The caption of tabCell or null if tabCell has no caption.
*/
private String getTabCaption(WebElement ... | 3.26 |
framework_TabSheetElement_getContent_rdh | /**
* Gets TabSheet content and wraps it in given class.
*
* @param clazz
* Components element class
* @return TabSheet content wrapped in given class
*/
public <T extends AbstractElement> T getContent(Class<T> clazz) {
return TestBench.createElement(clazz, $$(AbstractComponentElement.class).first().getW... | 3.26 |
framework_DateCell_updatePositionFor_rdh | // date methods are not deprecated in GWT
@SuppressWarnings("deprecation")
private void
updatePositionFor(DateCellDayEvent dayEvent, Date targetDay, CalendarEvent calendarEvent) {
if (shouldDisplay(calendarEvent)) {
dayEvent.getElement().getStyle().clearDisplay();
Date fromDt = calendarEvent.getStartTime();
int h = f... | 3.26 |
framework_DateCell_getOverlappingEvents_rdh | /**
* Returns all overlapping DayEvent indexes in the Group. Including the
* target.
*
* @param targetIndex
* Index of DayEvent in the current DateCell widget.
* @return Group that contains all Overlapping DayEvent indexes
*/
public DateCellGroup getOverlappingEvents(int targetIndex) {
DateCellGroup g = new D... | 3.26 |
framework_DateCell_addEmphasisStyle_rdh | /**
*
* @since 7.2
*/
public void addEmphasisStyle(Element elementOver) {
addEmphasisStyle(DOM.asOld(elementOver));
}
/**
*
* @deprecated As of 7.2, call or override
{@link #removeEmphasisStyle(Element)} | 3.26 |
framework_DateCell_setVerticalSized_rdh | /**
*
* @param isVerticalSized
* if true, this DateCell is sized with CSS and not via
* {@link #setHeightPX(int)}
*/ public void setVerticalSized(boolean isVerticalSized) {
if (isVerticalSized) {
addStyleDependentName("Vsized");
// recalc heights&size for events. all other height sizes come
// fro... | 3.26 |
framework_DateCell_removeEmphasisStyle_rdh | /**
*
* @since 7.2
*/
public void removeEmphasisStyle(Element elementOver) {
removeEmphasisStyle(DOM.asOld(elementOver));
} | 3.26 |
framework_DateCell_setHorizontalSized_rdh | /**
*
* @param isHorizontalSized
* if true, this DateCell is sized with CSS and not via
* {@link #setWidthPX(int)}
*/
public void setHorizontalSized(boolean isHorizontalSized) {
if (isHorizontalSized) {
addStyleDependentName("Hsized");
width = getOffsetWidth() - WidgetUtil.measureHorizontalBorder(getEl... | 3.26 |
framework_DateCell_updateGroup_rdh | /* Update top and bottom date range values. Add new index to the group. */
private void updateGroup(DateCellGroup targetGroup, DateCellGroup byGroup) { Date newStart = targetGroup.getStart();
Date newEnd = targetGroup.getEnd();
if (byGroup.getStart().before(targetGroup.getStart())) {newStart = byGroup.getEnd();
}
if (b... | 3.26 |
framework_OptionGroup_setItemEnabled_rdh | /**
* Sets an item disabled or enabled. In the multiselect mode, a disabled
* item cannot be selected or deselected by the user. In the single
* selection mode, a disable item cannot be selected.
*
* However, programmatical selection or deselection of an disable item is
* possible. By default, items are enabled.
... | 3.26 |
framework_OptionGroup_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_OptionGroup_isItemEnabled_rdh | /**
* Returns true if the item is enabled.
*
* @param itemId
* the id of the item to be checked
* @return true if the item is enabled, false otherwise
* @see #setItemEnabled(Object, boolean)
*/
public boolean isItemEnabled(Object itemId) {if (itemId != null) {
return !disabledItemIds.contains(itemId);
}
return... | 3.26 |
framework_DragSourceExtension_setDragImage_rdh | /**
* Set a custom drag image for the current drag source.
*
* @param imageResource
* Resource of the image to be displayed as drag image.
*/
public void setDragImage(Resource imageResource) {
setResource(DragSourceState.RESOURCE_DRAG_IMAGE, imageResource);
} | 3.26 |
framework_DragSourceExtension_addDragEndListener_rdh | /**
* Attaches dragend listener for the current drag source.
* {@link DragEndListener#dragEnd(DragEndEvent)} is called when dragend
* event happens on the client side.
*
* @param listener
* Listener to handle dragend event.
* @return Handle to be used to remove this listener.
*/
public Registration addDragEnd... | 3.26 |
framework_DragSourceExtension_setEffectAllowed_rdh | /**
* Sets the allowed effects for the current drag source element. Used for
* setting client side {@code DataTransfer.effectAllowed} parameter for the
* drag event.
* <p>
* By default the value is {@link EffectAllowed#UNINITIALIZED} which is
* equivalent to {@link EffectAllowed#ALL}.
*
* @param effect
* Eff... | 3.26 |
framework_DragSourceExtension_onDragStart_rdh | /**
* Method invoked when a <code>dragstart</code> has been sent from client
* side. Fires the {@link DragStartEvent}.
*/
protected void onDragStart() {
DragStartEvent<T> event = new DragStartEvent<>(getParent(), getState(false).effectAllowed);
fireEvent(event);
} | 3.26 |
framework_DragSourceExtension_setDragData_rdh | /**
* Set server side drag data. This data is available in the drop event and
* can be used to transfer data between drag source and drop target if they
* are in the same UI.
*
* @param data
* Data to transfer to drop event.
*/
public void setDragData(Object data) {
f0 = data;
} | 3.26 |
framework_DragSourceExtension_getParent_rdh | /**
* Returns the component this extension is attached to.
*
* @return Extended component.
*/
@Override
@SuppressWarnings("unchecked")
public T getParent() {
return ((T) (super.getParent()));
} | 3.26 |
framework_DragSourceExtension_clearDataTransferData_rdh | /**
* Clears all data for this drag source element.
*/
public void clearDataTransferData() {
getState().types.clear();
getState().data.clear();
} | 3.26 |
framework_DragSourceExtension_addDragStartListener_rdh | /**
* Attaches dragstart listener for the current drag source.
* {@link DragStartListener#dragStart(DragStartEvent)} is called when
* dragstart event happens on the client side.
*
* @param listener
* Listener to handle dragstart event.
* @return Handle to be used to remove this listener.
*/
public Registratio... | 3.26 |
framework_DragSourceExtension_registerDragSourceRpc_rdh | /**
* Registers the server side RPC methods invoked from client side on
* <code>dragstart</code> and <code>dragend</code> events.
* <p>
* Override this method if you have custom RPC interface for transmitting
* those events with more data. If just need to do additional things before
* firing the events, then you ... | 3.26 |
framework_DragSourceExtension_getDataTransferData_rdh | /**
* Returns the data stored with type {@code type} in this drag source
* element.
*
* @param type
* Type of the requested data, e.g. {@code text/plain}.
* @return Data of type {@code type} stored in this drag source element.
*/
public String getDataTransferData(String type) {
return getState(false).data.... | 3.26 |
framework_DragSourceExtension_setPayload_rdh | /**
* Sets payload for this drag source to use with acceptance criterion. The
* payload is transferred as data type in the data transfer object in the
* following format: {@code "v-item:string:key:value"}. The given value is
* compared to the criterion value when the drag source is dragged on top of
* a drop targe... | 3.26 |
framework_DragSourceExtension_onDragEnd_rdh | /**
* Method invoked when a <code>dragend</code> has been sent from client
* side. Fires the {@link DragEndEvent}.
*
* @param dropEffect
* the drop effect on the dragend
*/
protected void onDragEnd(DropEffect dropEffect) {
DragEndEvent<T> event = new DragEndEvent<>(getParent(), dropEffect);
fireEvent(ev... | 3.26 |
framework_DragSourceExtension_initListeners_rdh | /**
* Initializes dragstart and -end event listeners for this drag source to
* capture the active drag source for the UI.
*/
private void initListeners() {// Set current extension as active drag source in the UI
dragStartListenerHandle = addDragStartListener(event -> getUI().setActiveDragSource(this));
// Re... | 3.26 |
framework_DragSourceExtension_setDataTransferText_rdh | /**
* Sets data of type {@code "text"} for this drag source element. The data
* is set for the client side draggable element using the {@code DataTransfer.setData("text", data)} method.
* <p>
* Note that {@code "text"} is the only cross browser supported data type.
* Use this method if your application supports IE... | 3.26 |
framework_DragSourceExtension_setDataTransferData_rdh | /**
* Sets data for this drag source element with the given type. The data is
* set for the client side draggable element using {@code DataTransfer.setData(type, data)} method.
* <p>
* Note that {@code "text"} is the only cross browser supported data type.
* Use {@link #setDataTransferText(String)} method instead ... | 3.26 |
framework_DragSourceExtension_getDragData_rdh | /**
* Get server side drag data. This data is available in the drop event and
* can be used to transfer data between drag source and drop target if they
* are in the same UI.
*
* @return Server side drag data if set, otherwise {@literal null}.
*/
public Object
getDragData() {
return f0;
} | 3.26 |
framework_MenuItem_m0_rdh | /**
* Sets the sub-menu associated with this item.
*
* @param subMenu
* this item's new sub-menu
*/
public void m0(MenuBar subMenu) {
this.subMenu = subMenu;
} | 3.26 |
framework_MenuItem_setCommand_rdh | /**
* Sets the command associated with this item.
*
* @param cmd
* the command to be associated with this item
*/
public void setCommand(Command cmd)
{
command = cmd;
} | 3.26 |
framework_MenuItem_getCommand_rdh | /**
* Gets the command associated with this item.
*
* @return this item's command, or <code>null</code> if none exists
*/
public Command getCommand() {
return command;
} | 3.26 |
framework_SimpleStringFilter_getFilterString_rdh | /**
* Returns the filter string.
*
* Note: this method is intended only for implementations of lazy string
* filters and may change in the future.
*
* @return filter string given to the constructor
*/
public String getFilterString() {return filterString;} | 3.26 |
framework_DDEventHandleStrategy_handleMouseOver_rdh | /**
* Called to handle {@link Event#ONMOUSEOVER} event.
*
* @param target
* target element over which DnD event has happened
* @param event
* ONMOUSEOVER GWT event for active DnD operation
* @param mediator
* VDragAndDropManager data accessor
*/
protected void handleMouseOver(Element target, NativePrevie... | 3.26 |
framework_DDEventHandleStrategy_handleMouseMove_rdh | /**
* Called to handle {@link Event#ONMOUSEMOVE} event.
*
* @param target
* target element over which DnD event has happened
* @param event
* ONMOUSEMOVE GWT event for active DnD operation
* @param mediator
* VDragAndDropManager data accessor
*/
protected void handleMouseMove(Element target, NativePrevie... | 3.26 |
framework_DDEventHandleStrategy_handleDragLeave_rdh | /**
* Handles drag leave on old element.
*
* @param mediator
* VDragAndDropManager data accessor
* @param clearServerCallback
* {@code true} if server communication callback should be
* cleaned up, {@code false} otherwise
*/
protected void handleDragLeave(DDManagerMediator mediator, boolean clearServerCal... | 3.26 |
framework_DDEventHandleStrategy_handleDragOver_rdh | /**
* Handles drag over on element.
*
* @param mediator
* VDragAndDropManager data accessor
* @param target
* target element over which DnD event has happened
*/
protected void handleDragOver(Element
target, DDManagerMediator mediator) {
mediator.getDragEvent().setElementOver(target);
mediator.getMan... | 3.26 |
framework_DDEventHandleStrategy_isDragInterrupted_rdh | /**
* Strategy to handle native preview events for VDragAndDropManager.
*
* The strategy could be overridden via GWT Deferred Binding mechanism.
*
* @author Vaadin Ltd
* @since 7.4.4
* @deprecated Replaced in 8.1 with {@link DropTargetExtensionConnector}
*/@Deprecatedpublic class DDEventHandleStrategy {
/**... | 3.26 |
framework_DDEventHandleStrategy_handleMouseUp_rdh | /**
* Called to handle {@link Event#ONMOUSEUP} event.
*
* @param target
* target element over which DnD event has happened
* @param event
* ONMOUSEUP GWT event for active DnD operation
* @param mediator
* VDragAndDropManager data accessor
*/
protected void handleMouseUp(Element target, NativePreviewEvent... | 3.26 |
framework_DDEventHandleStrategy_handleMouseOut_rdh | /**
* Called to handle {@link Event#ONMOUSEOUT} event.
*
* @param target
* target element over which DnD event has happened
* @param event
* ONMOUSEOUT GWT event for active DnD operation
* @param mediator
* VDragAndDropManager data accessor
*/
protected void handleMouseOut(Element target, NativePreviewEv... | 3.26 |
framework_DDEventHandleStrategy_handleTouchEnd_rdh | /**
* Called to handle {@link Event#ONTOUCHEND} event.
*
* @param target
* target element over which DnD event has happened
* @param event
* ONTOUCHEND GWT event for active DnD operation
* @param mediator
* VDragAndDropManager data accessor
*/
protected void handleTouchEnd(Element target, NativePreviewEv... | 3.26 |
framework_DDEventHandleStrategy_getTargetElement_rdh | /**
* Get target element for {@code event}.
*
* @param event
* GWT event to find target
* @param mediator
* VDragAndDropManager data accessor
* @return target element for {@code event}
*/
public Element getTargetElement(NativePreviewEvent event, DDManagerMediator mediator) {
NativeEvent gwtEvent = even... | 3.26 |
framework_DDEventHandleStrategy_handleDragEnter_rdh | /**
* Handles drag enter on new element.
*
* @param mediator
* VDragAndDropManager data accessor
* @param target
* target element over which DnD event has happened
*/
protected void handleDragEnter(Element target, DDManagerMediator mediator) {
VDragAndDropManager manager = mediator.getManager();
if ... | 3.26 |
framework_DDEventHandleStrategy_restoreDragImage_rdh | /**
* Restores drag image after temporary update by
* {@link #updateDragImage(NativePreviewEvent, DDManagerMediator)}.
*
* @param originalImageDisplay
* original "display" CSS style property of drag image element
* @param mediator
* VDragAndDropManager data accessor
* @param event
* GWT event for active ... | 3.26 |
framework_DDEventHandleStrategy_findDragTarget_rdh | /**
* Find drag handler for the {@code target} element.
*
* @param target
* target element over which DnD event has happened
* @param mediator
* VDragAndDropManager data accessor
* @return drop handler of target element
*/
protected VDropHandler findDragTarget(Element target, DDManagerMediator mediator) {
... | 3.26 |
framework_DDEventHandleStrategy_handleEvent_rdh | /**
* Final phase of event handling.
*
* @param targetElement
* target element over which DnD event has happened
* @param event
* GWT event for active DnD operation
* @param mediator
* VDragAndDropManager data accessor
*/
public void handleEvent(Element targetElement, NativePreviewEvent event, DDManagerM... | 3.26 |
framework_DDEventHandleStrategy_handleKeyDownEvent_rdh | /**
* Handles key down {@code event}.
*
* Default implementation doesn't do anything.
*
* @param event
* key down GWT event
* @param mediator
* VDragAndDropManager data accessor
*/
public void handleKeyDownEvent(NativePreviewEvent event, DDManagerMediator mediator) {
// no use for handling for any key... | 3.26 |
framework_WidgetSet_ensureConnectorLoaded_rdh | /**
* Due its nature, GWT does not support dynamic classloading. To bypass this
* limitation, widgetset must have function that returns Class by its fully
* qualified name.
*
* @param tag
* @param applicationConfiguration
* @return */public void ensureConnectorLoaded(int tag, ApplicationConfiguration conf) {
... | 3.26 |
framework_ValueProvider_identity_rdh | /**
* A callback interface for providing values from a given source.
* <p>
* For example this interface can be implemented to simply extract a value with
* a getter, or to create a composite value based on the fields of the source
* object.
*
* @author Vaadin Ltd.
* @since 8.0
* @param <SOURCE>
* the type o... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.