name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_VTabsheet_selectTab_rdh | /**
* Selects the indicated tab, deselects the previously selected tab, and
* updates the style names, tabulator indices, and the
* {@code aria-selected} roles to match. Also recalculates the tab
* caption widths in case the addition or removal of the selection style
* changed them, and schedules a scroll for movi... | 3.26 |
framework_VTabsheet_getCloseTabKey_rdh | /**
* Returns the key code of the keyboard shortcut that closes the currently
* focused tab (if closable) in a focused tabsheet.
*
* @return the key to close the current tab
*/
protected int getCloseTabKey() {
return KeyCodes.KEY_DELETE;
} | 3.26 |
framework_VTabsheet_getFocusedTab_rdh | /**
* Returns the tab that has the focus currently.
*
* @return the focused tab or {@code null} if one doesn't exist
*/
private Tab getFocusedTab() {
return focusedTab;
} | 3.26 |
framework_VTabsheet_m4_rdh | /**
* Remove the last blur deferred command from execution.
*/
public void m4() {
if
(blurCommand != null) {
blurCommand.stopSchedule();
blurCommand = null;
}
// We really want to make sure this flag gets reseted at any time
// when something interact with the blur manager and ther's no blur
// command scheduled (a... | 3.26 |
framework_VTabsheet_getRightGap_rdh | /**
* Returns the gap between the rightmost visible tab and the tab container
* edge. If the tabs have been right-aligned by styling (e.g. Valo style
* {@code right-aligned-tabs}) there should be no gap at all.
*
* @return the right gap (in pixels), or zero if no gap
*/
private int getRightGap() {
int lastVisible... | 3.26 |
framework_VTabsheet_setClosable_rdh | /**
* Adds or removes the button for closing the corresponding tab and the
* style name for a closable tab.
*
* @param closable
* {@code true} if the tab is closable, {@code false}
* otherwise
*/
public void setClosable(boolean closable) {
this.closable
= closable;
if (closable && (closeButton ==... | 3.26 |
framework_VTabsheet_canSelectTab_rdh | /**
* Returns whether the tab could be selected or not. In addition to 'usual'
* selection blockers like being disabled or hidden, if the tab sheet is
* already waiting for selection confirmation from the server, any further
* selections are blocked until the response has been received.
*
* @param tabIndex
* t... | 3.26 |
framework_VTabsheet_addTab_rdh | /**
* Adds a tab to the tab bar.
*
* @return the added tab.
*/
public Tab addTab() {
Tab t = new Tab(this);
int tabIndex = getTabCount();
// Logical attach
insert(t, tr, tabIndex, true);
if (tabIndex == 0)
{
// Set the "first" style... | 3.26 |
framework_VTabsheet_navigateTab_rdh | /**
* Updates tab focus styles when navigating from one tab to another.
* <p>
* This method should be called when there is either a mouse click at
* the new tab (which should also trigger selection) or a next/previous
* key navigation event (which should not, unless confirmed with
* selection key).
*
* @param f... | 3.26 |
framework_VTabsheet_setAssistiveDescription_rdh | /**
* Sets the {@code aria-describedby} attribute for this tab element to
* the referenced id. This should be called when this tab receives focus
* and has a tooltip configured.
*
* @param descriptionId
* the unique id of the tooltip element
*/
public void setAssistiveDescription(String
descriptionId) {
Ro... | 3.26 |
framework_VTabsheet_updateOpenTabSize_rdh | /**
* Sets the size of the visible tab content (component). As the tab is set
* to position: absolute (to work around a firefox flickering bug) we must
* keep this up-to-date by hand.
* <p>
* For internal use only. May be removed or replaced in the future.
*/
public void updateOpenTabSize() {
/* The overflow=auto... | 3.26 |
framework_VTabsheet_registerTab_rdh | /**
* Register the tab to the selection handler.
*
* @param tab
* the tab to register.
*/
public void registerTab(Tab tab) {
tab.addBlurHandler(this);
tab.addFocusHandler(this);
tab.addKeyDownHandler(this);tab.addClickHandler(this);
tab.addMouseDownHandler(this);
} | 3.26 |
framework_VTabsheet_onClose_rdh | /**
* Handles a request to close this tab. Closability should be checked
* before calling this method. The close request will be delivered to
* the server, where the actual closing is handled.
*
* @see #isClosable()
*/
public void onClose() {
closeHandler.onClose(new VCloseEvent(this));
} | 3.26 |
framework_VTabsheet_focusPreviousTab_rdh | /**
* Left arrow key focus move. Selection won't change until the selection
* key is pressed, but the target tab must be selectable. If no
* selectable tabs are found before currently focused tab, focus isn't
* moved.
*/
private void focusPreviousTab() {
int newTabIndex = focusedTabIndex;
// Find the previous visi... | 3.26 |
framework_VTabsheet_setCloseHandler_rdh | /**
* Sets the close handler for this tab. This handler should be called
* whenever closing of a tab is requested (by clicking the close button
* or pressing the close key).
*
* @param closeHandler
* the close handler
* @see VTabsheet#getCloseTabKey()
*/
public void setCloseHandler(VCloseHandler closeHandler)... | 3.26 |
framework_VTabsheet_getCurrentlyDisplayedWidget_rdh | /**
* Returns the currently displayed widget in the tab panel.
*
* @since 7.2
* @return currently displayed content widget
*/
public Widget getCurrentlyDisplayedWidget() {
return tabPanel.getWidget(tabPanel.getVisibleWidget());
} | 3.26 |
framework_VTabsheet_setStyleNames_rdh | /**
* Sets the style names for this tab according to the given parameters.
*
* @param selected
* {@code true} if the tab is selected, {@code false}
* otherwise
* @param first
* {@code true} if the tab is the first one from the left,
* {@code false} otherwise
* @param keyboardFocus
* {@code true} if ... | 3.26 |
framework_VTabsheet_updateTabScroller_rdh | /**
* Layouts the tab-scroller elements, and applies styles.
*/
private void updateTabScroller() {
if (!isDynamicWidth()) {
tabs.getStyle().setWidth(100, Unit.PCT);
}
// Make sure scrollerIndex is valid
boolean changed = false;
if ((scrollerIndex < 0) || (scrollerIndex > tb.getTabCount())) {
scrollerIndex = tb.m3();
... | 3.26 |
framework_VTabsheet_cancelNextBlurSchedule_rdh | /**
* Cancel the next scheduled execution. This method must be called only
* from an event occurring before the onBlur event. It's the case of IE
* which doesn't trigger the focus event, so we're using this approach
* to cancel the next blur event prior it's execution, calling the
* method from mouse down event.
... | 3.26 |
framework_VTabsheet_getLeftGap_rdh | /**
* Returns the gap between the leftmost visible tab and the tab container
* edge. By default there should be no gap at all, unless the tabs have been
* right-aligned by styling (e.g. Valo style {@code right-aligned-tabs} or
* {@code centered-tabs}).
*
* @return the left gap (in pixels), or zero if no gap
*/
p... | 3.26 |
framework_VTabsheet_scrollAccordingToScrollTarget_rdh | /**
* Scroll the tab bar according to the last scrollTarget.
*
* @param scrollTarget
* the scroll button that was pressed
*/
private void
scrollAccordingToScrollTarget(Element scrollTarget) {
if (scrollTarget == null) {
return;
}
int newFirstIndex = -1;// Scroll left.
if (hasScrolledTabs() && (scrollTarget == s... | 3.26 |
framework_VTabsheet_m1_rdh | /**
* Removes focus from the tab.
*/
public void m1() {
FOCUS_IMPL.blur(td);
}
/**
* Returns whether the tab caption has a configured tooltip or not.
*
* @return {@code true} if the tab caption has a tooltip, {@code false} | 3.26 |
framework_VTabsheet_handleStyleNames_rdh | /**
* For internal use only. May be removed or replaced in the future.
*
* @param state
* the state object for this component
*/
public void handleStyleNames(AbstractComponentState state) {
// Add proper stylenames for all elements (easier to prevent unwanted
// style inheritance)
if (ComponentStateUtil.hasStyle... | 3.26 |
framework_VTabsheet_isHiddenOnServer_rdh | /**
* Returns whether the tab is hidden on server (as opposed to simply
* hidden because it's scrolled out of view).
*
* @return {@code true} if hidden on server, {@code false} otherwise
*/
public boolean isHiddenOnServer() {
return hiddenOnServer;} | 3.26 |
framework_VTabsheet_hideTabs_rdh | /**
* Makes tab bar invisible.
*
* @since 7.2
*/public void hideTabs() {
tb.setVisible(false);
addStyleName(CLASSNAME + "-hidetabs");
} | 3.26 |
framework_VTabsheet_blur_rdh | /**
* Removes focus from the active tab.
*
* @deprecated This method is not called by the framework code anymore.
*/
@Deprecated
public void blur() {
getActiveTab().m1();} | 3.26 |
framework_VTabsheet_getPreviousTabKey_rdh | /**
* Returns the key code of the keyboard shortcut that focuses the previous
* tab in a focused tabsheet.
*
* @return the key to move focus to the previous tab
*/
protected int getPreviousTabKey() {
return KeyCodes.KEY_LEFT;
} | 3.26 |
framework_VTabsheet_m5_rdh | /**
* Gets the key to select the focused tab when navigating using
* previous/next (left/right) keys.
*
* @return the key to select the focused tab.
* @see #getNextTabKey()
* @see #getPreviousTabKey()
*/
protected int m5() {
return KeyCodes.KEY_SPACE;
} | 3.26 |
framework_VTabsheet_scheduleDeferred_rdh | /**
* Schedule the command for a deferred execution.
*
* @since 7.4
*/
public void scheduleDeferred() {
Scheduler.get().scheduleDeferred(this);
} | 3.26 |
framework_VTabsheet_getSpacerWidth_rdh | /**
* Returns the width of the spacer cell. Valo theme has the element hidden
* by default, in which case the this returns zero.
*
* @return the width of the spacer cell in pixels
*/
private int getSpacerWidth() {
return tb.spacerTd.getOffsetWidth();
} | 3.26 |
framework_VTabsheet_stopSchedule_rdh | /**
* Stop the command from being executed.
*
* @since 7.4
*/
public void stopSchedule() {
blurSource = null;
} | 3.26 |
framework_LegacyApplication_setTheme_rdh | /**
* Sets the application's theme.
* <p>
* The default theme for {@link LegacyApplication} is reindeer, unlike for
* {@link UI} the default theme is valo.
* <p>
* Note that this theme can be overridden for a specific UI with
* {@link VaadinSession#getThemeForUI(UI)}. Setting theme to be
* <code>null</code> sel... | 3.26 |
framework_LegacyApplication_addWindow_rdh | /**
* Adds a new browser level window to this application.
*
* @param uI
* the UI window to add to the application
*/
public void addWindow(LegacyWindow uI) {
if (uI.getName() ==
null) {
String name = Integer.toString(namelessUIIndex++);
uI.setName(name);
}
uI.setApplication(this)... | 3.26 |
framework_LegacyApplication_removeWindow_rdh | /**
* Removes the specified window from the application. This also removes all
* name mappings for the window (see {@link #addWindow(LegacyWindow)} and
* #getWindowName(UI)}.
*
* <p>
* Note that removing window from the application does not close the browser
* window - the window is only removed from the server-... | 3.26 |
framework_LegacyApplication_setMainWindow_rdh | /**
* Sets the main window of this application. Setting window as a main window
* of this application also adds the window to this application.
*
* @param mainWindow
* the UI to set as the default window
*/
public void setMainWindow(LegacyWindow mainWindow) {
if (this.mainWindow != null) {
throw n... | 3.26 |
framework_LegacyApplication_setLogoutURL_rdh | /**
* Sets the URL user is redirected to on application close. If the URL is
* <code>null</code>, the application is closed normally as defined by the
* application running environment: Desktop application just closes the
* application window and web-application redirects the browser to
* application main URL.
*
... | 3.26 |
framework_LegacyApplication_getTheme_rdh | /**
* Gets the application's theme. The application's theme is the default
* theme used by all the uIs for which a theme is not explicitly defined. If
* the application theme is not explicitly set, <code>null</code> is
* returned.
*
* @return the name of the application's theme.
*/
public String getTheme() {
... | 3.26 |
framework_Sort_then_rdh | /**
* Continue building a Sort order. The provided column is sorted in
* specified order if the previously added columns have been evaluated as
* equals.
*
* @param column
* a grid column object reference
* @param direction
* indicator of sort direction - either ascending or descending
* @return a sort ins... | 3.26 |
framework_Sort_by_rdh | /**
* Start building a Sort order by sorting a provided column.
*
* @param column
* a grid column object reference
* @param direction
* indicator of sort direction - either ascending or descending
* @return a sort instance, typed to the grid data type
*/
public static Sort by(Grid.Column<?, ?> column,
SortD... | 3.26 |
framework_Sort_build_rdh | /**
* Build a sort order list. This method is called internally by Grid when
* calling {@link com.vaadin.client.ui.grid.Grid#sort(Sort)}, but can also
* be called manually to create a SortOrder list, which can also be provided
* directly to Grid.
*
* @return a sort order list.
*/
public List<SortOrder> build() {... | 3.26 |
framework_VCustomLayout_setWidget_rdh | /**
* Sets widget to given location.
*
* If location already contains a widget it will be removed.
*
* @param widget
* Widget to be set into location.
* @param location
* location name where widget will be added
* @throws IllegalArgumentException
* if no such location is found in the layout.
*/
public ... | 3.26 |
framework_VCustomLayout_initImgElements_rdh | /**
* Img elements needs some special handling in custom layout. Img elements
* will get their onload events sunk. This way custom layout can notify
* parent about possible size change.
*/
private void initImgElements() {
NodeList<Element> nodeList = getElement().getElementsByTagName("IMG");
for (int i = ... | 3.26 |
framework_VCustomLayout_initializeHTML_rdh | /**
* Initialize HTML-layout.
*
* @param template
* original HTML-template
* @param themeUri
* URI to the current theme
*/
public void initializeHTML(String template, String themeUri) {
// Connect body of the template to DOM
template = extractBodyAndScriptsFromTemplate(template);
// TODO prefix... | 3.26 |
framework_VCustomLayout_extractBodyAndScriptsFromTemplate_rdh | /**
* Extract body part and script tags from raw html-template.
*
* Saves contents of all script-tags to private property: scripts. Returns
* contents of the body part for the html without script-tags. Also replaces
* all _UID_ tags with an unique id-string.
*
* @param html
* Original HTML-template received f... | 3.26 |
framework_VCustomLayout_updateCaption_rdh | /**
* Update caption for the given child connector.
*
* @param childConnector
* the child connector whose caption should be updated
*/
public void updateCaption(ComponentConnector childConnector) {
Widget
widget =
childConnector.getWidget();
if (!widget.isAttached()) {
// Widget has not b... | 3.26 |
framework_VCustomLayout_clear_rdh | /**
* Clear all widgets from the layout.
*/@Override
public void clear() {
super.clear();
locationToWidget.clear();
childWidgetToCaptionWrapper.clear();
} | 3.26 |
framework_VCustomLayout_scanForLocations_rdh | /**
* Collect locations from template
*/
private void scanForLocations(Element elem) {
if (elem.hasAttribute("location")) {
final String location = elem.getAttribute("location");
locationToElement.put(location, elem);
elem.setInnerHTML("");
} else if (elem.hasAttribute("data-locat... | 3.26 |
framework_VCustomLayout_getLocation_rdh | /**
* Get the location of an widget.
*
* @param w
* the widget whose location to check
* @return location name, or {@code null} if not found
*/
public String getLocation(Widget w) {
for (final String location : locationToWidget.keySet()) {
if (locationToWidget.get(location) == w) {
retur... | 3.26 |
framework_VCssLayout_addOrMove_rdh | /**
* For internal use only. May be removed or replaced in the future.
*/
public void addOrMove(Widget child, int index) {
Profiler.enter("VCssLayout.addOrMove");
if (child.getParent() == this) {
Profiler.enter("VCssLayout.addOrMove getWidgetIndex");
int currentIndex = getWidgetIndex(child);
... | 3.26 |
framework_RichTextAreaElement_m0_rdh | /**
* Return value of the field element.
*
* @return value of the field element
* @since 8.4
*/
public String m0() {
JavascriptExecutor executor = ((JavascriptExecutor) (getDriver()));
return executor.executeScript("return arguments[0].contentDocument.body.innerHTML", getEditorIframe()).toString();
} | 3.26 |
framework_RichTextAreaElement_setValue_rdh | /**
* Set value of the field element.
*
* @param chars
* new value of the field
* @since 8.4
*/
public void setValue(CharSequence
chars) throws ReadOnlyException {
if
(isReadOnly()) {
throw new ReadOnlyException();
}
JavascriptExecutor executor = ((JavascriptExecutor) (getDri... | 3.26 |
framework_FileDownloaderConnector_trigger_rdh | /**
* Called when the download should start.
*
* @since 8.4
*/
@Override
protected void trigger() {final String url = getResourceUrl("dl");
if ((url != null) && (!url.isEmpty())) {
BrowserInfo browser = BrowserInfo.get();
if (browser.isIOS()) {
... | 3.26 |
framework_VAbstractCalendarPanel_setAssistiveLabelPreviousMonth_rdh | /**
* Set assistive label for the previous month element.
*
* @param label
* the label to set
* @since 8.4
*/
public void setAssistiveLabelPreviousMonth(String label) {
prevMonthAssistiveLabel = label;
} | 3.26 |
framework_VAbstractCalendarPanel_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 the closing key
*/
protected int getCloseKey() {
return KeyCodes.KEY_ESCAPE;
} | 3.26 |
framework_VAbstractCalendarPanel_setParentField_rdh | /**
* Sets the parent date field widget.
*
* @param parent
* the parent widget
*/
public void setParentField(VDateField<R> parent) {
this.parent = parent;
} | 3.26 |
framework_VAbstractCalendarPanel_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_VAbstractCalendarPanel_adjustDateToFitInsideRange_rdh | /**
* Adjusts a date to fit inside the range, only if outside
*
* @param date
*/private Date adjustDateToFitInsideRange(Date date) {
if (!isAcceptedByRangeStart(date, resolution)) {
date = parseRangeString(rangeStart);
}
else if (!isAcceptedByRangeEnd(date, resolution)) {
date = parseRangeString(rangeEnd);
}
return... | 3.26 |
framework_VAbstractCalendarPanel_isEnabled_rdh | /**
* Checks whether the widget is enabled.
*
* @return {@code true} is the widget is enabled
*/
protected boolean isEnabled() {
return parent.isEnabled();
} | 3.26 |
framework_VAbstractCalendarPanel_updateAssistiveLabels_rdh | /**
* Updates assistive labels of the navigation elements.
*
* @since 8.4
*/
public void updateAssistiveLabels() {
if (prevMonth != null) {
Roles.getButtonRole().setAriaLabelProperty(prevMonth.getElement(), prevMonthAssistiveLabel);
}
if (nextMonth != null) {
Roles.getButtonRole().setAriaLabelProperty(nextMonth.get... | 3.26 |
framework_VAbstractCalendarPanel_setAssistiveLabelNextMonth_rdh | /**
* Set assistive label for the next month element.
*
* @param label
* the label to set
* @since 8.4
*/
public void setAssistiveLabelNextMonth(String label) {
nextMonthAssistiveLabel = label;
} | 3.26 |
framework_VAbstractCalendarPanel_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_VAbstractCalendarPanel_focusNextYear_rdh | /**
* Selects the next year
*/
@SuppressWarnings("deprecation")
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(nextYearDat... | 3.26 |
framework_VAbstractCalendarPanel_processClickEvent_rdh | /**
* Handles a user click on the component
*
* @param sender
* The component that was clicked
*/
private void processClickEvent(Widget sender) {
if ((!isEnabled()) || isReadonly()) {
return;
}
if (sender == prevYear) {
focusPreviousYear(1);
} else if (sender == nextYear) {
focusNextYear(1);
} else if (sender =... | 3.26 |
framework_VAbstractCalendarPanel_focusNextDay_rdh | /**
* Moves the focus forward the given number of days.
*/
@SuppressWarnings("deprecation")
private void focusNextDay(int days)
{
if (focusedDate == null) {
return;
}
Date focusCopy = ((Date) (focusedDate.clone()));
focusCopy.setDate(focusedDate.getDate() + days);
if (!isDateInsideRange(focusCopy, getResolution()... | 3.26 |
framework_VAbstractCalendarPanel_setResolution_rdh | /**
* Sets the current date resolution.
*
* @param resolution
* the new resolution
*/public void setResolution(R resolution) {
this.resolution = resolution;
} | 3.26 |
framework_VAbstractCalendarPanel_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 the backward key
*/
protected int getBackwardKey() {
return
KeyCodes.KEY_LEFT;
} | 3.26 |
framework_VAbstractCalendarPanel_setShowISOWeekNumbers_rdh | /**
* Sets whether ISO 8601 week numbers should be shown in the value selector
* or not. ISO 8601 defines that a week always starts with a Monday so the
* week numbers are only shown if this is the case.
*
* @param showISOWeekNumbers
* {@code true} if week number should be shown, {@code false}
* otherwise
*... | 3.26 |
framework_VAbstractCalendarPanel_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_VAbstractCalendarPanel_isAcceptedByRangeEnd_rdh | /**
* Accepts dates earlier 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_VAbstractCalendarPanel_setDateStyles_rdh | /**
* Sets the style names for dates.
*
* @param dateStyles
* the map of date string to style name
* @since 8.3
*/ public void setDateStyles(Map<String, String> dateStyles) {this.dateStyles.clear();
if (dateStyles != null) {
this.dateStyles.putAll(dateStyles);
}
} | 3.26 |
framework_VAbstractCalendarPanel_setDateTimeService_rdh | /**
* Sets date time service for the widget.
*
* @param dateTimeService
* date time service
*/
public void setDateTimeService(DateTimeService dateTimeService) {
this.dateTimeService = dateTimeService;
}
/**
* Returns whether ISO 8601 week numbers should be shown in the value
* selector or not. ISO 8601 define... | 3.26 |
framework_VAbstractCalendarPanel_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(String newRangeStart) {
if (!SharedUtil.equals(rangeStart, new... | 3.26 |
framework_VAbstractCalendarPanel_onValueChange_rdh | /**
*
* @deprecated This method is not used by the framework code anymore.
* @return {@code false}
*/
@Deprecated
protected boolean onValueChange() {
return false;
} | 3.26 |
framework_VAbstractCalendarPanel_m2_rdh | /**
* Returns date time service for the widget.
*
* @see #setDateTimeService(DateTimeService)
* @return date time service
*/
protected DateTimeService m2() {
return dateTimeService;
} | 3.26 |
framework_VAbstractCalendarPanel_isReadonly_rdh | /**
* Checks whether the widget is not editable (read-only).
*
* @return {@code true} if the widget is read-only
*/
protected boolean isReadonly() {
return parent.isReadonly();
} | 3.26 |
framework_VAbstractCalendarPanel_onCancel_rdh | /**
* Notifies submit-listeners of a cancel event
*/
private void onCancel() {
if (getSubmitListener() != null) {
getSubmitListener().onCancel();
}
} | 3.26 |
framework_VAbstractCalendarPanel_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.
*/
@SuppressWarnings("unchecked")
private void focusDay(Date date) {
// Only used wh... | 3.26 |
framework_VAbstractCalendarPanel_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_VAbstractCalendarPanel_setAssistiveLabelNextYear_rdh | /**
* Set assistive label for the next year element.
*
* @param label
* the label to set
* @since 8.4
*/
public void setAssistiveLabelNextYear(String label) {
nextYearAssistiveLabel = label;
} | 3.26 |
framework_VAbstractCalendarPanel_isYear_rdh | /**
* Returns {@code true} if the provided {@code resolution} represents an
* year.
*
* @param resolution
* the given resolution
* @return {@code true} if the {@code resolution} represents a year
*/
protected boolean isYear(R resolution) {
return parent.isYear(resolution);
}
/**
* Returns {@code true} if th... | 3.26 |
framework_VAbstractCalendarPanel_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.
*/
@SuppressWarnings("unchecked")
private void selectDate(Date date) {
if (selectedDay != null) {
selectedDay.removeStyleDep... | 3.26 |
framework_VAbstractCalendarPanel_buildCalendarHeader_rdh | /**
* Builds the top buttons and current month and year header.
*
* @param needsMonth
* Should the month buttons be visible?
* @param needsBody
* indicates whether the calendar body is drawn
*/
private void buildCalendarHeader(boolean needsMonth, boolean needsBody) {
getRowFormatter().addStyleName(0, parent.... | 3.26 |
framework_VAbstractCalendarPanel_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 the forward key
*/
protected int getForwardKey() {
return KeyCodes.KEY_RIGHT;
} | 3.26 |
framework_VAbstractCalendarPanel_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_VAbstractCalendarPanel_buildCalendarBody_rdh | /**
* Builds the day and time selectors of the calendar.
*/
@SuppressWarnings("deprecation")
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, ... | 3.26 |
framework_VAbstractCalendarPanel_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_VAbstractCalendarPanel_m4_rdh | /**
* Notifies submit-listeners of a submit event
*/
private void m4() {
if (getSubmitListener() != null) {
getSubmitListener().onSubmit();
}
} | 3.26 |
framework_VAbstractCalendarPanel_getResolutions_rdh | /**
* Returns all available resolutions for the widget.
*
* @return all available resolutions
*/
protected Stream<R> getResolutions() {
return parent.getResolutions();
} | 3.26 |
framework_VAbstractCalendarPanel_isDateInsideRange_rdh | /**
* Checks inclusively whether a date is inside a range of dates or not.
*
* @param date
* @return */
private boolean isDateInsideRange(Date date, R minResolution) {
assert date != null;return isAcceptedByRangeEnd(date, minResolution) && isAcceptedByRangeStart(date, minResolution);
} | 3.26 |
framework_VAbstractCalendarPanel_setDate_rdh | /**
* Sets the data of the Panel.
*
* @param currentDate
* The date to set
*/
public void setDate(Date currentDate) {
doSetDate(currentDate, false, () -> {
});
} | 3.26 |
framework_VAbstractCalendarPanel_getResolution_rdh | /**
* Returns the current date resolution.
*
* @return the resolution
*/
public R getResolution() {
return resolution;
} | 3.26 |
framework_VAbstractCalendarPanel_focusPreviousDay_rdh | /**
* Moves the focus backward the given number of days.
*/
private void focusPreviousDay(int days) {
focusNextDay(-days);
} | 3.26 |
framework_VAbstractCalendarPanel_setAssistiveLabelPreviousYear_rdh | /**
* Set assistive label for the previous year element.
*
* @param label
* the label to set
* @since 8.4
*/
public void setAssistiveLabelPreviousYear(String label) {
prevYearAssistiveLabel = label;
} | 3.26 |
framework_VAbstractCalendarPanel_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 the previous week key
*/
protected int getPreviousKey() {
return KeyCodes.KEY_UP;
} | 3.26 |
framework_VAbstractCalendarPanel_doSetDate_rdh | /**
* The actual implementation of the logic which sets the data of the Panel.
* The method {@link #setDate(Date)} just delegate a call to this method
* providing additional config parameters.
*
* @param currentDate
* currentDate The date to set
* @param needRerender
* if {@code true} then calendar will be ... | 3.26 |
framework_VAbstractCalendarPanel_m1_rdh | /**
* Updates year, month, day from focusedDate to value
*/
@SuppressWarnings("deprecation")
private void m1() {
if ((focusedDate != null) && isDateInsideRange(focusedDate, getResolution())) {
if (value == null) {
// No previously selected value (set to null on server side).
// Create a new date using current date... | 3.26 |
framework_VAbstractCalendarPanel_getSelectKey_rdh | /**
* Returns the select key which selects the value. By default this is the
* enter key but it can be changed to whatever you like by overriding this
* method.
*
* @return the select key
*/
protected int getSelectKey() {
return KeyCodes.KEY_ENTER;
} | 3.26 |
framework_VAbstractCalendarPanel_m5_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 the next week key
*/
protected int m5() {
return KeyCodes.KEY_DOWN;
} | 3.26 |
framework_VAbstractCalendarPanel_handleKeyPress_rdh | /**
* Handles the keypress from both the onKeyPress event and the onKeyDown
* event
*
* @param event
* The keydown/keypress event
*/
private void
handleKeyPress(DomEvent<?> event) {
// Check tabs
int keycode = event.getNativeEvent().getKeyCode();
if ((keycode == KeyCodes.KEY_TAB) && event.getNativeEvent().getS... | 3.26 |
framework_VAbstractCalendarPanel_focusPreviousYear_rdh | /**
* Selects the previous year
*/
@SuppressWarnings("deprecation")
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 (!isDateIn... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.