name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_AbstractRemoteDataSource_setCacheStrategy_rdh | /**
* Sets the cache strategy that is used to determine how much data is
* fetched and cached.
* <p>
* The new strategy is immediately used to evaluate whether currently cached
* rows should be discarded or new rows should be fetched.
*
* @param cacheStrategy
* a cache strategy implementation, not <code>null<... | 3.26 |
framework_AbstractRemoteDataSource_setRowData_rdh | /**
* Informs this data source that updated data has been sent from the server.
*
* @param firstRowIndex
* the index of the first received row
* @param rowData
* a list of rows, starting from <code>firstRowIndex</code>
*/
protected void setRowData(int firstRowIndex, List<T> rowData) {
assert (firstRowIndex +... | 3.26 |
framework_AbstractRemoteDataSource_getRequestedRange_rdh | /**
* Gets the range of rows that was requested.
*
* @return the requsted row range
*/public Range getRequestedRange() {
return requestedRange;
} | 3.26 |
framework_AbstractRemoteDataSource_getRequestedAvailability_rdh | /**
* Gets the row index range that was requested by the previous call to
* {@link #ensureAvailability(int, int)}.
*
* @return the requested availability range
*/
public Range getRequestedAvailability() {return requestedAvailability;
} | 3.26 |
framework_AbstractRemoteDataSource_fillCacheFromInvalidatedRows_rdh | /**
* Go through items invalidated by {@link #insertRowData(int, int)}. If the
* server has pre-emptively sent added row data immediately after informing
* of row addition, the invalid cache can be restored to proper index range.
*
* @param maxCacheRange
* the maximum amount of rows that can cached
*/
private ... | 3.26 |
framework_AbstractRemoteDataSource_removeRowData_rdh | /**
* Informs this data source that the server has removed data.
*
* @param firstRowIndex
* the index of the first removed row
* @param count
* the number of removed rows, starting from
* <code>firstRowIndex</code>
*/
protected void removeRowData(int firstRowIndex, int count) {
Profiler.enter("AbstractRem... | 3.26 |
framework_ComputedStyle_getMarginWidth_rdh | /**
* Returns the sum of the left and right margin.
*
* @since 7.5.6
* @return the sum of the left and right margin
*/
public double
getMarginWidth() {
double marginWidth = getDoubleProperty("marginLeft");
marginWidth += getDoubleProperty("marginRight");
return marginWidth;
} | 3.26 |
framework_ComputedStyle_getBorderWidth_rdh | /**
* Returns the sum of the left and right border width.
*
* @since 7.5.3
* @return the sum of the left and right border
*/
public double getBorderWidth() {
double borderWidth = getDoubleProperty("borderLeftWidth");
borderWidth += getDoubleProperty("borderRightWidth");
return borderWidth;
} | 3.26 |
framework_ComputedStyle_getBorderHeight_rdh | /**
* Returns the sum of the top and bottom border width.
*
* @since 7.5.3
* @return the sum of the top and bottom border
*/
public double getBorderHeight() {
double
borderHeight = getDoubleProperty("borderTopWidth");
borderHeight += getDoubleProperty("borderBottomWidth");
return borderHeight;
} | 3.26 |
framework_ComputedStyle_getIntProperty_rdh | /**
* Retrieves the given computed property as an integer.
*
* Returns 0 if the property cannot be converted to an integer
*
* @param name
* the property to retrieve
* @return the integer value of the property or 0
*/
public final int getIntProperty(String name) {
Profiler.enter("ComputedStyle.getIntPrope... | 3.26 |
framework_ComputedStyle_m0_rdh | /**
* Returns the current height from the DOM.
*
* @since 7.5.1
* @return the computed height
*/
public double m0() {
return getDoubleProperty("height");
}
/**
* Takes a String value e.g. "12px" and parses that to Integer 12.
*
* @param value
* a value starting with a number
* @return Integer the value... | 3.26 |
framework_ComputedStyle_getHeightIncludingBorderPadding_rdh | /**
* Returns the current height, padding and border from the DOM.
*
* @return the computed height including padding and borders
*/public double getHeightIncludingBorderPadding() {
double h = m0();
if (BrowserInfo.get().isIE() || isContentBox()) {
// IE11 always returns only the height without paddi... | 3.26 |
framework_ComputedStyle_getMarginHeight_rdh | /**
* Returns the sum of the top and bottom margin.
*
* @since 7.5.6
* @return the sum of the top and bottom margin
*/
public double getMarginHeight() {
double marginHeight = getDoubleProperty("marginTop");
marginHeight += getDoubleProperty("marginBottom");
return marginHeight;
} | 3.26 |
framework_ComputedStyle_getBoxSizing_rdh | /**
* Returns the value of the boxSizing property.
*
* @return the value of the boxSizing property
*/
private String getBoxSizing() {
return getProperty("boxSizing");
} | 3.26 |
framework_ComputedStyle_getPaddingWidth_rdh | /**
* Returns the sum of the top and bottom padding.
*
* @since 7.5.3
* @return the sum of the left and right padding
*/
public double
getPaddingWidth() {
double paddingWidth = getDoubleProperty("paddingLeft");
paddingWidth += getDoubleProperty("paddingRight");
return paddingWidth;
} | 3.26 |
framework_ComputedStyle_getPaddingHeight_rdh | /**
* Returns the sum of the top and bottom padding.
*
* @since 7.5.3
* @return the sum of the top and bottom padding
*/
public double getPaddingHeight() {
double paddingHeight =
getDoubleProperty("paddingTop");
paddingHeight += getDoubleProperty("paddingBottom");
return paddingHeight;
} | 3.26 |
framework_ComputedStyle_getWidthIncludingBorderPadding_rdh | /**
* Returns the current width, padding and border from the DOM.
*
* @return the computed width including padding and borders
*/
public double getWidthIncludingBorderPadding()
{
double w = ge... | 3.26 |
framework_BeanContainer_addItemAfter_rdh | /**
* Adds the bean after the given item id.
*
* @see Container.Ordered#addItemAfter(Object, Object)
*/
@Override
public BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId, IDTYPE newItemId, BEANTYPE bean) {
if ((newItemId != null) && (bean != null))
{
return super.ad... | 3.26 |
framework_BeanContainer_setBeanIdProperty_rdh | // automatic item id resolution
/**
* Sets the bean id resolver to use a property of the beans as the
* identifier.
*
* @param propertyId
* the identifier of the property to use to find item identifiers
*/public void setBeanIdProperty(Object propertyId) {
setBeanIdResolver(createBeanPropertyResolver(propertyI... | 3.26 |
framework_BeanContainer_addItem_rdh | /**
* Adds the bean to the Container.
*
* @see Container#addItem(Object)
*/
@Override
public BeanItem<BEANTYPE> addItem(IDTYPE itemId, BEANTYPE bean) {
if ((itemId != null) && (bean != null)) {
return super.addItem(itemId, bean);
} else {
return null;
}
} | 3.26 |
framework_BeanContainer_setBeanIdResolver_rdh | // overridden to make public
@Override
public void setBeanIdResolver(BeanIdResolver<IDTYPE, BEANTYPE> beanIdResolver) {
super.setBeanIdResolver(beanIdResolver);
} | 3.26 |
framework_BeanContainer_addBean_rdh | // overridden to make public
@Override
public BeanItem<BEANTYPE> addBean(BEANTYPE bean) throws IllegalStateException, IllegalArgumentException {
return super.addBean(bean);
} | 3.26 |
framework_BeanContainer_addBeanAt_rdh | // overridden to make public
@Override
public BeanItem<BEANTYPE> addBeanAt(int index, BEANTYPE bean) throws IllegalStateException, IllegalArgumentException {
return super.addBeanAt(index, bean);
} | 3.26 |
framework_BeanContainer_addAll_rdh | // overridden to make public
@Override
public void addAll(Collection<? extends BEANTYPE> collection) throws IllegalStateException {
super.addAll(collection);
} | 3.26 |
framework_BeanContainer_addBeanAfter_rdh | // overridden to make public
@Override
public BeanItem<BEANTYPE> addBeanAfter(IDTYPE previousItemId, BEANTYPE bean) throws IllegalStateException, IllegalArgumentException {
return super.addBeanAfter(previousItemId, bean);
} | 3.26 |
framework_Heartbeat_send_rdh | /**
* Sends a heartbeat to the server.
*/
public void send() {
f0.cancel();
final RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, uri);
XhrConnection.addXsrfHeaderFromCookie(rb);
final RequestCallback v1 = new RequestCallback() {
@Override
public void onResponseReceived(Req... | 3.26 |
framework_Heartbeat_getInterval_rdh | /**
*
* @return the interval at which heartbeat requests are sent
*/
public int getInterval() {
return interval;
} | 3.26 |
framework_Heartbeat_schedule_rdh | /**
* Updates the schedule of the heartbeat to match the set interval. A
* negative interval disables the heartbeat.
*/
public void
schedule() {
if (interval > 0) {
getLogger().fine(("Scheduling heartbeat in " + interval) + " seconds");f0.schedule(interval * 1000);
} else {
getLogger().fine("... | 3.26 |
framework_Heartbeat_getConnection_rdh | /**
*
* @return the application connection
*/
@Deprecated
protected ApplicationConnection getConnection() {
return connection;
} | 3.26 |
framework_Heartbeat_setInterval_rdh | /**
* Changes the heartbeatInterval in runtime and applies it.
*
* @param heartbeatInterval
* new interval in seconds.
*/
public void setInterval(int heartbeatInterval) {
getLogger().info(("Setting hearbeat interval to " + heartbeatInterval) + "sec.");
interval = heartbeatInterval;
schedule();
} | 3.26 |
framework_VOptionGroupBase_getRows_rdh | /**
* For internal use only. May be removed or replaced in the future.
*
* @return "rows" specified in uidl, 0 if not specified
*/
public int getRows() {
return rows;
} | 3.26 |
framework_VOptionGroupBase_getColumns_rdh | /**
* For internal use only. May be removed or replaced in the future.
*
* @return "cols" specified in uidl, 0 if not specified
*/
public int getColumns() {
return cols;
} | 3.26 |
framework_PushRequestHandler_createPushHandler_rdh | /**
* Creates a push handler for this request handler.
* <p>
* Create your own request handler and override this method if you want to
* customize the {@link PushHandler}, e.g. to dynamically decide the suspend
* timeout.
*
* @since 7.6
* @param service
* the vaadin service
* @return the push handler to use... | 3.26 |
framework_PushRequestHandler_getPreInitializedAtmosphere_rdh | /**
* Returns an AtmosphereFramework instance which was initialized in the
* servlet context init phase by {@link JSR356WebsocketInitializer}, if such
* exists
*/
private AtmosphereFramework getPreInitializedAtmosphere(ServletConfig vaadinServletConfig) {
String attributeName = JSR356WebsocketInitializer.getAtt... | 3.26 |
framework_PushRequestHandler_initAtmosphere_rdh | /**
* Initializes Atmosphere for the given ServletConfiguration
*
* @since 7.5.0
* @param vaadinServletConfig
* The servlet configuration for the servlet which should have
* Atmosphere support
*/
static AtmosphereFramework initAtmosphere... | 3.26 |
framework_TranslatedURLReference_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;
} | 3.26 |
framework_AbstractValidator_m0_rdh | /**
* Returns the error message for the given value.
*
* @param value
* an invalid value
* @return the formatted error message
*/
protected String m0(T value) {
return messageProvider.apply(value);
} | 3.26 |
framework_AbstractValidator_toResult_rdh | /**
* A helper method for creating a {@code Result} from a value and a validity
* flag. If the flag is true, returns {@code Result.ok}, otherwise yields
* {@code Result.error} bearing the error message returned by
* {@link #getMessage(T)}.
* <p>
* For instance, the following {@code apply} method only accepts even... | 3.26 |
framework_VOverlay_setApplicationConnection_rdh | /**
* Sets the {@link ApplicationConnection} that this overlay belongs to.
*
* @see #getApplicationConnection()
* @param ac
* the connection
*/
public void setApplicationConnection(ApplicationConnection ac) {
this.ac = ac;
} | 3.26 |
framework_VOverlay_getApplicationConnection_rdh | /**
* Get the {@link ApplicationConnection} that this overlay belongs to. If
* it's not set, {@link #getOwner()} is used to figure it out.
*
* @return */
protected ApplicationConnection getApplicationConnection() {
if (ac != null) {
return ac;
} else if (getOwner()
!= null) {ComponentConnector ... | 3.26 |
framework_VOverlay_setOverlayContainerLabel_rdh | /**
* Set the label of the container element, where tooltip, notification and
* dialogs are added to.
*
* @param applicationConnection
* the application connection for which to change the label
* @param overlayContainerLabel
* label for the container
*/
public static void setOverlayContainerLabel(Applicatio... | 3.26 |
framework_VOverlay_getOverlayContainer_rdh | /**
* Gets the 'overlay container' element pertaining to the given
* {@link ApplicationConnection}. Each overlay should be created in a
* overlay container element, so that the correct theme and styles can be
* applied.
*
* @param ac
* A reference to {@link ApplicationConnection}
* @return The overlay contain... | 3.26 |
framework_MultiSelectionModel_addSelectionListener_rdh | /**
* {@inheritDoc }
* <p>
* Use {@link #addMultiSelectionListener(MultiSelectionListener)} for more
* specific event on multiselection.
*
* @see #addMultiSelectionListener(MultiSelectionListener)
*/
@Override
public default Registration addSelectionListener(SelectionListener<T> listener) {
return addMultiSe... | 3.26 |
framework_CustomizedSystemMessages_setSessionExpiredURL_rdh | /**
* Sets the URL to go to when the session has expired.
*
* @param sessionExpiredURL
* the URL to go to, or null to reload current
*/
public void setSessionExpiredURL(String sessionExpiredURL) {
this.sessionExpiredURL = sessionExpiredURL;
} | 3.26 |
framework_CustomizedSystemMessages_setCommunicationErrorNotificationEnabled_rdh | /**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly.
*
* @param communicationErrorNotificationEnabled
* true = enabled, false = disabled
*/
public void setCommunicationErrorNotificationEnabled(boolean communicationErrorNotificationEnabled) {
this.communicat... | 3.26 |
framework_CustomizedSystemMessages_setCookiesDisabledCaption_rdh | /**
* Sets the caption of the "cookies disabled" notification. Set to null for
* no caption. If both caption and message is null, the notification is
* disabled.
*
* @param cookiesDisabledCaption
* the caption for the "cookies disabled" notification
*/
public void setCookiesDisabledCaption(String cookiesDisabl... | 3.26 |
framework_CustomizedSystemMessages_setCookiesDisabledNotificationEnabled_rdh | /**
* Enables or disables the notification for "cookies disabled" messages. If
* disabled, the URL returned by {@link #getCookiesDisabledURL()} is loaded
* directly.
*
* @param cookiesDisabledNotificationEnabled
* true to enable "cookies disabled" messages, false otherwise
*/
public void setCookiesDisabledNoti... | 3.26 |
framework_CustomizedSystemMessages_setInternalErrorMessage_rdh | /**
* Sets the message of the notification. Set to null for no message. If both
* caption and message is null, the notification is disabled;
*
* @param internalErrorMessage
* the message
*/
public void setInternalErrorMessage(String internalErrorMessage) {this.internalErrorMessage = internalErrorMessage;
} | 3.26 |
framework_CustomizedSystemMessages_setInternalErrorURL_rdh | /**
* Sets the URL to go to when an internal error occurs.
*
* @param internalErrorURL
* the URL to go to, or null to reload current
*/
public void setInternalErrorURL(String internalErrorURL) {
this.internalErrorURL = internalErrorURL;
} | 3.26 |
framework_CustomizedSystemMessages_setAuthenticationErrorCaption_rdh | /**
* Sets the caption of the notification. Set to null for no caption. If both
* caption and message is null, the notification is disabled;
*
* @param authenticationErrorCaption
* the caption
*/
public void setAuthenticationErrorCaption(String authenticationErrorCaption) {
this.authenticationErrorCaption... | 3.26 |
framework_CustomizedSystemMessages_setSessionExpiredCaption_rdh | /**
* Sets the caption of the notification. Set to null for no caption. If both
* caption and message are null, client automatically forwards to
* sessionExpiredUrl after timeout timer expires. Timer uses value read from
* HTTPSession.getMaxInactiveInterval()
*
* @param sessionExpiredCaption
* the caption
*/
... | 3.26 |
framework_CustomizedSystemMessages_setCommunicationErrorURL_rdh | /**
* Sets the URL to go to when there is a communication error.
*
* @param communicationErrorURL
* the URL to go to, or null to reload current
*/
public void setCommunicationErrorURL(String communicationErrorURL) {
this.communicationErrorURL = communicationErrorURL;
} | 3.26 |
framework_CustomizedSystemMessages_m0_rdh | /**
* Sets the URL to go to when there is a authentication error.
*
* @param authenticationErrorURL
* the URL to go to, or null to reload current
*/
public void m0(String authenticationErrorURL) {
this.authenticationErrorURL = authenticationErrorURL;
} | 3.26 |
framework_CustomizedSystemMessages_setInternalErrorNotificationEnabled_rdh | /**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly.
*
* @param internalErrorNotificationEnabled
* true = enabled, false = disabled
*/
public void setInternalErrorNotificationEnabled(boolean internalErrorNotificationEnabled) {
this.internalErrorNotification... | 3.26 |
framework_CustomizedSystemMessages_setCommunicationErrorMessage_rdh | /**
* Sets the message of the notification. Set to null for no message. If both
* caption and message is null, the notification is disabled;
*
* @param communicationErrorMessage
* the message
*/
public void setCommunicationErrorMessage(String communicationErrorMessage) {
this.communicationErrorMessage = com... | 3.26 |
framework_CustomizedSystemMessages_setCookiesDisabledMessage_rdh | /**
* Sets the message of the "cookies disabled" notification. Set to null for
* no message. If both caption and message is null, the notification is
* disabled.
*
* @param cookiesDisabledMessage
* the message for the "cookies disabled" notification
*/
public void setCookiesDisabledMessage(String cookiesDisab... | 3.26 |
framework_CustomizedSystemMessages_setInternalErrorCaption_rdh | /**
* Sets the caption of the notification. Set to null for no caption. If both
* caption and message is null, the notification is disabled;
*
* @param internalErrorCaption
* the caption
*/
public void setInternalErrorCaption(String internalErrorCaption) {
this.internalErrorCaption = internalErrorCaption;
} | 3.26 |
framework_CustomizedSystemMessages_setAuthenticationErrorNotificationEnabled_rdh | /**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly.
*
* @param authenticationErrorNotificationEnabled
* true = enabled, false = disabled
*/
public void setAuthenticationErrorNotificationEnabled(boolean authenticationErrorNotificationEnabled) {
this.authent... | 3.26 |
framework_CustomizedSystemMessages_m1_rdh | /**
* Sets the message of the notification. Set to null for no message. If both
* caption and message is null, the notification is disabled;
*
* @param authenticationErrorMessage
* the message
*/
public void m1(String authenticationErrorMessage) {this.authenticationErrorMessage =... | 3.26 |
framework_CustomizedSystemMessages_setSessionExpiredNotificationEnabled_rdh | /**
* Enables or disables the notification. If disabled, the set URL (or
* current) is loaded directly when next transaction between server and
* client happens.
*
* @param sessionExpiredNotificationEnabled
* true = enabled, false = disabled
*/
public void setSessionExpiredNotificationEnabled(boolean sessionEx... | 3.26 |
framework_CustomizedSystemMessages_setSessionExpiredMessage_rdh | /**
* Sets the message of the notification. Set to null for no message. If both
* caption and message are null, client automatically forwards to
* sessionExpiredUrl after timeout timer expires. Timer uses value read from
* HTTPSession.getMaxInactiveInterval()
*
* @param sessionExpiredMessage
* the message
*/
... | 3.26 |
framework_DefaultFieldFactory_createCaptionByPropertyId_rdh | /**
* If name follows method naming conventions, convert the name to spaced
* upper case text. For example, convert "firstName" to "First Name"
*
* @param propertyId
* @return the formatted caption string
*/
public static String createCaptionByPropertyId(Object propertyId) {
return SharedUtil.propertyIdToHum... | 3.26 |
framework_DefaultFieldFactory_createFieldByPropertyType_rdh | /**
* Creates fields based on the property type.
* <p>
* The default field type is {@link TextField}. Other field types generated
* by this method:
* <p>
* <b>Boolean</b>: {@link CheckBox}.<br/>
* <b>Date</b>: {@link DateField}(resolution: day).<br/>
* <b>Item</b>: {@link Form}. <br/>
* <b>default field type</... | 3.26 |
framework_AutoScroller_getScrollArea_rdh | /**
* Returns the size of the auto scroll area in pixels.
* <p>
* Defaults to 100px.
*
* @return size in pixels
*/
public int getScrollArea() {
return f0;
} | 3.26 |
framework_AutoScroller_stop_rdh | /**
* Stops the automatic scrolling.
*/
public void stop() {
if (handlerRegistration != null) {
handlerRegistration.removeHandler();
handlerRegistration = null;
}
if (autoScroller != null) {
autoScroller.stop();
autoScroller = null;
}
removeNativeHandler();
} | 3.26 |
framework_AutoScroller_reboundScrollArea_rdh | /**
* If the scroll are has been offset by the pointer starting out there,
* move it back a bit
*/
private void reboundScrollArea(double timeDiff) {
if (!f1) {
return;
}
int reboundPx = ((int) (Math.ceil(SCROLL_AREA_REBOUND_PX_PER_MS * timeDiff)));
if (startBound < finalStartBound) {
... | 3.26 |
framework_AutoScroller_setScrollArea_rdh | /**
* Set the auto scroll area height or width depending on the scrolling axis.
* This is the amount of pixels from the edge of the grid that the scroll is
* triggered.
* <p>
* Defaults to 100px.
*
* @param px
* the pixel height/width for the auto scroll area depending on
* direction
*/
public void setScr... | 3.26 |
framework_AutoScroller_doScrollAreaChecks_rdh | /**
* This method checks whether the first pointer event started in an area
* that would start scrolling immediately, and does some actions
* accordingly.
* <p>
* If it is, that scroll area will be offset "beyond" the pointer (above
* if pointer is towards the top/left, otherwise below/right).
*/
private void do... | 3.26 |
framework_SpacerIndexChangedEvent_getNewIndex_rdh | /**
* Gets the new row index to which the spacer element belongs.
*
* @return the new row index to which the spacer element belongs
*/
public int getNewIndex() {
return newIndex;
} | 3.26 |
framework_Footer_join_rdh | /**
* Merges column cells in the row. Original cells are hidden, and new
* merged cell is shown instead. The cell has a width of all merged
* cells together, inherits styles of the first merged cell but has
* empty caption.
*
* @param cellsToMerge
* the cells which should be merged. The cells should not be
* ... | 3.26 |
framework_ListSelect_setRows_rdh | /**
* Sets the number of rows in the editor. If the number of rows is set 0,
* the actual number of displayed rows is determined implicitly by the
* adapter.
*
* @param rows
* the number of rows to set.
*/
public void setRows(int rows) {
if (rows < 0) {
rows = 0;
}
if (this.rows != rows) ... | 3.26 |
framework_UIInitHandler_getEmbedId_rdh | /**
* Constructs an embed id based on information in the request.
*
* @since 7.2
* @param request
* the request to get embed information from
* @return the embed id, or <code>null</code> if id is not available.
* @see UI#getEmbedId()
*/
protected String getEmbedId(VaadinRequest request) {
// Parameters ... | 3.26 |
framework_UIInitHandler_getSecurityKeyUIDL_rdh | /**
* Gets the security key (and generates one if needed) as UIDL.
*
* @param session
* the vaadin session to which the security key belongs
* @return the security key UIDL or "" if the feature is turned off
*/
private static String getSecurityKeyUIDL(VaadinSession session) {
String seckey = session.getCsr... | 3.26 |
framework_UIInitHandler_getPushIdUIDL_rdh | /**
* Gets the push connection identifier as UIDL.
*
* @param session
* the vaadin session to which the security key belongs
* @return the push identifier UIDL
*/
private static String getPushIdUIDL(VaadinSession session) {
return ((("\"" + ApplicationConstants.UIDL_PUSH_ID) + "\":\"") + session.getPushId(... | 3.26 |
framework_UIInitHandler_reinitUI_rdh | /**
* Updates a UI that has already been initialized but is now loaded again,
* e.g. because of {@link PreserveOnRefresh}.
*
* @param ui
* @param request
*/
private void reinitUI(UI ui, VaadinRequest request) {
UI.setCurrent(ui);
ui.doRefresh(request);
} | 3.26 |
framework_UIInitHandler_getInitialUidl_rdh | /**
* Generates the initial UIDL message that can e.g. be included in a html
* page to avoid a separate round trip just for getting the UIDL.
*
* @param request
* the request that caused the initialization
* @param uI
* the UI for which the UIDL should be generated
* @return a string with the initial UIDL m... | 3.26 |
framework_UIInitHandler_commitJsonResponse_rdh | /**
* Commit the JSON response. We can't write immediately to the output stream
* as we want to write only a critical notification if something goes wrong
* during the response handling.
*
* @param request
* The request that resulted in this response
* @param response
* The response to write to
* @param js... | 3.26 |
framework_SharedStateWriter_write_rdh | /**
* Serializes {@link SharedState shared state} changes to JSON.
*
* @author Vaadin Ltd
* @since 7.1
*/public class SharedStateWriter implements Serializable {
/**
* Writes a JSON object containing the pending state changes of the dirty
* connectors of the given UI.
*
* @param ui
* ... | 3.26 |
framework_VComboBox_selectPrevPage_rdh | /* Show the prev page. */
private void
selectPrevPage() {
if (currentPage > 0) {
dataReceivedHandler.setNavigationCallback(() -> suggestionPopup.selectLastItem());
filterOptions(currentPage - 1, lastFilter);
}
} | 3.26 |
framework_VComboBox_getItemOffsetHeight_rdh | /* Gets the height of one menu item. */
int getItemOffsetHeight() {
List<MenuItem> items = getItems();
return (items != null) && (!items.isEmpty()) ? items.get(0).getOffsetHeight() : 0;
} | 3.26 |
framework_VComboBox_getItemOffsetWidth_rdh | /* Gets the width of one menu item. */
int getItemOffsetWidth() {
List<MenuItem> items = getItems();
return (items != null) && (!items.isEmpty()) ?
items.get(0).getOffsetWidth() : 0;
} | 3.26 |
framework_VComboBox_updateStyleNames_rdh | /**
* Updates style names in suggestion popup to help theme building.
*
* @param componentState
* shared state of the combo box
*/
public void updateStyleNames(AbstractComponentState componentState) {
debug("VComboBox.SP: updateStyleNames()");
setStyleName(VComboBox.this.getStylePrimaryName() + "-suggest... | 3.26 |
framework_VComboBox_setTotalSuggestions_rdh | /**
* Sets the total number of suggestions.
* <p>
* NOTE: this excluded the possible null selection item!
* <p>
* NOTE: this just updates the state, but doesn't update any UI.
*
* @since 8.0
* @param totalSuggestions
* total number of suggestions
*/
public void setTotalSuggestions(int totalSuggestions) {
th... | 3.26 |
framework_VComboBox_isrelativeUnits_rdh | /**
*
* @since 7.7
* @param suggestionPopupWidth
* @return */
private boolean isrelativeUnits(String suggestionPopupWidth) {
return suggestionPopupWidth.trim().endsWith("%");
} | 3.26 |
framework_VComboBox_updateMenuWidth_rdh | /**
* Adds in-line CSS rules to the DOM according to the
* suggestionPopupWidth field
*
* @param desiredWidth
* @param naturalMenuWidth
*/
private void updateMenuWidth(final int desiredWidth, int naturalMenuWidth) {
/**
* Three different width modes for the suggestion pop-up:
*
* 1. Legacy "nul... | 3.26 |
framework_VComboBox_m3_rdh | /**
* Perform selection (if appropriate) based on a reply from the server.
* When this method is called, the suggestions have been reset if new
* ones (different from the previous list) were received from the
* server.
*
* @param selectedKey
* new selected key or null if none given by the server
* @param sele... | 3.26 |
framework_VComboBox_dataReceived_rdh | /**
* Called by the connector when new data for the last requested filter
* is received from the server.
*/
public void dataReceived() {
if (initialData) {
suggestionPopup.menu.setSuggestions(currentSuggestions);
performSelection(serverSelectedKey, true, true);
updateSuggestionPopupMinWidth();
update... | 3.26 |
framework_VComboBox_isJustClosed_rdh | /**
* Was the popup just closed?
*
* @return true if popup was just closed
*/
public boolean isJustClosed() {
debug("VComboBox.SP: justClosed()");
final long now = new Date().getTime();
return (lastAutoClosed > 0) && ((now - lastAutoClosed) < 200);
} | 3.26 |
framework_VComboBox_selectFirstItem_rdh | /**
*
* @deprecated use {@link SuggestionPopup#selectFirstItem()} instead.
*/
@Deprecated
public void selectFirstItem() {
debug("VComboBox.SM: selectFirstItem()");
MenuItem firstItem = getItems().get(0);
selectItem(firstItem);
} | 3.26 |
framework_VComboBox_startWaitingForFilteringResponse_rdh | /**
* Set a flag that filtering of options is pending a response from the
* server.
*/
private void startWaitingForFilteringResponse() {
waitingForFilteringResponse = true;
} | 3.26 |
framework_VComboBox_showSuggestions_rdh | /**
* Shows the popup where the user can see the filtered options that have
* been set with a call to
* {@link SuggestionMenu#setSuggestions(Collection)}.
*
* @param currentPage
* The current page number
*/
public void showSuggestions(final int currentPage) {
debug(((("VComboBox.SP: showSuggestions(" + ... | 3.26 |
framework_VComboBox_updateSelectedIconPosition_rdh | /**
* Positions the icon vertically in the middle. Should be called after the
* icon has loaded
*/
private void updateSelectedIconPosition() {
// Position icon vertically to middle
int availableHeight = 0;
availableHeight = getOffsetHeight();int iconHeight = WidgetUtil.getRequiredHeight(selectedItemIcon);
int mar... | 3.26 |
framework_VComboBox_selectPrevItem_rdh | /**
* Selects the previous item in the filtered selections.
*/
public void selectPrevItem() {
debug("VComboBox.SP: selectPrevItem()");
final int index = menu.getSelectedIndex() - 1;
if (index >
(-1)) {
selectItem(menu.getItems().get(index));
} else if (index == (-1)) {
selectPrevP... | 3.26 |
framework_VComboBox_setSelectedItemIcon_rdh | /**
* Sets the icon URI of the selected item. The icon is shown on the left
* side of the item caption text. Set the URI to null to remove the icon.
*
* @param iconUri
* The URI of the icon, or null to remove icon
*/
public void setSelectedItemIcon(String iconUri) {
if
(selectedItemIcon != null) {
panel.remove(... | 3.26 |
framework_VComboBox_m2_rdh | /**
* Called by the connector any pending navigation operations should be
* cleared.
*/
public void m2() {
navigationCallback = null;
} | 3.26 |
framework_VComboBox_getEmptySelectionCaption_rdh | /**
* Gets the empty selection caption.
*
* @since 8.0.7
* @return the empty selection caption
*/
public String getEmptySelectionCaption() {
return emptySelectionCaption;
} | 3.26 |
framework_VComboBox_getPreferredHeight_rdh | /* Gets the preferred height of the menu including pageItemsCount items. */
String getPreferredHeight(int pageItemsCount) {
if (!currentSuggestions.isEmpty()) {
final int pixels = (getPreferredHeight() / currentSuggestions.size()) * pageItemsCount;
return pixels + "px";
}
return "";
} | 3.26 |
framework_VComboBox_getDisplayString_rdh | /**
* Gets the visible row in the popup as a HTML string. The string
* contains an image tag with the rows icon (if an icon has been
* specified) and the caption of the item
*/
@Override
public String getDisplayString() {
final StringBuilder sb = n... | 3.26 |
framework_VComboBox_m6_rdh | /**
* Triggered when a key was depressed.
*
* @param event
* The KeyUpEvent of the key depressed
*/
@Override
public void m6(KeyUpEvent event) {
if (enableDebug) {
debug(("VComboBox: onKeyUp(" + event.getNativeKeyCode()) + ")");
}
if (enabled && (!readonly)) {
switch (event.getNativeKeyCode()) {
case KeyCodes.... | 3.26 |
framework_VComboBox_asFraction_rdh | /**
* Returns the percentage value as a fraction, e.g. 42% -> 0.42
*
* @param percentage
*/private float asFraction(String percentage) {
String trimmed
= percentage.trim();
String withoutPercentSign = trimmed.substring(0, trimmed.length() -... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.