Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Scout/Concepts/CalendarField

< Scout‎ | Concepts
Revision as of 09:54, 29 August 2013 by Matthias.zimmermann.bsiag.com (Talk | contribs) (Calendar Item Provider)

The Scout documentation has been moved to https://eclipsescout.github.io/.

Specific type of The Scout documentation has been moved to https://eclipsescout.github.io/. to represent String.

Description

The CalendarField is made to represent an The Scout documentation has been moved to https://eclipsescout.github.io/. with appointments. The field gets his contents from the CalendarItemProviders defined in the fields source code. Calendar item providers may also access a (remote) CalendarService.

Calendar Item Provider

A calendar displays calendar items provided by the CalendarItemProviders associated with a calendar field. Calendar item providers are written as inner classes of the calendar field as shown below.

public class CalendarField extends AbstractCalendarField<CalendarField.Calendar> {
 
    @Order(10.0)
    public class Calendar extends AbstractExtensibleCalendar {
 
        @Order(10.0)
        public class FirstItemProvider extends AbstractExtensibleCalendarItemProvider {
            @Override
            protected void execLoadItems(Date minDate, Date maxDate, Holder<ICalendarItem[]> resultHolder) throws ProcessingException {
                // logic to collect items to display in the range [minDate, maxDate] into the result holder
            }
        }
 
        @Order(10.0)
        public class SecondItemProvider extends AbstractExtensibleCalendarItemProvider {
            ....
        }
 
        ....
    }
}

Adding item providers to a calendar field is also supported by the Scout SDK. A corresponding wizard is provided on the folder Calendar Item Providers as shown below:

Sdk calendar item provider.png

See the implementation of the calendar field of the Scout widget demo for an example of a local item provider.

The CalendarField has 4 different views:

  • Month: Displays a whole month
  • Week: Displays a week
  • Working week: Displays a week from Monday to Friday
  • Day: Displays only a day

Screenshot

Type RAP SWT Swing Swing Rayo
Month Scout 3.8 CalendarField Month RAP.png Scout 3.8 CalendarField Month SWT.png Scout 3.8 CalendarField Month Swing.png Scout 3.8 CalendarField Month Swing Rayo.png
Week Scout 3.8 CalendarField Week RAP.png Scout 3.8 CalendarField Week SWT.png Scout 3.8 CalendarField Week Swing.png Scout 3.8 CalendarField Week Swing Rayo.png
Working week Scout 3.8 CalendarField WorkingWeek RAP.png Scout 3.8 CalendarField WorkingWeek SWT.png Scout 3.8 CalendarField WorkingWeek Swing.png Scout 3.8 CalendarField WorkingWeek Swing Rayo.png
Day Scout 3.8 CalendarField Day RAP.png Scout 3.8 CalendarField Day SWT.png Scout 3.8 CalendarField Day Swing.png Scout 3.8 CalendarField Day Swing Rayo.png

Properties

Defined with The Scout documentation has been moved to https://eclipsescout.github.io/. methods.

See also the The Scout documentation has been moved to https://eclipsescout.github.io/. and The Scout documentation has been moved to https://eclipsescout.github.io/. pages for the properties that all fields have in common.

Events

Defined with The Scout documentation has been moved to https://eclipsescout.github.io/. methods.

See also the The Scout documentation has been moved to https://eclipsescout.github.io/. and The Scout documentation has been moved to https://eclipsescout.github.io/. pages for the events that all fields have in common.


See Also

Back to the top