name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
framework_DateField_getRangeStart_rdh | /**
* Gets the start range for a certain resolution. The range is inclusive, so
* if <code>rangeStart</code> is set to one millisecond before year n and
* resolution is set to YEAR, any date in year n - 1 will be accepted.
* Lowest supported resolution is DAY.
*
* @param forResolution
* - the range conforms to... | 3.26 |
framework_DateField_getCalendar_rdh | /**
* Returns new instance calendar used in Date conversions.
*
* Returns new clone of the calendar object initialized using the the
* current date (if available)
*
* If this is no calendar is assigned the <code>Calendar.getInstance</code>
* is used.
*
* @return the Calendar.
* @see #setCalendar(Calendar)
*/... | 3.26 |
framework_DateField_getResolution_rdh | /**
* Gets the resolution.
*
* @return int
*/
public Resolution getResolution() {
return resolution;
} | 3.26 |
framework_DateField_getDateOutOfRangeMessage_rdh | /**
* Returns current date-out-of-range error message.
*
* @see #setDateOutOfRangeMessage(String)
* @since 7.4
* @return Current error message for dates out of range.
*/
public String
getDateOutOfRangeMessage() {
return dateOutOfRangeMessage;
} | 3.26 |
framework_DateField_setDateOutOfRangeMessage_rdh | /**
* Sets the current error message if the range validation fails.
*
* @param dateOutOfRangeMessage
* - Localizable message which is shown when value (the date) is
* set outside allowed range
*/
public void setDateOutOfRangeMessage(String
dateOutOfRangeMessage) {
this.dateOutOfRangeMessage = dateOutOfRan... | 3.26 |
framework_DateField_getTimeZone_rdh | /**
* Gets the time zone used by this field. The time zone is used to convert
* the absolute time in a Date object to a logical time displayed in the
* selector and to convert the select time back to a Date object.
*
* If {@code null} is returned, the current default time zone returned by
* {@code TimeZone.getDef... | 3.26 |
framework_DateField_validate_rdh | /**
* Validates the current value against registered validators if the field is
* not empty. Note that DateField is considered empty (value == null) and
* invalid if it contains text typed in by the user that couldn't be parsed
* into a Date value.
*
* @see AbstractField#validate()
*/
@Override
public void valid... | 3.26 |
framework_DateField_getRangeEnd_rdh | /**
* Returns the precise rangeEnd used.
*
* @param startDate
*/
public Date getRangeEnd() {return getState(false).rangeEnd;
} | 3.26 |
framework_DateField_fireValueChange_rdh | /* only fires the event if preventValueChangeEvent flag is false */
@Override
protected void fireValueChange(boolean repaintIsNotNeeded) {
if (!f2) {
super.fireValueChange(repaintIsNotNeeded);
}
} | 3.26 |
framework_DateField_setDateFormat_rdh | /**
* Sets formatting used by some component implementations. See
* {@link SimpleDateFormat} for format details.
*
* By default it is encouraged to used default formatting defined by Locale,
* but due some JVM bugs it is sometimes necessary to use this method to
* override formatting. See Vaadin issue #2200.
*
... | 3.26 |
framework_DateField_setResolution_rdh | /**
* Sets the resolution of the DateField.
*
* The default resolution is {@link Resolution#DAY} since Vaadin 7.0.
*
* @param resolution
* the resolution to set.
*/
public void setResolution(Resolution resolution) {
this.resolution = resolution;
updateRangeValidator();
markAsDirty();
} | 3.26 |
framework_DateField_handleUnparsableDateString_rdh | /**
* This method is called to handle a non-empty date string from the client
* if the client could not parse it as a Date.
*
* By default, a Converter.ConversionException is thrown, and the current
* value is not modified.
*
* This can be overridden to handle conversions, to return null (equivalent
* to empty ... | 3.26 |
framework_DateField_setShowISOWeekNumbers_rdh | /**
* Sets the visibility of ISO 8601 week numbers in the date selector. ISO
* 8601 defines that a week always starts with a Monday so the week numbers
* are only shown if this is the case.
*
* @param showWeekNumbers
* true if week numbers should be shown, false otherwise.
*/
public void setShowISOWeekNumbers(... | 3.26 |
framework_DateField_setTimeZone_rdh | /**
* Sets the time zone used by this date field. The time zone is used to
* convert the absolute time in a Date object to a logical time displayed in
* the selector and to convert the select time back to a Date object.
*
* If no time zone has been set, the current default time zone returned by
* {@code TimeZone.... | 3.26 |
framework_FileUploadHandler_doHandleSimpleMultipartFileUpload_rdh | /**
* Method used to stream content from a multipart request (either from
* servlet or portlet request) to given StreamVariable.
* <p>
* This method takes care of locking the session as needed and does not
* assume the caller has locked the session. This allows the session to be
* locked only when needed and not ... | 3.26 |
framework_FileUploadHandler_sendUploadResponse_rdh | /**
* Sends the upload response.
*
* @param request
* @param response
* @throws IOException
*/
protected void sendUploadResponse(VaadinRequest request, VaadinResponse response) throws IOException {
response.setContentType(ApplicationConstants.CONTENT_TYPE_TEXT_HTML_UTF_8);
try (OutputStream out = response.getOutp... | 3.26 |
framework_FileUploadHandler_doHandleXhrFilePost_rdh | /**
* Used to stream plain file post (aka XHR2.post(File))
* <p>
* This method takes care of locking the session as needed and does not
* assume the caller has locked the session. This allows the session to be
* locked only when needed and not when handling the upload data.
* </p>
*
* @param session
* The se... | 3.26 |
framework_FileUploadHandler_getBuffered_rdh | /**
* Returns the partly matched boundary string and the byte following
* that.
*
* @return * @throws IOException
*/
private int getBuffered() throws IOException {
int b;
if (f0 == 0) {
// The boundary has been returned, return the buffered byte.
b = bufferedByte;
bufferedByte = -1... | 3.26 |
framework_RandomLayoutStress_fillLayout_rdh | /**
* Add demo components to given layout
*
* @param layout
*/
private void fillLayout(Layout layout, int numberOfComponents)
{
for (int i = 0; i < numberOfComponents; i++) {
layout.addComponent(getRandomComponent(i));
}
} | 3.26 |
framework_RandomLayoutStress_init_rdh | /**
* Initialize Application. Demo components are added to main window.
*/
@Override
public void init() {
final LegacyWindow mainWindow = new LegacyWindow("Layout demo");
setMainWindow(mainWindow);
// Create horizontal ordered layout
VerticalLayout panelALayout = new VerticalLayout();
panelALayout.setMargin(true);
fi... | 3.26 |
framework_NestedMethodProperty_setValue_rdh | /**
* Sets the value of the property. The new value must be assignable to the
* type of this property.
*
* @param newValue
* the New value of the property.
* @throws <code>Property.ReadOnlyException</code>
* if the object is in read-only mode.
* @see #invokeSetMethod(Object)
*/
@Override
public void setVal... | 3.26 |
framework_NestedMethodProperty_setInstance_rdh | /**
* Sets the instance used by this property.
* <p>
* The new instance must be of the same type as the old instance
* <p>
* To be consistent with {@link #setValue(Object)}, this method will fire a
* value change event even if the value stays the same
*
* @param instance
* the instance to use
* @since 7.7.7... | 3.26 |
framework_NestedMethodProperty_getValue_rdh | /**
* Gets the value stored in the Property. The value is resolved by calling
* the specified getter methods on the current instance:
*
* @return the value of the Property
* @see #getInstance()
*/
@Override
public T getValue() {
try {
Object object = instance;
for (Method m : getMethods) {
... | 3.26 |
framework_NestedMethodProperty_initialize_rdh | /**
* Initializes most of the internal fields based on the top-level bean
* instance and property name (dot-separated string).
*
* @param beanClass
* class of the top-level bean to which the property applies
* @param propertyName
* dot separated nested property name
* @throws IllegalArgumentException
* i... | 3.26 |
framework_NestedMethodProperty_writeObject_rdh | /* Special serialization to handle method references */
private void writeObject(ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
// getMethods and setMethod are reconstructed on read based on
// propertyName
} | 3.26 |
framework_NestedMethodProperty_readObject_rdh | /* Special serialization to handle method references */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
initialize(instance.getClass(), propertyName);
} | 3.26 |
framework_HierarchySection_stopFind_rdh | /**
* Stop any current find operation, regardless of the handler
*/
private void stopFind() {
if (!isFindMode()) {
return;
}
highlightModeRegistration.removeHandler();
highlightModeRegistration = null;
find.removeStyleDependentName(VDebugWindow.STYLENAME_ACTIVE);
generateDesign.removeS... | 3.26 |
framework_VUnknownComponent_setCaption_rdh | /**
* Sets the content text for this placeholder. Can contain HTML.
*
* @param c
* the content text to set
*/
public void setCaption(String c) {
caption.getElement().setInnerHTML(c);
} | 3.26 |
framework_CssLayoutConnector_makeCamelCase_rdh | /**
* Converts a css property string to CamelCase
*
* @param cssProperty
* The property string
* @return A string converted to camelcase
*/
private static final String makeCamelCase(String cssProperty) {
cssProperty = SharedUtil.dashSeparatedToCamelCase(cssProperty);
if ("float".equals(cssProperty)) {
... | 3.26 |
framework_Upload_addStartedListener_rdh | /**
* Adds the upload started event listener.
*
* @param listener
* the Listener to be added, not null
* @since 8.0
*/
public Registration addStartedListener(StartedListener listener) {
return addListener(Upload.StartedEvent.class, listener, UPLOAD_STARTED_METHOD);
} | 3.26 |
framework_Upload_addFinishedListener_rdh | /**
* Adds the upload received event listener.
*
* @param listener
* the Listener to be added, not null
* @since 8.0
*/
public Registration addFinishedListener(FinishedListener listener) {
return addListener(Upload.FinishedEvent.class,
listener, UPLOAD_FINISHED_METHOD);
} | 3.26 |
framework_Upload_setImmediateMode_rdh | /**
* Sets the immediate mode of the upload.
* <p>
* If the upload is in immediate mode, the file upload is started
* immediately after the user has selected the file.
* <p>
* If the upload is not in immediate mode, after selecting the file the user
* must click another button to start the upload.
* <p>
* The ... | 3.26 |
framework_Upload_addProgressListener_rdh | /**
* Adds the upload progress event listener.
*
* @param listener
* the progress listener to be added
* @since 8.0
*/
public Registration addProgressListener(ProgressListener listener) {
Objects.requireNonNull(listener, "Listener must not be null.");
if (progressListeners == null) {
progressLi... | 3.26 |
framework_Upload_getButtonStyleName_rdh | /**
* Returns the style name rendered into button that fires uploading.
*
* @return Style name to be rendered into button that fires uploading
* @since 8.2
*/
public String getButtonStyleName() {
return getState(false).buttonStyleName;
}
/**
* Checks whether the caption of the button that fir... | 3.26 |
framework_Upload_getContentLength_rdh | /**
*
* @return the length of the file that is being uploaded
*/
public long getContentLength() {
return length;
} | 3.26 |
framework_Upload_setAcceptMimeTypes_rdh | /**
* Sets the component's list of accepted content-types. According to RFC
* 1867, if the attribute is present, the browser might constrain the file
* patterns prompted for to match those with the corresponding appropriate
* file extensions for the platform. Good examples are: {@code image/*} or
* {@code image/pn... | 3.26 |
framework_Upload_fireUploadInterrupted_rdh | /**
* Emits the upload failed event.
*
* @param filename
* @param mimeType
* @param length
*/
protected void fireUploadInterrupted(String filename, String mimeType, long length) {
fireEvent(new Upload.FailedEvent(this, filename, mimeType, length));
} | 3.26 |
framework_Upload_fireUploadSuccess_rdh | /**
* Emits the upload success event.
*
* @param filename
* @param MIMEType
* @param length
*/
protected void fireUploadSuccess(String filename, String MIMEType, long length) {
fireEvent(new Upload.SucceededEvent(this, filename, MIMEType, length));
} | 3.26 |
framework_Upload_setButtonStyleName_rdh | /**
* In addition to the actual file chooser, upload components have button
* that starts actual upload progress. This method is used to set a style
* name to that button.
* <p>
... | 3.26 |
framework_Upload_getSource_rdh | /**
* Uploads where the event occurred.
*
* @return the Source of the event.
*/
@Override
public Upload getSource() {
return ((Upload) (super.getSource()));
} | 3.26 |
framework_Upload_addChangeListener_rdh | /**
* Adds a filename change event listener.
*
* @param listener
* the Listener to add, not null
* @since 8.0
*/
public Registration addChangeListener(ChangeListener listener) {
return addListener(EventId.CHANGE, Upload.ChangeEvent.class, listener, ChangeListener.f2);
} | 3.26 |
framework_Upload_setReceiver_rdh | /**
* Sets the receiver.
*
* @param receiver
* the receiver to set.
*/
public void setReceiver(Receiver receiver)
{
this.receiver = receiver;
} | 3.26 |
framework_Upload_removeSucceededListener_rdh | /**
* Removes the upload success event listener.
*
* @param listener
* the Listener to be removed.
*/
@Deprecated
public void removeSucceededListener(SucceededListener listener) {
removeListener(Upload.SucceededEvent.class, listener, UPLOAD_SUCCEEDED_METHOD);
} | 3.26 |
framework_Upload_removeProgressListener_rdh | /**
* Removes the upload progress event listener.
*
* @param listener
* the progress listener to be removed
*/
@Deprecated
public void removeProgressListener(ProgressListener listener) {
if (progressListeners != null) {
progressListeners.remove(listener);
}
} | 3.26 |
framework_Upload_removeFinishedListener_rdh | /**
* Removes the upload received event listener.
*
* @param listener
* the Listener to be removed.
*/
@Deprecated
public void removeFinishedListener(FinishedListener listener) {removeListener(Upload.FinishedEvent.class, listener, UPLOAD_FINISHED_METHOD);
} | 3.26 |
framework_Upload_removeFailedListener_rdh | /**
* Removes the upload interrupted event listener.
*
* @param listener
* the Listener to be removed.
*/
@Deprecated
public void removeFailedListener(FailedListener listener) {removeListener(Upload.FailedEvent.class, listener, UPLOAD_FAILED_METHOD);
} | 3.26 |
framework_Upload_addSucceededListener_rdh | /**
* Adds the upload success event listener.
*
* @param listener
* the Listener to be added, not null
* @since 8.0
*/
public Registration addSucceededListener(SucceededListener listener) {
return addListener(Upload.SucceededEvent.class, listener,
UPLOAD_SUCCEEDED_METHOD);
} | 3.26 |
framework_Upload_getMIMEType_rdh | /**
* Gets the MIME Type of the file.
*
* @return the MIME type.
*/
public String getMIMEType() {
return type;
} | 3.26 |
framework_Upload_m0_rdh | /**
* Uploads where the event occurred.
*
* @return the Source of the event.
*/
public Upload m0() {
return ((Upload) (getSource()));
} | 3.26 |
framework_Upload_getBytesRead_rdh | /**
* Gets read bytes of the file currently being uploaded.
*
* @return bytes
*/
public long getBytesRead() {
return totalBytes;
} | 3.26 |
framework_Upload_setButtonCaption_rdh | /**
* In addition to the actual file chooser, upload components have button
* that starts actual upload progress. This method is used to set text in
* that button.
* <p>
* In case the button text is set to null, the button is hidden. In this
* case developer must explicitly initiate the upload process with
* {@l... | 3.26 |
framework_Upload_removeStartedListener_rdh | /**
* Removes the upload started event listener.
*
* @param listener
* the Listener to be removed.
*/
@Deprecated
public void removeStartedListener(StartedListener listener) {
removeListener(Upload.StartedEvent.class, listener, UPLOAD_STARTED_METHOD);
} | 3.26 |
framework_Upload_fireUpdateProgress_rdh | /**
* Emits the progress event.
*
* @param totalBytes
* bytes received so far
* @param contentLength
* actual size of the file being uploaded, if known
*/
protected void fireUpdateProgress(long totalBytes, long contentLength) {
// this is implemented differently than other listeners to maintain
// ba... | 3.26 |
framework_Upload_setButtonCaptionAsHtml_rdh | /**
* In addition to the actual file chooser, upload components have button
* that starts actual upload progress. This method is used to set whether
* the caption on that button is rendered as HTML.
* <p>
* If set to {@code true}, the caption is rendered in the browser as HTML
* and the developer is responsible f... | 3.26 |
framework_Upload_addFailedListener_rdh | /**
* Adds the upload interrupted event listener.
*
* @param listener
* the Listener to be added, not null
* @since 8.0
*/
public Registration addFailedListener(FailedListener listener) {
return addListener(Upload.FailedEvent.class, listener, UPLOAD_FAILED_METHOD);
} | 3.26 |
framework_Upload_getUploadSize_rdh | /**
* Returns size of file currently being uploaded. Value sane only during
* upload.
*
* @return size in bytes
*/
public long getUploadSize() {
return contentLength;
} | 3.26 |
framework_Upload_fireStarted_rdh | /**
* Emit upload received event.
*
* @param filename
* @param mimeType
*/
protected void fireStarted(String filename, String mimeType) {
fireEvent(new Upload.StartedEvent(this, filename, mimeType, contentLength));
} | 3.26 |
framework_Upload_m1_rdh | /**
* Uploads where the event occurred.
*
* @return the Source of the event.
*/
public Upload m1() {
return ((Upload) (getSource()));
} | 3.26 |
framework_Upload_paintContent_rdh | /**
* Paints the content of this component.
*
* @param target
* Target to paint the content on.
* @throws PaintException
* if the paint operation failed.
*/
@Override
public void paintContent(PaintTarget target) throws PaintException {
if (notStarted) {
target.addAttribute("notStarted", true);
... | 3.26 |
framework_Upload_interruptUpload_rdh | /**
* Interrupts the upload currently being received. The interruption will be
* done by the receiving thread so this method will return immediately and
* the actual interrupt will happen a bit later.
*/
public void interruptUpload() {
if (isUploading)
{
interrupted = true;
}
} | 3.26 |
framework_Upload_getReason_rdh | /**
* Gets the exception that caused the failure.
*
* @return the exception that caused the failure, null if n/a
*/public Exception getReason() {
return reason;
} | 3.26 |
framework_Upload_focus_rdh | /**
* {@inheritDoc }
*/
@Override
public void focus() {
super.focus();
} | 3.26 |
framework_Upload_removeChangeListener_rdh | /**
* Removes a filename change event listener.
*
* @param listener
* the listener to be removed
*/@Deprecated
public void removeChangeListener(ChangeListener listener) {
super.removeListener(EventId.CHANGE, Upload.ChangeEvent.class, listener);
} | 3.26 |
framework_AbsoluteLayoutResizeComponents_addStartWithFullWidth_rdh | /**
* Build test layout for #8255
*/
private void addStartWithFullWidth(AbsoluteLayout layout) {
final Panel full =
new Panel(new CssLayout(new Label("Start Width 100%")));
full.setWidth("100%");
full.setId("expanding-panel");
layout.addComponent(full, "right:0;top:10px;");
layout.addComponent... | 3.26 |
framework_AbsoluteLayoutResizeComponents_addStartWithDefinedWidth_rdh | /**
* Build test layout for #8256
*/
private void addStartWithDefinedWidth(AbsoluteLayout layout) {
final Panel small = new Panel(new CssLayout(new Label("Start Width 250px")));
small.setWidth("250px");
small.setId("small-panel");
layout.addComponent(small,
"right:0;top:100px;");
layout.addCom... | 3.26 |
framework_AbsoluteLayoutResizeComponents_expandButton_rdh | /**
* Create size change button for component
*
* @param component
* Component to controll with button
* @return Created Expand Button
*/
private Button expandButton(Component component) {
Button button = new Button("Change Size", clickEvent -> resizeComponent(component));
button.setId(component.getId(... | 3.26 |
framework_AbsoluteLayoutResizeComponents_addStartWithDefinedWidthAbsoluteLayout_rdh | /**
* Build test layout for #8257
*/
private void addStartWithDefinedWidthAbsoluteLayout(AbsoluteLayout layout) {
AbsoluteLayout v3 = new AbsoluteLayout();
v3.setWidth("250px");
v3.addComponent(new Panel(new CssLayout(new Label("Start Width 250px"))));
v3.setId("absolute-expanding");
layout.addCom... | 3.26 |
framework_Calendar_setHandler_rdh | /**
* Set the handler for the given type information. Mirrors
* {@link #addListener(String, Class, Object, Method) addListener} from
* AbstractComponent
*
* @param eventId
* A unique id for the event. Usually one of
* {@link CalendarEventId}
* @param eventType
* The class of the event, most likely a subc... | 3.26 |
framework_Calendar_setDefaultHandlers_rdh | /**
* Set all the wanted default handlers here. This is always called after
* constructing this object. All other events have default handlers except
* range and event click.
*/
protected void setDefaultHandlers() {
setHandler(new BasicBackwardHandler());
setHandler(new BasicForwardHandler());
setHandle... | 3.26 |
framework_Calendar_setLastVisibleHourOfDay_rdh | /**
* This method restricts the hours that are shown per day. This affects the
* weekly view. The general contract is that <b>firstHour < lastHour</b>.
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate(Date)} and
* {@link #setEndDate(D... | 3.26 |
framework_Calendar_setFirstVisibleHourOfDay_rdh | /**
* <p>
* This method restricts the hours that are shown per day. This affects the
* weekly view. The general contract is that <b>firstHour < lastHour</b>.
* </p>
*
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate(Date)} and
* {@... | 3.26 |
framework_Calendar_isClientChangeAllowed_rdh | /**
* Is the user allowed to trigger events which alters the events.
*
* @return true if the client is allowed to send changes to server
* @see #isEventClickAllowed()
*/
protected boolean isClientChangeAllowed() {
return !isReadOnly();
} | 3.26 |
framework_Calendar_getEndDate_rdh | /**
* Gets the calendar's end date.
*
* @return Last visible date.
*/
public Date getEndDate() {
if (endDate == null) {
currentCalendar.set(Calendar.MILLISECOND, 0);
currentCalendar.set(Calendar.SECOND, 59);
currentCalendar.set(Calendar.MINUTE, 59);
currentCalendar.set(Calenda... | 3.26 |
framework_Calendar_getTimeFormat_rdh | /**
* Gets currently active time format. Value is either TimeFormat.Format12H
* or TimeFormat.Format24H.
*
* @return TimeFormat Format for the time.
*/
public TimeFormat getTimeFormat() {
if (f0 == null) {
SimpleDateFormat f;
if (getLocale() == null) {
f = ((SimpleDateFormat) (SimpleDateFormat.... | 3.26 |
framework_Calendar_setStartDate_rdh | /**
* Sets start date for the calendar. This and {@link #setEndDate(Date)}
* control the range of dates visible on the component. The default range is
* one week.
*
* @param date
* First visible date to show.
*/
public void setStartDate(Date date) {
if (!date.equals(startDate)) {
startDate = date;
... | 3.26 |
framework_Calendar_getEventSortOrder_rdh | /**
* Returns sort order for events.
*
* @return currently active sort strategy
*/
public EventSortOrder getEventSortOrder() { EventSortOrder order = getState(false).eventSortOrder;
if (order == null) {
return EventSortOrder.DURATION_DESC;
} else {
return order;
}
} | 3.26 |
framework_Calendar_setWeeklyCaptionFormat_rdh | /**
* Sets custom date format for the weekly view. This is the caption of the
* date. Format could be like "mmm MM/dd".
*
* @param dateFormatPattern
* The date caption pattern.
*/
public void setWeeklyCaptionFormat(String dateFormatPattern) {
if (((weeklyCaptionFormat == null) && (dateFormatPattern != null)) |... | 3.26 |
framework_Calendar_setContainerDataSource_rdh | /**
* Sets a container as a data source for the events in the calendar.
* Equivalent for doing
* <code>Calendar.setEventProvider(new ContainerEventProvider(container))</code>
*
* Please note that the container must be sorted by date!
*
* @param container
* The container to use as a data source
* @param capti... | 3.26 |
framework_Calendar_resetVisibleHoursOfDay_rdh | /**
* Resets the {@link #setFirstVisibleHourOfDay(int)} and
* {@link #setLastVisibleHourOfDay(int)} to the default values, 0 and 23
* respectively.
*
* @see #autoScaleVisibleHoursOfDay()
* @see #setFirstVisibleHourOfDay(int)
* @see #setLastVisibleHourOfDay(int)
*/
public void resetVisibleHoursOfDay() {setFirstV... | 3.26 |
framework_Calendar_getFirstVisibleHourOfDay_rdh | /**
* Returns the first visible hour in the week view. Returns the hour using a
* 24h time format
*/
public int getFirstVisibleHourOfDay() {
return firstHour;} | 3.26 |
framework_Calendar_fireEventResize_rdh | /**
* Fires an event resize event. The event is fired when a user resizes the
* event in the calendar causing the time range of the event to increase or
* decrease. The new start and end times are returned as arguments to this
* method.
*
* @param index
* The index of the event in the event cache
* @param sta... | 3.26 |
framework_Calendar_setFirstDayOfWeek_rdh | /**
* Allow setting first day of week independent of Locale. Set to null if you
* want first day of week being defined by the locale
*
* @since 7.6
* @param dayOfWeek
* any of java.util.Calendar.SUNDAY..java.util.Calendar.SATURDAY
* or null to revert to default first day of week by locale
*/
public void set... | 3.26 |
framework_Calendar_setLastVisibleDayOfWeek_rdh | /**
* <p>
* This method restricts the weekdays that are shown. This affects both the
* monthly and the weekly view. The general contract is that <b>firstDay <
* lastDay</b>.
* </p>
*
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate... | 3.26 |
framework_Calendar_setFirstVisibleDayOfWeek_rdh | /**
* <p>
* This method restricts the weekdays that are shown. This affects both the
* monthly and the weekly view. The general contract is that <b>firstDay <
* lastDay</b>.
* </p>
*
* <p>
* Note that this only affects the rendering process. Events are still
* requested by the dates set by {@link #setStartDate... | 3.26 |
framework_Calendar_isEventClickAllowed_rdh | /**
* Is the user allowed to trigger click events. Returns {@code true} by
* default. Subclass can override this method to disallow firing event
* clicks got from the client side.
*
* @return true if the client is allowed to click events
* @see #isClientChangeAllowed()
* @deprecated As of 7.4, override {@link #f... | 3.26 |
framework_Calendar_getDowByLocale_rdh | /**
* Get the day of week by the given calendar and its locale
*
* @param calendar
* The calendar to use
* @return */
private static int getDowByLocale(Calendar calendar) {
int fow = calendar.get(Calendar.DAY_OF_WEEK);
// monday first
if (calendar.getFirstDayOfWeek() == Calendar.MONDAY) {
fow
= (fow == Calenda... | 3.26 |
framework_Calendar_getLastDateForWeek_rdh | /**
* Gets a date that is last day in the week that target given date belongs
* to.
*
* @param date
* Target date
* @return Date that is last date in same week that given date is.
*/
protected Date getLastDateForWeek(Date date) {
currentCalendar.setTime(date);
currentCalendar.add(Calendar.DATE, 1);
... | 3.26 |
framework_Calendar_fireDateClick_rdh | /**
* Fires event when a date was clicked in the calendar. Creates a new event
* for the date and passes it to the listener.
*
* @param date
* The date and time that was clicked
*/
protected void fireDateClick(Date date) {
fireEvent(new DateClickEvent(this, date));
} | 3.26 |
framework_Calendar_getDayNamesShort_rdh | /**
* Localized display names for week days starting from sunday. Returned
* array's length is always 7.
*
* @return Array of localized weekday names.
*/
protected String[] getDayNamesShort() {
DateFormatSymbols s = new DateFormatSymbols(getLocale());
return Arrays.copyOfRange(s.getWeekdays(), 1,
8);
} | 3.26 |
framework_Calendar_setEventProvider_rdh | /**
* Set the {@link CalendarEventProvider} to be used with this calendar. The
* EventProvider is used to query for events to show, and must be non-null.
* By default a {@link BasicEventProvider} is used.
*
* @param calendarEventProvider
* the calendarEventProvider to set. Cannot be null.
*/
public void setEve... | 3.26 |
framework_Calendar_setDropHandler_rdh | /**
* Set the drop handler for the calendar See {@link DropHandler} for
* implementation details.
*
* @param dropHandler
* The drop handler to set
*/public void setDropHandler(DropHandler dropHandler) {
this.dropHandler = dropHandler;
} | 3.26 |
framework_Calendar_getFirstDateForWeek_rdh | /**
* Gets a date that is first day in the week that target given date belongs
* to.
*
* @param date
* Target date
* @return Date that is first date in same week that given date is.
*/
protected Date getFirstDateForWeek(Date date) {
int firstDayOfWeek = currentCalendar.getFirstDayOfWeek();
currentCalen... | 3.26 |
framework_Calendar_getTimeZone_rdh | /**
* Returns a time zone that is currently used by this component.
*
* @return Component's Time zone
*/
public TimeZone getTimeZone() {
if (timezone == null) {
return currentCalendar.getTimeZone();
}
return timezone;
} | 3.26 |
framework_Calendar_setEndDate_rdh | /**
* Sets end date for the calendar. Starting from startDate, only six weeks
* will be shown if duration to endDate is longer than six weeks.
*
* This and {@link #setStartDate(Date)} control the range of dates visible
* on the component. The default range is one week.
*
* @param date
* Last visible date to s... | 3.26 |
framework_Calendar_fireEventMove_rdh | /**
* Fires an event move event to all server side move listeners.
*
* @param index
* The index of the event in the events list
* @param newFromDatetime
* The changed from date time
*/
protected void fireEventMove(int index, Date newFromDatetime) {
MoveEvent event = new MoveEvent(this, events.get(index), ne... | 3.26 |
framework_Calendar_getMonthNamesShort_rdh | /**
* Localized display names for months starting from January. Returned
* array's length is always 12.
*
* @return Array of localized month names.
*/
protected String[] getMonthNamesShort() {
DateFormatSymbols s = new DateFormatSymbols(getLocale());
return Arrays.copyOf(s.getShortMonths(), 12);
} | 3.26 |
framework_Calendar_m1_rdh | /**
* Fires event when a date was clicked in the calendar. Uses an existing
* event from the event cache.
*
* @param index
* The index of the event in the event cache.
*/
protected void m1(Integer index) {
fireEvent(new EventClick(this, events.get(index)));
} | 3.26 |
framework_Calendar_getEndOfDay_rdh | /**
* Calculates the end time of the day using the given calendar and date
*
* @param date
* @param calendar
* the calendar instance to be used in the calculation. The given
* instance is unchanged in this operation.
* @return the given date, with time set to the end of the day
*/
private static Date getEnd... | 3.26 |
framework_Calendar_addActionHandler_rdh | /**
* Adds an action handler to the calendar that handles event produced by the
* context menu.
*
* <p>
* The {@link Handler#getActions(Object, Object)} parameters depend on what
* view the Calendar is in:
* <ul>
* <li>If the Calendar is in <i>Day or Week View</i> then the target
* parameter will be a {@link C... | 3.26 |
framework_Calendar_getInternalCalendar_rdh | /**
* Get the internally used Calendar instance. This is the currently used
* instance of {@link java.util.Calendar} but is bound to change during the
* lifetime of the component.
*
* @return the currently used java calendar
*/
public Calendar getInternalCalendar() {
return currentCalendar;
} | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.