name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_VCalendarPanel_buildTime_rdh | /**
* Constructs the ListBoxes and updates their value
*
* @param redraw
* Should new instances of the listboxes be created
*/private void buildTime() {
clear();
hours = m1();
if (m2().isTwelveHourClock()) {
hours.addItem("12");
for (int i =... | 3.26 |
framework_VCalendarPanel_handleNavigationMonthMode_rdh | /**
* Handle the keyboard navigation when the resolution is set to MONTH.
*
* @param keycode
* The keycode to handle
* @param ctrl
* Was the ctrl key pressed?
* @param shift
* Was the shift key pressed?
* @return */
protected boolean handleNavigationMonthMode(int keycode, boolean ctrl, boolean shift) {
... | 3.26 |
framework_VCalendarPanel_isAcceptedByRangeStart_rdh | /**
* Accepts dates greater than or equal to rangeStart, depending on the
* resolution. If the resolution is set to DAY, the range will compare on a
* day-basis. If the resolution is set to YEAR, only years are compared. So
* even if the range is set to one millisecond in next year, also next year
* will be includ... | 3.26 |
framework_VCalendarPanel_buildCalendarBody_rdh | /**
* Builds the day and time selectors of the calendar.
*/
private void buildCalendarBody() {
final int weekColumn = 0;
final int firstWeekdayColumn = 1;
final int headerRow
= 0;
setWidget(1, 0, days);
setCellPadding(0);
setCellSpacing(0);
getFlexCellFormatter().setColSpan(1, 0, 5);
getFlexCellFormatter().setStyleNa... | 3.26 |
framework_VCalendarPanel_getPreviousKey_rdh | /**
* The key that selects the previous week in the calendar. By default this
* is the up arrow key but by overriding this method it can be changed to
* whatever you like.
*
* @return */
protected int getPreviousKey() {
return KeyCodes.KEY_UP;
} | 3.26 |
framework_VCalendarPanel_focusPreviousDay_rdh | /**
* Moves the focus backward the given number of days.
*/
private void focusPreviousDay(int days) {
focusNextDay(-days);
} | 3.26 |
framework_VCalendarPanel_buildCalendarHeader_rdh | /**
* Builds the top buttons and current month and year header.
*
* @param needsMonth
* Should the month buttons be visible?
*/
private void buildCalendarHeader(boolean needsMonth) {
getRowFormatter().addStyleName(0, parent.getStylePrimaryName() + "-calendarpanel-header");
if ((prevMonth == null) && needsMonth) ... | 3.26 |
framework_VCalendarPanel_focusNextMonth_rdh | /**
* Selects the next month
*/
private void focusNextMonth() {
if (focusedDate == null) {
return;
}
// Trying to request next month
Date requestedNextMonthDate = ((Date) (focusedDate.clone()));
addOneMonth(requestedNextMonthDate);
if (!isDateInsideRange(requestedNextMonthDate, Resolution.MONTH)) {
return;
}
// Now a... | 3.26 |
framework_VCalendarPanel_getForwardKey_rdh | /**
* The key that selects the next day in the calendar. By default this is the
* right arrow key but by overriding this method it can be changed to
* whatever you like.
*
* @return */
protected int getForwardKey() {
return KeyCodes.KEY_RIGHT;
} | 3.26 |
framework_VCalendarPanel_setSubmitListener_rdh | /**
* The submit listener is called when the user selects a value from the
* calendar either by clicking the day or selects it by keyboard.
*
* @param submitListener
* The listener to trigger
*/
public void setSubmitListener(SubmitListener submitListener) {
this.submitListener = submitListener;
} | 3.26 |
framework_VCalendarPanel_getNextKey_rdh | /**
* The key that selects the next week in the calendar. By default this is
* the down arrow key but by overriding this method it can be changed to
* whatever you like.
*
* @return */
protected int getNextKey() {
return KeyCodes.KEY_DOWN;
} | 3.26 |
framework_VCalendarPanel_setTimeChangeListener_rdh | /**
* The time change listener is triggered when the user changes the time.
*
* @param listener
*/
public void setTimeChangeListener(TimeChangeListener listener) {
timeChangeListener = listener;
} | 3.26 |
framework_VCalendarPanel_selectDate_rdh | /**
* Sets the selection highlight to a given day in the current view
*
* @param date
* A Date representing the day of month to be selected. Must be
* one of the days currently visible.
*/
private void selectDate(Date date) {
if (selectedDay != null) {
selectedDay.removeStyleDependentName(CN_SELECTED);Roles.g... | 3.26 |
framework_VCalendarPanel_getCloseKey_rdh | /**
* Returns the key that closes the popup window if this is a VPopopCalendar.
* Else this does nothing. By default this is the Escape key but you can
* change the key to whatever you want by overriding this method.
*
* @return */
protected int getCloseKey() {
return KeyCodes.KEY_ESCAPE;
} | 3.26 |
framework_VCalendarPanel_isTimeSelectorNeeded_rdh | /**
* Do we need the time selector
*
* @return True if it is required
*/
private boolean isTimeSelectorNeeded() {
return getResolution().getCalendarField() > Resolution.DAY.getCalendarField();
} | 3.26 |
framework_VCalendarPanel_focusPreviousYear_rdh | /**
* Selects the previous year
*/
private void focusPreviousYear(int years) {
if (focusedDate == null) {
return;
}
Date previousYearDate = ((Date) (focusedDate.clone()));
previousYearDate.setYear(previousYearDate.getYear() - years);
// Do not focus if not inside range
if (!isDateInsideRange(previousYearDate, Resol... | 3.26 |
framework_VCalendarPanel_onSubmit_rdh | /**
* Notifies submit-listeners of a submit event
*/
private void onSubmit() {
if (getSubmitListener() != null) {
getSubmitListener().onSubmit();
}
} | 3.26 |
framework_VCalendarPanel_setRangeEnd_rdh | /**
* Sets the end range for this component. The end range is inclusive, and it
* depends on the current resolution, what is considered inside the range.
*
* @param newRangeEnd
* - the allowed range's end date
*/
public void setRangeEnd(Date newRangeEnd) {
if (!SharedUtil.equals(rangeEnd, newRangeEnd)) {
rangeE... | 3.26 |
framework_VCalendarPanel_setDate_rdh | /**
* Sets the data of the Panel.
*
* @param currentDate
* The date to set
*/
public void setDate(Date currentDate) {
// Check that we are not re-rendering an already active date
if ((currentDate == value) && (currentDate != null)) {
return;
}
boolean currentDateWasAdjusted = false;
// Check that selected date i... | 3.26 |
framework_VCalendarPanel_processClickEvent_rdh | /**
* Handles a user click on the component
*
* @param sender
* The component that was clicked
* @param updateVariable
* Should the value field be updated
*/
private void processClickEvent(Widget sender) {if ((!isEnabled()) || isReadonly()) {
return;
}
if (sender == prevYear) {
focusPreviousYear(1);
} else i... | 3.26 |
framework_VCalendarPanel_updateTimes_rdh | /**
* Updates the value to correspond to the values in value.
*/
public void updateTimes() {
if (value == null) {
value = new Date();
}
if (m2().isTwelveHourClock()) {
int h = value.getHours();
ampm.setSelectedIndex(h < 12 ? 0 : 1);
h -= ampm.getSelectedIndex() * 12;
hours.setSelectedIndex(h);
} else {
hours.setSele... | 3.26 |
framework_VCalendarPanel_setFocusChangeListener_rdh | /**
* The given FocusChangeListener is notified when the focused date changes
* by user either clicking on a new date or by using the keyboard.
*
* @param listener
* The FocusChangeListener to be notified
*/
public void setFocusChangeListener(FocusChangeListener listener) {
focusChangeListener = listener;
} | 3.26 |
framework_VCalendarPanel_setFocusOutListener_rdh | /**
* A focus out listener is triggered when the panel loosed focus. This can
* happen either after a user clicks outside the panel or tabs out.
*
* @param listener
* The listener to trigger
*/
public void setFocusOutListener(FocusOutListener listener) {
focusOutListener = listener;
} | 3.26 |
framework_VCalendarPanel_getResetKey_rdh | /**
* Returns the reset key which will reset the calendar to the previous
* selection. By default this is backspace but it can be overridden to
* change the key to whatever you want.
*
* @return */
protected int getResetKey() {
return KeyCodes.KEY_BACKSPACE;
} | 3.26 |
framework_VCalendarPanel_focusNextYear_rdh | /**
* Selects the next year
*/
private void focusNextYear(int years) {
if (focusedDate == null) {
return;
}
Date nextYearDate = ((Date) (focusedDate.clone()));
nextYearDate.setYear(nextYearDate.getYear() + years);
// Do not focus if not inside range
if (!isDateInsideRange(nextYearDate, Resolution.YEAR)) {
return;
}
... | 3.26 |
framework_VCalendarPanel_selectFocused_rdh | /**
* Updates year, month, day from focusedDate to value
*/
private void selectFocused() {
if ((focusedDate != null) && isDateInsideRange(focusedDate, resolution)) {
if (value == null) {
// No previously selected value (set to null on server side).
// Create a new date using current date and time
value = new Date();
... | 3.26 |
framework_VCalendarPanel_getSubmitListener_rdh | /**
* Returns the submit listener that listens to selection made from the
* panel.
*
* @return The listener or NULL if no listener has been set
*/
public SubmitListener getSubmitListener() {
return submitListener;
} | 3.26 |
framework_VCalendarPanel_handleNavigationYearMode_rdh | /**
* Handles the keyboard navigation when the resolution is set to years.
*
* @param keycode
* The keycode to process
* @param ctrl
* Is ctrl pressed?
* @param shift
* is shift pressed
* @return Returns true if the keycode was processed, else false
*/
protected boolean handleNavigationYearMode(int keyc... | 3.26 |
framework_VCalendarPanel_contains_rdh | /**
* Checks if subElement is inside the widget DOM hierarchy.
*
* @param w
* @param subElement
* @return true if {@code w} is a parent of subElement, false otherwise.
*/
private boolean contains(Widget w, Element subElement) {
if ((w == null) || (w.getElement() == null)) {
return false;
}
return w.getElement().i... | 3.26 |
framework_VCalendarPanel_focusNextDay_rdh | /**
* Moves the focus forward the given number of days.
*/
private void focusNextDay(int days) {
if (focusedDate == null) {
return;
}
Date focusCopy = ((Date) (focusedDate.clone()));
focusCopy.setDate(focusedDate.getDate() + days);
if (!isDateInsideRange(focusCopy, resolution)) {
// If not inside allowed range, then... | 3.26 |
framework_VCalendarPanel_focusDay_rdh | /**
* Sets the focus to given date in the current view. Used when moving in the
* calendar with the keyboard.
*
* @param date
* A Date representing the day of month to be focused. Must be
* one of the days currently visible.
*/
private void focusDay(Date date) {
// Only used when calendar body is present
if ... | 3.26 |
framework_VCalendarPanel_getBackwardKey_rdh | /**
* The key that selects the previous day in the calendar. By default this is
* the left arrow key but by overriding this method it can be changed to
* whatever you like.
*
* @return */
protected int getBackwardKey() {
return KeyCodes.KEY_LEFT;
} | 3.26 |
framework_VCalendarPanel_adjustDateToFitInsideRange_rdh | /**
* Adjusts a date to fit inside the range, only if outside
*
* @param date
*/
private Date adjustDateToFitInsideRange(Date date) {
if ((rangeStart != null) && rangeStart.after(date)) {
date = ((Date) (rangeStart.clone()));
} else if ((rangeEnd != null) && rangeEnd.before(date)) {
date = ((Date) (rangeEnd.clo... | 3.26 |
framework_VCalendarPanel_renderCalendar_rdh | /**
* For internal use only. May be removed or replaced in the future.
*
* Updates the calendar and text field with the selected dates.
*
* @param updateDate
* The value false prevents setting the selected date of the
* calendar based on focusedDate. That can be used when only the
* resolution of the cale... | 3.26 |
framework_VCalendarPanel_focusPreviousMonth_rdh | /**
* Selects the previous month
*/
private void focusPreviousMonth() {
if (focusedDate == null) {
return;
}
Date requestedPreviousMonthDate = ((Date) (focusedDate.clone()));
removeOneMonth(requestedPreviousMonthDate);
if (!isDateInsideRange(requestedPreviousMonthDate, Resolution.MONTH)) {
return;
}
if (!isDateInside... | 3.26 |
framework_VCalendarPanel_setRangeStart_rdh | /**
* Sets the start range for this component. The start range is inclusive,
* and it depends on the current resolution, what is considered inside the
* range.
*
* @param newRangeStart
* - the allowed range's start date
*/
public void setRangeStart(Date newRangeStart) {
if (!SharedUtil.equals(rangeStart, newRa... | 3.26 |
framework_UidlRequestHandler_getUINotFoundErrorJSON_rdh | /**
* Returns the JSON which should be returned to the client when a request
* for a non-existent UI arrives.
*
* @param service
* The VaadinService
* @param vaadinRequest
* The request which triggered this, or null if not available
* @since 7.1
* @return A JSON string
*/
static String getUINotFoundErrorJ... | 3.26 |
framework_AbstractComponentContainer_removeAllComponents_rdh | /**
* Removes all components from the container. This should probably be
* re-implemented in extending classes for a more powerful implementation.
*/
@Override
public void removeAllComponents() {
final LinkedList<Component> l = new LinkedList<>();
// Adds all components
for (final Iterator<Component> i... | 3.26 |
framework_AbstractComponentContainer_addComponentDetachListener_rdh | /* documented in interface */
@Override
public Registration addComponentDetachListener(ComponentDetachListener listener) {
return addListener(ComponentDetachEvent.class, listener, ComponentDetachListener.detachMethod);
} | 3.26 |
framework_AbstractComponentContainer_getComponentIterator_rdh | /**
* {@inheritDoc }
*
* @deprecated As of 7.0, use {@link #iterator()} instead.
*/@Deprecated
@Override
public Iterator<Component> getComponentIterator() {
return iterator();
} | 3.26 |
framework_AbstractComponentContainer_addComponent_rdh | /**
* This only implements the events and component parent calls. The extending
* classes must implement component list maintenance and call this method
* after component list maintenance.
*
* @see com.vaadin.ui.ComponentContainer#addComponent(Component)
*/
@Override
public void addComponent(Component c) {
// Mak... | 3.26 |
framework_AbstractComponentContainer_fireComponentAttachEvent_rdh | /**
* Fires the component attached event. This should be called by the
* addComponent methods after the component have been added to this
* container.
*
* @param component
* the component that has been added to this container.
*/
protected void fireComponentAttachEvent(Component component) {
fireEvent(new Comp... | 3.26 |
framework_AbstractComponentContainer_fireComponentDetachEvent_rdh | /**
* Fires the component detached event. This should be called by the
* removeComponent methods after the component have been removed from this
* container.
*
* @param component
* the component that has been removed from this container.
*/
protected void fireComponentDetachEvent(Component component) {
fireEve... | 3.26 |
framework_AbstractComponentContainer_removeComponentDetachListener_rdh | /* documented in interface */
@Override
@Deprecated
public void removeComponentDetachListener(ComponentDetachListener listener) {
removeListener(ComponentDetachEvent.class, listener, ComponentDetachListener.detachMethod);
} | 3.26 |
framework_AbstractComponentContainer_removeComponentAttachListener_rdh | /* documented in interface */
@Override
@Deprecatedpublic void removeComponentAttachListener(ComponentAttachListener listener) {
removeListener(ComponentAttachEvent.class, listener, ComponentAttachListener.attachMethod);} | 3.26 |
framework_BackEndDataProvider_m0_rdh | /**
* Sets the sort order to use, given a {@link QuerySortOrderBuilder}.
* Shorthand for {@code setSortOrders(builder.build())}.
*
* @see QuerySortOrderBuilder
* @param builder
* the sort builder to retrieve the sort order from
* @throws NullPointerException
* if builder is null
*/
default void m0(QuerySor... | 3.26 |
framework_BackEndDataProvider_setSortOrder_rdh | /**
* Sets a single sort order to use as the default sorting for this data
* provider. This overrides the sorting set by any other method that
* manipulates the default sorting of this data provider.
* <p>
* The default sorting is used if the query defines no sorting. The default
* sorting is also used to determi... | 3.26 |
framework_AtmospherePushConnection_onTransportFailure_rdh | /**
* Called if the transport mechanism cannot be used and the fallback will be
* tried.
*/
protected void onTransportFailure() {
getLogger().warning((("Push connection using primary method (" + getConfig().getTransport()) + ") failed. Trying with ") + getConfig().getFallbackTransport(... | 3.26 |
framework_AtmospherePushConnection_onError_rdh | /**
* Called if the push connection fails. Atmosphere will automatically retry
* the connection until successful.
*/
protected void onError(AtmosphereResponse response) {
state = State.DISCONNECTED;
getConnectionStateHandler().pushError(this, response);
} | 3.26 |
framework_AtmospherePushConnection_onConnect_rdh | /**
* Called whenever a server push connection is established (or
* re-established).
*
* @param response
* @since 7.2
*/
protected void onConnect(AtmosphereResponse response) {
transport = response.getTransport();
switch (state) {
case CONNECT_PENDING :
state = State.CONNECTED;
... | 3.26 |
framework_ExpandingContainer_m0_rdh | // Expand container if we scroll past 85%
public int m0(int index) {
log(("checkExpand(" + index) + ")");
if (index >= (f0
* 0.85)) {
final int v0 = f0; f0 = ((int) (v0 * 1.3333));
log((((("*** getSizeWithHint(" + index) + "): went past 85% of size=") + v0) + ", new size=") +
f0);... | 3.26 |
framework_ExpandingContainer_getItem_rdh | // Container
@Override
public BeanItem<MyBean> getItem(Object itemId) {
if (!(itemId instanceof Integer)) {
return null;
}
final int index = ((Integer) (itemId)).intValue();
return new BeanItem<>(new MyBean(index));
} | 3.26 |
framework_ExpandingContainer_removeContainerProperty_rdh | /**
*
* @throws UnsupportedOperationException
* always
*/
@Override
public boolean removeContainerProperty(Object propertyId) {
throw new UnsupportedOperationException();
} | 3.26 |
framework_ExpandingContainer_removeItem_rdh | /**
*
* @throws UnsupportedOperationException
* always
*/
@Override
public boolean removeItem(Object itemId) {
throw new UnsupportedOperationException();
} | 3.26 |
framework_ExpandingContainer_addItemAt_rdh | /**
*
* @throws UnsupportedOperationException
* always
*/
@Override
public Item addItemAt(int index, Object newItemId) {
throw new UnsupportedOperationException();
} | 3.26 |
framework_ExpandingContainer_addListener_rdh | // Container.ItemSetChangeNotifier
@Override
@SuppressWarnings("deprecation")
public void addListener(Container.ItemSetChangeListener listener) {super.addListener(listener);
} | 3.26 |
framework_ExpandingContainer_addItemAfter_rdh | /**
*
* @throws UnsupportedOperationException
* always
*/@Override
public Item addItemAfter(Object previousItemId, Object newItemId) {
throw new UnsupportedOperationException();
} | 3.26 |
framework_ExpandingContainer_m1_rdh | /**
*
* @throws UnsupportedOperationException
* always
*/
@Override
public Item m1() {
throw new UnsupportedOperationException();
} | 3.26 |
framework_ExpandingContainer_removeAllItems_rdh | /**
*
* @throws UnsupportedOperationException
* always
*/
@Override
public boolean removeAllItems() {
throw new UnsupportedOperationException();
} | 3.26 |
framework_ExpandingContainer_addItem_rdh | /**
*
* @throws UnsupportedOperationException
* always
*/
@Override
public Item addItem(Object itemId) {
throw new UnsupportedOperationException();
} | 3.26 |
framework_ExpandingContainer_nextItemId_rdh | // Container.Ordered
@Override
public Integer nextItemId(Object itemId) {
if (!(itemId instanceof Integer)) {
return null;
}
int index = ((Integer)
(itemId)).intValue();
m0(index);
if ((index < 0) || ((index + 1) >= f0)) {
return null;
}
return index + 1;
} | 3.26 |
framework_ExpandingContainer_addContainerProperty_rdh | /**
*
* @throws UnsupportedOperationException
* always
*/
@Override
public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) {
throw new UnsupportedOperationException();
} | 3.26 |
framework_SelectorPredicate_setIndex_rdh | /**
*
* @param index
* the index to set
*/
public void setIndex(int index) {this.index = index;
} | 3.26 |
framework_SelectorPredicate_isWildcard_rdh | /**
*
* @return the wildcard
*/
public boolean isWildcard() {
return wildcard;
} | 3.26 |
framework_SelectorPredicate_setWildcard_rdh | /**
*
* @param wildcard
* the wildcard to set
*/
public void setWildcard(boolean wildcard) {
this.wildcard =
wildcard;
} | 3.26 |
framework_SelectorPredicate_getValue_rdh | /**
*
* @return the value
*/
public String getValue() {return value;
} | 3.26 |
framework_SelectorPredicate_getIndex_rdh | /**
*
* @return the index
*/
public int getIndex() { return index;
} | 3.26 |
framework_SelectorPredicate_getName_rdh | /**
*
* @return the name
*/
public String getName() {return name;
} | 3.26 |
framework_SelectorPredicate_setName_rdh | /**
*
* @param name
* the name to set
*/
public void setName(String name) {this.name = name;
} | 3.26 |
framework_SelectorPredicate_extractPredicates_rdh | /**
* Generates a list of predicates from a single predicate string.
*
* @param path
* a comma separated string of predicates
* @return a List of Predicate objects
*/
public static List<SelectorPredicate> extractPredicates(String path) {
List<SelectorPredicate> predicates... | 3.26 |
framework_SelectorPredicate_readPredicatesFromString_rdh | /**
* Splits the predicate string to list of predicate strings.
*
* @param predicateStr
* Comma separated predicate strings
* @return List of predicate strings
*/
private static List<String> readPredicatesFromString(String predicateStr) {
List<String> predicates = new ArrayList<>();
int prevIdx = 0;
... | 3.26 |
framework_SelectorPredicate_setValue_rdh | /**
*
* @param value
* the value to set
*/public void setValue(String value) {
this.value = value;} | 3.26 |
framework_VAbstractPopupCalendar_setDescriptionForAssistiveDevices_rdh | /**
* Set a description that explains the usage of the Widget for users of
* assistive devices.
*
* @param descriptionForAssistiveDevices
* String with the description
*/
public void setDescriptionForAssistiveDevices(String descriptionForAssistiveDevices) {
f0.setInnerText(descriptionForAssistiveDevices);
} | 3.26 |
framework_VAbstractPopupCalendar_setFocus_rdh | /**
* Sets focus to Calendar panel.
*
* @param focus
* {@code true} for {@code focus}, {@code false} for {@code blur}
*/
public void setFocus(boolean focus) {
calendar.setFocus(focus);
} | 3.26 |
framework_VAbstractPopupCalendar_m0_rdh | /**
* Changes the current date, and updates the
* {@link VDateField#bufferedResolutions}, possibly
* {@link VDateField#sendBufferedValues()} to the server if needed.
*
* @param newDate
* the new {@code Date} to update
*/
@SuppressWarnings("deprecation")
public void m0(Date newDate) {
Date currentDate = get... | 3.26 |
framework_VAbstractPopupCalendar_setTextFieldTabIndex_rdh | /**
* Set correct tab index for disabled text field in IE as the value set in
* setTextFieldEnabled(...) gets overridden in
* TextualDateConnection.updateFromUIDL(...).
*
* @since 7.3.1
*/
public void setTextFieldTabIndex() {
if (BrowserInfo.get().isIE() && (!textFieldEnabled)) {
// index needs to b... | 3.26 |
framework_VAbstractPopupCalendar_setRangeStart_rdh | /**
* Sets the start range for this component. The start range is inclusive,
* and it depends on the current resolution, what is considered inside the
* range.
*
* @param rangeStart
* - the allowed range's start date
*/
public void setRangeStart(String rangeStart) {
calendar.setRangeStart(rangeStart);
} | 3.26 |
framework_VAbstractPopupCalendar_updateTextFieldEnabled_rdh | /**
* Updates the text field's enabled status to correspond with the latest
* value set through {@link #setTextFieldEnabled(boolean)} and this
* component's general {@link #setEnabled(boolean)}.
*
* @see #setTextFieldEnabled(boolean)
*/
protected void updateTextFieldEnabled() {
boolean reallyEnabled = isEnabl... | 3.26 |
framework_VAbstractPopupCalendar_setRangeEnd_rdh | /**
* Sets the end range for this component. The end range is inclusive, and it
* depends on the current resolution, what is considered inside the range.
*
* @param rangeEnd
* - the allowed range's end date
*/
public void setRangeEnd(String rangeEnd) {
calendar.setRangeEnd(rangeEnd);
} | 3.26 |
framework_VAbstractPopupCalendar_getOpenCalenderPanelKey_rdh | /**
* Get the key code that opens the calendar panel. By default it is the down
* key but you can override this to be whatever you like
*
* @return the key code that opens the calendar panel
*/
protected int getOpenCalenderPanelKey() {
return KeyCodes.KEY_DOWN;
} | 3.26 |
framework_VAbstractPopupCalendar_setFocusedDate_rdh | /**
* Sets the content of a special field for assistive devices, so that they
* can recognize the change and inform the user (reading out in case of
* screen reader).
*
* @param selectedDate
* Date that is currently selected
*/public void setFocusedDate(Date selectedDate) {
this.selectedDate.setText(DateTimeFo... | 3.26 |
framework_VAbstractPopupCalendar_getDescriptionForAssistiveDevices_rdh | /**
* Get the description that explains the usage of the Widget for users of
* assistive devices.
*
* @return String with the description
*/
public String getDescriptionForAssistiveDevices() {
return f0.getInnerText();} | 3.26 |
framework_VAbstractPopupCalendar_buildDate_rdh | /**
* Update the text field contents from the date. See {@link #buildDate()}.
*
* @param forceValid
* true to force the text field to be updated, false to only
* update if the parsable flag is true.
*/
protected void buildDate(boolean forceValid) {
if (forceValid) {
parsable = true;
}
buildDate();
} | 3.26 |
framework_VAbstractPopupCalendar_openCalendarPanel_rdh | /**
* Opens the calendar panel popup.
*/
public void openCalendarPanel() {
if (((!open) && (!readonly)) && isEnabled()) {
open = true;
if (getCurrentDate() != null) {
calendar.setDate(((Date) (getCurrentDate().clone())));
} else if (getDefaultDate() !=
null) {
calendar.setDate(getDefaultDate());
} else {
c... | 3.26 |
framework_VAbstractPopupCalendar_setTextFieldEnabled_rdh | /**
* Sets the state of the text field of this component. By default the text
* field is enabled. Disabling it causes only the button for date selection
* to be active, thus preventing the user from entering invalid dates. See
* <a href="http://dev.vaadin.com/ticket/6790">#6790</a>.
* <p>
* If the text field is e... | 3.26 |
framework_DateUtil_formatClientSideDate_rdh | /**
*
* @param date
* the date to format
* @return given Date as String, for communicating to server-side
*/
public static String formatClientSideDate(Date date) {
DateTimeFormat v0 = DateTimeFormat.getFormat(DateConstants.CLIENT_DATE_FORMAT);
return v0.format(date);
} | 3.26 |
framework_DateUtil_compareDate_rdh | /**
* Checks if dates are same day without checking datetimes.
*
* @param date1
* @param date2
* @return */
@SuppressWarnings("deprecation")
public static boolean compareDate(Date date1, Date date2) {
if (((date1.getDate() == date2.getDate()) && (date1.getYear() == date2.getYear())) && (date1.getMonth() == da... | 3.26 |
framework_DateUtil_formatClientSideTime_rdh | /**
*
* @param date
* the date to format
* @return given Date as String, for communicating to server-side
*/
public static String formatClientSideTime(Date date) {
DateTimeFormat dateformatDate = DateTimeFormat.getFormat(DateConstants.CLIENT_TIME_FORMAT);
return dateformatDate.format(date);
} | 3.26 |
framework_VaadinPortletResponse_escapeHtml_rdh | /**
* Perform minimal HTML escaping similar to Guava HtmlEscapers.
*
* @param input
* string to escape
* @return minimally escaped HTML safe string
*/
private static String escapeHtml(String input) {StringBuilder sb = new StringBuilder();
for (int i = 0; i
< input.length(); i++) {
char c = inpu... | 3.26 |
framework_VUI_m0_rdh | /**
* Called when the window or parent div might have been resized.
*
* This immediately checks the sizes of the window and the parent div (if
* monitoring it) and triggers layout recalculation if they have changed.
*/
protected void m0() {
windowSizeMaybeChanged(Window.getClientWidth(), Window.getClientHeight... | 3.26 |
framework_VUI_triggerSizeChangeCheck_rdh | /**
* Called when a resize event is received.
*
* This may trigger a lazy refresh or perform the size check immediately
* depending on the browser used and whether the server side requests
* resizes to be lazy.
*/
private void triggerSizeChangeCheck() {
/* We may postpone these events to avoid slowness when r... | 3.26 |
framework_VUI_getTheme_rdh | /**
*
* @return the name of the theme in use by this UI.
* @deprecated as of 7.3. Use {@link UIConnector#getActiveTheme()} instead.
*/
@Deprecated
public String getTheme() {
return ((UIConnector) (ConnectorMap.get(connection).getConnector(this))).getActiveTheme();
} | 3.26 |
framework_VUI_sendClientResized_rdh | /**
* Send new dimensions to the server.
* <p>
* For internal use only. May be removed or replaced in the future.
*/
public void sendClientResized() {
Profiler.enter("VUI.sendClientResized");
Element parentElement = getElement().getParentElement();
int viewHeight = parentElement.getClientHeight();
... | 3.26 |
framework_VUI_onLoad_rdh | /**
* Start to periodically monitor for parent element resizes if embedded
* application (e.g. portlet).
*/
@Override
protected void onLoad() {
super.onLoad();
if (isMonitoringParentSize()) {
resizeTimer = new Timer() {
@Override
public void run() {
// trigger ... | 3.26 |
framework_VUI_m1_rdh | /**
* Ensures the widget is scrollable e.g. after style name changes.
* <p>
* For internal use only. May be removed or replaced in the future.
*/
public void m1() {
if (touchScrollHandler == null) {
touchScrollHandler = TouchScrollDelegate.enableTouchScrolling(this);
}
touchScrollHandler.addElem... | 3.26 |
framework_VUI_onUnload_rdh | /**
* Stop monitoring for parent element resizes.
*/
@Overrideprotected void onUnload() {
if (resizeTimer != null) {
resizeTimer.cancel();
resizeTimer = null;
}
super.onUnload();
} | 3.26 |
framework_VUI_storeFocus_rdh | /**
* Allows to store the currently focused Element.
*
* Current use case is to store the focus when a Window is opened. Does
* currently handle only a single value. Needs to be extended for #12158
*
* @param focusedElement
*/
public void storeFocus() {
storedFocus = WidgetUtil.getFocusedElement();
} | 3.26 |
framework_VUI_isEmbedded_rdh | /**
* Returns true if the body is NOT generated, i.e if someone else has made
* the page that we're running in. Otherwise we're in charge of the whole
* page.
*
* @return true if we're running embedded
*/
public boolean isEmbedded() {
return !getElement().getOwnerDocument().getBody().getClassName().contains(A... | 3.26 |
framework_StringToDateConverter_getFormat_rdh | /**
* Returns the format used by
* {@link #convertToPresentation(Date, Class,Locale)} and
* {@link #convertToModel(String, Class, Locale)}.
*
* @param locale
* The locale to use
* @return A DateFormat instance
*/
protected DateFormat getFormat(Locale locale) {
if (locale == null) {
locale = Local... | 3.26 |
framework_AbstractFieldConnector_isRequiredIndicatorVisible_rdh | /**
* Checks whether the required indicator should be shown for the field.
*
* Required indicators are hidden if the field or its data source is
* read-only.
*
* @return true if required indicator should be shown
*/
@Override
public boolean isRequiredIndicatorVisible() {
return getState().required && (!isR... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.