|
|
(9 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | {{ScoutPage|cat=Component Model}}
| + | The Scout documentation has been moved to https://eclipsescout.github.io/. |
− | | + | |
− | Specific type of {{ScoutLink|Concepts|ValueField|value field}} to represent String.
| + | |
− | | + | |
− | * implements: {{ScoutJavadoc|ICalendarField|I}}
| + | |
− | * extends: {{ScoutJavadoc|AbstractCalendarField|C}}
| + | |
− | | + | |
− | == Description ==
| + | |
− | The CalendarField is made to represent an {{ScoutJavadoc|AbstractCalendar|C}} 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.
| + | |
− | | + | |
− | <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.
| + | |
− | | + | |
− | 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 ==
| + | |
− | {|{{BMTableStyle}}
| + | |
− | |-{{BMTHStyle}}
| + | |
− | ! Type
| + | |
− | ! RAP
| + | |
− | ! SWT
| + | |
− | ! Swing
| + | |
− | ! Swing Rayo
| + | |
− | |-
| + | |
− | | Month || [[Image:Scout_3.8_CalendarField_Month_RAP.png]] || [[Image:Scout_3.8_CalendarField_Month_SWT.png]] || [[Image:Scout_3.8_CalendarField_Month_Swing.png]] || [[Image:Scout_3.8_CalendarField_Month_Swing_Rayo.png]]
| + | |
− | |-
| + | |
− | | Week || [[Image:Scout_3.8_CalendarField_Week_RAP.png]] || [[Image:Scout_3.8_CalendarField_Week_SWT.png]] || [[Image:Scout_3.8_CalendarField_Week_Swing.png]] || [[Image:Scout_3.8_CalendarField_Week_Swing_Rayo.png]]
| + | |
− | |-
| + | |
− | | Working week || [[Image:Scout_3.8_CalendarField_WorkingWeek_RAP.png]] || [[Image:Scout_3.8_CalendarField_WorkingWeek_SWT.png]] || [[Image:Scout_3.8_CalendarField_WorkingWeek_Swing.png]] || [[Image:Scout_3.8_CalendarField_WorkingWeek_Swing_Rayo.png]]
| + | |
− | |-
| + | |
− | | Day || [[Image:Scout_3.8_CalendarField_Day_RAP.png]] || [[Image:Scout_3.8_CalendarField_Day_SWT.png]] || [[Image:Scout_3.8_CalendarField_Day_Swing.png]] || [[Image:Scout_3.8_CalendarField_Day_Swing_Rayo.png]]
| + | |
− | |-
| + | |
− | |}
| + | |
− | | + | |
− | == Properties ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
| + | |
− | | + | |
− | See also the {{ScoutLink|Concepts|Field|Field}} and {{ScoutLink|Concepts|ValueField|Value field}} pages for the properties that all fields have in common.
| + | |
− | | + | |
− | == Events ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
| + | |
− | | + | |
− | See also the {{ScoutLink|Concepts|Field|Field}} and {{ScoutLink|Concepts|ValueField|Value field}} pages for the events that all fields have in common.
| + | |
− | | + | |
− | | + | |
− | == See Also ==
| + | |
− | * {{ScoutLink|Concepts|ValueField|Value field}}
| + | |
− | * {{ScoutLink|Concepts|Field|Field}}
| + | |
− | * {{ScoutLink|Concepts|Form|Form}}
| + | |