Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Scout/Concepts/CalendarField"
(→Description) |
(→Description) |
||
Line 10: | Line 10: | ||
The field gets his contents from the CalendarItemProviders defined in the fields source code. | 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 providers may also access a (remote) CalendarService. | ||
+ | |||
+ | === Calendar Item Provider === | ||
+ | |||
+ | A calendar displays calendar items provided by the CalendarItemProviders associated with a calendar field. | ||
+ | |||
+ | <source lang="java"> | ||
+ | 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 { | ||
+ | .... | ||
+ | } | ||
+ | |||
+ | .... | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
See the [https://github.com/BSI-Business-Systems-Integration-AG/org.eclipsescout.demo/blob/master/widgets/org.eclipsescout.demo.widgets.client/src/org/eclipsescout/demo/widgets/client/ui/forms/CalendarFieldForm.java implementation] of the calendar field of the [[Scout/Demo#Widgets|Scout widget demo]] for an example of a local item provider. | See the [https://github.com/BSI-Business-Systems-Integration-AG/org.eclipsescout.demo/blob/master/widgets/org.eclipsescout.demo.widgets.client/src/org/eclipsescout/demo/widgets/client/ui/forms/CalendarFieldForm.java implementation] of the calendar field of the [[Scout/Demo#Widgets|Scout widget demo]] for an example of a local item provider. |
Revision as of 09:37, 29 August 2013
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.
- implements: The Scout documentation has been moved to https://eclipsescout.github.io/.
- extends: The Scout documentation has been moved to https://eclipsescout.github.io/.
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.
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 { .... } .... } }
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 | ||||
Week | ||||
Working week | ||||
Day |
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
- The Scout documentation has been moved to https://eclipsescout.github.io/.
- The Scout documentation has been moved to https://eclipsescout.github.io/.
- The Scout documentation has been moved to https://eclipsescout.github.io/.