Class Calendar

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasBackgroundClickHandlers, HasBackgroundMouseDownHandlers, HasBackgroundMouseUpHandlers, HasCurrentViewChangedHandlers, HasDateChangedHandlers, HasDayBodyClickHandlers, HasDayHeaderClickHandlers, HasEventAddedHandlers, HasEventChangedHandlers, HasEventClickHandlers, HasEventRemoveClickHandlers, HasEventRemovedHandlers, HasEventRepositionMoveHandlers, HasEventRepositionStopHandlers, HasEventResizeMoveHandlers, HasEventResizeStopHandlers, HasEventSaveErrorHandlers, HasEventsRenderedHandlers, HasIndicatorClickHandlers, HasZoneClickHandlers, DataBoundComponent, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragCompleteHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropCompleteHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFetchDataHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers
Direct Known Subclasses:
Timeline

The Calendar component provides several different ways for a user to view and edit a set of events. Note that the standard Calendar module must be loaded to make use of the Calendar class.

CalendarEvents

Events are represented as ordinary JavaScript Objects (see CalendarEvent). The Calendar expects to be able to read and write a basic set of properties on events: name, startDate, endDate, description, etc, which can be stored under configurable property names (see eg startDateField).

Much like a ListGrid manages it's ListGridRecords, the Calendar can either be passed an ordinary Array of CalendarEvents or can fetch data from a DataSource. When this is the case, if the DataSource does not contain fields with the configured property names, an attempt is made to auto-detect likely-looking fields from those that are present. To see logs indicating that this has happened, switch default logging preferences to INFO level in the Developer Console.

If the calendar is bound to a DataSource, event changes by user action or by calling methods will be saved to the DataSource.

Navigation

The calendar supports a number of views by default: day, week, month and timeline. The user can navigate using back and forward buttons or via an attached DateChooser.

Event Manipulation

Events can be created by clicking directly onto one of the views, or via the Add Event button. In the day, week and timeline views, the user may click and drag to create an event of a specific duration.

Creating an event via click or click and drag pops up the EventDialog, which provides a simple form for quick event entry (for normal events, only the description is required by default - for events that are shown in a lane, that field is also required).

A separate editor called the EventEditor provides an interface for editing all possible properties of an event, including custom properties. The EventEditor is used whenever a pre-existing event is being edited, and can also be invoked by the user wherever the simpler EventDialog appears.

Events can also be programmatically added, removed, or updated.

  • Constructor Details

    • Calendar

      public Calendar()
    • Calendar

      public Calendar(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static Calendar getOrCreateRef(JavaScriptObject jsObj)
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • create

      protected JavaScriptObject create()
      Overrides:
      create in class Canvas
    • getAddEventButton

      public ImgButton getAddEventButton() throws IllegalStateException
      An ImgButton that appears in a Calendar's week/day/month views and offers an alternative way to create a new event.

      This component is an AutoChild named "addEventButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current addEventButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setAddEventButtonHoverText

      public Calendar setAddEventButtonHoverText(String addEventButtonHoverText) throws IllegalStateException
      The text to be displayed when a user hovers over the add event toolbar button
      Parameters:
      addEventButtonHoverText - New addEventButtonHoverText value. Default value is "Add an event"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAddEventButtonHoverText

      public String getAddEventButtonHoverText()
      The text to be displayed when a user hovers over the add event toolbar button
      Returns:
      Current addEventButtonHoverText value. Default value is "Add an event"
    • setAllowDurationEvents

      public Calendar setAllowDurationEvents(Boolean allowDurationEvents)
      When set to true, allows events to be managed by duration, as well as by end date. Values can be set for duration and duration unit on each event, and are then maintained, instead of the end date, when alterations are made to the event via editors or dragging with the mouse.
      Parameters:
      allowDurationEvents - New allowDurationEvents value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getAllowDurationEvents

      public Boolean getAllowDurationEvents()
      When set to true, allows events to be managed by duration, as well as by end date. Values can be set for duration and duration unit on each event, and are then maintained, instead of the end date, when alterations are made to the event via editors or dragging with the mouse.
      Returns:
      Current allowDurationEvents value. Default value is null
      See Also:
    • setAlternateLaneStyles

      public Calendar setAlternateLaneStyles(Boolean alternateLaneStyles)
      When showing a Timeline, or a day view when showDayLanes is true, whether to make lane boundaries more obvious by showing alternate lanes in a different color.
      Parameters:
      alternateLaneStyles - New alternateLaneStyles value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getAlternateLaneStyles

      public Boolean getAlternateLaneStyles()
      When showing a Timeline, or a day view when showDayLanes is true, whether to make lane boundaries more obvious by showing alternate lanes in a different color.
      Returns:
      Current alternateLaneStyles value. Default value is null
    • setAlwaysShowEventHovers

      public Calendar setAlwaysShowEventHovers(Boolean alwaysShowEventHovers)
      By default, EventCanvases show their content in hovers. If you set this attribute to false, hovers will only be shown if the content of the event-canvas is visually clipped.

      Note - if you have custom hover-content/handling, you should leave this property set to true.

      Parameters:
      alwaysShowEventHovers - New alwaysShowEventHovers value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
    • getAlwaysShowEventHovers

      public Boolean getAlwaysShowEventHovers()
      By default, EventCanvases show their content in hovers. If you set this attribute to false, hovers will only be shown if the content of the event-canvas is visually clipped.

      Note - if you have custom hover-content/handling, you should leave this property set to true.

      Returns:
      Current alwaysShowEventHovers value. Default value is true
    • setBackButtonIconSrc

      public Calendar setBackButtonIconSrc(String backButtonIconSrc) throws IllegalStateException
      The icon to show in the month-button on Handsets when the month view is the current visible view.
      Parameters:
      backButtonIconSrc - New backButtonIconSrc value. Default value is "Chevron_Left"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBackButtonIconSrc

      public String getBackButtonIconSrc()
      The icon to show in the month-button on Handsets when the month view is the current visible view.
      Returns:
      Current backButtonIconSrc value. Default value is "Chevron_Left"
      See Also:
    • setBackButtonTitle

      public Calendar setBackButtonTitle(String backButtonTitle) throws IllegalStateException
      The title of the month on Handsets when the month view is the current visible view.

      When the month view is not the current visible view, the title for the month button is set according to the value of monthButtonTitle.

      Parameters:
      backButtonTitle - New backButtonTitle value. Default value is "Back"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBackButtonTitle

      public String getBackButtonTitle()
      The title of the month on Handsets when the month view is the current visible view.

      When the month view is not the current visible view, the title for the month button is set according to the value of monthButtonTitle.

      Returns:
      Current backButtonTitle value. Default value is "Back"
      See Also:
    • setBaseStyle

      public Calendar setBaseStyle(String baseStyle)
      The base name for the CSS class applied to the grid cells of the day and week views of the calendar. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Parameters:
      baseStyle - New baseStyle value. Default value is "calendar"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getBaseStyle

      public String getBaseStyle()
      The base name for the CSS class applied to the grid cells of the day and week views of the calendar. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Returns:
      Current baseStyle value. Default value is "calendar"
      See Also:
    • setBringEventsToFront

      public Calendar setBringEventsToFront(Boolean bringEventsToFront) throws IllegalStateException
      If set to true, clicking an event will bring it to the front of the zorder.
      Parameters:
      bringEventsToFront - New bringEventsToFront value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getBringEventsToFront

      public Boolean getBringEventsToFront()
      If set to true, clicking an event will bring it to the front of the zorder.
      Returns:
      Current bringEventsToFront value. Default value is null
    • setCalMonthEventLinkStyle

      public Calendar setCalMonthEventLinkStyle(String calMonthEventLinkStyle)
      The base name for the CSS class applied to the links rendered by getDayBodyHTML().

      These links are rendered as plain HTML links using A elements, and the CSS style in the provided skins references the pseudo-classes :link, :visited, :active, :hover.
      Even though it goes against the general policy of not exposing the HTML structures SC writes out and not relying on them for styling, applying style to these particular selectors is acceptable, as we're unlikely to use any other kind of HTML structure than a link.

      Parameters:
      calMonthEventLinkStyle - New calMonthEventLinkStyle value. Default value is "calMonthEventLink"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getCalMonthEventLinkStyle

      public String getCalMonthEventLinkStyle()
      The base name for the CSS class applied to the links rendered by getDayBodyHTML().

      These links are rendered as plain HTML links using A elements, and the CSS style in the provided skins references the pseudo-classes :link, :visited, :active, :hover.
      Even though it goes against the general policy of not exposing the HTML structures SC writes out and not relying on them for styling, applying style to these particular selectors is acceptable, as we're unlikely to use any other kind of HTML structure than a link.

      Returns:
      Current calMonthEventLinkStyle value. Default value is "calMonthEventLink"
      See Also:
    • getCancelButton

      public IButton getCancelButton() throws IllegalStateException
      An com.smartgwt.client.types.AutoChild of type IButton, used to cancel editing of an event and close the eventEditor.

      This component is an AutoChild named "cancelButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current cancelButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setCancelButtonTitle

      public Calendar setCancelButtonTitle(String cancelButtonTitle) throws IllegalStateException
      The title for the Cancel button in the event editor.
      Parameters:
      cancelButtonTitle - New cancelButtonTitle value. Default value is "Cancel"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCancelButtonTitle

      public String getCancelButtonTitle()
      The title for the Cancel button in the event editor.
      Returns:
      Current cancelButtonTitle value. Default value is "Cancel"
      See Also:
    • setCanCreateEvents

      public Calendar setCanCreateEvents(Boolean canCreateEvents) throws IllegalStateException
      If true, users can create new events.
      Parameters:
      canCreateEvents - New canCreateEvents value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanCreateEvents

      public Boolean getCanCreateEvents()
      If true, users can create new events.
      Returns:
      Current canCreateEvents value. Default value is true
    • setCanCreateOtherDayEvents

      public Calendar setCanCreateOtherDayEvents(Boolean canCreateOtherDayEvents)
      When showOtherDays is true, determines whether clicking in a Month-view body-cell that represents a date outside the selected month will open the event-editor window at the cell's location.

      Note that, when otherDayClickNavigation is also true, the Month-view first switches to the month of the clicked date before displaying the event-editor. This causes the editor to open in a different cell than the one clicked and may be unexpected to users.

      Parameters:
      canCreateOtherDayEvents - New canCreateOtherDayEvents value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
    • getCanCreateOtherDayEvents

      public Boolean getCanCreateOtherDayEvents()
      When showOtherDays is true, determines whether clicking in a Month-view body-cell that represents a date outside the selected month will open the event-editor window at the cell's location.

      Note that, when otherDayClickNavigation is also true, the Month-view first switches to the month of the clicked date before displaying the event-editor. This causes the editor to open in a different cell than the one clicked and may be unexpected to users.

      Returns:
      Current canCreateOtherDayEvents value. Default value is false
    • setCanDeleteEvents

      public Calendar setCanDeleteEvents(Boolean canDeleteEvents) throws IllegalStateException
      Deprecated.
      in favor of canRemoveEvents
      If true, users can delete existing events. Defaults to canEditEvents.
      Parameters:
      canDeleteEvents - New canDeleteEvents value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanDeleteEvents

      public Boolean getCanDeleteEvents()
      Deprecated.
      in favor of canRemoveEvents
      If true, users can delete existing events. Defaults to canEditEvents.
      Returns:
      Current canDeleteEvents value. Default value is null
    • setCanDragCreateEvents

      public Calendar setCanDragCreateEvents(Boolean canDragCreateEvents)
      A boolean value controlling whether new events of varying length can be created by dragging the cursor. By default, this is false for Touch devices and true otherwise.
      Parameters:
      canDragCreateEvents - New canDragCreateEvents value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getCanDragCreateEvents

      public Boolean getCanDragCreateEvents()
      A boolean value controlling whether new events of varying length can be created by dragging the cursor. By default, this is false for Touch devices and true otherwise.
      Returns:
      Current canDragCreateEvents value. Default value is null
    • setCanDragEventField

      public Calendar setCanDragEventField(String canDragEventField) throws IllegalStateException
      Name of the field on each CalendarEvent that determines whether an EventCanvas can be moved or resized by dragging with the mouse. Note that canEditEvents must be true for dragging to be allowed.
      Parameters:
      canDragEventField - New canDragEventField value. Default value is "canDrag"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanDragEventField

      public String getCanDragEventField()
      Name of the field on each CalendarEvent that determines whether an EventCanvas can be moved or resized by dragging with the mouse. Note that canEditEvents must be true for dragging to be allowed.
      Returns:
      Current canDragEventField value. Default value is "canDrag"
      See Also:
    • setCanDragEvents

      public Calendar setCanDragEvents(Boolean canDragEvents) throws IllegalStateException
      A boolean value controlling whether users can drag-reposition events. By default, this is false for Touch devices, where drag gestures scroll the view, and true otherwise.

      Only has an effect when canEditEvents is true.

      Parameters:
      canDragEvents - New canDragEvents value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanDragEvents

      public Boolean getCanDragEvents()
      A boolean value controlling whether users can drag-reposition events. By default, this is false for Touch devices, where drag gestures scroll the view, and true otherwise.

      Only has an effect when canEditEvents is true.

      Returns:
      Current canDragEvents value. Default value is null
    • setCanEditEvents

      public Calendar setCanEditEvents(Boolean canEditEvents) throws IllegalStateException
      If true, users can edit existing events.
      Parameters:
      canEditEvents - New canEditEvents value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanEditEvents

      public Boolean getCanEditEvents()
      If true, users can edit existing events.
      Returns:
      Current canEditEvents value. Default value is true
    • setCanEditField

      public Calendar setCanEditField(String canEditField) throws IllegalStateException
      Name of the field on each CalendarEvent that determines whether it can be edited in the event editor. Note that an event with canEdit set to true can also have canDrag or canResize set to false, which would still allow editing, but not via drag operations.
      Parameters:
      canEditField - New canEditField value. Default value is "canEdit"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanEditField

      public String getCanEditField()
      Name of the field on each CalendarEvent that determines whether it can be edited in the event editor. Note that an event with canEdit set to true can also have canDrag or canResize set to false, which would still allow editing, but not via drag operations.
      Returns:
      Current canEditField value. Default value is "canEdit"
      See Also:
    • setCanEditLane

      public Calendar setCanEditLane(Boolean canEditLane) throws IllegalStateException
      Can events be moved between lanes? If so, the event can be dragged to a different lane, and the event quick dialog and editor allow a lane to be selected with a drop-down chooser.

      In either case, the event's laneNameField is updated automatically.

      If set to false, cross-lane dragging is disallowed and drop-down Lane-choosers are disabled when editing existng events. When creating new events, the Lane-chooser remains enabled so an initial Lane can be selected.

      This setting can be overridden on each event.

      Parameters:
      canEditLane - New canEditLane value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanEditLane

      public Boolean getCanEditLane()
      Can events be moved between lanes? If so, the event can be dragged to a different lane, and the event quick dialog and editor allow a lane to be selected with a drop-down chooser.

      In either case, the event's laneNameField is updated automatically.

      If set to false, cross-lane dragging is disallowed and drop-down Lane-choosers are disabled when editing existng events. When creating new events, the Lane-chooser remains enabled so an initial Lane can be selected.

      This setting can be overridden on each event.

      Returns:
      Current canEditLane value. Default value is null
    • setCanEditLaneField

      public Calendar setCanEditLaneField(String canEditLaneField) throws IllegalStateException
      Name of the field on each CalendarEvent that determines whether that event can be moved between lanes.
      Parameters:
      canEditLaneField - New canEditLaneField value. Default value is "canEditLane"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanEditLaneField

      public String getCanEditLaneField()
      Name of the field on each CalendarEvent that determines whether that event can be moved between lanes.
      Returns:
      Current canEditLaneField value. Default value is "canEditLane"
      See Also:
    • setCanEditSublane

      public Calendar setCanEditSublane(Boolean canEditSublane) throws IllegalStateException
      Can events be moved between sublanes?

      If so, the event can be dragged to a different sublane within the same parent Lane and, when it's editor is shown, an additional drop-down widget is provided allowing the sublane to be altered.

      If the sublane is locked, but the parent lane isn't, an update to the event's lane name will be allowed, assuming that the new Lane has an existing sublane with the same name.

      In either case, the event's sublane is updated automatically.

      This setting can be overridden on each event.

      Parameters:
      canEditSublane - New canEditSublane value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanEditSublane

      public Boolean getCanEditSublane()
      Can events be moved between sublanes?

      If so, the event can be dragged to a different sublane within the same parent Lane and, when it's editor is shown, an additional drop-down widget is provided allowing the sublane to be altered.

      If the sublane is locked, but the parent lane isn't, an update to the event's lane name will be allowed, assuming that the new Lane has an existing sublane with the same name.

      In either case, the event's sublane is updated automatically.

      This setting can be overridden on each event.

      Returns:
      Current canEditSublane value. Default value is null
    • setCanEditSublaneField

      public Calendar setCanEditSublaneField(String canEditSublaneField) throws IllegalStateException
      Name of the field on each CalendarEvent that determines whether that event can be moved between individual sublanes in a Lane.
      Parameters:
      canEditSublaneField - New canEditSublaneField value. Default value is "canEditSublane"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanEditSublaneField

      public String getCanEditSublaneField()
      Name of the field on each CalendarEvent that determines whether that event can be moved between individual sublanes in a Lane.
      Returns:
      Current canEditSublaneField value. Default value is "canEditSublane"
      See Also:
    • setCanGroupLanes

      public Calendar setCanGroupLanes(Boolean canGroupLanes)
      If true, allows the lanes in a Timeline to be grouped by providing a value for laneGroupByField. The fields available for grouping on are those defined as lane fields. Since these are definitions for normal fields, you can choose to hide the field in the timeline, but still have it available for grouping.
      Parameters:
      canGroupLanes - New canGroupLanes value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getCanGroupLanes

      public Boolean getCanGroupLanes()
      If true, allows the lanes in a Timeline to be grouped by providing a value for laneGroupByField. The fields available for grouping on are those defined as lane fields. Since these are definitions for normal fields, you can choose to hide the field in the timeline, but still have it available for grouping.
      Returns:
      Current canGroupLanes value. Default value is null
    • setCanRemoveEvents

      public Calendar setCanRemoveEvents(Boolean canRemoveEvents) throws IllegalStateException
      If true, users can remove existing events. Defaults to canEditEvents.
      Parameters:
      canRemoveEvents - New canRemoveEvents value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanRemoveEvents

      public Boolean getCanRemoveEvents()
      If true, users can remove existing events. Defaults to canEditEvents.
      Returns:
      Current canRemoveEvents value. Default value is true
    • setCanRemoveField

      public Calendar setCanRemoveField(String canRemoveField) throws IllegalStateException
      Name of the field on each CalendarEvent that determines whether an event shows a remove button.
      Parameters:
      canRemoveField - New canRemoveField value. Default value is "canRemove"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanRemoveField

      public String getCanRemoveField()
      Name of the field on each CalendarEvent that determines whether an event shows a remove button.
      Returns:
      Current canRemoveField value. Default value is "canRemove"
      See Also:
    • setCanReorderLanes

      public Calendar setCanReorderLanes(Boolean canReorderLanes) throws IllegalStateException
      If true, lanes can be reordered by dragging their laneFields with the mouse.
      Parameters:
      canReorderLanes - New canReorderLanes value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanReorderLanes

      public Boolean getCanReorderLanes()
      If true, lanes can be reordered by dragging their laneFields with the mouse.
      Returns:
      Current canReorderLanes value. Default value is null
    • setCanResizeEventField

      public Calendar setCanResizeEventField(String canResizeEventField) throws IllegalStateException
      Name of the field on each CalendarEvent that determines whether an event can be resized by dragging.
      Parameters:
      canResizeEventField - New canResizeEventField value. Default value is "canResize"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCanResizeEventField

      public String getCanResizeEventField()
      Name of the field on each CalendarEvent that determines whether an event can be resized by dragging.
      Returns:
      Current canResizeEventField value. Default value is "canResize"
      See Also:
    • setCanResizeEvents

      public Calendar setCanResizeEvents(Boolean canResizeEvents) throws IllegalStateException
      Can events be resized by dragging appropriate edges of the canvas? Only has an effect when both canEditEvents and canDragEvents are true. Set this attribute to false to disallow drag-resizing.

      Always false when showColumnLayouts is true.

      Parameters:
      canResizeEvents - New canResizeEvents value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanResizeEvents

      public Boolean getCanResizeEvents()
      Can events be resized by dragging appropriate edges of the canvas? Only has an effect when both canEditEvents and canDragEvents are true. Set this attribute to false to disallow drag-resizing.

      Always false when showColumnLayouts is true.

      Returns:
      Current canResizeEvents value. Default value is true
    • setCanResizeTimelineEvents

      public Calendar setCanResizeTimelineEvents(Boolean canResizeTimelineEvents) throws IllegalStateException
      Deprecated.
      in favor of canResizeEvents;
      Can Timeline events be stretched by their left and right edges?
      Parameters:
      canResizeTimelineEvents - New canResizeTimelineEvents value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanResizeTimelineEvents

      public Boolean getCanResizeTimelineEvents()
      Deprecated.
      in favor of canResizeEvents;
      Can Timeline events be stretched by their left and right edges?
      Returns:
      Current canResizeTimelineEvents value. Default value is false
    • setCanSelectEvents

      public Calendar setCanSelectEvents(Boolean canSelectEvents) throws IllegalStateException
      When set to true, makes individual event canvases selectable. Events may be selected via a single click, as well as being included in the page's tab order. The current selected event is shown in a special style and pressing TAB or Shift-TAB will move the selection first among the events in the same lane, and then among those in the next or previous lane.

      Pressing Enter while an editable event is selected will show either the event- dialog or editor. Pressing Delete will remove the event.

      Note that when this property is false, single clicking the event canvas for an editable event will bring up an editing interface for that event. When true this is no longer the case - a user can double click to bring up the editing interface instead (a single click will simply select the event canvas).

      Parameters:
      canSelectEvents - New canSelectEvents value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanSelectEvents

      public Boolean getCanSelectEvents()
      When set to true, makes individual event canvases selectable. Events may be selected via a single click, as well as being included in the page's tab order. The current selected event is shown in a special style and pressing TAB or Shift-TAB will move the selection first among the events in the same lane, and then among those in the next or previous lane.

      Pressing Enter while an editable event is selected will show either the event- dialog or editor. Pressing Delete will remove the event.

      Note that when this property is false, single clicking the event canvas for an editable event will bring up an editing interface for that event. When true this is no longer the case - a user can double click to bring up the editing interface instead (a single click will simply select the event canvas).

      Returns:
      Current canSelectEvents value. Default value is null
    • setChosenDate

      public Calendar setChosenDate(Date chosenDate)
      The date for which events are displayed in the day, week, and month tabs of the calendar. Default is today.

      If this method is called after the component has been drawn/initialized: Set the current date for which the calendar will display events.
      Parameters:
      chosenDate - the new date to set as the current date. Default value is 'Today'
      Returns:
      Calendar instance, for chaining setter calls
    • getChosenDate

      public Date getChosenDate()
      The date for which events are displayed in the day, week, and month tabs of the calendar. Default is today.
      Returns:
      Current chosenDate value. Default value is 'Today'
    • getColumnLayout

      public VLayout getColumnLayout()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      When showColumnLayouts is true, the layouts added to each column to stack events.

      Returns:
      null
    • setColumnsPerPage

      public Calendar setColumnsPerPage(Integer columnsPerPage) throws IllegalStateException
      When using the Next and Previous arrows to scroll a Timeline, this is the number of columns of the timelineGranularity to scroll by. With the default value of null, the Timeline will scroll by its current length.
      Parameters:
      columnsPerPage - New columnsPerPage value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getColumnsPerPage

      public Integer getColumnsPerPage()
      When using the Next and Previous arrows to scroll a Timeline, this is the number of columns of the timelineGranularity to scroll by. With the default value of null, the Timeline will scroll by its current length.
      Returns:
      Current columnsPerPage value. Default value is null
    • setControlBarIconBaseStyle

      public Calendar setControlBarIconBaseStyle(String controlBarIconBaseStyle) throws IllegalStateException
      A CSS style to apply to icons in the controlsBar. This is a base style supporting suffixes for states, specifically "Over", "Down" and "Disabled", which are applied when ImgButton settings like ImgButton.showRollOverIcon are applied to the icons.
      Parameters:
      controlBarIconBaseStyle - New controlBarIconBaseStyle value. Default value is "icon"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getControlBarIconBaseStyle

      public String getControlBarIconBaseStyle()
      A CSS style to apply to icons in the controlsBar. This is a base style supporting suffixes for states, specifically "Over", "Down" and "Disabled", which are applied when ImgButton settings like ImgButton.showRollOverIcon are applied to the icons.
      Returns:
      Current controlBarIconBaseStyle value. Default value is "icon"
      See Also:
    • setControlBarIconSize

      public Calendar setControlBarIconSize(Integer controlBarIconSize) throws IllegalStateException
      The size of the various icons displayed in the controlsBar of this Calendar.
      Parameters:
      controlBarIconSize - New controlBarIconSize value. Default value is 16
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getControlBarIconSize

      public Integer getControlBarIconSize()
      The size of the various icons displayed in the controlsBar of this Calendar.
      Returns:
      Current controlBarIconSize value. Default value is 16
    • getControlsBar

      public HLayout getControlsBar() throws IllegalStateException
      An HLayout shown above the Calendar views and displaying a set of controls for interacting with the current view - namely, the next, previous and add buttons, the date label and the date-picker icon.

      This component is an AutoChild named "controlsBar". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current controlsBar value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setControlsBarHeight

      public Calendar setControlsBarHeight(Integer controlsBarHeight) throws IllegalStateException
      Default height of the controlsBar shown above the main Calendar grid. When multiple views are available and tabs are visible, this value is modified to ensure that the content of the controlsBar is vertically-aligned with the text in the tabs.
      Parameters:
      controlsBarHeight - New controlsBarHeight value. Default value is 30
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getControlsBarHeight

      public Integer getControlsBarHeight()
      Default height of the controlsBar shown above the main Calendar grid. When multiple views are available and tabs are visible, this value is modified to ensure that the content of the controlsBar is vertically-aligned with the text in the tabs.
      Returns:
      Current controlsBarHeight value. Default value is 30
    • setCurrentViewName

      public Calendar setCurrentViewName(ViewName currentViewName)
      The name of the view that should be visible initially by default.

      If this method is called after the component has been drawn/initialized: Sets the currently visible view.
      Parameters:
      currentViewName - The name of the view that should be made visible. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getCurrentViewName

      public ViewName getCurrentViewName()
      The name of the view that should be visible initially by default.
      Returns:
      Get the name of the visible view. Returns one of 'day', 'week', 'month' or 'timeline'. Default value is null
    • setData

      public Calendar setData(CalendarEvent... data)
      A List of CalendarEvent objects, specifying the data to be used to populate the calendar.

      This property will typically not be explicitly specified for databound Calendars, where the data is returned from the server via databound component methods such as fetchData(). In this case the data objects will be set to a resultSet rather than a simple array.

      If this method is called after the component has been drawn/initialized: Initialize the data object with the given array. Observes methods of the data object so that when the data changes, the calendar will redraw automatically.

      Parameters:
      data - data to show in the list. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getData

      public CalendarEvent[] getData()
      A List of CalendarEvent objects, specifying the data to be used to populate the calendar.

      This property will typically not be explicitly specified for databound Calendars, where the data is returned from the server via databound component methods such as fetchData(). In this case the data objects will be set to a resultSet rather than a simple array.

      Returns:
      Current data value. Default value is null
      See Also:
    • setDataFetchMode

      public Calendar setDataFetchMode(FetchMode dataFetchMode)
      How to fetch and manage records retrieve from the server. See FetchMode.

      This setting only applies to the ResultSet automatically created by calling fetchData(). If a pre-existing ResultSet is passed to setData() instead, it's existing setting for ResultSet.fetchMode applies.

      Specified by:
      setDataFetchMode in interface DataBoundComponent
      Parameters:
      dataFetchMode - New dataFetchMode value. Default value is "basic"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getDataFetchMode

      public FetchMode getDataFetchMode()
      How to fetch and manage records retrieve from the server. See FetchMode.

      This setting only applies to the ResultSet automatically created by calling fetchData(). If a pre-existing ResultSet is passed to setData() instead, it's existing setting for ResultSet.fetchMode applies.

      Specified by:
      getDataFetchMode in interface DataBoundComponent
      Returns:
      Current dataFetchMode value. Default value is "basic"
      See Also:
    • setDataSource

      public Calendar setDataSource(DataSource dataSource)
      The DataSource that this component should bind to for default fields and for performing DataSource requests.

      Can be specified as either a DataSource instance or the String ID of a DataSource.

      Specified by:
      setDataSource in interface DataBoundComponent
      Parameters:
      dataSource - New dataSource value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • setDataSource

      public Calendar setDataSource(String dataSource)
      The DataSource that this component should bind to for default fields and for performing DataSource requests.

      Can be specified as either a DataSource instance or the String ID of a DataSource.

      Specified by:
      setDataSource in interface DataBoundComponent
      Parameters:
      dataSource - New dataSource value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getDateChooser

      public DateChooser getDateChooser() throws IllegalStateException
      DateChooser used to select the date for which events will be displayed.

      This component is an AutoChild named "dateChooser". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current dateChooser value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setDateEditingStyle

      public Calendar setDateEditingStyle(DateEditingStyle dateEditingStyle) throws IllegalStateException
      Indicates the type of controls to use in event-windows. Valid values are those in the DateEditingStyle type.

      If unset, the editing style will be set to the field-type on the DataSource, if there is one. If there's no DataSource, it will be set to "date" if the granularity is "day" or larger and "time" if granularity is "minute" or smaller, otherwise "datetime".

      Parameters:
      dateEditingStyle - New dateEditingStyle value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDateEditingStyle

      public DateEditingStyle getDateEditingStyle()
      Indicates the type of controls to use in event-windows. Valid values are those in the DateEditingStyle type.

      If unset, the editing style will be set to the field-type on the DataSource, if there is one. If there's no DataSource, it will be set to "date" if the granularity is "day" or larger and "time" if granularity is "minute" or smaller, otherwise "datetime".

      Returns:
      Current dateEditingStyle value. Default value is null
    • setDateFormatter

      public Calendar setDateFormatter(DateDisplayFormat dateFormatter)
      Date formatter for displaying events. Default is to use the system-wide default short date format, configured via DateUtil.setShortDisplayFormat(). Specify any valid DateDisplayFormat.
      Parameters:
      dateFormatter - New dateFormatter value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getDateFormatter

      public DateDisplayFormat getDateFormatter()
      Date formatter for displaying events. Default is to use the system-wide default short date format, configured via DateUtil.setShortDisplayFormat(). Specify any valid DateDisplayFormat.
      Returns:
      Current dateFormatter value. Default value is null
    • getDateLabel

      public Label getDateLabel() throws IllegalStateException
      The com.smartgwt.client.types.AutoChild Label used to display the current date or range above the selected calendar view.

      This component is an AutoChild named "dateLabel". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current dateLabel value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getDatePickerButton

      public ImgButton getDatePickerButton() throws IllegalStateException
      An ImgButton that appears above the various views of the calendar and offers alternative access to a DateChooser to pick the current day.

      This component is an AutoChild named "datePickerButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current datePickerButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setDatePickerHoverText

      public Calendar setDatePickerHoverText(String datePickerHoverText) throws IllegalStateException
      The text to be displayed when a user hovers over the date picker toolbar button
      Parameters:
      datePickerHoverText - New datePickerHoverText value. Default value is "Choose a date"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDatePickerHoverText

      public String getDatePickerHoverText()
      The text to be displayed when a user hovers over the date picker toolbar button
      Returns:
      Current datePickerHoverText value. Default value is "Choose a date"
    • setDayBodyBaseStyle

      public Calendar setDayBodyBaseStyle(String dayBodyBaseStyle)
      The base name for the CSS class applied to the day body of the month view of the calendar. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Parameters:
      dayBodyBaseStyle - New dayBodyBaseStyle value. Default value is "calMonthDayBody"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getDayBodyBaseStyle

      public String getDayBodyBaseStyle()
      The base name for the CSS class applied to the day body of the month view of the calendar. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Returns:
      Current dayBodyBaseStyle value. Default value is "calMonthDayBody"
      See Also:
    • setDayHeaderBaseStyle

      public Calendar setDayHeaderBaseStyle(String dayHeaderBaseStyle)
      The base name for the CSS class applied to the day headers of the month view. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Parameters:
      dayHeaderBaseStyle - New dayHeaderBaseStyle value. Default value is "calMonthDayHeader"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getDayHeaderBaseStyle

      public String getDayHeaderBaseStyle()
      The base name for the CSS class applied to the day headers of the month view. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Returns:
      Current dayHeaderBaseStyle value. Default value is "calMonthDayHeader"
      See Also:
    • getDayView

      public CalendarView getDayView() throws IllegalStateException
      CalendarView used to display events that pertain to a given day.

      This component is an AutoChild named "dayView". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current dayView value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setDayViewTitle

      public Calendar setDayViewTitle(String dayViewTitle) throws IllegalStateException
      The title for the day view.
      Parameters:
      dayViewTitle - New dayViewTitle value. Default value is "Day"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDayViewTitle

      public String getDayViewTitle()
      The title for the day view.
      Returns:
      Current dayViewTitle value. Default value is "Day"
    • setDefaultTimelineColumnSpan

      public Calendar setDefaultTimelineColumnSpan(int defaultTimelineColumnSpan) throws IllegalStateException
      The number of columns of the timelineGranularity to give the timeline by default if no endDate is provided. The default is 20.
      Parameters:
      defaultTimelineColumnSpan - New defaultTimelineColumnSpan value. Default value is 20
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDefaultTimelineColumnSpan

      public int getDefaultTimelineColumnSpan()
      The number of columns of the timelineGranularity to give the timeline by default if no endDate is provided. The default is 20.
      Returns:
      Current defaultTimelineColumnSpan value. Default value is 20
    • setDescriptionField

      public Calendar setDescriptionField(String descriptionField) throws IllegalStateException
      The name of the description field on a CalendarEvent.
      Parameters:
      descriptionField - New descriptionField value. Default value is "description"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDescriptionField

      public String getDescriptionField()
      The name of the description field on a CalendarEvent.
      Returns:
      Current descriptionField value. Default value is "description"
    • setDetailsButtonTitle

      public Calendar setDetailsButtonTitle(String detailsButtonTitle) throws IllegalStateException
      The title for the edit button in the quick quick event dialog.
      Parameters:
      detailsButtonTitle - New detailsButtonTitle value. Default value is "Edit Details"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDetailsButtonTitle

      public String getDetailsButtonTitle()
      The title for the edit button in the quick quick event dialog.
      Returns:
      Current detailsButtonTitle value. Default value is "Edit Details"
      See Also:
    • setDisableWeekends

      public Calendar setDisableWeekends(Boolean disableWeekends)
      If true, weekend days appear in a disabled style and events cannot be created on weekends. Which days are considered weekends is controlled by weekendDays.
      Parameters:
      disableWeekends - New disableWeekends value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getDisableWeekends

      public Boolean getDisableWeekends()
      If true, weekend days appear in a disabled style and events cannot be created on weekends. Which days are considered weekends is controlled by weekendDays.
      Returns:
      Current disableWeekends value. Default value is true
      See Also:
    • setDurationField

      public Calendar setDurationField(String durationField) throws IllegalStateException
      The name of the duration field on a CalendarEvent.
      Parameters:
      durationField - New durationField value. Default value is "duration"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDurationField

      public String getDurationField()
      The name of the duration field on a CalendarEvent.
      Returns:
      Current durationField value. Default value is "duration"
      See Also:
    • setDurationUnitField

      public Calendar setDurationUnitField(String durationUnitField) throws IllegalStateException
      The name of the durationUnit field on a CalendarEvent.
      Parameters:
      durationUnitField - New durationUnitField value. Default value is "durationUnit"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDurationUnitField

      public String getDurationUnitField()
      The name of the durationUnit field on a CalendarEvent.
      Returns:
      Current durationUnitField value. Default value is "durationUnit"
      See Also:
    • setEndDate

      public Calendar setEndDate(Date endDate) throws IllegalStateException
      The end date of the calendar timeline view. Has no effect in other views.

      To set different start and end dates after initial draw, see setTimelineRange.

      Note that the value you provide may be automatically altered if showing header-levels, to fit to header boundaries.

      Parameters:
      endDate - New endDate value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEndDate

      public Date getEndDate()
      The end date of the calendar timeline view. Has no effect in other views.

      To set different start and end dates after initial draw, see setTimelineRange.

      Note that the value you provide may be automatically altered if showing header-levels, to fit to header boundaries.

      Returns:
      Current endDate value. Default value is null
    • setEndDateField

      public Calendar setEndDateField(String endDateField) throws IllegalStateException
      The name of the end date field on a CalendarEvent.
      Parameters:
      endDateField - New endDateField value. Default value is "endDate"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEndDateField

      public String getEndDateField()
      The name of the end date field on a CalendarEvent.
      Returns:
      Current endDateField value. Default value is "endDate"
      See Also:
    • setEventAutoArrange

      public Calendar setEventAutoArrange(Boolean eventAutoArrange) throws IllegalStateException
      If set to true, enables the auto-arrangement of events that share time in the calendar. The default is true.
      Parameters:
      eventAutoArrange - New eventAutoArrange value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventAutoArrange

      public Boolean getEventAutoArrange()
      If set to true, enables the auto-arrangement of events that share time in the calendar. The default is true.
      Returns:
      Current eventAutoArrange value. Default value is true
    • getEventCanvas

      public EventCanvas getEventCanvas()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      To display events in day, week and timeline views, the Calendar creates instances of EventCanvas for each event. Use the com.smartgwt.client.types.AutoChild system to customize these canvases.

      Returns:
      null
    • getEventCanvasButtonLayout

      public HLayout getEventCanvasButtonLayout() throws IllegalStateException
      HLayout that snaps to the top-right of an event canvas on rollover and contains the close and/or context buttons.

      This component is an AutoChild named "eventCanvasButtonLayout". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current eventCanvasButtonLayout value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getEventCanvasCloseButton

      public ImgButton getEventCanvasCloseButton() throws IllegalStateException
      The close button that snaps to the top-right of an event canvas on rollover and allows an event to be removed from a CalendarView.

      This component is an AutoChild named "eventCanvasCloseButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current eventCanvasCloseButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setEventCanvasCloseButtonSize

      public Calendar setEventCanvasCloseButtonSize(Integer eventCanvasCloseButtonSize) throws IllegalStateException
      The size of the close-button that snaps to the top-right of an event canvas on rollover and shows allows an event to be removed from a CalendarView.
      Parameters:
      eventCanvasCloseButtonSize - New eventCanvasCloseButtonSize value. Default value is 16
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventCanvasCloseButtonSize

      public Integer getEventCanvasCloseButtonSize()
      The size of the close-button that snaps to the top-right of an event canvas on rollover and shows allows an event to be removed from a CalendarView.
      Returns:
      Current eventCanvasCloseButtonSize value. Default value is 16
    • setEventCanvasCloseIconSize

      public Calendar setEventCanvasCloseIconSize(Integer eventCanvasCloseIconSize) throws IllegalStateException
      The size of the icon in the close-button floated over events on rollover.
      Parameters:
      eventCanvasCloseIconSize - New eventCanvasCloseIconSize value. Default value is 13
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventCanvasCloseIconSize

      public Integer getEventCanvasCloseIconSize()
      The size of the icon in the close-button floated over events on rollover.
      Returns:
      Current eventCanvasCloseIconSize value. Default value is 13
    • getEventCanvasComponent

      public Canvas getEventCanvasComponent()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Multi-AutoChild component, created as a space-filling member in individual event-canvases, when showEventCanvasComponents is true.

      Returns:
      null
      See Also:
    • getEventCanvasContextButton

      public ImgButton getEventCanvasContextButton() throws IllegalStateException
      The context button that snaps to the top-right of an event canvas on rollover and shows a custom context menu when clicked.

      This component is an AutoChild named "eventCanvasContextButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current eventCanvasContextButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getEventCanvasContextMenu

      public Menu getEventCanvasContextMenu() throws IllegalStateException
      Context menu displayed when an event canvas is right-clicked, or when the rollover context button is clicked. The context button, and the menu itself, will only be displayed if getEventCanvasMenuItems returns an array of appropriate items for the event.

      This component is an AutoChild named "eventCanvasContextMenu". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current eventCanvasContextMenu value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getEventCanvasGripper

      public Img getEventCanvasGripper()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      The "gripper" widget that snaps to the top of an event canvas and allows an event to be dragged with the mouse.

      Returns:
      null
    • getEventCanvasHResizer

      public Img getEventCanvasHResizer()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      The resizer image that snaps to the left and right edges of an editable event canvas in a Timeline, allowing it to be resized horizontally by dragging with the mouse.

      Returns:
      null
    • getEventCanvasLabel

      public Label getEventCanvasLabel()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      Returns:
      null
    • getEventCanvasVResizer

      public Img getEventCanvasVResizer()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      The resizer image that snaps to the bottom of event canvases in day and week views, allowing them to be resized vertically by dragging with the mouse.

      Returns:
      null
    • setEventDescriptionFieldTitle

      public Calendar setEventDescriptionFieldTitle(String eventDescriptionFieldTitle) throws IllegalStateException
      The title for the descriptionField field in the quick event dialog and the detailed editor.
      Parameters:
      eventDescriptionFieldTitle - New eventDescriptionFieldTitle value. Default value is "Description"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventDescriptionFieldTitle

      public String getEventDescriptionFieldTitle()
      The title for the descriptionField field in the quick event dialog and the detailed editor.
      Returns:
      Current eventDescriptionFieldTitle value. Default value is "Description"
      See Also:
    • getEventDialog

      public Window getEventDialog() throws IllegalStateException
      An com.smartgwt.client.types.AutoChild of type Window that displays a quick event entry form in a popup window.

      This component is an AutoChild named "eventDialog". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current eventDialog value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setEventDragGap

      public Calendar setEventDragGap(Integer eventDragGap)
      The number of pixels to leave to the right of events so overlapping events can still be added using the mouse.
      Parameters:
      eventDragGap - New eventDragGap value. Default value is 10
      Returns:
      Calendar instance, for chaining setter calls
    • getEventDragGap

      public Integer getEventDragGap()
      The number of pixels to leave to the right of events so overlapping events can still be added using the mouse.
      Returns:
      Current eventDragGap value. Default value is 10
    • setEventDurationFieldTitle

      public Calendar setEventDurationFieldTitle(String eventDurationFieldTitle) throws IllegalStateException
      The title for the duration field in the quick event dialog and the detailed editor.
      Parameters:
      eventDurationFieldTitle - New eventDurationFieldTitle value. Default value is "Duration"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventDurationFieldTitle

      public String getEventDurationFieldTitle()
      The title for the duration field in the quick event dialog and the detailed editor.
      Returns:
      Current eventDurationFieldTitle value. Default value is "Duration"
      See Also:
    • setEventDurationUnitFieldTitle

      public Calendar setEventDurationUnitFieldTitle(String eventDurationUnitFieldTitle) throws IllegalStateException
      The title for the duration unit field in the quick event dialog and the detailed editor.
      Parameters:
      eventDurationUnitFieldTitle - New eventDurationUnitFieldTitle value. Default value is " "
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventDurationUnitFieldTitle

      public String getEventDurationUnitFieldTitle()
      The title for the duration unit field in the quick event dialog and the detailed editor.
      Returns:
      Current eventDurationUnitFieldTitle value. Default value is " "
      See Also:
    • getEventEditor

      public DynamicForm getEventEditor() throws IllegalStateException
      An com.smartgwt.client.types.AutoChild of type DynamicForm which displays event data. This form is created within the event editor layout

      This component is an AutoChild named "eventEditor". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current eventEditor value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getEventEditorButtonLayout

      public HLayout getEventEditorButtonLayout() throws IllegalStateException
      An com.smartgwt.client.types.AutoChild of type HLayout which houses the Save, Remove and Cancel buttons in the eventEditor.

      This component is an AutoChild named "eventEditorButtonLayout". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current eventEditorButtonLayout value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setEventEditorButtons

      public Calendar setEventEditorButtons(Object... eventEditorButtons) throws IllegalStateException
      The list of buttons to include in the eventEditor. Entries can be the names of the builtin buttons, saveButton, removeButton and cancelButton, or the names of custom autoChildren that have been defined on the Calendar instance, or widget instances that already exist.

      The default is to show the builtin buttons.

      Parameters:
      eventEditorButtons - New eventEditorButtons value. Default value is (see below)
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventEditorButtons

      public Object[] getEventEditorButtons()
      The list of buttons to include in the eventEditor. Entries can be the names of the builtin buttons, saveButton, removeButton and cancelButton, or the names of custom autoChildren that have been defined on the Calendar instance, or widget instances that already exist.

      The default is to show the builtin buttons.

      Returns:
      Current eventEditorButtons value. Default value is (see below)
    • setEventEditorDateFieldTitle

      public Calendar setEventEditorDateFieldTitle(String eventEditorDateFieldTitle) throws IllegalStateException
      The title for the Date-field in the eventEditor that allows for changing the logical start-date of an event, along with its start and end times, when editing events in the day and week views.
      Parameters:
      eventEditorDateFieldTitle - New eventEditorDateFieldTitle value. Default value is "Date"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventEditorDateFieldTitle

      public String getEventEditorDateFieldTitle()
      The title for the Date-field in the eventEditor that allows for changing the logical start-date of an event, along with its start and end times, when editing events in the day and week views.
      Returns:
      Current eventEditorDateFieldTitle value. Default value is "Date"
      See Also:
    • getEventEditorLayout

      public Window getEventEditorLayout() throws IllegalStateException
      An com.smartgwt.client.types.AutoChild of type Window that displays the full event editor

      This component is an AutoChild named "eventEditorLayout". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current eventEditorLayout value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setEventEndDateFieldTitle

      public Calendar setEventEndDateFieldTitle(String eventEndDateFieldTitle) throws IllegalStateException
      The title for the endDateField in the quick event dialog and the detailed editor.
      Parameters:
      eventEndDateFieldTitle - New eventEndDateFieldTitle value. Default value is "To"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventEndDateFieldTitle

      public String getEventEndDateFieldTitle()
      The title for the endDateField in the quick event dialog and the detailed editor.
      Returns:
      Current eventEndDateFieldTitle value. Default value is "To"
      See Also:
    • setEventHeaderHeight

      public Calendar setEventHeaderHeight(int eventHeaderHeight) throws IllegalStateException
      When eventHeaderWrap is false and showEventDescriptions is true, this is the fixed height for the header area in event canvases.
      Parameters:
      eventHeaderHeight - New eventHeaderHeight value. Default value is 14
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventHeaderHeight

      public int getEventHeaderHeight()
      When eventHeaderWrap is false and showEventDescriptions is true, this is the fixed height for the header area in event canvases.
      Returns:
      Current eventHeaderHeight value. Default value is 14
    • setEventHeaderWrap

      public Calendar setEventHeaderWrap(boolean eventHeaderWrap) throws IllegalStateException
      When rendering the canvas for an event, whether to allow the content of the header area to wrap to multiple lines.

      The default is true - if set to false, the header area is fixed, unless showEventDescriptions is false, in which case the header area fills the canvas.

      Parameters:
      eventHeaderWrap - New eventHeaderWrap value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventHeaderWrap

      public boolean getEventHeaderWrap()
      When rendering the canvas for an event, whether to allow the content of the header area to wrap to multiple lines.

      The default is true - if set to false, the header area is fixed, unless showEventDescriptions is false, in which case the header area fills the canvas.

      Returns:
      Current eventHeaderWrap value. Default value is true
    • setEventLaneFieldTitle

      public Calendar setEventLaneFieldTitle(String eventLaneFieldTitle) throws IllegalStateException
      The title for the laneNameField in the quick event dialog and the detailed editor.
      Parameters:
      eventLaneFieldTitle - New eventLaneFieldTitle value. Default value is "Lane"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventLaneFieldTitle

      public String getEventLaneFieldTitle()
      The title for the laneNameField in the quick event dialog and the detailed editor.
      Returns:
      Current eventLaneFieldTitle value. Default value is "Lane"
      See Also:
    • setEventNameFieldTitle

      public Calendar setEventNameFieldTitle(String eventNameFieldTitle) throws IllegalStateException
      The title for the nameField in the quick event dialog and the detailed editor.
      Parameters:
      eventNameFieldTitle - New eventNameFieldTitle value. Default value is "Event Name"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventNameFieldTitle

      public String getEventNameFieldTitle()
      The title for the nameField in the quick event dialog and the detailed editor.
      Returns:
      Current eventNameFieldTitle value. Default value is "Event Name"
      See Also:
    • setEventOverlap

      public Calendar setEventOverlap(Boolean eventOverlap) throws IllegalStateException
      When eventAutoArrange is true, setting eventOverlap to true causes events that share timeslots to overlap each other by a percentage of their width, specified by eventOverlapPercent. The default is true for Calendars and false for Timelines.
      Parameters:
      eventOverlap - New eventOverlap value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventOverlap

      public Boolean getEventOverlap()
      When eventAutoArrange is true, setting eventOverlap to true causes events that share timeslots to overlap each other by a percentage of their width, specified by eventOverlapPercent. The default is true for Calendars and false for Timelines.
      Returns:
      Current eventOverlap value. Default value is true
    • setEventOverlapIdenticalStartTimes

      public Calendar setEventOverlapIdenticalStartTimes(Boolean eventOverlapIdenticalStartTimes) throws IllegalStateException
      When set to true, events that start at the same time will not overlap each other to prevent events having their close button hidden.
      Parameters:
      eventOverlapIdenticalStartTimes - New eventOverlapIdenticalStartTimes value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventOverlapIdenticalStartTimes

      public Boolean getEventOverlapIdenticalStartTimes()
      When set to true, events that start at the same time will not overlap each other to prevent events having their close button hidden.
      Returns:
      Current eventOverlapIdenticalStartTimes value. Default value is false
    • setEventOverlapPercent

      public Calendar setEventOverlapPercent(int eventOverlapPercent) throws IllegalStateException
      The size of the overlap, presented as a percentage of the width of events sharing timeslots.
      Parameters:
      eventOverlapPercent - New eventOverlapPercent value. Default value is 10
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventOverlapPercent

      public int getEventOverlapPercent()
      The size of the overlap, presented as a percentage of the width of events sharing timeslots.
      Returns:
      Current eventOverlapPercent value. Default value is 10
    • setEventScreen

      public Calendar setEventScreen(String eventScreen) throws IllegalStateException
      Screen to create (via createScreen()) in lieu of calling createEventCanvasComponent().

      If this calendar has a dataSource, the created screen is provided with a Canvas.dataContext that includes the event being shown. Be sure the event screen meets these requirements to utilize the dataContext.

      Parameters:
      eventScreen - New eventScreen value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getEventScreen

      public String getEventScreen()
      Screen to create (via createScreen()) in lieu of calling createEventCanvasComponent().

      If this calendar has a dataSource, the created screen is provided with a Canvas.dataContext that includes the event being shown. Be sure the event screen meets these requirements to utilize the dataContext.

      Returns:
      Current eventScreen value. Default value is null
    • setEventSnapGap

      public Calendar setEventSnapGap(Integer eventSnapGap)
      The number of minutes that determines the positions to which events will snap when rendered, and when moved or resized with the mouse.

      If unset (the default), all views will snap to each cell boundary; 30 minutes in a default vertical view, or one column in a default Timeline.

      If set to zero, views will snap to one of a set of known "sensible" defaults: for a default vertical, this will be 5 minutes. For timelines, the eventSnapGap is automatic depending on the current timelineGranularity. If timelineUnitsPerColumn is greater than 1, the snapGap is set to one unit of the current granularity. So, a cell-resolution of 15 minutes would snap to every minute, assuming there are at least 15 pixels per column. Otherwise, the snapGap is either 15 minutes, 1 hour, one day or one month, depending on granularity.

      If any other value is specified, it is used where possible.

      If the specified or calculated value is less than the time covered by a single pixel in the current view, then it can't be represented. In this case, it is rounded up to the lowest of a set of "sensible" time-spans that can be represented: one of [1, 5, 10, 15, 20, 30, 60, 120, 240, 360, 480, 720, 1440].

      For example - a Timeline showing "day" columns cannot support an eventSnapGap of 1 minute, unless each column is at least 1440 pixels wide - if the columns were only 150px wide, then each pixel would represent around 9.6 minutes, which would result in unpleasant and unexpected time-offsets when dragging events. So, the calculated eventSnapGap will be rounded up to the nearest "sensible" time-span - in this case, 10 minutes. If the columns were only 60px wide, it would be 30 minutes.

      Parameters:
      eventSnapGap - New eventSnapGap value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getEventSnapGap

      public Integer getEventSnapGap()
      The number of minutes that determines the positions to which events will snap when rendered, and when moved or resized with the mouse.

      If unset (the default), all views will snap to each cell boundary; 30 minutes in a default vertical view, or one column in a default Timeline.

      If set to zero, views will snap to one of a set of known "sensible" defaults: for a default vertical, this will be 5 minutes. For timelines, the eventSnapGap is automatic depending on the current timelineGranularity. If timelineUnitsPerColumn is greater than 1, the snapGap is set to one unit of the current granularity. So, a cell-resolution of 15 minutes would snap to every minute, assuming there are at least 15 pixels per column. Otherwise, the snapGap is either 15 minutes, 1 hour, one day or one month, depending on granularity.

      If any other value is specified, it is used where possible.

      If the specified or calculated value is less than the time covered by a single pixel in the current view, then it can't be represented. In this case, it is rounded up to the lowest of a set of "sensible" time-spans that can be represented: one of [1, 5, 10, 15, 20, 30, 60, 120, 240, 360, 480, 720, 1440].

      For example - a Timeline showing "day" columns cannot support an eventSnapGap of 1 minute, unless each column is at least 1440 pixels wide - if the columns were only 150px wide, then each pixel would represent around 9.6 minutes, which would result in unpleasant and unexpected time-offsets when dragging events. So, the calculated eventSnapGap will be rounded up to the nearest "sensible" time-span - in this case, 10 minutes. If the columns were only 60px wide, it would be 30 minutes.

      Returns:
      Current eventSnapGap value. Default value is null
      See Also:
    • setEventStartDateFieldTitle

      public Calendar setEventStartDateFieldTitle(String eventStartDateFieldTitle) throws IllegalStateException
      The title for the startDateField in the quick event dialog and the detailed editor.
      Parameters:
      eventStartDateFieldTitle - New eventStartDateFieldTitle value. Default value is "From"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventStartDateFieldTitle

      public String getEventStartDateFieldTitle()
      The title for the startDateField in the quick event dialog and the detailed editor.
      Returns:
      Current eventStartDateFieldTitle value. Default value is "From"
      See Also:
    • setEventStyleName

      public Calendar setEventStyleName(String eventStyleName)
      The base name for the CSS class applied to events when they're rendered in calendar views. This style will have "Header" and "Body" appended to it, according to which part of the event window is being styled. For example, to style the header, define a CSS class called 'eventWindowHeader'.
      Parameters:
      eventStyleName - New eventStyleName value. Default value is "eventWindow"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getEventStyleName

      public String getEventStyleName()
      The base name for the CSS class applied to events when they're rendered in calendar views. This style will have "Header" and "Body" appended to it, according to which part of the event window is being styled. For example, to style the header, define a CSS class called 'eventWindowHeader'.
      Returns:
      Current eventStyleName value. Default value is "eventWindow"
      See Also:
    • setEventStyleNameField

      public Calendar setEventStyleNameField(String eventStyleNameField) throws IllegalStateException
      The name of the field used to override eventStyleName for an individual CalendarEvent.styleName.
      Parameters:
      eventStyleNameField - New eventStyleNameField value. Default value is "styleName"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventStyleNameField

      public String getEventStyleNameField()
      The name of the field used to override eventStyleName for an individual CalendarEvent.styleName.
      Returns:
      Current eventStyleNameField value. Default value is "styleName"
      See Also:
    • setEventSublaneFieldTitle

      public Calendar setEventSublaneFieldTitle(String eventSublaneFieldTitle) throws IllegalStateException
      The title for the sublaneNameField in the quick event dialog and the detailed event editor.
      Parameters:
      eventSublaneFieldTitle - New eventSublaneFieldTitle value. Default value is "Sublane"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventSublaneFieldTitle

      public String getEventSublaneFieldTitle()
      The title for the sublaneNameField in the quick event dialog and the detailed event editor.
      Returns:
      Current eventSublaneFieldTitle value. Default value is "Sublane"
      See Also:
    • setEventWindowStyle

      public Calendar setEventWindowStyle(String eventWindowStyle)
      Deprecated.
      in favor of eventStyleName
      The base name for the CSS class applied to event windows within calendars. This style will have "Header", "HeaderLabel", and "Body" appended to it, according to which part of the event window is being styled. For example, to style the header, define a CSS class called 'eventWindowHeader'.
      Parameters:
      eventWindowStyle - New eventWindowStyle value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getEventWindowStyle

      public String getEventWindowStyle()
      Deprecated.
      in favor of eventStyleName
      The base name for the CSS class applied to event windows within calendars. This style will have "Header", "HeaderLabel", and "Body" appended to it, according to which part of the event window is being styled. For example, to style the header, define a CSS class called 'eventWindowHeader'.
      Returns:
      Current eventWindowStyle value. Default value is null
      See Also:
    • setEventWindowStyleField

      public Calendar setEventWindowStyleField(String eventWindowStyleField) throws IllegalStateException
      Deprecated.
      The name of the field used to override eventWindowStyle for an individual CalendarEvent. See CalendarEvent.eventWindowStyle.
      Parameters:
      eventWindowStyleField - New eventWindowStyleField value. Default value is "eventWindowStyle"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEventWindowStyleField

      public String getEventWindowStyleField()
      Deprecated.
      The name of the field used to override eventWindowStyle for an individual CalendarEvent. See CalendarEvent.eventWindowStyle.
      Returns:
      Current eventWindowStyleField value. Default value is "eventWindowStyle"
      See Also:
    • setFirstDayOfWeek

      public Calendar setFirstDayOfWeek(Integer firstDayOfWeek)
      The numeric day (0-6, Sunday-Saturday) which the calendar should consider as the first day of the week in multi-day views, and in the popup DateChooser.

      If unset, the default is taken from the current locale.

      Parameters:
      firstDayOfWeek - New firstDayOfWeek value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getFirstDayOfWeek

      public Integer getFirstDayOfWeek()
      The numeric day (0-6, Sunday-Saturday) which the calendar should consider as the first day of the week in multi-day views, and in the popup DateChooser.

      If unset, the default is taken from the current locale.

      Returns:
      Current firstDayOfWeek value. Default value is null
    • setHeaderLevels

      public Calendar setHeaderLevels(HeaderLevel... headerLevels)
      Configures the levels of headers shown above the event area, and their time units.

      Header levels are provided from the top down, so the first header level should be the largest time unit and the last one the smallest. The smallest is then used for the actual field-headers.

      If this method is called after the component has been drawn/initialized: For Timelines, configures the levels of headers shown above the event area, and their time units, after initialization.

      Parameters:
      headerLevels - the array of HeaderLevels to set. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getHeaderLevels

      public HeaderLevel[] getHeaderLevels()
      Configures the levels of headers shown above the event area, and their time units.

      Header levels are provided from the top down, so the first header level should be the largest time unit and the last one the smallest. The smallest is then used for the actual field-headers.

      Returns:
      Current headerLevels value. Default value is null
    • setHideUnusedLanes

      public Calendar setHideUnusedLanes(Boolean hideUnusedLanes)
      When set to true, hides any lane that doesn't have any active events in the current dataset.

      If this method is called after the component has been drawn/initialized: Setter for updating hideUnusedLanes after creation.
      Parameters:
      hideUnusedLanes - whether to hide unused lanes. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getHideUnusedLanes

      public Boolean getHideUnusedLanes()
      When set to true, hides any lane that doesn't have any active events in the current dataset.
      Returns:
      Current hideUnusedLanes value. Default value is null
    • setIncludeRangeCriteria

      public Calendar setIncludeRangeCriteria(Boolean includeRangeCriteria) throws IllegalStateException
      When set to true, the default, the fetches issued by navigating around in the various views are limited to the accessible date-range in the current view - as you change the current date-range, a fetch is only issued if the new range is not entirely within the previous range.

      For example, navigating in the monthView will fetch all events in the range of 5 or 6 weeks that cover that month. If you then change to the day or week views, no fetches will be issued until you navigate outside of the 5 or 6 weeks initially fetched by the Month view.

      Parameters:
      includeRangeCriteria - New includeRangeCriteria value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getIncludeRangeCriteria

      public Boolean getIncludeRangeCriteria()
      When set to true, the default, the fetches issued by navigating around in the various views are limited to the accessible date-range in the current view - as you change the current date-range, a fetch is only issued if the new range is not entirely within the previous range.

      For example, navigating in the monthView will fetch all events in the range of 5 or 6 weeks that cover that month. If you then change to the day or week views, no fetches will be issued until you navigate outside of the 5 or 6 weeks initially fetched by the Month view.

      Returns:
      Current includeRangeCriteria value. Default value is true
    • getIndicatorCanvas

      public IndicatorCanvas getIndicatorCanvas()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      AutoChild component created for each indicator entry.

      Returns:
      null
    • setIndicators

      public Calendar setIndicators(CalendarEvent... indicators)
      An array of CalendarEvent instances representing instants in time, to be highlighted in timeline views. Each indicator renders out as an indicator canvas, a special, non-interactive subclass of EventCanvas, which spans all lanes and draws behind any normal, interactive events in the zorder, but in front of any zones. The default style for these components renders them as thin vertical lines that span all lanes and have a hover but no title.

      If this method is called after the component has been drawn/initialized: Sets the indicators used to highlight instants in time.
      Parameters:
      indicators - array of indicators to display. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getIndicators

      public CalendarEvent[] getIndicators()
      An array of CalendarEvent instances representing instants in time, to be highlighted in timeline views. Each indicator renders out as an indicator canvas, a special, non-interactive subclass of EventCanvas, which spans all lanes and draws behind any normal, interactive events in the zorder, but in front of any zones. The default style for these components renders them as thin vertical lines that span all lanes and have a hover but no title.
      Returns:
      Current indicators value. Default value is null
    • setIndicatorStyleName

      public Calendar setIndicatorStyleName(String indicatorStyleName)
      CSS style to apply to the canvases created for each specified indicator.
      Parameters:
      indicatorStyleName - New indicatorStyleName value. Default value is "indicatorCanvas"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getIndicatorStyleName

      public String getIndicatorStyleName()
      CSS style to apply to the canvases created for each specified indicator.
      Returns:
      Current indicatorStyleName value. Default value is "indicatorCanvas"
      See Also:
    • setInvalidDateMessage

      public Calendar setInvalidDateMessage(String invalidDateMessage) throws IllegalStateException
      The message to display in the eventEditor when the 'To' date is greater than the 'From' date and a save is attempted.
      Parameters:
      invalidDateMessage - New invalidDateMessage value. Default value is "From must be before To"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getInvalidDateMessage

      public String getInvalidDateMessage()
      The message to display in the eventEditor when the 'To' date is greater than the 'From' date and a save is attempted.
      Returns:
      Current invalidDateMessage value. Default value is "From must be before To"
    • setLaneEventPadding

      public Calendar setLaneEventPadding(Integer laneEventPadding)
      The pixel space to leave between events and the edges of the lane or sublane they appear in. Only applicable to timelines and to dayViews showing day lanes.
      Parameters:
      laneEventPadding - New laneEventPadding value. Default value is 0
      Returns:
      Calendar instance, for chaining setter calls
    • getLaneEventPadding

      public Integer getLaneEventPadding()
      The pixel space to leave between events and the edges of the lane or sublane they appear in. Only applicable to timelines and to dayViews showing day lanes.
      Returns:
      Current laneEventPadding value. Default value is 0
    • setLaneFields

      public Calendar setLaneFields(ListGridField... laneFields) throws IllegalStateException
      Field definitions for the frozen area of the timelineView, which shows data about the timeline lanes. Each field shows one attribute of the objects provided as lanes.

      When lane grouping is enabled, only fields that are specified as lane fields can be used as group fields.

      Parameters:
      laneFields - New laneFields value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getLaneFields

      public ListGridField[] getLaneFields()
      Field definitions for the frozen area of the timelineView, which shows data about the timeline lanes. Each field shows one attribute of the objects provided as lanes.

      When lane grouping is enabled, only fields that are specified as lane fields can be used as group fields.

      Returns:
      Current laneFields value. Default value is null
    • setLaneGroupByField

      public Calendar setLaneGroupByField(String laneGroupByField)
      For timelines with canGroupLanes set to true, this is a field name or array of field names on which to group the lanes in a timeline.
      Parameters:
      laneGroupByField - New laneGroupByField value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getLaneGroupByField

      public String getLaneGroupByField()
      For timelines with canGroupLanes set to true, this is a field name or array of field names on which to group the lanes in a timeline.
      Returns:
      Current laneGroupByField value. Default value is null
    • setLaneGroupByField

      public Calendar setLaneGroupByField(String... laneGroupByField)
      For timelines with canGroupLanes set to true, this is a field name or array of field names on which to group the lanes in a timeline.
      Parameters:
      laneGroupByField - New laneGroupByField value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getLaneGroupByFieldAsStringArray

      public String[] getLaneGroupByFieldAsStringArray()
      For timelines with canGroupLanes set to true, this is a field name or array of field names on which to group the lanes in a timeline.
      Returns:
      Current laneGroupByField value. Default value is null
    • setLaneNameField

      public Calendar setLaneNameField(String laneNameField) throws IllegalStateException
      The name of the field which will determine the lane in which a given event will be displayed in Timelines and in the day view, if showDayLanes is true.
      Parameters:
      laneNameField - New laneNameField value. Default value is "lane"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLaneNameField

      public String getLaneNameField()
      The name of the field which will determine the lane in which a given event will be displayed in Timelines and in the day view, if showDayLanes is true.
      Returns:
      Current laneNameField value. Default value is "lane"
      See Also:
    • setLanes

      public Calendar setLanes(Lane... lanes)
      An array of Lane definitions that represent the rows of the timelineView, or the columns of the dayView if showDayLanes is true.

      If this method is called after the component has been drawn/initialized: Sets the lanes in the current calendar view. Only has an effect in timeline views, and in day views when showDayLanes is true.
      Parameters:
      lanes - array of lanes to display. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getLanes

      public Lane[] getLanes()
      An array of Lane definitions that represent the rows of the timelineView, or the columns of the dayView if showDayLanes is true.
      Returns:
      Current lanes value. Default value is null
    • setLeadingDateField

      public Calendar setLeadingDateField(String leadingDateField) throws IllegalStateException
      The name of the leading date field for each event. When this attribute and trailingDateField are present in the data, a line extends out from the event showing the extent of the leading and trailing dates - useful for visualizing a pipeline of events where some can be moved a certain amount without affecting others.
      Parameters:
      leadingDateField - New leadingDateField value. Default value is "leadingDate"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLeadingDateField

      public String getLeadingDateField()
      The name of the leading date field for each event. When this attribute and trailingDateField are present in the data, a line extends out from the event showing the extent of the leading and trailing dates - useful for visualizing a pipeline of events where some can be moved a certain amount without affecting others.
      Returns:
      Current leadingDateField value. Default value is "leadingDate"
      See Also:
    • setLimitToWorkday

      public Calendar setLimitToWorkday(Boolean limitToWorkday) throws IllegalStateException
      When showWorkday is true, this attribute prevents the user from scrolling vertical views beyond the specified workday start and end hours.
      Parameters:
      limitToWorkday - New limitToWorkday value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getLimitToWorkday

      public Boolean getLimitToWorkday()
      When showWorkday is true, this attribute prevents the user from scrolling vertical views beyond the specified workday start and end hours.
      Returns:
      Current limitToWorkday value. Default value is false
      See Also:
    • getMainView

      public TabSet getMainView() throws IllegalStateException
      TabSet for managing calendar views when multiple views are available (eg, day and month).

      This component is an AutoChild named "mainView". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current mainView value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setMinimalUI

      public Calendar setMinimalUI(boolean minimalUI)
      A boolean value controlling whether the Calendar shows tabs for available calendar views. By default, this is true for handsets and false otherwise.
      Parameters:
      minimalUI - New minimalUI value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
    • getMinimalUI

      public boolean getMinimalUI()
      A boolean value controlling whether the Calendar shows tabs for available calendar views. By default, this is true for handsets and false otherwise.
      Returns:
      Current minimalUI value. Default value is false
    • setMinimumDayHeight

      public Calendar setMinimumDayHeight(Integer minimumDayHeight)
      In the month view when showDayHeaders is true, this is the minimum height applied to a day cell and its header combined.

      If showDayHeaders is false, this attribute has no effect - the minimum height of day cells is either an equal share of the available height, or the rendered height of the cell's HTML content, whichever is greater. If the latter, a vertical scrollbar is shown.

      Parameters:
      minimumDayHeight - New minimumDayHeight value. Default value is 80
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getMinimumDayHeight

      public Integer getMinimumDayHeight()
      In the month view when showDayHeaders is true, this is the minimum height applied to a day cell and its header combined.

      If showDayHeaders is false, this attribute has no effect - the minimum height of day cells is either an equal share of the available height, or the rendered height of the cell's HTML content, whichever is greater. If the latter, a vertical scrollbar is shown.

      Returns:
      Current minimumDayHeight value. Default value is 80
      See Also:
    • setMinLaneWidth

      public Calendar setMinLaneWidth(Integer minLaneWidth) throws IllegalStateException
      When showing vertical lanes in the dayView, this attribute sets the minimum width of each column or field.
      Parameters:
      minLaneWidth - New minLaneWidth value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinLaneWidth

      public Integer getMinLaneWidth()
      When showing vertical lanes in the dayView, this attribute sets the minimum width of each column or field.
      Returns:
      Current minLaneWidth value. Default value is null
    • setMinRowHeight

      public Calendar setMinRowHeight(int minRowHeight)
      The minimum height of time-rows in vertical calendar views. Rows will not shrink below this height when sizeToWorkday is true, meaning that a Calendar with a long workday may not be able to fit all workday rows in the viewport at once, and scrolling may be necessary.

      To prevent users from scrolling beyond the workday hours, see limitToWorkday.

      Parameters:
      minRowHeight - New minRowHeight value. Default value is 20
      Returns:
      Calendar instance, for chaining setter calls
    • getMinRowHeight

      public int getMinRowHeight()
      The minimum height of time-rows in vertical calendar views. Rows will not shrink below this height when sizeToWorkday is true, meaning that a Calendar with a long workday may not be able to fit all workday rows in the viewport at once, and scrolling may be necessary.

      To prevent users from scrolling beyond the workday hours, see limitToWorkday.

      Returns:
      Current minRowHeight value. Default value is 20
    • setMinutesPerRow

      public Calendar setMinutesPerRow(Integer minutesPerRow) throws IllegalStateException
      The number of minutes per row in day and week views. The default of 30 minutes shows two rows per hour. Note that this value must divide into 60.
      Parameters:
      minutesPerRow - New minutesPerRow value. Default value is 30
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinutesPerRow

      public Integer getMinutesPerRow()
      The number of minutes per row in day and week views. The default of 30 minutes shows two rows per hour. Note that this value must divide into 60.
      Returns:
      Current minutesPerRow value. Default value is 30
    • getMonthButton

      public NavigationButton getMonthButton() throws IllegalStateException
      A NavigationButton that appears to the left of other navigation controls in the controls bar on Handset devices.

      Used to show and hide the month view on devices with limited space.

      This component is an AutoChild named "monthButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current monthButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setMonthButtonIconSrc

      public Calendar setMonthButtonIconSrc(String monthButtonIconSrc) throws IllegalStateException
      The icon to show next to the month-name in the month button, used for showing and hiding the month view on Handsets.
      Parameters:
      monthButtonIconSrc - New monthButtonIconSrc value. Default value is "Chevron_Left"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getMonthButtonIconSrc

      public String getMonthButtonIconSrc()
      The icon to show next to the month-name in the month button, used for showing and hiding the month view on Handsets.
      Returns:
      Current monthButtonIconSrc value. Default value is "Chevron_Left"
      See Also:
    • setMonthButtonTitle

      public Calendar setMonthButtonTitle(String monthButtonTitle) throws IllegalStateException
      The title of the month button, used for showing and hiding the month view on Handsets.

      This is a dynamic string - text within ${...} are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only one dynamic variable, monthName, is available and represents the name of the month containing the currently selected date.

      The default value is the Month-name of the selected date.

      When the month view is already visible, the title for the month button is set according to the value of backButtonTitle.

      Parameters:
      monthButtonTitle - New monthButtonTitle value. Default value is "${monthName}"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getMonthButtonTitle

      public String getMonthButtonTitle()
      The title of the month button, used for showing and hiding the month view on Handsets.

      This is a dynamic string - text within ${...} are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only one dynamic variable, monthName, is available and represents the name of the month containing the currently selected date.

      The default value is the Month-name of the selected date.

      When the month view is already visible, the title for the month button is set according to the value of backButtonTitle.

      Returns:
      Current monthButtonTitle value. Default value is "${monthName}"
      See Also:
    • setMonthMoreEventsLinkTitle

      public Calendar setMonthMoreEventsLinkTitle(String monthMoreEventsLinkTitle) throws IllegalStateException
      The title of the link shown in a cell of a month view when there are too many events to be displayed at once.

      This is a dynamic string - text within ${...} are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only one dynamic variable, eventCount, is available and represents the number of events that are not currently displayed and that will appear in the menu displayed when the More Events link is clicked.

      The default value is a string like "+ 3 more...".

      Parameters:
      monthMoreEventsLinkTitle - New monthMoreEventsLinkTitle value. Default value is "+ ${eventCount} more..."
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getMonthMoreEventsLinkTitle

      public String getMonthMoreEventsLinkTitle()
      The title of the link shown in a cell of a month view when there are too many events to be displayed at once.

      This is a dynamic string - text within ${...} are dynamic variables and will be evaluated as JS code when the message is displayed.

      Only one dynamic variable, eventCount, is available and represents the number of events that are not currently displayed and that will appear in the menu displayed when the More Events link is clicked.

      The default value is a string like "+ 3 more...".

      Returns:
      Current monthMoreEventsLinkTitle value. Default value is "+ ${eventCount} more..."
      See Also:
    • getMonthMoreEventsMenu

      public Menu getMonthMoreEventsMenu() throws IllegalStateException
      AutoChild Menu, shown when a user clicks the more events link in a cell of the monthView. Items in this menu represent additional events, not already displayed in the cell, and clicking them fires the eventClick notification.

      This component is an AutoChild named "monthMoreEventsMenu". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current monthMoreEventsMenu value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getMonthView

      public CalendarView getMonthView() throws IllegalStateException
      CalendarView used to display events that pertain to a given month.

      This component is an AutoChild named "monthView". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current monthView value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setMonthViewTitle

      public Calendar setMonthViewTitle(String monthViewTitle) throws IllegalStateException
      The title for the month view.
      Parameters:
      monthViewTitle - New monthViewTitle value. Default value is "Month"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMonthViewTitle

      public String getMonthViewTitle()
      The title for the month view.
      Returns:
      Current monthViewTitle value. Default value is "Month"
    • setNameField

      public Calendar setNameField(String nameField) throws IllegalStateException
      The name of the name field on a CalendarEvent.
      Parameters:
      nameField - New nameField value. Default value is "name"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getNameField

      public String getNameField()
      The name of the name field on a CalendarEvent.
      Returns:
      Current nameField value. Default value is "name"
      See Also:
    • setNewEventWindowTitle

      public Calendar setNewEventWindowTitle(String newEventWindowTitle) throws IllegalStateException
      The title-text displayed in the popup event dialog/editor for new events.
      Parameters:
      newEventWindowTitle - New newEventWindowTitle value. Default value is "New Event"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getNewEventWindowTitle

      public String getNewEventWindowTitle()
      The title-text displayed in the popup event dialog/editor for new events.
      Returns:
      Current newEventWindowTitle value. Default value is "New Event"
      See Also:
    • getNextButton

      public ImgButton getNextButton() throws IllegalStateException
      An ImgButton that appears above the week/day/month views of the calendar and allows the user to move the calendar forwards in time.

      This component is an AutoChild named "nextButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current nextButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setNextButtonHoverText

      public Calendar setNextButtonHoverText(String nextButtonHoverText) throws IllegalStateException
      The text to be displayed when a user hovers over the next toolbar button
      Parameters:
      nextButtonHoverText - New nextButtonHoverText value. Default value is "Next"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getNextButtonHoverText

      public String getNextButtonHoverText()
      The text to be displayed when a user hovers over the next toolbar button
      Returns:
      Current nextButtonHoverText value. Default value is "Next"
    • setOtherDayBlankStyle

      public Calendar setOtherDayBlankStyle(String otherDayBlankStyle) throws IllegalStateException
      The CSS style applied to both the header and body of days from other months in the month view, when showOtherDays is false.
      Parameters:
      otherDayBlankStyle - New otherDayBlankStyle value. Default value is "calMonthOtherDayBlank"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getOtherDayBlankStyle

      public String getOtherDayBlankStyle()
      The CSS style applied to both the header and body of days from other months in the month view, when showOtherDays is false.
      Returns:
      Current otherDayBlankStyle value. Default value is "calMonthOtherDayBlank"
      See Also:
    • setOtherDayBodyBaseStyle

      public Calendar setOtherDayBodyBaseStyle(String otherDayBodyBaseStyle)
      The base name for the CSS class applied to the day body of the month view of the calendar. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Parameters:
      otherDayBodyBaseStyle - New otherDayBodyBaseStyle value. Default value is "calMonthOtherDayBody"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getOtherDayBodyBaseStyle

      public String getOtherDayBodyBaseStyle()
      The base name for the CSS class applied to the day body of the month view of the calendar. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Returns:
      Current otherDayBodyBaseStyle value. Default value is "calMonthOtherDayBody"
      See Also:
    • setOtherDayClickNavigation

      public Calendar setOtherDayClickNavigation(Boolean otherDayClickNavigation)
      When showOtherDays is true, this attribute determines whether the month-view should change month when cells representing days in the previous or following month are clicked.
      Parameters:
      otherDayClickNavigation - New otherDayClickNavigation value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
    • getOtherDayClickNavigation

      public Boolean getOtherDayClickNavigation()
      When showOtherDays is true, this attribute determines whether the month-view should change month when cells representing days in the previous or following month are clicked.
      Returns:
      Current otherDayClickNavigation value. Default value is true
    • setOtherDayHeaderBaseStyle

      public Calendar setOtherDayHeaderBaseStyle(String otherDayHeaderBaseStyle)
      The base name for the CSS class applied to the day headers of the month view. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Parameters:
      otherDayHeaderBaseStyle - New otherDayHeaderBaseStyle value. Default value is "calMonthDayHeader"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getOtherDayHeaderBaseStyle

      public String getOtherDayHeaderBaseStyle()
      The base name for the CSS class applied to the day headers of the month view. This style will have "Dark", "Over", "Selected", or "Disabled" appended to it according to the state of the cell.

      See CellStyleSuffixes for details on how stateful suffixes are combined with the base style to generate stateful cell styles.

      Returns:
      Current otherDayHeaderBaseStyle value. Default value is "calMonthDayHeader"
      See Also:
    • setOverlapSortSpecifiers

      public Calendar setOverlapSortSpecifiers(SortSpecifier... overlapSortSpecifiers)
      A set of sort-specifiers for customizing the render order of events that overlap.

      In timelines, this dictates the vertical rendering order of overlapped events in each lane.

      In day and week views, it dictates the horizontal rendering order of overlapped events in each column or Lane.

      By default, events that share space in a Lane or column are rendered from top to bottom, or left to right according to their start-dates - the earliest in a given lane appears top-most in that lane, or left-most in its column.

      Providing overlapSortSpecifiers allows for the events to be ordered by one or more of the fields stored on the events, or in the underlying data-source, if the Calendar is databound.

      Parameters:
      overlapSortSpecifiers - New overlapSortSpecifiers value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getOverlapSortSpecifiers

      public SortSpecifier[] getOverlapSortSpecifiers()
      A set of sort-specifiers for customizing the render order of events that overlap.

      In timelines, this dictates the vertical rendering order of overlapped events in each lane.

      In day and week views, it dictates the horizontal rendering order of overlapped events in each column or Lane.

      By default, events that share space in a Lane or column are rendered from top to bottom, or left to right according to their start-dates - the earliest in a given lane appears top-most in that lane, or left-most in its column.

      Providing overlapSortSpecifiers allows for the events to be ordered by one or more of the fields stored on the events, or in the underlying data-source, if the Calendar is databound.

      Returns:
      Current overlapSortSpecifiers value. Default value is null
    • getPreviousButton

      public ImgButton getPreviousButton() throws IllegalStateException
      An ImgButton that appears above the week/day/month views of the calendar and allows the user to move the calendar backwards in time.

      This component is an AutoChild named "previousButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current previousButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setPreviousButtonHoverText

      public Calendar setPreviousButtonHoverText(String previousButtonHoverText) throws IllegalStateException
      The text to be displayed when a user hovers over the previous toolbar button.
      Parameters:
      previousButtonHoverText - New previousButtonHoverText value. Default value is "Previous"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPreviousButtonHoverText

      public String getPreviousButtonHoverText()
      The text to be displayed when a user hovers over the previous toolbar button.
      Returns:
      Current previousButtonHoverText value. Default value is "Previous"
    • getRemoveButton

      public IButton getRemoveButton() throws IllegalStateException
      An com.smartgwt.client.types.AutoChild of type IButton, used to permanently remove an event from the eventEditor.

      This component is an AutoChild named "removeButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current removeButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setRemoveButtonTitle

      public Calendar setRemoveButtonTitle(String removeButtonTitle) throws IllegalStateException
      The title for the Remove button in the event editor.
      Parameters:
      removeButtonTitle - New removeButtonTitle value. Default value is "Remove Event"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRemoveButtonTitle

      public String getRemoveButtonTitle()
      The title for the Remove button in the event editor.
      Returns:
      Current removeButtonTitle value. Default value is "Remove Event"
      See Also:
    • setRenderEventsOnDemand

      public Calendar setRenderEventsOnDemand(boolean renderEventsOnDemand) throws IllegalStateException
      When set to true, the default, each event is rendered as it appears in the viewport. If set to false, all events are rendered up-front, whenever the current range changes.

      Has no effect when showColumnLayouts is true.

      Parameters:
      renderEventsOnDemand - New renderEventsOnDemand value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRenderEventsOnDemand

      public boolean getRenderEventsOnDemand()
      When set to true, the default, each event is rendered as it appears in the viewport. If set to false, all events are rendered up-front, whenever the current range changes.

      Has no effect when showColumnLayouts is true.

      Returns:
      Current renderEventsOnDemand value. Default value is true
    • setRowHeight

      public Calendar setRowHeight(int rowHeight)
      The height of time-slots in the calendar.
      Parameters:
      rowHeight - New rowHeight value. Default value is 20
      Returns:
      Calendar instance, for chaining setter calls
    • getRowHeight

      public int getRowHeight()
      The height of time-slots in the calendar.
      Returns:
      Current rowHeight value. Default value is 20
    • setRowTitleFrequency

      public Calendar setRowTitleFrequency(Integer rowTitleFrequency) throws IllegalStateException
      A minute value that indicates which rows should show times in vertical views, like day and week. The default of 60 minutes shows titles on the first row of each hour. The value provided must be a multiple of minutesPerRow and be no larger than 60.
      Parameters:
      rowTitleFrequency - New rowTitleFrequency value. Default value is 60
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getRowTitleFrequency

      public Integer getRowTitleFrequency()
      A minute value that indicates which rows should show times in vertical views, like day and week. The default of 60 minutes shows titles on the first row of each hour. The value provided must be a multiple of minutesPerRow and be no larger than 60.
      Returns:
      Current rowTitleFrequency value. Default value is 60
    • getSaveButton

      public IButton getSaveButton() throws IllegalStateException
      An com.smartgwt.client.types.AutoChild of type IButton, used to save an event from the eventEditor.

      This component is an AutoChild named "saveButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current saveButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setSaveButtonTitle

      public Calendar setSaveButtonTitle(String saveButtonTitle) throws IllegalStateException
      The title for the Save button in the quick event dialog and the event editor.
      Parameters:
      saveButtonTitle - New saveButtonTitle value. Default value is "Save Event"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSaveButtonTitle

      public String getSaveButtonTitle()
      The title for the Save button in the quick event dialog and the event editor.
      Returns:
      Current saveButtonTitle value. Default value is "Save Event"
      See Also:
    • setScrollToWorkday

      public Calendar setScrollToWorkday(Boolean scrollToWorkday)
      If set, and showWorkday is true, automatically scrolls the day and week views to the start of the workday when the calendar is first displayed and whenever the user changes to a different day or week.
      Parameters:
      scrollToWorkday - New scrollToWorkday value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getScrollToWorkday

      public Boolean getScrollToWorkday()
      If set, and showWorkday is true, automatically scrolls the day and week views to the start of the workday when the calendar is first displayed and whenever the user changes to a different day or week.
      Returns:
      Current scrollToWorkday value. Default value is false
      See Also:
    • setSelectChosenDate

      public Calendar setSelectChosenDate(Boolean selectChosenDate)
      When true, shows the current chosenDate in a selected style in the month view. Has no effect in other views.
      Parameters:
      selectChosenDate - New selectChosenDate value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getSelectChosenDate

      public Boolean getSelectChosenDate()
      When true, shows the current chosenDate in a selected style in the month view. Has no effect in other views.
      Returns:
      Current selectChosenDate value. Default value is true
      See Also:
    • setSelectedCellStyle

      public Calendar setSelectedCellStyle(String selectedCellStyle)
      The base name for the CSS class applied to a cell that is selected via a mouse drag.
      Parameters:
      selectedCellStyle - New selectedCellStyle value. Default value is "calendarCellSelected"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getSelectedCellStyle

      public String getSelectedCellStyle()
      The base name for the CSS class applied to a cell that is selected via a mouse drag.
      Returns:
      Current selectedCellStyle value. Default value is "calendarCellSelected"
      See Also:
    • setShowAddEventButton

      public Calendar setShowAddEventButton(Boolean showAddEventButton)
      Set to false to hide the Add Event button.
      Parameters:
      showAddEventButton - New showAddEventButton value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getShowAddEventButton

      public Boolean getShowAddEventButton()
      Set to false to hide the Add Event button.
      Returns:
      Current showAddEventButton value. Default value is null
    • setShowCellHovers

      public Calendar setShowCellHovers(Boolean showCellHovers) throws IllegalStateException
      When showViewHovers is true, dictates whether to display hover prompts when the mouse rolls over the normal cells in the body of CalendarViews.

      The content of the hover is determined by a call to getCellHoverHTML(), which can be overridden to return custom results; by default, it returns the cell's date as a string.

      Parameters:
      showCellHovers - New showCellHovers value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowCellHovers

      public Boolean getShowCellHovers()
      When showViewHovers is true, dictates whether to display hover prompts when the mouse rolls over the normal cells in the body of CalendarViews.

      The content of the hover is determined by a call to getCellHoverHTML(), which can be overridden to return custom results; by default, it returns the cell's date as a string.

      Returns:
      Current showCellHovers value. Default value is false
    • setShowColumnLayouts

      public Calendar setShowColumnLayouts(Boolean showColumnLayouts) throws IllegalStateException
      When true, causes layouts to be added to each column in vertical views. In this mode, eventCanvases are stacked in these layouts, filling width and auto-sizing vertically to content, rather than being placed, sized and overlapped according to their times.

      Because times are ignored in this mode, various behaviors are switched off automatically; for example, the time-column is hidden and event-canvases cannot be resized or rendered on-demand.

      Parameters:
      showColumnLayouts - New showColumnLayouts value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowColumnLayouts

      public Boolean getShowColumnLayouts()
      When true, causes layouts to be added to each column in vertical views. In this mode, eventCanvases are stacked in these layouts, filling width and auto-sizing vertically to content, rather than being placed, sized and overlapped according to their times.

      Because times are ignored in this mode, various behaviors are switched off automatically; for example, the time-column is hidden and event-canvases cannot be resized or rendered on-demand.

      Returns:
      Current showColumnLayouts value. Default value is false
      See Also:
    • setShowControlsBar

      public Calendar setShowControlsBar(Boolean showControlsBar) throws IllegalStateException
      If false the controls bar at the top of the calendar will not be displayed - this means that the controlsBar will be hidden, so the autoChildren (previousButton, dateLabel, nextButton, addEventButton, and datePickerButton) will not be created or shown.
      Parameters:
      showControlsBar - New showControlsBar value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowControlsBar

      public Boolean getShowControlsBar()
      If false the controls bar at the top of the calendar will not be displayed - this means that the controlsBar will be hidden, so the autoChildren (previousButton, dateLabel, nextButton, addEventButton, and datePickerButton) will not be created or shown.
      Returns:
      Current showControlsBar value. Default value is true
    • setShowDateChooser

      public Calendar setShowDateChooser(Boolean showDateChooser) throws IllegalStateException
      Determines whether the dateChooser is displayed.
      Parameters:
      showDateChooser - New showDateChooser value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowDateChooser

      public Boolean getShowDateChooser()
      Determines whether the dateChooser is displayed.
      Returns:
      Current showDateChooser value. Default value is true
      See Also:
    • setShowDatePickerButton

      public Calendar setShowDatePickerButton(Boolean showDatePickerButton)
      Set to false to hide the datePickerButton that allows selecting a new base date for this Calendar.
      Parameters:
      showDatePickerButton - New showDatePickerButton value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getShowDatePickerButton

      public Boolean getShowDatePickerButton()
      Set to false to hide the datePickerButton that allows selecting a new base date for this Calendar.
      Returns:
      Current showDatePickerButton value. Default value is null
    • setShowDayHeaders

      public Calendar setShowDayHeaders(Boolean showDayHeaders) throws IllegalStateException
      If true, the default, show a header cell for each day cell in the month view, with both cells having a minimum combined height of minimumDayHeight. If false, the header cells will not be shown, and the value of minimumDayHeight is ignored. This causes the available vertical space in month views to be shared equally between day cells, such that no vertical scrollbar is required unless the HTML in the cells renders them taller than will fit.
      Parameters:
      showDayHeaders - New showDayHeaders value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowDayHeaders

      public Boolean getShowDayHeaders()
      If true, the default, show a header cell for each day cell in the month view, with both cells having a minimum combined height of minimumDayHeight. If false, the header cells will not be shown, and the value of minimumDayHeight is ignored. This causes the available vertical space in month views to be shared equally between day cells, such that no vertical scrollbar is required unless the HTML in the cells renders them taller than will fit.
      Returns:
      Current showDayHeaders value. Default value is true
      See Also:
    • setShowDayLanes

      public Calendar setShowDayLanes(Boolean showDayLanes) throws IllegalStateException
      If set to true, the day view uses lanes to render multiple vertical "lanes" within the day, very much like a vertical Timeline.

      Day lanes are useful for showing events for various entities on the same day - agendas for various staff members, for example, or delivery schedules for a fleet of trucks.

      Each day lane is self-contained, showing in a column with a header and individual events are placed in appropriate lanes, respecting padding and overlapping. If canEditEvents is true, events can be drag-moved or drag-resized from their top and bottom edges, within the containing lane. To allow events to be dragged from one lane into another, see canEditLane.

      If this method is called after the component has been drawn/initialized: Changes the view mode of the day view at runtime - whether to show a normal day column for the chosenDate, or the specified set of vertical lanes.

      Parameters:
      showDayLanes - whether or not to show lanes in the day view. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowDayLanes

      public Boolean getShowDayLanes()
      If set to true, the day view uses lanes to render multiple vertical "lanes" within the day, very much like a vertical Timeline.

      Day lanes are useful for showing events for various entities on the same day - agendas for various staff members, for example, or delivery schedules for a fleet of trucks.

      Each day lane is self-contained, showing in a column with a header and individual events are placed in appropriate lanes, respecting padding and overlapping. If canEditEvents is true, events can be drag-moved or drag-resized from their top and bottom edges, within the containing lane. To allow events to be dragged from one lane into another, see canEditLane.

      Returns:
      Current showDayLanes value. Default value is null
    • setShowDayView

      public Calendar setShowDayView(Boolean showDayView) throws IllegalStateException
      Whether to show the Day view.
      Parameters:
      showDayView - New showDayView value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowDayView

      public Boolean getShowDayView()
      Whether to show the Day view.
      Returns:
      Current showDayView value. Default value is true
      See Also:
    • setShowDetailFields

      public Calendar setShowDetailFields(Boolean showDetailFields) throws IllegalStateException
      Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no component.fields.

      The detail property is used on DataSource fields to mark fields that shouldn't appear by default in a view that tries to show many records in a small space.

      Specified by:
      setShowDetailFields in interface DataBoundComponent
      Parameters:
      showDetailFields - New showDetailFields value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowDetailFields

      public Boolean getShowDetailFields()
      Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no component.fields.

      The detail property is used on DataSource fields to mark fields that shouldn't appear by default in a view that tries to show many records in a small space.

      Specified by:
      getShowDetailFields in interface DataBoundComponent
      Returns:
      Current showDetailFields value. Default value is true
      See Also:
    • setShowDragHovers

      public Calendar setShowDragHovers(Boolean showDragHovers)
      When showViewHovers is true, dictates whether to display hover prompts when an event is being dragged with the mouse.

      The content of the hover is determined by a call to getDragHoverHTML(), which can be overridden to return custom results; by default, it returns the date range of the drag canvas as a string.

      Parameters:
      showDragHovers - New showDragHovers value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
    • getShowDragHovers

      public Boolean getShowDragHovers()
      When showViewHovers is true, dictates whether to display hover prompts when an event is being dragged with the mouse.

      The content of the hover is determined by a call to getDragHoverHTML(), which can be overridden to return custom results; by default, it returns the date range of the drag canvas as a string.

      Returns:
      Current showDragHovers value. Default value is false
    • setShowEventCanvasComponents

      public Calendar setShowEventCanvasComponents(boolean showEventCanvasComponents) throws IllegalStateException
      Whether event-canvases should show a custom widget as content, rather than the default header and body HTML.
      Parameters:
      showEventCanvasComponents - New showEventCanvasComponents value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowEventCanvasComponents

      public boolean getShowEventCanvasComponents()
      Whether event-canvases should show a custom widget as content, rather than the default header and body HTML.
      Returns:
      Current showEventCanvasComponents value. Default value is false
      See Also:
    • setShowEventDescriptions

      public Calendar setShowEventDescriptions(boolean showEventDescriptions) throws IllegalStateException
      When rendering the canvas for an event, whether to show the body area, typically containing brief details of the event - by default, its description.

      The default is true - if set to false, the event's header will fill the canvas.

      Parameters:
      showEventDescriptions - New showEventDescriptions value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowEventDescriptions

      public boolean getShowEventDescriptions()
      When rendering the canvas for an event, whether to show the body area, typically containing brief details of the event - by default, its description.

      The default is true - if set to false, the event's header will fill the canvas.

      Returns:
      Current showEventDescriptions value. Default value is true
    • setShowEventHeaders

      public Calendar setShowEventHeaders(boolean showEventHeaders) throws IllegalStateException
      When rendering the canvas for an event, whether to show the header area, typically containing suitable title text - by default, the event's name.

      The default is true - if set to false, the event's body area will fill the canvas.

      Parameters:
      showEventHeaders - New showEventHeaders value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowEventHeaders

      public boolean getShowEventHeaders()
      When rendering the canvas for an event, whether to show the header area, typically containing suitable title text - by default, the event's name.

      The default is true - if set to false, the event's body area will fill the canvas.

      Returns:
      Current showEventHeaders value. Default value is true
    • setShowEventHovers

      public Calendar setShowEventHovers(Boolean showEventHovers)
      When showViewHovers is true, dictates whether to display hover prompts when the mouse moves over an event canvas in a calendarView.

      The content of the hover is determined by a call to getCellHoverHTML(), which can be overridden to return custom results.

      Parameters:
      showEventHovers - New showEventHovers value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
    • getShowEventHovers

      public Boolean getShowEventHovers()
      When showViewHovers is true, dictates whether to display hover prompts when the mouse moves over an event canvas in a calendarView.

      The content of the hover is determined by a call to getCellHoverHTML(), which can be overridden to return custom results.

      Returns:
      Current showEventHovers value. Default value is true
    • setShowHeaderHovers

      public Calendar setShowHeaderHovers(Boolean showHeaderHovers) throws IllegalStateException
      When showViewHovers is true, dictates whether to display hover prompts when the mouse rolls over the header levels in a CalendarView.

      The content of the hover is determined by a call to getHeaderHoverHTML(), which can be overridden to return custom results;

      Parameters:
      showHeaderHovers - New showHeaderHovers value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowHeaderHovers

      public Boolean getShowHeaderHovers()
      When showViewHovers is true, dictates whether to display hover prompts when the mouse rolls over the header levels in a CalendarView.

      The content of the hover is determined by a call to getHeaderHoverHTML(), which can be overridden to return custom results;

      Returns:
      Current showHeaderHovers value. Default value is false
    • setShowIndicators

      public Calendar setShowIndicators(Boolean showIndicators)
      Set to true to render any defined indicators into timeline views.
      Parameters:
      showIndicators - New showIndicators value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getShowIndicators

      public Boolean getShowIndicators()
      Set to true to render any defined indicators into timeline views.
      Returns:
      Current showIndicators value. Default value is null
    • setShowIndicatorsInFront

      public Calendar setShowIndicatorsInFront(boolean showIndicatorsInFront) throws IllegalStateException
      In indicator lines are showing, this attribute affects where in the z-order their canvases will be rendered: either in front of, or behind normal calendar events.
      Parameters:
      showIndicatorsInFront - New showIndicatorsInFront value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowIndicatorsInFront

      public boolean getShowIndicatorsInFront()
      In indicator lines are showing, this attribute affects where in the z-order their canvases will be rendered: either in front of, or behind normal calendar events.
      Returns:
      Current showIndicatorsInFront value. Default value is true
    • setShowLabelColumn

      public Calendar setShowLabelColumn(boolean showLabelColumn) throws IllegalStateException
      When set to false, hides the frozen Label-Column in vertical CalendarViews.

      Always false when showColumnLayouts is true.

      Parameters:
      showLabelColumn - New showLabelColumn value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowLabelColumn

      public boolean getShowLabelColumn()
      When set to false, hides the frozen Label-Column in vertical CalendarViews.

      Always false when showColumnLayouts is true.

      Returns:
      Current showLabelColumn value. Default value is true
    • setShowLaneFieldHovers

      public Calendar setShowLaneFieldHovers(Boolean showLaneFieldHovers)
      When showViewHovers is true, dictates whether to display hover prompts when the mouse moves over the cells in a laneField.

      The content of the hover is determined by a call to getCellHoverHTML(), which can be overridden to return custom results. Note that getCellHoverHTML() is also called when the mouse moves over cells if showCellHovers is true - when called for a laneField, no "date" parameter is passed to that method.

      Parameters:
      showLaneFieldHovers - New showLaneFieldHovers value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
    • getShowLaneFieldHovers

      public Boolean getShowLaneFieldHovers()
      When showViewHovers is true, dictates whether to display hover prompts when the mouse moves over the cells in a laneField.

      The content of the hover is determined by a call to getCellHoverHTML(), which can be overridden to return custom results. Note that getCellHoverHTML() is also called when the mouse moves over cells if showCellHovers is true - when called for a laneField, no "date" parameter is passed to that method.

      Returns:
      Current showLaneFieldHovers value. Default value is false
    • setShowLaneRollOver

      public Calendar setShowLaneRollOver(Boolean showLaneRollOver)
      When set to true, causes Timelines to highlight the Lane under the mouse with the "Over" style.
      Parameters:
      showLaneRollOver - New showLaneRollOver value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getShowLaneRollOver

      public Boolean getShowLaneRollOver()
      When set to true, causes Timelines to highlight the Lane under the mouse with the "Over" style.
      Returns:
      Current showLaneRollOver value. Default value is null
    • setShowMonthButton

      public Calendar setShowMonthButton(Boolean showMonthButton)
      Set to false to prevent the Month button from displaying on Handset devices.
      Parameters:
      showMonthButton - New showMonthButton value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getShowMonthButton

      public Boolean getShowMonthButton()
      Set to false to prevent the Month button from displaying on Handset devices.
      Returns:
      Current showMonthButton value. Default value is null
    • setShowMonthView

      public Calendar setShowMonthView(Boolean showMonthView) throws IllegalStateException
      Whether to show the Month view.
      Parameters:
      showMonthView - New showMonthView value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowMonthView

      public Boolean getShowMonthView()
      Whether to show the Month view.
      Returns:
      Current showMonthView value. Default value is true
      See Also:
    • setShowNextButton

      public Calendar setShowNextButton(Boolean showNextButton)
      Set to false to hide the Next button.
      Parameters:
      showNextButton - New showNextButton value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getShowNextButton

      public Boolean getShowNextButton()
      Set to false to hide the Next button.
      Returns:
      Current showNextButton value. Default value is null
    • setShowOtherDays

      public Calendar setShowOtherDays(Boolean showOtherDays) throws IllegalStateException
      If set to true, in the month view, days that fall in an adjacent month are still shown with a header and body area, and are interactive. Otherwise days from other months are rendered in the otherDayBlankStyle and are non-interactive.
      Parameters:
      showOtherDays - New showOtherDays value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowOtherDays

      public Boolean getShowOtherDays()
      If set to true, in the month view, days that fall in an adjacent month are still shown with a header and body area, and are interactive. Otherwise days from other months are rendered in the otherDayBlankStyle and are non-interactive.
      Returns:
      Current showOtherDays value. Default value is true
      See Also:
    • setShowPreviousButton

      public Calendar setShowPreviousButton(Boolean showPreviousButton)
      Set to false to hide the Previous button.
      Parameters:
      showPreviousButton - New showPreviousButton value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getShowPreviousButton

      public Boolean getShowPreviousButton()
      Set to false to hide the Previous button.
      Returns:
      Current showPreviousButton value. Default value is null
    • setShowQuickEventDialog

      public Calendar setShowQuickEventDialog(Boolean showQuickEventDialog) throws IllegalStateException
      Determines whether the quick event dialog is displayed when a time is clicked. If this is false, the full event editor is displayed.
      Parameters:
      showQuickEventDialog - New showQuickEventDialog value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowQuickEventDialog

      public Boolean getShowQuickEventDialog()
      Determines whether the quick event dialog is displayed when a time is clicked. If this is false, the full event editor is displayed.
      Returns:
      Current showQuickEventDialog value. Default value is true
      See Also:
    • setShowTimelineView

      public Calendar setShowTimelineView(Boolean showTimelineView)
      If set to true, show the Timeline view.
      Parameters:
      showTimelineView - New showTimelineView value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
    • getShowTimelineView

      public Boolean getShowTimelineView()
      If set to true, show the Timeline view.
      Returns:
      Current showTimelineView value. Default value is false
    • setShowViewHovers

      public Calendar setShowViewHovers(Boolean showViewHovers)
      When set to true, the default value, causes the Calendar to show customizable hovers when the mouse moves over various areas of a CalendarView.

      See showEventHovers, showZoneHovers, showHeaderHovers, showCellHovers, showLaneFieldHovers, showDragHovers for further configuration options.

      If this method is called after the component has been drawn/initialized: Switches the various levels of hovers on or off at runtime.

      Parameters:
      showViewHovers - whether to allow CalendarViews to show hovers. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
    • getShowViewHovers

      public Boolean getShowViewHovers()
      When set to true, the default value, causes the Calendar to show customizable hovers when the mouse moves over various areas of a CalendarView.

      See showEventHovers, showZoneHovers, showHeaderHovers, showCellHovers, showLaneFieldHovers, showDragHovers for further configuration options.

      Returns:
      Current showViewHovers value. Default value is true
    • setShowWeekends

      public Calendar setShowWeekends(Boolean showWeekends)
      Suppresses the display of weekend days in the week, month and timeline views, and disallows the creation of events on weekends. Which days are considered weekends is controlled by weekendDays.

      If this method is called after the component has been drawn/initialized: Setter for updating showWeekends at runtime.
      Parameters:
      showWeekends - whether or not to show weekends. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getShowWeekends

      public Boolean getShowWeekends()
      Suppresses the display of weekend days in the week, month and timeline views, and disallows the creation of events on weekends. Which days are considered weekends is controlled by weekendDays.
      Returns:
      Current showWeekends value. Default value is true
      See Also:
    • setShowWeekView

      public Calendar setShowWeekView(Boolean showWeekView) throws IllegalStateException
      Whether to show the Week view.
      Parameters:
      showWeekView - New showWeekView value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowWeekView

      public Boolean getShowWeekView()
      Whether to show the Week view.
      Returns:
      Current showWeekView value. Default value is true
      See Also:
    • setShowWorkday

      public Calendar setShowWorkday(Boolean showWorkday)
      When set to true, this setting enables various features related to cells that fall within the workday (as defined by workdayStart and workdayEnd) in vertical calendar views (day and week). Workday cells can be styled separately and sized automatically, and users can be prevented from scrolling the calendar beyond the workday hours.

      The hours of the workday can be customized for particular dates by providing implementations of getWorkdayStart() and getWorkdayEnd().

      Parameters:
      showWorkday - New showWorkday value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getShowWorkday

      public Boolean getShowWorkday()
      When set to true, this setting enables various features related to cells that fall within the workday (as defined by workdayStart and workdayEnd) in vertical calendar views (day and week). Workday cells can be styled separately and sized automatically, and users can be prevented from scrolling the calendar beyond the workday hours.

      The hours of the workday can be customized for particular dates by providing implementations of getWorkdayStart() and getWorkdayEnd().

      Returns:
      Current showWorkday value. Default value is false
      See Also:
    • setShowZoneHovers

      public Calendar setShowZoneHovers(Boolean showZoneHovers)
      When showViewHovers is true, dictates whether to display hover prompts when the mouse moves over a zone in a calendarView.

      When showCellHovers is true, this attribute is ignored and zone hovers are not displayed.

      The content of the hover is determined by a call to getZoneHoverHTML(), which can be overridden to return custom results.

      Parameters:
      showZoneHovers - New showZoneHovers value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
    • getShowZoneHovers

      public Boolean getShowZoneHovers()
      When showViewHovers is true, dictates whether to display hover prompts when the mouse moves over a zone in a calendarView.

      When showCellHovers is true, this attribute is ignored and zone hovers are not displayed.

      The content of the hover is determined by a call to getZoneHoverHTML(), which can be overridden to return custom results.

      Returns:
      Current showZoneHovers value. Default value is true
    • setShowZones

      public Calendar setShowZones(Boolean showZones)
      Set to true to render any defined zones into timeline views.
      Parameters:
      showZones - New showZones value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getShowZones

      public Boolean getShowZones()
      Set to true to render any defined zones into timeline views.
      Returns:
      Current showZones value. Default value is null
    • setSizeEventsToGrid

      public Calendar setSizeEventsToGrid(Boolean sizeEventsToGrid) throws IllegalStateException
      If true, events will be sized to the grid, even if they start and/or end at times between grid cells.
      Parameters:
      sizeEventsToGrid - New sizeEventsToGrid value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSizeEventsToGrid

      public Boolean getSizeEventsToGrid()
      If true, events will be sized to the grid, even if they start and/or end at times between grid cells.
      Returns:
      Current sizeEventsToGrid value. Default value is true
    • setSizeToWorkday

      public Calendar setSizeToWorkday(Boolean sizeToWorkday)
      When showWorkday is true, attempt to resize rows in the day and week views so that the workday hours fill the visible viewport-height, and the whole workday is visible without scrolling. If the Calendar is resized, the row-size is recalculated to keep the workday hours visible.

      Note that row-heights will not shrink below the minRowHeight, so the entire workday may not be visible without scrolling if the workday is long or the viewport-height is insufficient.

      Parameters:
      sizeToWorkday - New sizeToWorkday value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getSizeToWorkday

      public Boolean getSizeToWorkday()
      When showWorkday is true, attempt to resize rows in the day and week views so that the workday hours fill the visible viewport-height, and the whole workday is visible without scrolling. If the Calendar is resized, the row-size is recalculated to keep the workday hours visible.

      Note that row-heights will not shrink below the minRowHeight, so the entire workday may not be visible without scrolling if the workday is long or the viewport-height is insufficient.

      Returns:
      Current sizeToWorkday value. Default value is false
      See Also:
    • setStartDate

      public Calendar setStartDate(Date startDate) throws IllegalStateException
      The start date of the calendar timeline view. Has no effect in other views. If not specified, defaults to a timeline starting from the beginning of the current timelineGranularity and spanning a default of 20 columns of that granularity.

      To set different start and end dates after initial draw, see setTimelineRange.

      Note that the value you provide may be automatically altered if showing header-levels, to fit to header boundaries.

      Parameters:
      startDate - New startDate value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getStartDate

      public Date getStartDate()
      The start date of the calendar timeline view. Has no effect in other views. If not specified, defaults to a timeline starting from the beginning of the current timelineGranularity and spanning a default of 20 columns of that granularity.

      To set different start and end dates after initial draw, see setTimelineRange.

      Note that the value you provide may be automatically altered if showing header-levels, to fit to header boundaries.

      Returns:
      Current startDate value. Default value is null
    • setStartDateField

      public Calendar setStartDateField(String startDateField) throws IllegalStateException
      The name of the start date field on a CalendarEvent.
      Parameters:
      startDateField - New startDateField value. Default value is "startDate"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getStartDateField

      public String getStartDateField()
      The name of the start date field on a CalendarEvent.
      Returns:
      Current startDateField value. Default value is "startDate"
      See Also:
    • setStyleWorkday

      public Calendar setStyleWorkday(Boolean styleWorkday)
      When showWorkday is true, applies the workdayBaseStyle to cells that fall within the workday (as defined by workdayStart and workdayEnd), in both the dayView and weekView.

      The hours of the workday can be customized for particular dates by providing implementations of getWorkdayStart() and getWorkdayEnd().

      Parameters:
      styleWorkday - New styleWorkday value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getStyleWorkday

      public Boolean getStyleWorkday()
      When showWorkday is true, applies the workdayBaseStyle to cells that fall within the workday (as defined by workdayStart and workdayEnd), in both the dayView and weekView.

      The hours of the workday can be customized for particular dates by providing implementations of getWorkdayStart() and getWorkdayEnd().

      Returns:
      Current styleWorkday value. Default value is true
      See Also:
    • setSublaneNameField

      public Calendar setSublaneNameField(String sublaneNameField) throws IllegalStateException
      The name of the field which will determine the sublane in which this event will be displayed, within its parent Lane, in Timelines and in the day view, if showDayLanes is true.
      Parameters:
      sublaneNameField - New sublaneNameField value. Default value is "sublane"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getSublaneNameField

      public String getSublaneNameField()
      The name of the field which will determine the sublane in which this event will be displayed, within its parent Lane, in Timelines and in the day view, if showDayLanes is true.
      Returns:
      Current sublaneNameField value. Default value is "sublane"
    • setTimelineGranularity

      public Calendar setTimelineGranularity(TimeUnit timelineGranularity) throws IllegalStateException
      The granularity in which the timelineView will display events. Possible values are those available in the built-in TimeUnit type.
      Parameters:
      timelineGranularity - New timelineGranularity value. Default value is "day"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTimelineGranularity

      public TimeUnit getTimelineGranularity()
      The granularity in which the timelineView will display events. Possible values are those available in the built-in TimeUnit type.
      Returns:
      Current timelineGranularity value. Default value is "day"
    • setTimelineUnitsPerColumn

      public Calendar setTimelineUnitsPerColumn(int timelineUnitsPerColumn) throws IllegalStateException
      How many units of timelineGranularity each cell represents.
      Parameters:
      timelineUnitsPerColumn - New timelineUnitsPerColumn value. Default value is 1
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTimelineUnitsPerColumn

      public int getTimelineUnitsPerColumn()
      How many units of timelineGranularity each cell represents.
      Returns:
      Current timelineUnitsPerColumn value. Default value is 1
    • getTimelineView

      public CalendarView getTimelineView() throws IllegalStateException
      CalendarView used to display events in lanes in a horizontal Timeline view.

      This component is an AutoChild named "timelineView". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current timelineView value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setTimelineViewTitle

      public Calendar setTimelineViewTitle(String timelineViewTitle) throws IllegalStateException
      The title for the timeline view.
      Parameters:
      timelineViewTitle - New timelineViewTitle value. Default value is "Timeline"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTimelineViewTitle

      public String getTimelineViewTitle()
      The title for the timeline view.
      Returns:
      Current timelineViewTitle value. Default value is "Timeline"
    • setTodayBackgroundColor

      public Calendar setTodayBackgroundColor(String todayBackgroundColor) throws IllegalStateException
      The background color for cells that represent today in all CalendarViews.
      Parameters:
      todayBackgroundColor - New todayBackgroundColor value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTodayBackgroundColor

      public String getTodayBackgroundColor()
      The background color for cells that represent today in all CalendarViews.
      Returns:
      Current todayBackgroundColor value. Default value is null
    • setTrailingDateField

      public Calendar setTrailingDateField(String trailingDateField) throws IllegalStateException
      The name of the trailing date field for each event. When this attribute and leadingDateField are present in the data, a line extends out from the event showing the extent of the leading and trailing dates - useful for visualizing a pipeline of events where some can be moved a certain amount without affecting others.
      Parameters:
      trailingDateField - New trailingDateField value. Default value is "trailingDate"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getTrailingDateField

      public String getTrailingDateField()
      The name of the trailing date field for each event. When this attribute and leadingDateField are present in the data, a line extends out from the event showing the extent of the leading and trailing dates - useful for visualizing a pipeline of events where some can be moved a certain amount without affecting others.
      Returns:
      Current trailingDateField value. Default value is "trailingDate"
      See Also:
    • setTwentyFourHourTime

      public Calendar setTwentyFourHourTime(Boolean twentyFourHourTime) throws IllegalStateException
      Dictates whether times throughout the widget are formatted and edited as 24-hour values. If unset, defaults to the String. If set, and no local formatter is installed, causes the Calendar to choose an appropriate builtin formatter.
      Parameters:
      twentyFourHourTime - New twentyFourHourTime value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getTwentyFourHourTime

      public Boolean getTwentyFourHourTime()
      Dictates whether times throughout the widget are formatted and edited as 24-hour values. If unset, defaults to the String. If set, and no local formatter is installed, causes the Calendar to choose an appropriate builtin formatter.
      Returns:
      Current twentyFourHourTime value. Default value is null
    • setUseEventCanvasRolloverControls

      public Calendar setUseEventCanvasRolloverControls(boolean useEventCanvasRolloverControls) throws IllegalStateException
      By default, the close buttons and the horizontal and vertical resizer widgets for event canvases are shown only when the mouse is over a given event. Set this attribute to false to have event canvases show these widgets permanently.
      Parameters:
      useEventCanvasRolloverControls - New useEventCanvasRolloverControls value. Default value is true
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseEventCanvasRolloverControls

      public boolean getUseEventCanvasRolloverControls()
      By default, the close buttons and the horizontal and vertical resizer widgets for event canvases are shown only when the mouse is over a given event. Set this attribute to false to have event canvases show these widgets permanently.
      Returns:
      Current useEventCanvasRolloverControls value. Default value is true
    • setUseSublanes

      public Calendar setUseSublanes(Boolean useSublanes) throws IllegalStateException
      When set to true, causes lanes to be sub-divided according to their set of sublanes.
      Parameters:
      useSublanes - New useSublanes value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseSublanes

      public Boolean getUseSublanes()
      When set to true, causes lanes to be sub-divided according to their set of sublanes.
      Returns:
      Current useSublanes value. Default value is null
    • setWeekendDays

      public Calendar setWeekendDays(int... weekendDays)
      An array of integer day-numbers that should be considered to be weekend days by this Calendar instance. If unset, defaults to the set of days indicated globally.
      Parameters:
      weekendDays - New weekendDays value. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getWeekendDays

      public int[] getWeekendDays()
      An array of integer day-numbers that should be considered to be weekend days by this Calendar instance. If unset, defaults to the set of days indicated globally.
      Returns:
      Current weekendDays value. Default value is null
      See Also:
    • setWeekEventBorderOverlap

      public Calendar setWeekEventBorderOverlap(Boolean weekEventBorderOverlap) throws IllegalStateException
      Augments the width of week event windows slightly to avoid duplicate adjacent borders between events.
      Parameters:
      weekEventBorderOverlap - New weekEventBorderOverlap value. Default value is false
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getWeekEventBorderOverlap

      public Boolean getWeekEventBorderOverlap()
      Augments the width of week event windows slightly to avoid duplicate adjacent borders between events.
      Returns:
      Current weekEventBorderOverlap value. Default value is false
      See Also:
    • setWeekPrefix

      public Calendar setWeekPrefix(String weekPrefix) throws IllegalStateException
      The text to appear before the week number in the title of week-based HeaderLevels when this calendar is showing a timeline.
      Parameters:
      weekPrefix - New weekPrefix value. Default value is "Week"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getWeekPrefix

      public String getWeekPrefix()
      The text to appear before the week number in the title of week-based HeaderLevels when this calendar is showing a timeline.
      Returns:
      Current weekPrefix value. Default value is "Week"
      See Also:
    • getWeekView

      public CalendarView getWeekView() throws IllegalStateException
      CalendarView used to display events that pertain to a given week.

      This component is an AutoChild named "weekView". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current weekView value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setWeekViewTitle

      public Calendar setWeekViewTitle(String weekViewTitle) throws IllegalStateException
      The title for the week view.
      Parameters:
      weekViewTitle - New weekViewTitle value. Default value is "Week"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getWeekViewTitle

      public String getWeekViewTitle()
      The title for the week view.
      Returns:
      Current weekViewTitle value. Default value is "Week"
    • setWorkdayBaseStyle

      public Calendar setWorkdayBaseStyle(String workdayBaseStyle) throws IllegalStateException
      If showWorkday is set, this is the style used for cells that are within the workday, as defined by workdayStart and workdayEnd, or by a date-specific range provided in getWorkdayStart() and getWorkdayEnd() implementations.
      Parameters:
      workdayBaseStyle - New workdayBaseStyle value. Default value is "calendarWorkday"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getWorkdayBaseStyle

      public String getWorkdayBaseStyle()
      If showWorkday is set, this is the style used for cells that are within the workday, as defined by workdayStart and workdayEnd, or by a date-specific range provided in getWorkdayStart() and getWorkdayEnd() implementations.
      Returns:
      Current workdayBaseStyle value. Default value is "calendarWorkday"
      See Also:
    • setWorkdayEnd

      public Calendar setWorkdayEnd(String workdayEnd) throws IllegalStateException
      When using showWorkday:true, workdayStart and workdayEnd specify the time of day when the workday starts and ends, specified as a String acceptable to String.

      Both start and end time must fall on a 30 minute increment (eg 9:30, but not 9:45).

      The hours of the workday can be customized for particular dates by providing implementations of getWorkdayStart() and getWorkdayEnd().

      Parameters:
      workdayEnd - New workdayEnd value. Default value is "5:00pm"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • setWorkdayStart

      public Calendar setWorkdayStart(String workdayStart) throws IllegalStateException
      When using showWorkday:true, workdayStart and workdayEnd specify the time of day when the workday starts and ends, specified as a String acceptable to String.

      Both start and end time must fall on a 30 minute increment (eg 9:30, but not 9:45).

      The hours of the workday can be customized for particular dates by providing implementations of getWorkdayStart() and getWorkdayEnd().

      Parameters:
      workdayStart - New workdayStart value. Default value is "9:00am"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getZoneCanvas

      public ZoneCanvas getZoneCanvas()
      Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. See Using AutoChildren for details.

      AutoChild component created for each zone entry.

      Returns:
      null
    • setZones

      public Calendar setZones(CalendarEvent... zones)
      An array of CalendarEvent instances representing pre-defined periods of time to be highlighted in timeline views. Each zone renders out a zone canvas, a special, non-interactive subclass of EventCanvas, which spans all lanes and draws behind any normal, interactive events in the zorder.

      The default style for these components renders them semi-transparent and with a bottom-aligned title label.

      If this method is called after the component has been drawn/initialized: Sets the zones used to highlight areas of this calendar.

      Parameters:
      zones - array of zones to display. Default value is null
      Returns:
      Calendar instance, for chaining setter calls
    • getZones

      public CalendarEvent[] getZones()
      An array of CalendarEvent instances representing pre-defined periods of time to be highlighted in timeline views. Each zone renders out a zone canvas, a special, non-interactive subclass of EventCanvas, which spans all lanes and draws behind any normal, interactive events in the zorder.

      The default style for these components renders them semi-transparent and with a bottom-aligned title label.

      Returns:
      Current zones value. Default value is null
    • setZoneStyleName

      public Calendar setZoneStyleName(String zoneStyleName)
      CSS style to apply to the canvases created for each specified zone.
      Parameters:
      zoneStyleName - New zoneStyleName value. Default value is "zoneCanvas"
      Returns:
      Calendar instance, for chaining setter calls
      See Also:
    • getZoneStyleName

      public String getZoneStyleName()
      CSS style to apply to the canvases created for each specified zone.
      Returns:
      Current zoneStyleName value. Default value is "zoneCanvas"
      See Also:
    • setZoneTitleOrientation

      public Calendar setZoneTitleOrientation(VerticalAlignment zoneTitleOrientation) throws IllegalStateException
      The vertical alignment of the header-text in each zone.
      Parameters:
      zoneTitleOrientation - New zoneTitleOrientation value. Default value is "bottom"
      Returns:
      Calendar instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getZoneTitleOrientation

      public VerticalAlignment getZoneTitleOrientation()
      The vertical alignment of the header-text in each zone.
      Returns:
      Current zoneTitleOrientation value. Default value is "bottom"
    • addCalendarEvent

      public void addCalendarEvent(CalendarEvent event)
      Create a new event in this calendar.

      In all cases, the event passed as the first parameter must have at least a start date set. If the calendar is showing lanes, the name of the lane and, if applicable, the sublane, must also be set.

      To deal with errors during saving, see Calendar.eventSaveError().

      Parameters:
      event - the new calendar event to add
    • addCalendarEvent

      public void addCalendarEvent(CalendarEvent event, Map customValues)
      Create a new event in this calendar.

      In all cases, the event passed as the first parameter must have at least a start date set. If the calendar is showing lanes, the name of the lane and, if applicable, the sublane, must also be set.

      To deal with errors during saving, see Calendar.eventSaveError().

      Parameters:
      event - the new calendar event to add
      customValues - additional, custom values to be saved with the event
    • addIndicator

      public void addIndicator(CalendarEvent indicator)
      Adds a new indicator to the calendar.
      Parameters:
      indicator - a new indicator to add to the calendar
    • addLane

      public void addLane(Lane lane)
      Adds a new Lane to the calendar, for display in the timeline view, and in the day view if showDayLanes is true.
      Parameters:
      lane - a new Lane object to add to the calendar
    • addLaneEvent

      public void addLaneEvent(Lane laneName, Date startDate)
      Deprecated.
      in favor of addCalendarEvent()
      For Timelines, and for dayView with showDayLanes set, creates a new event and adds it to a particular Lane.
      Parameters:
      laneName - the Lane in which to add this event
      startDate - start date of event, or CalendarEvent Object
    • addLaneEvent

      public void addLaneEvent(Lane laneName, Date startDate, Date endDate)
      See Also:
    • addLaneEvent

      public void addLaneEvent(Lane laneName, Date startDate, Date endDate, String name)
      See Also:
    • addLaneEvent

      public void addLaneEvent(Lane laneName, Date startDate, Date endDate, String name, String description)
      See Also:
    • addLaneEvent

      public void addLaneEvent(Lane laneName, Date startDate, Date endDate, String name, String description, Object otherFields)
      Deprecated.
      in favor of addCalendarEvent()
      For Timelines, and for dayView with showDayLanes set, creates a new event and adds it to a particular Lane.
      Parameters:
      laneName - the Lane in which to add this event
      startDate - start date of event, or CalendarEvent Object
      endDate - end date of event
      name - name of event
      description - description of event
      otherFields - new values of additional fields to be updated
    • addZone

      public void addZone(CalendarEvent zone)
      Adds a new zone to the calendar.
      Parameters:
      zone - a new zone to add to the calendar
    • addBackgroundClickHandler

      public HandlerRegistration addBackgroundClickHandler(BackgroundClickHandler handler)
      Add a backgroundClick handler.

      Callback fired when the mouse is clicked in a background-cell, ie, one without an event.

      Specified by:
      addBackgroundClickHandler in interface HasBackgroundClickHandlers
      Parameters:
      handler - the backgroundClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addBackgroundMouseDownHandler

      public HandlerRegistration addBackgroundMouseDownHandler(BackgroundMouseDownHandler handler)
      Add a backgroundMouseDown handler.

      Callback fired when the mouse button is depressed over a background-cell, ie, one without an event. Call BackgroundMouseDownEvent.cancel() from within BackgroundMouseDownHandler.onBackgroundMouseDown(com.smartgwt.client.widgets.calendar.events.BackgroundMouseDownEvent) to cancel the default behavior of allowing sweep selection via dragging.

      Specified by:
      addBackgroundMouseDownHandler in interface HasBackgroundMouseDownHandlers
      Parameters:
      handler - the backgroundMouseDown handler
      Returns:
      HandlerRegistration used to remove this handler
    • addBackgroundMouseUpHandler

      public HandlerRegistration addBackgroundMouseUpHandler(BackgroundMouseUpHandler handler)
      Add a backgroundMouseUp handler.

      Notification method fired when the mouse button is released over a background-cell, ie, one without an event. Call BackgroundMouseUpEvent.cancel() from within BackgroundMouseUpHandler.onBackgroundMouseUp(com.smartgwt.client.widgets.calendar.events.BackgroundMouseUpEvent) to cancel the default behavior of showing a dialog to add a new event with the passed dates.

      Specified by:
      addBackgroundMouseUpHandler in interface HasBackgroundMouseUpHandlers
      Parameters:
      handler - the backgroundMouseUp handler
      Returns:
      HandlerRegistration used to remove this handler
    • cancelEditing

      public void cancelEditing()
      Cancels the current edit-session, closing the builtin event dialog or editor and clearing any visible edit-selection from the current CalendarView.
    • createEventCanvasComponent

      public Canvas createEventCanvasComponent(EventCanvas canvas)
      Called from EventCanvas.setEvent() when showEventCanvasComponents is true and an eventCanvas needs a component. The method is expected to create and return a single component to apply as a space-filling member of the passed EventCanvas in the view in which it appears.

      By default, this method returns a DetailViewer showing values from the associated event, according to the fields in the Calendar's dataSource, or the default event-fields if no dataSource is present.

      However, the component can be any canvas-based widget, including a Layout containing an arrangement of other widgets. When applied as a member of an eventCanvas, the component fills its container and limits its own content to that size, showing scrollbars as appropriate.

      See updateEventCanvasComponent() for details on updating components that have already been created and applied.

      Parameters:
      canvas - the eventCanvas to get the component for
      Returns:
      any Canvas
      See Also:
    • addCurrentViewChangedHandler

      public HandlerRegistration addCurrentViewChangedHandler(CurrentViewChangedHandler handler)
      Add a currentViewChanged handler.

      Notification that fires whenever the current view changes via the mainView tabset.

      Specified by:
      addCurrentViewChangedHandler in interface HasCurrentViewChangedHandlers
      Parameters:
      handler - the currentViewChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDateChangedHandler

      public HandlerRegistration addDateChangedHandler(DateChangedHandler handler)
      Add a dateChanged handler.

      Fires whenever the user changes the current date, including picking a specific date or navigating to a new week or month.

      Specified by:
      addDateChangedHandler in interface HasDateChangedHandlers
      Parameters:
      handler - the dateChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDayBodyClickHandler

      public HandlerRegistration addDayBodyClickHandler(DayBodyClickHandler handler)
      Add a dayBodyClick handler.

      Called when the body area of a day in the month view is clicked on, outside of any links to a particular event.

      By default, if the user can add events, shows a dialog for adding a new event for that day. Call DayBodyClickEvent.cancel() from within DayBodyClickHandler.onDayBodyClick(com.smartgwt.client.widgets.calendar.events.DayBodyClickEvent) to cancel this action.

      Note that, when Calendar.otherDayClickNavigation is true, the calendar will first navigate the Month view to the selected month, before showing the Event Editor dialog at the proper location.

      Not called if the day falls outside the current month and Calendar.showOtherDays is false.

      Specified by:
      addDayBodyClickHandler in interface HasDayBodyClickHandlers
      Parameters:
      handler - the dayBodyClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDayHeaderClickHandler

      public HandlerRegistration addDayHeaderClickHandler(DayHeaderClickHandler handler)
      Add a dayHeaderClick handler.

      Called when the header area of a day in the month view is clicked on.

      By default, moves to the day tab and shows the clicked days events. Call DayHeaderClickEvent.cancel() from within DayHeaderClickHandler.onDayHeaderClick(com.smartgwt.client.widgets.calendar.events.DayHeaderClickEvent) to cancel this action.

      Not called if the day falls outside the current month and Calendar.showOtherDays is false.

      Specified by:
      addDayHeaderClickHandler in interface HasDayHeaderClickHandlers
      Parameters:
      handler - the dayHeaderClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • deselectEvent

      public Boolean deselectEvent(CalendarEvent event)
      Removes an event from the list of selected events in the current view, clearing its selected style.
      Parameters:
      event - the event to deselect
      Returns:
      true if the selection was changed, false otherwise
    • deselectEvents

      public Boolean deselectEvents(CalendarEvent... events)
      Removes one or more events from the list of selected events in the current view, clearing their selected styles.
      Parameters:
      events - the events to deselect
      Returns:
      true if the selection was changed, false otherwise
    • addEventAddedHandler

      public HandlerRegistration addEventAddedHandler(EventAddedHandler handler)
      Add a eventAdded handler.

      Notification fired whenever a user adds an event.

      In a calendar with a DataSource, eventAdded() fires after the event has been successfully added at the server

      Specified by:
      addEventAddedHandler in interface HasEventAddedHandlers
      Parameters:
      handler - the eventAdded handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEventChangedHandler

      public HandlerRegistration addEventChangedHandler(EventChangedHandler handler)
      Add a eventChanged handler.

      Notification fired whenever a user changes an event, whether by dragging the event or by editing it in a dialog.

      In a calendar with a DataSource, eventChanged() fires after the updated event has been successfully saved to the server

      Specified by:
      addEventChangedHandler in interface HasEventChangedHandlers
      Parameters:
      handler - the eventChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEventClickHandler

      public HandlerRegistration addEventClickHandler(EventClickHandler handler)
      Add a eventClick handler.

      Called whenever an event is clicked on in the day, week or month views.

      By default, a dialog appears showing details for the event, and offering the ability to edit events that can be edited. Call CalendarEventClick.cancel() from within EventClickHandler.onEventClick(com.smartgwt.client.widgets.calendar.events.CalendarEventClick) to cancel the default action. This is a good place to, for example, show a completely customized event dialog instead of the default one.

      Specified by:
      addEventClickHandler in interface HasEventClickHandlers
      Parameters:
      handler - the eventClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • eventMoved

      public boolean eventMoved(Date newDate, CalendarEvent event, String newLane)
      Deprecated.
      Called when an event is moved via dragging by a user. Return false to disallow the move.
      Parameters:
      newDate - new start date and time that the event is being moved to
      event - the event as it will be after this movement
      newLane - the name of the lane into which the event was moved
      Returns:
      return false to disallow the move.
    • addEventRemoveClickHandler

      public HandlerRegistration addEventRemoveClickHandler(EventRemoveClickHandler handler)
      Add a eventRemoveClick handler.

      Called whenever the close icon of an event canvas is clicked in the day, week and timeline views, or when the remove button is pressed in the event editor.

      Implement this method to intercept the automatic removal of data. You can Call CalendarEventRemoveClick.cancel() from within EventRemoveClickHandler.onEventRemoveClick(com.smartgwt.client.widgets.calendar.events.CalendarEventRemoveClick) to prevent the default action (calling removeEvent()) and instead take action of your own. For example, returning false from this method and then showing a custom confirmation dialog - if the user cancels, do nothing, otherwise make a call to removeEvent(event), passing the event.

      Specified by:
      addEventRemoveClickHandler in interface HasEventRemoveClickHandlers
      Parameters:
      handler - the eventRemoveClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEventRemovedHandler

      public HandlerRegistration addEventRemovedHandler(EventRemovedHandler handler)
      Add a eventRemoved handler.

      Notification fired whenever a user removes an event.

      In a calendar with a DataSource, eventRemoved() fires after the event has been successfully removed from the server

      Specified by:
      addEventRemovedHandler in interface HasEventRemovedHandlers
      Parameters:
      handler - the eventRemoved handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEventRepositionMoveHandler

      public HandlerRegistration addEventRepositionMoveHandler(EventRepositionMoveHandler handler)
      Add a eventRepositionMove handler.

      Notification called whenever the drop position of an event being drag-moved changes.

      The newEvent parameter represents the event as it will be after the move, including start and end dates and lane and sublane where applicable.

      Call EventRepositionMove.cancel() from within EventRepositionMoveHandler.onEventRepositionMove(com.smartgwt.client.widgets.calendar.events.EventRepositionMove) to prevent the default action, of positioning the drag canvas to the newEvent.

      Specified by:
      addEventRepositionMoveHandler in interface HasEventRepositionMoveHandlers
      Parameters:
      handler - the eventRepositionMove handler
      Returns:
      HandlerRegistration used to remove this handler
    • eventRepositionStart

      public Boolean eventRepositionStart(CalendarEvent event)
      Notification fired when a user drags an EventCanvas. Return false to cancel the drag.
      Parameters:
      event - the event that's about to be moved
      Returns:
      return false to cancel the default drag start behavior
    • addEventRepositionStopHandler

      public HandlerRegistration addEventRepositionStopHandler(EventRepositionStopHandler handler)
      Add a eventRepositionStop handler.

      Notification called when an event being drag-moved is dropped.

      The newEvent parameter represents the event as it will be after the move, including start and end dates and lane and sublane where applicable.

      Call EventRepositionStop.cancel() from within EventRepositionStopHandler.onEventRepositionStop(com.smartgwt.client.widgets.calendar.events.EventRepositionStop) to prevent the default action, of actually updating the event.

      Specified by:
      addEventRepositionStopHandler in interface HasEventRepositionStopHandlers
      Parameters:
      handler - the eventRepositionStop handler
      Returns:
      HandlerRegistration used to remove this handler
    • eventResized

      public boolean eventResized(Date newDate, CalendarEvent event)
      Deprecated.
      Called when an event is resized with the mouse. The passed date value is the new *end* date for the event, since resizing can only be performed on the bottom edge of an event in normal calendar views.
      Parameters:
      newDate - new end date and time that event is being resized to
      event - the event as it will be after this resize
      Returns:
      return false to disallow the resize
    • addEventResizeMoveHandler

      public HandlerRegistration addEventResizeMoveHandler(EventResizeMoveHandler handler)
      Add a eventResizeMove handler.

      Notification called on each resize during an event drag-resize operation.

      The newEvent parameter represents the event as it will be after the resize.

      Call EventResizeMove.cancel() from within EventResizeMoveHandler.onEventResizeMove(com.smartgwt.client.widgets.calendar.events.EventResizeMove) to prevent the default action, of resizing the drag canvas to the newEvent.

      Specified by:
      addEventResizeMoveHandler in interface HasEventResizeMoveHandlers
      Parameters:
      handler - the eventResizeMove handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEventResizeStopHandler

      public HandlerRegistration addEventResizeStopHandler(EventResizeStopHandler handler)
      Add a eventResizeStop handler.

      Notification called when an event drag-resize operation completes.

      The newEvent parameter represents the event as it will be after the move.

      Call EventResizeStop.cancel() from within EventResizeStopHandler.onEventResizeStop(com.smartgwt.client.widgets.calendar.events.EventResizeStop) to prevent the default action, of actually updating the event.

      Specified by:
      addEventResizeStopHandler in interface HasEventResizeStopHandlers
      Parameters:
      handler - the eventResizeStop handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEventSaveErrorHandler

      public HandlerRegistration addEventSaveErrorHandler(EventSaveErrorHandler handler)
      Add a eventSaveError handler.

      Notification method fired when an attempt to save an event following edits or drag-movements results in an error from the server. May be overridden to handle specific errors and provide feedback to the user or push a server-provided record to client caches with a call to updateCaches(), for example.

      The scenarioCode parameter may be used to determine how the save was initiated.

      Return false from this method to cancel builtin behavior, which is as follows:

      If a save happened because an event-canvas was moved or sized with the mouse, and any kind of error occurs, the event is restored to it's pre-save position - if this method specifically returns true, the errors are also sent to central error handling, which will show them to the user in a simple error dialog.

      If a save happened because an event was edited in the Calendar.eventDialog or Calendar.eventEditor windows and a validation error occurs, the window is re-opened for editing with the validation errors visible. If any other kind of error occurs, the window will not be re-opened and, if this method specifically returns true, the error will be sent to central error handling which will show a simple error dialog to the end user.

      In all cases, if the server returned an updated record despite the save failing (eg, perhaps the server enforces optimistic locking and the underlying record has been changed by another user), it is assumed to be a latest-version of the record and is applied instead of the original record during those builtin UI processes. So, the Calendar.eventEditor and Calendar.eventDialog will show any changes from the latest-record. If the save was caused by dragging an event and the event's start or end dates are different in the latest-record, the EventCanvas will be positioned using the latest values, instead of returning to it's pre-save position on-screen.

      Specified by:
      addEventSaveErrorHandler in interface HasEventSaveErrorHandlers
      Parameters:
      handler - the eventSaveError handler
      Returns:
      HandlerRegistration used to remove this handler
    • addEventsRenderedHandler

      public HandlerRegistration addEventsRenderedHandler(EventsRenderedHandler handler)
      Add a eventsRendered handler.

      A notification method fired when the events in the current view have been refreshed.

      Specified by:
      addEventsRenderedHandler in interface HasEventsRenderedHandlers
      Parameters:
      handler - the eventsRendered handler
      Returns:
      HandlerRegistration used to remove this handler
    • getActiveDay

      public Integer getActiveDay()
      Gets the day of the week (0-6) that the mouse is currently over.
      Returns:
      the day that the mouse is currently over
      See Also:
    • getActiveTime

      public Date getActiveTime()
      Gets a date object representing the date over which the mouse is hovering for the current selected view. For month view, the time will be set to midnight of the active day. For day and week views, the time will be the rounded to the closest half hour relative to the mouse position.
      Returns:
      the date that the mouse is over
    • getCellDate

      public Date getCellDate()
      Return the Date instance associated with the passed co-ordinates in the passed or selected view. If the cell at the passed co-ordinates is not a date-cell, returns null. If rowNum and colNum are both unset, returns the date from the cell under the mouse.

      To determine the date at a more specific point within a cell, see getDateFromPoint().

      Returns:
      the date, if any, associated with the passed co-ords in the appropriate view
    • getCellDate

      public Date getCellDate(Integer rowNum)
      See Also:
    • getCellDate

      public Date getCellDate(Integer rowNum, Integer colNum)
      See Also:
    • getCellDate

      public Date getCellDate(Integer rowNum, Integer colNum, CalendarView view)
      Return the Date instance associated with the passed co-ordinates in the passed or selected view. If the cell at the passed co-ordinates is not a date-cell, returns null. If rowNum and colNum are both unset, returns the date from the cell under the mouse.

      To determine the date at a more specific point within a cell, see getDateFromPoint().

      Parameters:
      rowNum - the row number to get the date for
      colNum - the column number to get the date for
      view - the view to use - uses the selected view if not passed
      Returns:
      the date, if any, associated with the passed co-ords in the appropriate view
    • getCellHoverHTML

      public String getCellHoverHTML(CalendarView view, Record record, Integer rowNum, Integer colNum, Date date, String defaultValue)
      Returns the hover HTML for the cell at the passed co-ordinates in the passed view. By default, the hover text is the snap date closest to the mouse, if the cell being hovered is a normal date cell - otherwise, it is the title of the laneField being hovered over.

      Override here to return custom HTML for the passed cell.

      Parameters:
      view - the CalendarView the mouse is hovered over
      record - The record containing the cell being hovered
      rowNum - The rowNum of the cell being hovered
      colNum - the colNum of the cell being hovered
      date - the snap-date at the mouse, which may be different from the result of a call to getCellDate
      defaultValue - the default hover text for the passed values
      Returns:
      the HTML to show in the hover. See HTMLString
    • getDateCellAlign

      public String getDateCellAlign(Date date, Integer rowNum, Integer colNum, CalendarView view)
      When getDateHTML returns a value, this method returns the horizontal alignment for that value in its cell, in the passed view.
      Parameters:
      date - the date to get the cell-alignment for
      rowNum - the row number containing the date to get the cell-alignment for
      colNum - the column number containing the date to get the cell-alignment for
      view - the relevant CalendarView
      Returns:
      cell-alignment for content in the cell with the passed date and rowNum/colNum. See HTMLString
      See Also:
    • getDateCellVAlign

      public String getDateCellVAlign(Date date, Integer rowNum, Integer colNum, CalendarView view)
      When getDateHTML returns a value, this method returns the vertical alignment for that value in its cell, in the passed view.
      Parameters:
      date - the date to get the cell-alignment for
      rowNum - the row number containing the date to get the cell-alignment for
      colNum - the column number containing the date to get the cell-alignment for
      view - the relevant CalendarView
      Returns:
      vertical-alignment for content in the cell with the passed date and rowNum/colNum. See HTMLString
      See Also:
    • getDateCSSText

      public String getDateCSSText(Date date, Integer rowNum, Integer colNum, CalendarView view)
      Return CSS text for styling the cell associated with the passed date and/or rowNum & colNum, which will be applied in addition to the CSS class for the cell, as overrides.

      "CSS text" means semicolon-separated style settings, suitable for inclusion in a CSS stylesheet or in a STYLE attribute of an HTML element.

      Parameters:
      date - the date to return CSS text for
      rowNum - the row number containing the date to get the CSS for
      colNum - the column number containing the date to get the CSS for
      view - the relevant CalendarView
      Returns:
      CSS text for the cell with the passed date and rowNum/colNum
      See Also:
    • getDateFromPoint

      public Date getDateFromPoint()
      Returns a Date instance representing the point at the passed offsets into the body of the current view.

      If snapOffsets is passed as false, returns the date representing the exact position of the passed offsets. If unset or passed as true, returns the date at the nearest eventSnapGap to the left, for Timelines, or above for day and week views.

      If neither x nor y offsets are passed, assumes them from the last mouse event.

      If the cell at the eventual offsets is not a date-cell, returns null.

      Note that, for the month view, this method is functionally equivalent to getCellDate(), which determines the date associated with a cell, without the additional offset precision offered here.

      Returns:
      the date, if any, associated with the passed co-ords in the current view
    • getDateFromPoint

      public Date getDateFromPoint(Integer x)
      See Also:
    • getDateFromPoint

      public Date getDateFromPoint(Integer x, Integer y)
      See Also:
    • getDateFromPoint

      public Date getDateFromPoint(Integer x, Integer y, Boolean snapOffsets)
      See Also:
    • getDateFromPoint

      public Date getDateFromPoint(Integer x, Integer y, Boolean snapOffsets, CalendarView view)
      Returns a Date instance representing the point at the passed offsets into the body of the current view.

      If snapOffsets is passed as false, returns the date representing the exact position of the passed offsets. If unset or passed as true, returns the date at the nearest eventSnapGap to the left, for Timelines, or above for day and week views.

      If neither x nor y offsets are passed, assumes them from the last mouse event.

      If the cell at the eventual offsets is not a date-cell, returns null.

      Note that, for the month view, this method is functionally equivalent to getCellDate(), which determines the date associated with a cell, without the additional offset precision offered here.

      Parameters:
      x - the x offset into the body of the selected view - non-functional for the day view. If this param and "y" are both unset, assumes both offsets from the last mouse event.
      y - the y offset into the body of the selected view - non-functional for the timeline view. If this param and "x" are both unset, assumes both offsets from the last mouse event.
      snapOffsets - whether to snap the offsets to the nearest eventSnapGap - if unset, the default is true
      view - the view to use - or the selected view if not passed
      Returns:
      the date, if any, associated with the passed co-ords in the current view
    • getDateHeaderTitle

      public String getDateHeaderTitle(Date date, int dayOfWeek, String defaultValue, CalendarView view)
      Return the title text to display in the header-button of the ListGridField showing the passed date, in the passed view.
      Parameters:
      date - the date to return the header-title for - note that the month view does not pass this parameter because a single column represents multiple dates
      dayOfWeek - the week-day number of the passed date, except for the month view, where no date is passed, because the week-day number represents multiple dates.
      defaultValue - the default header-title for the passed date and view
      view - the relevant CalendarView
      Returns:
      the text to show in the header-button for the passed date/field
    • getDateHTML

      public String getDateHTML(Date date, Integer rowNum, Integer colNum, CalendarView view)
      Return the HTML to be displayed in the associated date-cell in the passed view. Note that the month view has default cell HTML, controlled via getDayBodyHTML().
      Parameters:
      date - the date to get the HTML for
      rowNum - the row number containing the date to get the HTML for
      colNum - the column number containing the date to get the HTML for
      view - the relevant CalendarView
      Returns:
      HTML to display in the cell with the passed date and rowNum/colNum. See HTMLString
      See Also:
    • getDateStyle

      public String getDateStyle(Date date, Integer rowNum, Integer colNum, CalendarView view)
      Return the CSS styleName for the associated date-cell in the passed view.
      Parameters:
      date - the date to return the CSS styleName for
      rowNum - the row number containing the date to get the CSS styleName for
      colNum - the column number containing the date to get the CSS styleName for
      view - the relevant CalendarView
      Returns:
      CSS style for the cell with the passed date and rowNum/colNum. See CSSStyleName
      See Also:
    • getDragHoverHTML

      public String getDragHoverHTML(CalendarView view, CalendarEvent event, String defaultValue)
      Returns the HTML to show in a hover when an existing event is dragged, or when a new event is being created by dragging with the mouse.
      Parameters:
      view - the CalendarView the mouse is hovered over
      event - the CalendarEvent attached to the EventCanvas being dragged
      defaultValue - the default text for the passed values
      Returns:
      the HTML to show in the hover. See HTMLString
    • getEventBodyHTML

      public String getEventBodyHTML(CalendarEvent event)
      Returns the description text for the passed event, for display in the body area of an event canvas. The default implementation returns the event's description field.
      Parameters:
      event - the event to get the description text for
      Returns:
      the HTML to display in the body of the passed event's EventCanvas. See HTMLString
    • getEventBodyHTML

      public String getEventBodyHTML(CalendarEvent event, CalendarView view)
      Returns the description text for the passed event, for display in the body area of an event canvas. The default implementation returns the event's description field.
      Parameters:
      event - the event to get the description text for
      view - the view in which the event is being rendered
      Returns:
      the HTML to display in the body of the passed event's EventCanvas. See HTMLString
    • getEventCanvasStyle

      public String getEventCanvasStyle(CalendarEvent event)
      Returns the styleName to use for the passed event, in the passed view. By default, returns the style on the event, if one is specified - otherwise, in lane-based views, it returns the style specified on the lane or sublane, or the style specified on the calendar.
      Parameters:
      event - the event to get the CSS style for
      Returns:
      the CSS style to apply to the passed event in the passed view. See CSSStyleName
    • getEventCanvasStyle

      public String getEventCanvasStyle(CalendarEvent event, CalendarView view)
      Returns the styleName to use for the passed event, in the passed view. By default, returns the style on the event, if one is specified - otherwise, in lane-based views, it returns the style specified on the lane or sublane, or the style specified on the calendar.
      Parameters:
      event - the event to get the CSS style for
      view - the CalendarView that contains the canvas being styled
      Returns:
      the CSS style to apply to the passed event in the passed view. See CSSStyleName
    • getEventEndDate

      public Date getEventEndDate(CalendarEvent event)
      Returns the end date of the passed event. If the event is duration-based, the result is calculated from the start date and the specified duration and unit.
      Parameters:
      event - the event to get the start date of
      Returns:
      the end date of the passed event
    • getEventHeaderHTML

      public String getEventHeaderHTML(CalendarEvent event)
      Returns the title text for the passed event, which is displayed in the header area of an eventCanvas rendered in a vertical or horizontal view, or as a clickable link in a cell in a Month view.

      The default implementation returns the event's name field for timelines, and that same value pre-pended with the event's start for day, week and month views.

      Parameters:
      event - the event to get the description text for
      Returns:
      the HTML to display in the header of an event canvas. See HTMLString
    • getEventHeaderHTML

      public String getEventHeaderHTML(CalendarEvent event, CalendarView view)
      Returns the title text for the passed event, which is displayed in the header area of an eventCanvas rendered in a vertical or horizontal view, or as a clickable link in a cell in a Month view.

      The default implementation returns the event's name field for timelines, and that same value pre-pended with the event's start for day, week and month views.

      Parameters:
      event - the event to get the description text for
      view - the view in which the event is being rendered
      Returns:
      the HTML to display in the header of an event canvas. See HTMLString
    • getEventHoverHTML

      public String getEventHoverHTML(CalendarEvent event, EventCanvas eventCanvas, CalendarView view)
      Gets the hover HTML for an event being hovered over. Override here to return custom HTML based upon the parameter event object.
      Parameters:
      event - The event being hovered
      eventCanvas - the event canvas being hovered over
      view - the CalendarView in which the eventCanvas lives
      Returns:
      the HTML to show in the hover. See HTMLString
    • getEventHoverHTML

      public String getEventHoverHTML(CalendarEvent event, EventCanvas eventCanvas, CalendarView view, String defaultValue)
      Gets the hover HTML for an event being hovered over. Override here to return custom HTML based upon the parameter event object.
      Parameters:
      event - The event being hovered
      eventCanvas - the event canvas being hovered over
      view - the CalendarView in which the eventCanvas lives
      defaultValue - the default HTML to show when hovering over the passed event
      Returns:
      the HTML to show in the hover. See HTMLString
    • getEventLane

      public Lane getEventLane(CalendarEvent event)
      Returns the lane associated with the passed event, in the passed view
      Parameters:
      event - the event to get the lane for
      Returns:
      the lane associated with the passed event
    • getEventLane

      public Lane getEventLane(CalendarEvent event, CalendarView view)
      Returns the lane associated with the passed event, in the passed view
      Parameters:
      event - the event to get the lane for
      view - the view to get the lane object from
      Returns:
      the lane associated with the passed event
    • getEventLength

      public void getEventLength(CalendarEvent event)
      Returns the length of the passed event in the passed unit. If unit isn't passed, returns the length of the event in milliseconds.
      Parameters:
      event - the event to get the length of
    • getEventLength

      public void getEventLength(CalendarEvent event, TimeUnit unit)
      Returns the length of the passed event in the passed unit. If unit isn't passed, returns the length of the event in milliseconds.
      Parameters:
      event - the event to get the length of
      unit - the time unit to return the length in, milliseconds if not passed
    • getEventStartDate

      public Date getEventStartDate(CalendarEvent event)
      Returns the start date of the passed event.
      Parameters:
      event - the event to get the start date of
      Returns:
      the start date of the passed event
    • getEventSublane

      public Lane getEventSublane(CalendarEvent event)
      Returns the sublane associated with the passed event, in the passed view
      Parameters:
      event - the event to get the sublane for
      Returns:
      the sublane associated with the passed event
    • getEventSublane

      public Lane getEventSublane(CalendarEvent event, CalendarView view)
      Returns the sublane associated with the passed event, in the passed view
      Parameters:
      event - the event to get the sublane for
      view - the view to get the sublane object from
      Returns:
      the sublane associated with the passed event
    • getHeaderHoverHTML

      public String getHeaderHoverHTML(CalendarView view, HeaderLevel headerLevel, Date startDate, Date endDate, String defaultValue)
      Returns the hover HTML to show in a hover when the mouse moves over the header area.
      Parameters:
      view - the CalendarView the mouse is hovered over
      headerLevel - the header level hovered over
      startDate - the start date of the span being hovered over
      endDate - the end date of the span being hovered over
      defaultValue - the default text for the passed header level and date range
      Returns:
      the HTML to show in the hover. See HTMLString
    • getIndicatorCanvasStyle

      public String getIndicatorCanvasStyle(CalendarEvent indicator)
      Returns the styleName to use for the passed indicator, in the passed view. By default, returns the style on the indicator, if one is specified, or the style specified on the calendar otherwise.
      Parameters:
      indicator - the indicator to get the CSS style for
      Returns:
      See CSSStyleName
    • getIndicatorCanvasStyle

      public String getIndicatorCanvasStyle(CalendarEvent indicator, CalendarView view)
      Returns the styleName to use for the passed indicator, in the passed view. By default, returns the style on the indicator, if one is specified, or the style specified on the calendar otherwise.
      Parameters:
      indicator - the indicator to get the CSS style for
      view - the CalendarView that contains the canvas being styled
      Returns:
      See CSSStyleName
    • getIndicatorHoverHTML

      public String getIndicatorHoverHTML(CalendarEvent indicator, IndicatorCanvas indicatorCanvas, CalendarView view, String defaultValue)
      Gets the hover HTML for an indicator being hovered over. Override here to return custom HTML based upon the parameter indicator object.
      Parameters:
      indicator - The indicator being hovered over
      indicatorCanvas - the indicator canvas being hovered over
      view - the CalendarView in which the indicatorCanvas is displayed
      defaultValue - the default HTML to show when hovering over the passed Indicator
      Returns:
      the HTML to show in the hover. See HTMLString
    • getLane

      public Lane getLane(String lane)
      Returns the lane with the passed name, in the passed view
      Parameters:
      lane - the name of the lane to return
      Returns:
      the lane with the passed name, or null if not found
    • getLane

      public Lane getLane(String lane, CalendarView view)
      Returns the lane with the passed name, in the passed view
      Parameters:
      lane - the name of the lane to return
      view - the view to get the lane object from
      Returns:
      the lane with the passed name, or null if not found
    • getLaneEvents

      public CalendarEvent[] getLaneEvents(Lane lane)
      For views that support lanes, returns the array of events in the current dataset that apply to the passed lane in the passed or current view.
      Parameters:
      lane - lane object or name to get the events for
      Returns:
      the list of events that apply to the passed lane and view
    • getLaneEvents

      public CalendarEvent[] getLaneEvents(String lane)
      For views that support lanes, returns the array of events in the current dataset that apply to the passed lane in the passed or current view.
      Parameters:
      lane - lane object or name to get the events for
      Returns:
      the list of events that apply to the passed lane and view
    • getLaneEvents

      public CalendarEvent[] getLaneEvents(Lane lane, CalendarView view)
      For views that support lanes, returns the array of events in the current dataset that apply to the passed lane in the passed or current view.
      Parameters:
      lane - lane object or name to get the events for
      view - the view in which the passed lane lives - uses the selected view if unset
      Returns:
      the list of events that apply to the passed lane and view
    • getLaneFromPoint

      public Lane getLaneFromPoint()
      Returns the Lane at the passed co-ordinates. To get the lane under the mouse, pass null for both x and y.
      Returns:
      the Lane at the passed co-ords in the passed or selected view
    • getLaneFromPoint

      public Lane getLaneFromPoint(Integer x)
      See Also:
    • getLaneFromPoint

      public Lane getLaneFromPoint(Integer x, Integer y)
      See Also:
    • getLaneFromPoint

      public Lane getLaneFromPoint(Integer x, Integer y, CalendarView view)
      Returns the Lane at the passed co-ordinates. To get the lane under the mouse, pass null for both x and y.
      Parameters:
      x - the x offset into the body of the selected view
      y - the y offset into the body of the selected view. If this param and "x" are both unset, assumes both offsets from the last mouse event.
      view - the view to get the lane from - selected view if not passed
      Returns:
      the Lane at the passed co-ords in the passed or selected view
    • getLanePadding

      public Integer getLanePadding()
      For views that support lanes, returns the padding to apply to events rendered in lanes in the passed or current view. By default, returns laneEventPadding.
      Returns:
      the padding to apply to events in lanes in the passed or current view
    • getLanePadding

      public Integer getLanePadding(CalendarView view)
      For views that support lanes, returns the padding to apply to events rendered in lanes in the passed or current view. By default, returns laneEventPadding.
      Parameters:
      view - the view to get the lane padding for
      Returns:
      the padding to apply to events in lanes in the passed or current view
    • getMonthViewHoverHTML

      public String getMonthViewHoverHTML(Date date, CalendarEvent... events)
      This method returns the hover HTML to be displayed when the user hovers over a cell displayed in the calendar month view tab.

      Default implementation will display a list of the events occurring on the date the user is hovering over. Override for custom behavior. Note that returning null will suppress the hover altogether.

      Parameters:
      date - Date the user is hovering over
      events - array of events occurring on the current date. May be empty.
      Returns:
      HTML string to display. See HTMLString
    • getPeriodEndDate

      public Date getPeriodEndDate()
      Returns the end of the period selected in the passed, or current, calendar view. For the month view, and for the week view when not showing weekends, this will often be a different date than that returned by getVisibleEndDate().
      Returns:
      period end date
    • getPeriodEndDate

      public Date getPeriodEndDate(CalendarView view)
      Returns the end of the period selected in the passed, or current, calendar view. For the month view, and for the week view when not showing weekends, this will often be a different date than that returned by getVisibleEndDate().
      Parameters:
      view - the view to get the periodEndDate for, or current view if null
      Returns:
      period end date
    • getPeriodStartDate

      public Date getPeriodStartDate()
      Returns the start of the selected week or month depending on the current calendar view. For the month view, and for the week view when not showing weekends, this will often be a different date than that returned by getVisibleStartDate().
      Returns:
      period start date
    • getPeriodStartDate

      public Date getPeriodStartDate(CalendarView view)
      Returns the start of the selected week or month depending on the current calendar view. For the month view, and for the week view when not showing weekends, this will often be a different date than that returned by getVisibleStartDate().
      Parameters:
      view - the view to get the periodStartDate for, or current view if null
      Returns:
      period start date
    • getSelectedEvent

      public CalendarEvent getSelectedEvent()
      Returns the currently selected event, or the first one if more than one is selected.
      Returns:
      the selected event
    • getSelectedEvents

      public CalendarEvent[] getSelectedEvents()
      Returns the currently selected list of events.
      Returns:
      the list of selected events
    • getSelectedView

      public CalendarView getSelectedView()
      Returns the currently selected view.
      Returns:
      the currently selected view
    • getSublane

      public Lane getSublane(String lane, String sublane)
      Returns the sublane with the passed name, from the lane with the passed name, in the passed view.
      Parameters:
      lane - the name of the lane containing the sublane to return
      sublane - the name of the sublane to return
      Returns:
      the sublane with the passed name, or null if not found
    • getSublane

      public Lane getSublane(String lane, String sublane, CalendarView view)
      Returns the sublane with the passed name, from the lane with the passed name, in the passed view.
      Parameters:
      lane - the name of the lane containing the sublane to return
      sublane - the name of the sublane to return
      view - the view to get the sublane object from
      Returns:
      the sublane with the passed name, or null if not found
    • getSublaneEvents

      public CalendarEvent[] getSublaneEvents(Lane lane, Lane sublane)
      For views that support lanes and allow sublanes, returns the array of events in the current dataset that apply to the passed lane and sublane in the passed or current view.
      Parameters:
      lane - lane object or name to get the events for
      sublane - sublane object or name to get the events for
      Returns:
      the list of events that apply to the passed sublane and view
    • getSublaneEvents

      public CalendarEvent[] getSublaneEvents(Lane lane, Lane sublane, CalendarView view)
      For views that support lanes and allow sublanes, returns the array of events in the current dataset that apply to the passed lane and sublane in the passed or current view.
      Parameters:
      lane - lane object or name to get the events for
      sublane - sublane object or name to get the events for
      view - the view in which the passed sublane lives - uses the selected view if unset
      Returns:
      the list of events that apply to the passed sublane and view
    • getSublaneFromPoint

      public Lane getSublaneFromPoint()
      Returns the sublane at the passed co-ordinates. To get the sublane under the mouse, pass null for both x and y.
      Returns:
      the sublane at the passed co-ords in the selected view
    • getSublaneFromPoint

      public Lane getSublaneFromPoint(Integer x)
      See Also:
    • getSublaneFromPoint

      public Lane getSublaneFromPoint(Integer x, Integer y)
      See Also:
    • getSublaneFromPoint

      public Lane getSublaneFromPoint(Integer x, Integer y, CalendarView view)
      Returns the sublane at the passed co-ordinates. To get the sublane under the mouse, pass null for both x and y.
      Parameters:
      x - optional x offset into the body of the selected view
      y - optional y offset into the body of the selected view. If this param and "x" are both unset, assumes both offsets from the last mouse event.
      view - the view to get the sublane from - selected view if not passed
      Returns:
      the sublane at the passed co-ords in the selected view
    • getView

      public CalendarView getView(ViewName viewName)
      Returns the view with the passed name.
      Parameters:
      viewName - the name of the CalendarView to return
      Returns:
      the currently selected view
    • getVisibleEndDate

      public Date getVisibleEndDate()
      Returns the last visible date in the passed, or currently selected, calendar view.
      Returns:
      last visible date
    • getVisibleEndDate

      public Date getVisibleEndDate(CalendarView view)
      Returns the last visible date in the passed, or currently selected, calendar view.
      Parameters:
      view - the view to get the endDate for, or current view if null
      Returns:
      last visible date
    • getVisibleStartDate

      public Date getVisibleStartDate()
      Returns the first visible date in the passed, or currently selected, calendar view.
      Returns:
      first visible date
    • getVisibleStartDate

      public Date getVisibleStartDate(CalendarView view)
      Returns the first visible date in the passed, or currently selected, calendar view.
      Parameters:
      view - the view to get the startDate for, or current view if
      Returns:
      first visible date
    • getZoneCanvasStyle

      public String getZoneCanvasStyle(CalendarEvent zone)
      Returns the styleName to use for the passed zone, in the passed view. By default, returns the style on the zone, if one is specified, or the style specified on the calendar otherwise.
      Parameters:
      zone - the zone to get the CSS style for
      Returns:
      See CSSStyleName
    • getZoneCanvasStyle

      public String getZoneCanvasStyle(CalendarEvent zone, CalendarView view)
      Returns the styleName to use for the passed zone, in the passed view. By default, returns the style on the zone, if one is specified, or the style specified on the calendar otherwise.
      Parameters:
      zone - the zone to get the CSS style for
      view - the CalendarView that contains the canvas being styled
      Returns:
      See CSSStyleName
    • getZoneHoverHTML

      public String getZoneHoverHTML(CalendarEvent zone, ZoneCanvas zoneCanvas, CalendarView view, String defaultValue)
      Gets the hover HTML for a zone being hovered over. Override here to return custom HTML based upon the parameter zone object.
      Parameters:
      zone - The zone being hovered over
      zoneCanvas - the zone canvas being hovered over
      view - the CalendarView in which the zoneCanvas is displayed
      defaultValue - the default HTML to show when hovering over the passed Zone
      Returns:
      the HTML to show in the hover. See HTMLString
    • groupLanesBy

      public void groupLanesBy(String groupFieldName)
      When canGroupLanes is true, this method allows the grouping in timelines to be altered at runtime.
      Parameters:
      groupFieldName - one or more field names to group by
    • groupLanesBy

      public void groupLanesBy(String... groupFieldName)
      When canGroupLanes is true, this method allows the grouping in timelines to be altered at runtime.
      Parameters:
      groupFieldName - one or more field names to group by
    • addIndicatorClickHandler

      public HandlerRegistration addIndicatorClickHandler(IndicatorClickHandler handler)
      Add a indicatorClick handler.

      Called whenever an IndicatorCanvas is clicked in the timelineView. There is no default implementation.

      Specified by:
      addIndicatorClickHandler in interface HasIndicatorClickHandlers
      Parameters:
      handler - the indicatorClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • moveToEvent

      public void moveToEvent(CalendarEvent event)
      Deprecated.
      in favor of scrollToEvent().
      Resets the current visible range of a calendar view so that it shows the date on which the passed event occurs.
      Parameters:
      event - the event to move the calendar view to
    • next

      public void next()
      Move to the next day, week, or month, depending on which tab is selected.
    • previous

      public void previous()
      Move to the previous day, week, month, or timeline range depending on which tab is selected.
    • refreshEvent

      public void refreshEvent(CalendarEvent event)
      Refreshes the passed event in the current view.
      Parameters:
      event - The event object to refresh in the current view
    • removeIndicator

      public void removeIndicator(CalendarEvent indicator)
      Removes a indicator from the calendar.

      Accepts either a indicator object or a string that represents the name of anindicator.

      Parameters:
      indicator - either the actual CalendarEvent representing the indicator, or the name of the indicator to remove
    • removeIndicator

      public void removeIndicator(String indicator)
      Removes a indicator from the calendar.

      Accepts either a indicator object or a string that represents the name of anindicator.

      Parameters:
      indicator - either the actual CalendarEvent representing the indicator, or the name of the indicator to remove
    • removeZone

      public void removeZone(CalendarEvent zone)
      Removes a zone from the calendar.

      Accepts either a zone object or a string that represents the name of a zone.

      Parameters:
      zone - either the actual CalendarEvent representing the zone, or the name of the zone to remove
    • removeZone

      public void removeZone(String zone)
      Removes a zone from the calendar.

      Accepts either a zone object or a string that represents the name of a zone.

      Parameters:
      zone - either the actual CalendarEvent representing the zone, or the name of the zone to remove
    • scrollToEnd

      public void scrollToEnd()
      Move the viewport of a CalendarView to the end of its scrollable range.
    • scrollToEnd

      public void scrollToEnd(CalendarView view)
      Move the viewport of a CalendarView to the end of its scrollable range.
      Parameters:
      view - the view to affect, the current view if not specified
    • scrollToEvent

      public void scrollToEvent(CalendarEvent event)
      Scrolls the current view so the passed event is visible. If the event is outside of the view's current date-range, the default behavior is to automatically reload the view with a date-range starting at the event's startDate and then scroll to the event vertically as necessary. Pass false as the canReload param to prevent that default behavior.
      Parameters:
      event - the event to move the calendar view to
    • scrollToEvent

      public void scrollToEvent(CalendarEvent event, boolean canReload)
      Scrolls the current view so the passed event is visible. If the event is outside of the view's current date-range, the default behavior is to automatically reload the view with a date-range starting at the event's startDate and then scroll to the event vertically as necessary. Pass false as the canReload param to prevent that default behavior.
      Parameters:
      event - the event to move the calendar view to
      canReload - set to false to prevent a view from automatically reloading with a new range if the passed event is not in its current scrollable range
    • scrollToStart

      public void scrollToStart()
      Move the viewport of a CalendarView to the start of it's scrollable range.
    • scrollToStart

      public void scrollToStart(CalendarView view)
      Move the viewport of a CalendarView to the start of it's scrollable range.
      Parameters:
      view - the view to affect, the current view if not specified
    • scrollToTime

      public void scrollToTime(String time)
      Scrolls Calendar day or week views to the time represented by the time parameter. This string parameter is expected to be an arbitrary logical time value in any parsable time format - no date portion is expected, but time formats like "13:31" or "1:20am" are supported.

      Has no effect in timelines, where an arbitrary time-value is inapplicable to any range or resolution greater than a day.

      Parameters:
      time - any parsable time-string
    • selectEvent

      public Boolean selectEvent(CalendarEvent event)
      Adds an event to the list of selected events in the current view, showing it in a selected style.
      Parameters:
      event - the event to add to the selection
      Returns:
      true if the selection was changed, false otherwise
    • selectEvents

      public Boolean selectEvents(CalendarEvent... events)
      Adds one or more events to the list of selected events in the current view, showing them in a selected style.
      Parameters:
      events - the events to add to the selection
      Returns:
      true if the selection was changed, false otherwise
    • selectSingleEvent

      public Boolean selectSingleEvent(CalendarEvent event)
      Selects a single event in the current view, showing it in a selected style and deselecting any other selected events.
      Parameters:
      event - the event to select
      Returns:
      true if the selection was changed, false otherwise
    • selectTab

      public void selectTab(int tabnum)
      Selects the calendar view in the passed tab number.
      Parameters:
      tabnum - the index of the tab to select
    • setEventStyle

      public void setEventStyle(CalendarEvent event, String styleName)
      Update the styleName for the passed event. Refreshes the event's canvas in the current view.
      Parameters:
      event - The event object to refresh in the current view
      styleName - The new CSS style to apply to the canvases showing this event. See CSSStyleName
    • setLaneTitle

      public boolean setLaneTitle(String lane, String title)
      For views that support lanes, updates the title for the passed lane.
      Parameters:
      lane - the name of the lane to change the title for
      title - the new title to apply
      Returns:
      true if the title was updated, false otherwise
    • setResolution

      public void setResolution(HeaderLevel[] headerLevels, TimeUnit unit, Integer unitCount)
      Reset the resolution, the header levels and scrollable range, of the timeline view.

      headerLevels specifies the array of headers to show above the timeline, and the unit and unitCount parameters dictate the scrollable range (eg, passing "week" and 6 will create a timeline with a scrollable range of six weeks, irrespective of the number of columns that requires, according to the granularity).

      If the optional granularityPerColumn parameter is passed, each column will span that number of units of the granularity, which is determined from the unit of the innermost of the passed headerLevels. For example, to show a span of 12 hours with inner columns that each span 15 minutes, you could pass "hour" and "minute" -based headerLevels, unit and unitCount values of "hour" and 12 respectively, and granularityPerColumn of 15.

      Parameters:
      headerLevels - the header levels to show in the timeline
      unit - the time unit to use when calculating the range of the timeline
      unitCount - the count of the passed unit that the timeline should span
    • setResolution

      public void setResolution(HeaderLevel[] headerLevels, TimeUnit unit, Integer unitCount, Integer granularityPerColumn)
      Reset the resolution, the header levels and scrollable range, of the timeline view.

      headerLevels specifies the array of headers to show above the timeline, and the unit and unitCount parameters dictate the scrollable range (eg, passing "week" and 6 will create a timeline with a scrollable range of six weeks, irrespective of the number of columns that requires, according to the granularity).

      If the optional granularityPerColumn parameter is passed, each column will span that number of units of the granularity, which is determined from the unit of the innermost of the passed headerLevels. For example, to show a span of 12 hours with inner columns that each span 15 minutes, you could pass "hour" and "minute" -based headerLevels, unit and unitCount values of "hour" and 12 respectively, and granularityPerColumn of 15.

      Parameters:
      headerLevels - the header levels to show in the timeline
      unit - the time unit to use when calculating the range of the timeline
      unitCount - the count of the passed unit that the timeline should span
      granularityPerColumn - how many units of the granularity (the unit of the innermost headerLevel) should each column span? The default is 1.
    • setTimelineRange

      public void setTimelineRange(Date start)
      Sets the range over which the timeline will display events.

      If the end parameter is not passed, the end date of the range will default to 20 columns of the current granularity following the start date.

      Parameters:
      start - start of range
    • setTimelineRange

      public void setTimelineRange(Date start, Date end)
      Sets the range over which the timeline will display events.

      If the end parameter is not passed, the end date of the range will default to 20 columns of the current granularity following the start date.

      Parameters:
      start - start of range
      end - end of range
    • shouldDisableDate

      public boolean shouldDisableDate(Date date)
      Returns true if the passed date should be considered disabled. Disabled dates don't allow events to be created by clicking on them, and drag operations that would start or end on such dates are also disallowed.

      The default implementation returns false only for dates that fall on a weekend.

      Parameters:
      date - a Date instance
      Returns:
      true if this date should be considered disabled
    • shouldDisableDate

      public boolean shouldDisableDate(Date date, CalendarView view)
      Returns true if the passed date should be considered disabled. Disabled dates don't allow events to be created by clicking on them, and drag operations that would start or end on such dates are also disallowed.

      The default implementation returns false only for dates that fall on a weekend.

      Parameters:
      date - a Date instance
      view - the view the date appears in
      Returns:
      true if this date should be considered disabled
    • shouldShowDate

      public boolean shouldShowDate(Date date)
      Indicates whether the passed date should be visible in the passed CalendarView.

      The default implementation returns true, unless the date falls on a weekend and showWeekends is false.

      Parameters:
      date - a Date instance
      Returns:
      true if this date should be considered disabled
    • shouldShowDate

      public boolean shouldShowDate(Date date, CalendarView view)
      Indicates whether the passed date should be visible in the passed CalendarView.

      The default implementation returns true, unless the date falls on a weekend and showWeekends is false.

      Parameters:
      date - a Date instance
      view - the view the date appears in
      Returns:
      true if this date should be considered disabled
    • shouldShowEvent

      public boolean shouldShowEvent(CalendarEvent event)
      Indicates whether the passed event should be visible in the passed CalendarView.

      The default implementation returns true - note that this method only runs for events that are known to be in the accessible range and is a mechanism for extended custom filtering.

      Parameters:
      event - the event to check
      Returns:
      true if this event should be displayed in the passed view
    • shouldShowEvent

      public boolean shouldShowEvent(CalendarEvent event, CalendarView view)
      Indicates whether the passed event should be visible in the passed CalendarView.

      The default implementation returns true - note that this method only runs for events that are known to be in the accessible range and is a mechanism for extended custom filtering.

      Parameters:
      event - the event to check
      view - the view the event will be rendered in
      Returns:
      true if this event should be displayed in the passed view
    • shouldShowLane

      public boolean shouldShowLane(Lane lane)
      Indicates whether the passed lane should be visible in the passed CalendarView.

      The default implementation returns true, unless the lane has no events and hideUnusedLanes is true.

      Parameters:
      lane - the lane object or name
      Returns:
      true if this lane should be displayed in the passed view
    • shouldShowLane

      public boolean shouldShowLane(String lane)
      Indicates whether the passed lane should be visible in the passed CalendarView.

      The default implementation returns true, unless the lane has no events and hideUnusedLanes is true.

      Parameters:
      lane - the lane object or name
      Returns:
      true if this lane should be displayed in the passed view
    • shouldShowLane

      public boolean shouldShowLane(Lane lane, CalendarView view)
      Indicates whether the passed lane should be visible in the passed CalendarView.

      The default implementation returns true, unless the lane has no events and hideUnusedLanes is true.

      Parameters:
      lane - the lane object or name
      view - the view the lane appears in
      Returns:
      true if this lane should be displayed in the passed view
    • showEventCanvasComponent

      public boolean showEventCanvasComponent(EventCanvas canvas)
      Should a component be applied to the passed canvas in the view in which it appears? Return false from this method to override the global value of showEventCanvasComponents for this canvas.
      Parameters:
      canvas - should this eventCanvas get a component component?
      Returns:
      boolean
      See Also:
    • showEventDialog

      public void showEventDialog()
      Open the Quick Event dialog showing minimal information about an existing event.

      The startDate field on the event is used to calculate the display location for the dialog.

      If this method is called when the Event Dialog is already showing another event, and if changes have been made, a confirmation dialog is displayed and editing of the new event is cancelled unless confirmed.

      You can override this method to prevent the default action, perhaps instead showing a custom interface that performs validations or gathers custom data before making a call to addCalendarEvent or updateCalendarEvent when the new data is available.

    • showEventDialog

      public void showEventDialog(CalendarEvent event)
      See Also:
    • showEventDialog

      public void showEventDialog(CalendarEvent event, Boolean isNewEvent)
      Open the Quick Event dialog showing minimal information about an existing event.

      The startDate field on the event is used to calculate the display location for the dialog.

      If this method is called when the Event Dialog is already showing another event, and if changes have been made, a confirmation dialog is displayed and editing of the new event is cancelled unless confirmed.

      You can override this method to prevent the default action, perhaps instead showing a custom interface that performs validations or gathers custom data before making a call to addCalendarEvent or updateCalendarEvent when the new data is available.

      Parameters:
      event - the event to show in the Editor
      isNewEvent - optional boolean indicating that this is a new event, event if an event is passed - used to pass defaults for a new event
    • showEventEditor

      public void showEventEditor()
      Show an Event Editor for the passed event. Event Editor's fill the Calendar and allow for editing of the built-in Event fields, like name and description, as well as any custom fields supplied via eventEditorFields.

      If isNewEvent is true, a new event is created - in this case, if an event is passed, it represents default values to apply to the new event.

      You can override this method to prevent the default action, perhaps instead showing a custom interface that performs validations or gathers custom data before making a call to addCalendarEvent or updateCalendarEvent when the new data is available.

    • showEventEditor

      public void showEventEditor(CalendarEvent event)
      See Also:
    • showEventEditor

      public void showEventEditor(CalendarEvent event, Boolean isNewEvent)
      Show an Event Editor for the passed event. Event Editor's fill the Calendar and allow for editing of the built-in Event fields, like name and description, as well as any custom fields supplied via eventEditorFields.

      If isNewEvent is true, a new event is created - in this case, if an event is passed, it represents default values to apply to the new event.

      You can override this method to prevent the default action, perhaps instead showing a custom interface that performs validations or gathers custom data before making a call to addCalendarEvent or updateCalendarEvent when the new data is available.

      Parameters:
      event - an existing event to show in the Editor
      isNewEvent - optional boolean indicating that this is a new event, even if an event is passed - used to pass defaults for a new event
    • showNewEventDialog

      public void showNewEventDialog()
      Open the Quick Event dialog to begin editing a new event.

      If passed, the event parameter is used as defaults for the new event - in addition, the event's startDate, and its lane, for timeline events, are used to calculate the display location for the dialog.

      If this method is called when the Event Dialog is already showing another event, and if changes have been made, a confirmation dialog is displayed and editing of the new event is cancelled unless confirmed.

      You can override this method to prevent the default action, perhaps instead showing a custom interface that performs validations or gathers custom data before making a call to addCalendarEvent or updateCalendarEvent when the new data is available.

    • showNewEventDialog

      public void showNewEventDialog(CalendarEvent event)
      Open the Quick Event dialog to begin editing a new event.

      If passed, the event parameter is used as defaults for the new event - in addition, the event's startDate, and its lane, for timeline events, are used to calculate the display location for the dialog.

      If this method is called when the Event Dialog is already showing another event, and if changes have been made, a confirmation dialog is displayed and editing of the new event is cancelled unless confirmed.

      You can override this method to prevent the default action, perhaps instead showing a custom interface that performs validations or gathers custom data before making a call to addCalendarEvent or updateCalendarEvent when the new data is available.

      Parameters:
      event - defaults for the new event
    • showNewEventEditor

      public void showNewEventEditor()
      Show an Event Editor for a new event. If an event is passed as the parameter, it is used as defaults for the new event.
    • showNewEventEditor

      public void showNewEventEditor(CalendarEvent event)
      Show an Event Editor for a new event. If an event is passed as the parameter, it is used as defaults for the new event.
      Parameters:
      event - defaults for the new event to show in the Editor
    • timelineEventMoved

      public Boolean timelineEventMoved(CalendarEvent event, Date startDate, Date endDate, Lane lane)
      Deprecated.
      Called when a Timeline event is moved via dragging by a user. Return false to disallow the move.
      Parameters:
      event - the event that was moved
      startDate - new start date of the passed event
      endDate - new end date of the passed event
      lane - the Lane in which this event has been dropped
      Returns:
      return false to disallow the move.
    • timelineEventResized

      public Boolean timelineEventResized(CalendarEvent event, Date startDate, Date endDate)
      Deprecated.
      Called when a Timeline event is resized via dragging by a user. Return false to disallow the resize.
      Parameters:
      event - the event that was resized
      startDate - new start date of the passed event, after the resize
      endDate - new end date of the passed event, after the resize
      Returns:
      return false to disallow the resize
    • updateCalendarEvent

      public void updateCalendarEvent(CalendarEvent event, CalendarEvent newEvent, Map otherFields)
      Save an event to this Calendar's ${isc.DocUtils.linkForRef('attr:Calendar.dataSource','dataSource) or \n data array'). To deal with errors while saving, see Calendar.eventSaveError()
      Parameters:
      event - The event object that will be updated
      newEvent - The new attributes for the event
      otherFields - new values of additional fields to be updated
    • updateEventCanvasComponent

      public void updateEventCanvasComponent(EventCanvas canvas, Canvas component)
      Called from EventCanvas.setEvent() when showEventCanvasComponents is true and the eventCanvas already has a component. This method is expected to update the passed component as necessary, based on the current event.

      By default, if the passed component has methods called setEvent or setData, those methods are called automatically.

      Parameters:
      canvas - the eventCanvas to update the component for
      component - the component to be updated the canvas in question
      See Also:
    • addZoneClickHandler

      public HandlerRegistration addZoneClickHandler(ZoneClickHandler handler)
      Add a zoneClick handler.

      Called whenever a ZoneCanvas is clicked in the timelineView. There is no default implementation.

      Specified by:
      addZoneClickHandler in interface HasZoneClickHandlers
      Parameters:
      handler - the zoneClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • setDefaultProperties

      public static void setDefaultProperties(Calendar calendarProperties)
      Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

      Parameters:
      calendarProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • onInit

      protected void onInit()
      Overrides:
      onInit in class Canvas
    • onInit_Calendar

      protected void onInit_Calendar()
    • getWorkdayStart

      public String getWorkdayStart(Date date, String laneName)
      When using showWorkday:true, workdayStart and workdayEnd specify the time of day when the workday starts and ends, specified as a String acceptable to String.

      Both start and end time must fall on a 30 minute increment (eg 9:30, but not 9:45).

      The hours of the workday can be customized for particular dates by providing implementations of getWorkdayStart() and getWorkdayEnd().

      Note: This is an override point

      Parameters:
      date - the date to get the workday start for
      laneName - the name of the lane if showDayLanes is true, or null otherwise
      Returns:
      Returns the start of the working day on the passed date. By default, this method returns the value of workdayStart. Default value is "9:00am"
    • getWorkdayStart

      public String getWorkdayStart(Date date)
    • getWorkdayEnd

      public String getWorkdayEnd(Date date, String laneName)
      When using showWorkday:true, workdayStart and workdayEnd specify the time of day when the workday starts and ends, specified as a String acceptable to String.

      Both start and end time must fall on a 30 minute increment (eg 9:30, but not 9:45).

      The hours of the workday can be customized for particular dates by providing implementations of getWorkdayStart() and getWorkdayEnd().

      Note: This is an override point

      Parameters:
      date - the date to get the workday end for
      laneName - the name of the lane if showDayLanes is true, or null otherwise
      Returns:
      Returns the end of the working day on the passed date. By default, this method returns the value of workdayEnd. Default value is "5:00pm"
    • getWorkdayEnd

      public String getWorkdayEnd(Date date)
    • dateIsWorkday

      public boolean dateIsWorkday(Date date, String laneName)
      Should the parameter date be considered a workday? By default this method tries to find the parameter date day in workdays, and returns true if found. Override this method to provide custom logic for determining workday, for example returning false on holidays.

      Note that, when showing vertical lanes in the day view, this method is also passed the name of the associated lane.

      Note: This is an override point

      Parameters:
      date - date to check for being a workday
      laneName - the name of the lane if showDayLanes is true, or null otherwise
      Returns:
      true if date is a workday, false otherwise
    • dateIsWorkday

      public boolean dateIsWorkday(Date date)
    • getDayBodyHTML

      protected String getDayBodyHTML(Date date, CalendarEvent[] events, Calendar calendar, int rowNum, int colNum)
      Return the HTML to be shown in the body of a day in the month view.

      Default is to render a series of links that call Calendar.eventClick to provide details and/or an editing interface for the events.

      getDayBodyHTML() is not called for days outside of the current month if showOtherDays is false.

      Parameters:
      date - JavaScript Date object representing this day
      events - events that fall on this day
      calendar - the calendar itself
      rowNum - the row number to which the parameter date belongs
      colNum - the column number to which the parameter date belongs
      Returns:
      HTML to display
    • getDateLabelText

      public String getDateLabelText(String viewName, Date startDate, Date endDate)
      Returns the text to display with the navigation buttons above the Calendar - indicates the visible date range.

      Note: This is an override point.

      Parameters:
      viewName - one of "day", "week", "month" or "timeline"
      startDate - the start of the visible date range
      endDate - the optional end of the visible date range. May be null.
      Returns:
      a formmatted date or date-range string appropriate to the passed view
    • setEventEditorCustomizer

      public void setEventEditorCustomizer(EventEditorCustomizer customizer)
      Customizer called whenever the Calender needs to show an EventEditor, to edit or create a CalendarEvent
      Parameters:
      customizer - the customizer to execute.
    • setEventDialogCustomizer

      public void setEventDialogCustomizer(EventDialogCustomizer customizer)
      Customizer called whenever the Calender needs to show an EventDialog, to edit or view a CalendarEvent
      Parameters:
      customizer - the customizer to execute.
    • setEventHeaderHTMLCustomizer

      public void setEventHeaderHTMLCustomizer(EventHeaderHTMLCustomizer customizer)
      This method returns the HTML to be used as the header/title for the passed event.
      Parameters:
      customizer - the customizer to execute.
    • setEventBodyHTMLCustomizer

      public void setEventBodyHTMLCustomizer(EventBodyHTMLCustomizer customizer)
      This method installs a customizer that returns the HTML to be used as the body/description for the passed event.
      Parameters:
      customizer - the customizer to execute.
    • setDateStyleCustomizer

      public void setDateStyleCustomizer(DateStyleCustomizer customizer)
      This method installs a customizer that returns the CSS class name for the passed date-cell when rendered in the passed view
      Parameters:
      customizer - the customizer to execute.
    • setDateHeaderCustomizer

      public void setDateHeaderCustomizer(DateHeaderCustomizer customizer)
      This method installs a customizer to determine the HTML to be displayed in the header for a given date column in a CalendarView
      Parameters:
      customizer - the customizer to execute.
    • setDateHTMLCustomizer

      public void setDateHTMLCustomizer(DateHTMLCustomizer customizer)
      This method installs a customizer that returns the HTML to display in the passed date-cell when rendered in the passed view
      Parameters:
      customizer - the customizer to execute.
    • setDateCellAlignCustomizer

      public void setDateCellAlignCustomizer(DateCellAlignCustomizer customizer)
      This method installs a customizer that returns the horizontsal Alignment to display in the passed date-cell when rendered in the passed view
      Parameters:
      customizer - the customizer to execute.
    • setDateCellVAlignCustomizer

      public void setDateCellVAlignCustomizer(DateCellVAlignCustomizer customizer)
      This method installs a customizer that returns the VerticalAlignment to display in the passed date-cell when rendered in the passed view
      Parameters:
      customizer - the customizer to execute.
    • setDateCSSTextCustomizer

      public void setDateCSSTextCustomizer(DateCSSTextCustomizer customizer)
      This method returns the CSS class name for the passed event when rendered in the passed view
      Parameters:
      customizer - the customizer to execute.
    • setDisableDateCustomizer

      public void setDisableDateCustomizer(DisableDateCustomizer customizer)
      Return true from the customizer to have the passed event considered disabled in the passed view
      Parameters:
      customizer - the customizer to execute.
    • setShowDateCustomizer

      public void setShowDateCustomizer(ShowDateCustomizer customizer)
      This method is called during rendering for all events in the visible range - those which would be rendered by default. The customizer should return false to prevent the passed date from appearing in the passed view.
      Parameters:
      customizer - the customizer to execute.
    • setShowLaneCustomizer

      public void setShowLaneCustomizer(ShowLaneCustomizer customizer)
      Return false from the customizer to prevent the passed Lane from being rendered in the passed view.
      Parameters:
      customizer - the customizer to execute.
    • setShowEventCustomizer

      public void setShowEventCustomizer(ShowEventCustomizer customizer)
      Return false from the customizer to prevent the passed CalendarEvent from being rendered in the passed view.
      Parameters:
      customizer - the customizer to execute.
    • setEventCanvasHoverHTMLCustomizer

      public void setEventCanvasHoverHTMLCustomizer(EventCanvasHoverHTMLCustomizer customizer)
      This method returns the hover HTML to be displayed when the user hovers over an eventCanvas
      Parameters:
      customizer - the customizer to execute.
    • setZoneHoverHTMLCustomizer

      public void setZoneHoverHTMLCustomizer(ZoneHoverHTMLCustomizer zoneHoverHTMLCustomizer)
      This method returns the hover HTML to be displayed when the user hovers over an ZoneCanvas
      Parameters:
      zoneHoverHTMLCustomizer - the customizer to execute.
    • setIndicatorHoverHTMLCustomizer

      public void setIndicatorHoverHTMLCustomizer(IndicatorHoverHTMLCustomizer indicatorHoverHTMLCustomizer)
      This method returns the hover HTML to be displayed when the user hovers over an IndicatorCanvas
      Parameters:
      indicatorHoverHTMLCustomizer - the customizer to execute.
    • setMonthViewHoverHTMLCustomizer

      public void setMonthViewHoverHTMLCustomizer(MonthViewHoverHTMLCustomizer monthViewHoverHTMLCustomizer)
      This method returns the hover HTML to be displayed when the user hovers over a cell displayed in the calendar month view tab.

      Default implementation will display a list of the events occurring on the date the user is hovering over. Override for custom behavior. Note that returning null will suppress the hover altogether.

      Parameters:
      monthViewHoverHTMLCustomizer - the customizer to execute.
    • setHeaderHoverCustomizer

      public void setHeaderHoverCustomizer(HeaderLevelHoverCustomizer customizer)
      Customize the Hover text for a given span in a HeaderLevel.
      Parameters:
      customizer - HeaderLevelHoverCustomizer the customizer
    • setDragHoverCustomizer

      public void setDragHoverCustomizer(DragHoverCustomizer customizer)
      Customize the Hover text to display during a drag operation
      Parameters:
      customizer - DragHoverCustomizer the customizer
    • setCellHoverCustomizer

      public void setCellHoverCustomizer(CellHoverCustomizer customizer)
      Customize the Hover text to display when the mouse hovers over cells in a CalendarView
      Parameters:
      customizer - CellHoverCustomizer the customizer
    • setEventCanvasGripperIconCustomizer

      public void setEventCanvasGripperIconCustomizer(EventCanvasGripperIconCustomizer customizer)
      This method returns the SCImgURL for the icon to use as the gripper for a given EventCanvas
      Parameters:
      customizer - the customizer to execute.
    • setEventCanvasComponentCustomizer

      public void setEventCanvasComponentCustomizer(EventCanvasComponentCustomizer customizer)
      This method sets the customizer for EventCanvasComponent methods
      Parameters:
      customizer - the customizer to execute.
    • setLaneGroupStartOpen

      public void setLaneGroupStartOpen(GroupStartOpen group)
    • setLaneGroupStartOpen

      public void setLaneGroupStartOpen(Object... groupValues)
      Parameters:
      groupValues - Array of values that should be opened
    • setEventEditorFields

      public void setEventEditorFields(FormItem... eventEditorFields) throws IllegalStateException
      The set of fields for the eventEditor.

      The default set of fields are:

          {name: "startHours", title: "From", type: "select", width: 60},
       {name: "startMinutes", showTitle: false, type: "select", width: 60},    {name: "startAMPM", showTitle: false,
       type: "select", width: 60},    {name: "invalidDate", type: "blurb", colSpan: 4, visible: false}    {name:
       "endHours", title: "To", type: "select", width: 60},    {name: "endMinutes", showTitle: false, type: "select",
       width: 60},    {name: "endAMPM", showTitle: false, type: "select", width: 60},    {name: "name", title: "Name",
       type: "text", colSpan: 4},    {name: "description", title: "Description", type: "textArea", colSpan: 4, height:
       50} 
      See the Customized Binding example below for more information on altering default datasource fields within forms.
      Parameters:
      eventEditorFields - eventEditorFields Default value is see below
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • setEventDialogFields

      public void setEventDialogFields(FormItem... eventDialogFields) throws IllegalStateException
      The set of fields for the eventDialog.

      The default set of fields are:

          {name: "name", title: "Event Name", type: nameType, width: 250 },
       {name: "save", title: "Save Event", type: "SubmitItem", endRow: false},    {name: "details", title: "Edit
       Details", type: "button", startRow: false} 
      See the Customized Binding example below for more information on altering default datasource fields within forms.
      Parameters:
      eventDialogFields - eventDialogFields Default value is see below
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • setData

      public void setData(Record[] data)
      An array of Record objects, specifying the data to be used to populate the DataBoundComponent. Note that not all DataBoundComponents observe the changes to the data to redraw themselves. Refer to the version of setData that accepts component specific records.
      Parameters:
      data - array of Record objects.
      See Also:
    • setData

      public void setData(RecordList data)
      An List of Record objects, specifying the data to be used to populate the DataBoundComponent. Note that not all DataBoundComponents observe the changes to the data to redraw themselves. Refer to the version of setData that accepts component specific records.
      Parameters:
      data - List of Records
    • setTimeFormatter

      public void setTimeFormatter(TimeFormatter timeFormatter)
      Deprecated.
      Display format to use for the time portion of events' date information.
      Parameters:
      timeFormatter - timeFormatter Default value is "toShortPaddedTime"
    • setTimeFormatter

      public void setTimeFormatter(TimeDisplayFormat timeFormatter)
      Display format to use for the time portion of events' date information.
      Parameters:
      timeFormatter - timeFormatter Default value is "toShortPaddedTime"
    • getTimeFormatter

      public TimeDisplayFormat getTimeFormatter()
      Display format to use for the time portion of events' date information.
      Returns:
      TimeDisplayFormat
    • removeLane

      public void removeLane(Lane lane)
      Removes a lane from the calendar in timelineView mode.
      Parameters:
      lane - the lane to remove
    • removeLane

      public void removeLane(String laneName)
      Removes a lane from the calendar in timelineView mode.
      Parameters:
      laneName - the name of the lane to remove
    • addEvent

      public void addEvent(Date startDate, Date endDate, String name, String description)
      Create a new event in this calendar instance.
      Parameters:
      startDate - start date of event
      endDate - end date of event
      name - name of event
      description - description of event
    • addEvent

      public void addEvent(Date startDate, Date endDate, String name, String description, Map otherFields)
      Create a new event in this calendar instance.
      Parameters:
      startDate - start date of event
      endDate - end date of event
      name - name of event
      description - description of event
      otherFields - new values of additional fields to be updated
    • removeEvent

      public void removeEvent(CalendarEvent event)
      Remove an event from this calendar.
      Parameters:
      event - The event object to remove from the calendar
    • updateEvent

      public void updateEvent(CalendarEvent event, Date startDate, Date endDate, String name, String description)
      update an event in this calendar.
      Parameters:
      event - The event object to remove from the calendar
      startDate - start date of event
      endDate - end date of event
      name - name of event
      description - description of event
    • setWorkdays

      public void setWorkdays(int[] workdays) throws IllegalStateException
      Array of days that are considered workdays when showWorkday is true
      Parameters:
      workdays - workdays Default value is [1,2,3,4,5]
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • calendarLoaded

      public static boolean calendarLoaded()
      Static method indicating whether the optional Calendar module is loaded for the page. The Calendar component requires this module.
      Returns:
      true if the Calendar module is present
    • getLaneGroupByFieldAsString

      public String[] getLaneGroupByFieldAsString()
      Deprecated.
    • setEventCanvasMenuCustomizer

      public void setEventCanvasMenuCustomizer(EventCanvasMenuCustomizer customizer)
      Customizer called whenever the Calender needs to show a context-menu for a given EventCanvas
      Parameters:
      customizer - the customizer to execute.
    • setDataPageSize

      public Calendar setDataPageSize(int dataPageSize)
      Description copied from interface: DataBoundComponent
      When using data paging, how many records to fetch at a time. If set to a positive integer, dataPageSize will override the default resultSize for ResultSets automatically created when you call fetchData() (and similarly for the resultSize of ResultTrees). The default of 0 means to just use the default page size of the data container.

      Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords:true, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

      Specified by:
      setDataPageSize in interface DataBoundComponent
      Parameters:
      dataPageSize - dataPageSize Default value is 0
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getDataPageSize

      public int getDataPageSize()
      Description copied from interface: DataBoundComponent
      When using data paging, how many records to fetch at a time. If set to a positive integer, dataPageSize will override the default resultSize for ResultSets automatically created when you call fetchData() (and similarly for the resultSize of ResultTrees). The default of 0 means to just use the default page size of the data container.

      Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords:true, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

      Specified by:
      getDataPageSize in interface DataBoundComponent
      Returns:
      int
      See Also:
    • setUseAllDataSourceFields

      public Calendar setUseAllDataSourceFields(Boolean useAllDataSourceFields)
      Description copied from interface: DataBoundComponent
      If true, the set of fields given by the "default binding" (see &#010 fields) is used, with any fields specified in&#010 component.fields acting as overrides that can suppress or modify the&#010 display of individual fields, without having to list the entire set of fields that&#010 should be shown.&#010

      &#010 If component.fields contains fields that are not found in the DataSource,&#010 they will be shown after the most recently referred to DataSource field. If the new&#010 fields appear first, they will be shown first.

      Specified by:
      setUseAllDataSourceFields in interface DataBoundComponent
      Parameters:
      useAllDataSourceFields - useAllDataSourceFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getUseAllDataSourceFields

      public Boolean getUseAllDataSourceFields()
      Description copied from interface: DataBoundComponent
      If true, the set of fields given by the "default binding" (see &#010 fields) is used, with any fields specified in&#010 component.fields acting as overrides that can suppress or modify the&#010 display of individual fields, without having to list the entire set of fields that&#010 should be shown.&#010

      &#010 If component.fields contains fields that are not found in the DataSource,&#010 they will be shown after the most recently referred to DataSource field. If the new&#010 fields appear first, they will be shown first.

      Specified by:
      getUseAllDataSourceFields in interface DataBoundComponent
      Returns:
      Boolean
    • setSparseFieldState

      public Calendar setSparseFieldState(Boolean sparseFieldState)
      Description copied from interface: DataBoundComponent
      If true, ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String) will omit state information for hidden fields by default.
      Specified by:
      setSparseFieldState in interface DataBoundComponent
      Parameters:
      sparseFieldState - sparseFieldState Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getSparseFieldState

      public Boolean getSparseFieldState()
      Description copied from interface: DataBoundComponent
      If true, ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String) will omit state information for hidden fields by default.
      Specified by:
      getSparseFieldState in interface DataBoundComponent
      Returns:
      Boolean
    • setShowHiddenFields

      public Calendar setShowHiddenFields(Boolean showHiddenFields)
      Description copied from interface: DataBoundComponent
      Whether to show fields marked hidden:true when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 The hidden property is used on DataSource fields to mark fields that are&#010 never of meaning to an end user.

      Specified by:
      setShowHiddenFields in interface DataBoundComponent
      Parameters:
      showHiddenFields - showHiddenFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getShowHiddenFields

      public Boolean getShowHiddenFields()
      Description copied from interface: DataBoundComponent
      Whether to show fields marked hidden:true when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 The hidden property is used on DataSource fields to mark fields that are&#010 never of meaning to an end user.

      Specified by:
      getShowHiddenFields in interface DataBoundComponent
      Returns:
      Boolean
    • setShowComplexFields

      public Calendar setShowComplexFields(Boolean showComplexFields)
      Description copied from interface: DataBoundComponent
      Whether to show fields of non-atomic types when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 If true, the component will show fields that declare a complex type, for example, a&#010 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a&#010 DataSource that declares the fields of a shipping address (city, street name, etc).&#010

      &#010 Such fields may need custom formatters or editors in order to create a usable interface,&#010 for example, an Address field in a ListGrid might use a custom formatter to combine the&#010 relevant fields of an address into one column, and might use a pop-up dialog for&#010 editing.

      Note : This is an advanced setting

      Specified by:
      setShowComplexFields in interface DataBoundComponent
      Parameters:
      showComplexFields - showComplexFields Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getShowComplexFields

      public Boolean getShowComplexFields()
      Description copied from interface: DataBoundComponent
      Whether to show fields of non-atomic types when a DataBoundComponent is given a&#010 DataSource but no component.fields.&#010

      &#010 If true, the component will show fields that declare a complex type, for example, a&#010 field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a&#010 DataSource that declares the fields of a shipping address (city, street name, etc).&#010

      &#010 Such fields may need custom formatters or editors in order to create a usable interface,&#010 for example, an Address field in a ListGrid might use a custom formatter to combine the&#010 relevant fields of an address into one column, and might use a pop-up dialog for&#010 editing.

      Specified by:
      getShowComplexFields in interface DataBoundComponent
      Returns:
      Boolean
    • setFetchOperation

      public Calendar setFetchOperation(String fetchOperation)
      Description copied from interface: DataBoundComponent
      Operation ID this component should use when performing fetch operations.
      Specified by:
      setFetchOperation in interface DataBoundComponent
      Parameters:
      fetchOperation - fetchOperation Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getFetchOperation

      public String getFetchOperation()
      Description copied from interface: DataBoundComponent
      Operation ID this component should use when performing fetch operations.
      Specified by:
      getFetchOperation in interface DataBoundComponent
      Returns:
      String
    • setUpdateOperation

      public Calendar setUpdateOperation(String updateOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing update operations.
      Specified by:
      setUpdateOperation in interface DataBoundComponent
      Parameters:
      updateOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getUpdateOperation

      public String getUpdateOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing update operations.
      Specified by:
      getUpdateOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setAddOperation

      public Calendar setAddOperation(String addOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing add operations.
      Specified by:
      setAddOperation in interface DataBoundComponent
      Parameters:
      addOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getAddOperation

      public String getAddOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing add operations.
      Specified by:
      getAddOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setRemoveOperation

      public Calendar setRemoveOperation(String removeOperation)
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing remove operations.
      Specified by:
      setRemoveOperation in interface DataBoundComponent
      Parameters:
      removeOperation - Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getRemoveOperation

      public String getRemoveOperation()
      Description copied from interface: DataBoundComponent
      operationId this component should use when performing remove operations.
      Specified by:
      getRemoveOperation in interface DataBoundComponent
      Returns:
      String
      See Also:
    • setExportFields

      public Calendar setExportFields(String[] exportFields)
      Description copied from interface: DataBoundComponent
      The list of field-names to export. If provided, the field-list in the exported output is &#010 limited and sorted as per the list.&#010

      &#010 If exportFields is not provided, the exported output includes all visible fields &#010 from this component, sorted as they appear.

      Specified by:
      setExportFields in interface DataBoundComponent
      Parameters:
      exportFields - exportFields Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportFields

      public String[] getExportFields()
      Description copied from interface: DataBoundComponent
      The list of field-names to export. If provided, the field-list in the exported output is &#010 limited and sorted as per the list.&#010

      &#010 If exportFields is not provided, the exported output includes all visible fields &#010 from this component, sorted as they appear.

      Specified by:
      getExportFields in interface DataBoundComponent
      Returns:
      the list of field-names to export.
    • setExportAll

      public Calendar setExportAll(Boolean exportAll)
      Description copied from interface: DataBoundComponent
      Setting exportAll to true prevents the component from passing its list of fields to the &#010 export call. The result is the export of all visible fields from fields.&#010

      &#010 If exportAll is false, an export operation will first consider &#010 exportFields, if it's set, and fall back on all visible fields from&#010 fields otherwise.

      Specified by:
      setExportAll in interface DataBoundComponent
      Parameters:
      exportAll - exportAll Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportAll

      public Boolean getExportAll()
      Description copied from interface: DataBoundComponent
      Setting exportAll to true prevents the component from passing its list of fields to the &#010 export call. The result is the export of all visible fields from fields.&#010

      &#010 If exportAll is false, an export operation will first consider &#010 exportFields, if it's set, and fall back on all visible fields from&#010 fields otherwise.

      Specified by:
      getExportAll in interface DataBoundComponent
      Returns:
      Boolean
    • setExportIncludeSummaries

      public Calendar setExportIncludeSummaries(Boolean exportIncludeSummaries)
      Description copied from interface: DataBoundComponent
      If Summary rows exist for this component, whether to include them when exporting client data. Defaults to true if not set
      Specified by:
      setExportIncludeSummaries in interface DataBoundComponent
      Parameters:
      exportIncludeSummaries - exportIncludeSummaries Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getExportIncludeSummaries

      public Boolean getExportIncludeSummaries()
      Description copied from interface: DataBoundComponent
      If Summary rows exist for this component, whether to include them when exporting client data. Defaults to true if not set
      Specified by:
      getExportIncludeSummaries in interface DataBoundComponent
      Returns:
      Boolean
    • setPreventDuplicates

      public Calendar setPreventDuplicates(Boolean preventDuplicates) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If set, detect and prevent duplicate records from being transferred to this component, either via&#010 drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected,&#010 a dialog will appear showing the duplicateDragMessage.&#010

      &#010 If the component either does not have a DataSource or has a DataSource with no&#010 primaryKey declared, duplicate checking is off by&#010 default. If duplicate checking is enabled, it looks for an existing record in the dataset&#010 that has all of the properties of the dragged record, and considers that a duplicate.&#010

      &#010 For DragDataAction:"copy" where the target DataSource is related to the source&#010 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current&#010 criteria, already has a record whose value for the foreignKey field matches the&#010 primaryKey of the record being transferred.&#010

      &#010 For example, consider dragging "employees" to "teams", where "teams" has a field&#010 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target&#010 grid has search criteria causing it to show all the members of one team. A duplicate -&#010 adding an employee to the same team twice - is when the target grid's dataset contains an&#010 record with "employeeId" matching the "id" field of the dropped employee.

      Specified by:
      setPreventDuplicates in interface DataBoundComponent
      Parameters:
      preventDuplicates - preventDuplicates Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getPreventDuplicates

      public Boolean getPreventDuplicates()
      Description copied from interface: DataBoundComponent
      If set, detect and prevent duplicate records from being transferred to this component, either via&#010 drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected,&#010 a dialog will appear showing the duplicateDragMessage.&#010

      &#010 If the component either does not have a DataSource or has a DataSource with no&#010 primaryKey declared, duplicate checking is off by&#010 default. If duplicate checking is enabled, it looks for an existing record in the dataset&#010 that has all of the properties of the dragged record, and considers that a duplicate.&#010

      &#010 For DragDataAction:"copy" where the target DataSource is related to the source&#010 DataSource by foreignKey, a duplicate means that the target list, as filtered by the current&#010 criteria, already has a record whose value for the foreignKey field matches the&#010 primaryKey of the record being transferred.&#010

      &#010 For example, consider dragging "employees" to "teams", where "teams" has a field&#010 "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target&#010 grid has search criteria causing it to show all the members of one team. A duplicate -&#010 adding an employee to the same team twice - is when the target grid's dataset contains an&#010 record with "employeeId" matching the "id" field of the dropped employee.

      Specified by:
      getPreventDuplicates in interface DataBoundComponent
      Returns:
      Boolean
    • setDuplicateDragMessage

      public Calendar setDuplicateDragMessage(String duplicateDragMessage) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Message to show when a user attempts to transfer duplicate records into this component, and&#010 preventDuplicates is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.
      Specified by:
      setDuplicateDragMessage in interface DataBoundComponent
      Parameters:
      duplicateDragMessage - duplicateDragMessage Default value is "Duplicates not allowed"
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getDuplicateDragMessage

      public String getDuplicateDragMessage()
      Description copied from interface: DataBoundComponent
      Message to show when a user attempts to transfer duplicate records into this component, and&#010 preventDuplicates is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.
      Specified by:
      getDuplicateDragMessage in interface DataBoundComponent
      Returns:
      String
    • setAddDropValues

      public Calendar setAddDropValues(Boolean addDropValues)
      Description copied from interface: DataBoundComponent
      Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.

      If this value is true and this component is databound, DataBoundComponent.getDropValues() will be called for every databound item dropped on this grid, and an update performed on the item

      Specified by:
      setAddDropValues in interface DataBoundComponent
      Parameters:
      addDropValues - addDropValues Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddDropValues

      public Boolean getAddDropValues()
      Description copied from interface: DataBoundComponent
      Indicates whether to add "drop values" to items dropped on this component, if both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key. "Drop values" are properties of the dropped item that you wish to change (and persist) as a result of the item being dropped on this grid.

      If this value is true and this component is databound, DataBoundComponent.getDropValues() will be called for every databound item dropped on this grid, and an update performed on the item

      Specified by:
      getAddDropValues in interface DataBoundComponent
      Returns:
      Boolean
    • setDropValues

      public Calendar setDropValues(Map dropValues)
      Description copied from interface: DataBoundComponent
      When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.

      If this property is not defined, Smart GWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.

      Note : This is an advanced setting

      Specified by:
      setDropValues in interface DataBoundComponent
      Parameters:
      dropValues - dropValues Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDropValues

      public Map getDropValues()
      Description copied from interface: DataBoundComponent
      When an item is dropped on this component, and addDropValues is true and both the source and target widgets are databound, either to the same DataSource or to different DataSources that are related via a foreign key, this object provides the "drop values" that Smart GWT will apply to the dropped object before updating it.

      If this property is not defined, Smart GWT defaults to returning the selection criteria currently in place for this component. Thus, any databound items (for example, rows from other grids bound to the same DataSource) dropped on the grid will, by default, be subjected to an update that makes them conform to the grid's current filter criteria.

      Note : This is an advanced setting

      Specified by:
      getDropValues in interface DataBoundComponent
      Returns:
      Returns the "drop values" to apply to a record dropped on this component prior to update. Only&#010 applicable to databound components - see dropValues for more details. If multiple records &#010 are being dropped, this method is called for each of them in turn.&#010

      &#010 This method returns the following:&#010

        &#010
      • Nothing, if addDropValues is false
      • &#010
      • dropValues, if that property is set. If the component's criteria object is applicable (as explained&#010 in the next item), it is merged into dropValues, with properties in dropValues taking precedence.
      • &#010
      • The component's criteria object, if the most recent textMatchStyle for the component was "exact" &#010 and it is simple criteria (ie, not an AdvancedCriteria object)
      • &#010
      • Otherwise nothing
      • &#010
      &#010

      &#010 You can override this method if you need more complex setting of drop values than can be &#010 provided by simply supplying a dropValues object.&#010 &#010

    • setProgressiveLoading

      public Calendar setProgressiveLoading(Boolean progressiveLoading)
      Indicates whether or not this component will load its data progressively
      Parameters:
      progressiveLoading -
      Returns:
      DataBoundComponent instance, for chaining setter calls
      See Also:
    • getProgressiveLoading

      public Boolean getProgressiveLoading()
      Indicates whether or not this component will load its data progressively
      Returns:
      See Also:
    • setUseFlatFields

      public Calendar setUseFlatFields(Boolean useFlatFields) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      The useFlatFields flag causes all simple type fields anywhere in a nested&#010 set of DataSources to be exposed as a flat list for form binding. &#010

      &#010 useFlatFields is typically used with imported metadata, such as &#010 XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a &#010 XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML&#010 nesting that aren't meaningful in a user interface, without the cumbersome and fragile&#010 process of mapping form fields to XML structures.&#010

      &#010 For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message&#010 schema for a web service operation whose input message looks like this:&#010

      &#010 <FindServices>&#010     <searchFor>search text</searchFor>&#010     <Options>&#010         <caseSensitive>false</caseSensitive>&#010     </Options>&#010     <IncludeInSearch>&#010         <serviceName>true</serviceName>&#010         <documentation>true</documentation>&#010         <keywords>true</keywords>&#010     </IncludeInSearch>&#010 </FindServices>&#010 
      &#010 Setting useFlatFields on a DynamicForm that is bound to this input&#010 message schema would result in 5 FormItem reflecting the 5 simple type&#010 fields in the message.&#010

      &#010 For this form, the result of DynamicForm.getValues() might look&#010 like:&#010

      &#010

      {&#010    searchFor: "search text",&#010    caseSensitive: false,&#010    serviceName: true,&#010    documentation : true,&#010    keywords : true&#010 }
      &#010 When contacting a WebService, these values can be automatically&#010 mapped to the structure of the input message for a web service operation by setting&#010 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting&#010 useFlatFields (for use with a DataSource that is&#010 'bound to a WSDL web service' via&#010 wsOperation). &#010

      &#010 Using these two facilities in conjunction (component.useFlatFields and&#010 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user&#010 presentation and when providing the data for XML messages.&#010

      &#010 You can also set useFlatFields to automatically enable &#010 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a&#010 particular operationType.&#010

      &#010 Note that useFlatFields is not generally recommended for use with structures&#010 where multiple simple type fields exist with the same name, however if used with such a&#010 structure, the first field to use a given name wins. "first" means the first field&#010 encountered in a depth first search. "wins" means only the first field will be present as a&#010 field when data binding.

      Specified by:
      setUseFlatFields in interface DataBoundComponent
      Parameters:
      useFlatFields - useFlatFields Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getUseFlatFields

      public Boolean getUseFlatFields()
      Description copied from interface: DataBoundComponent
      The useFlatFields flag causes all simple type fields anywhere in a nested&#010 set of DataSources to be exposed as a flat list for form binding. &#010

      &#010 useFlatFields is typically used with imported metadata, such as &#010 XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a &#010 XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML&#010 nesting that aren't meaningful in a user interface, without the cumbersome and fragile&#010 process of mapping form fields to XML structures.&#010

      &#010 For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message&#010 schema for a web service operation whose input message looks like this:&#010

      &#010 <FindServices>&#010     <searchFor>search text</searchFor>&#010     <Options>&#010         <caseSensitive>false</caseSensitive>&#010     </Options>&#010     <IncludeInSearch>&#010         <serviceName>true</serviceName>&#010         <documentation>true</documentation>&#010         <keywords>true</keywords>&#010     </IncludeInSearch>&#010 </FindServices>&#010 
      &#010 Setting useFlatFields on a DynamicForm that is bound to this input&#010 message schema would result in 5 FormItem reflecting the 5 simple type&#010 fields in the message.&#010

      &#010 For this form, the result of DynamicForm.getValues() might look&#010 like:&#010

      &#010

      {&#010    searchFor: "search text",&#010    caseSensitive: false,&#010    serviceName: true,&#010    documentation : true,&#010    keywords : true&#010 }
      &#010 When contacting a WebService, these values can be automatically&#010 mapped to the structure of the input message for a web service operation by setting&#010 {@link com.smartgwt.client..WSRequest#getUseFlatFields useFlatFields} (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting&#010 useFlatFields (for use with a DataSource that is&#010 'bound to a WSDL web service' via&#010 wsOperation). &#010

      &#010 Using these two facilities in conjunction (component.useFlatFields and&#010 request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user&#010 presentation and when providing the data for XML messages.&#010

      &#010 You can also set useFlatFields to automatically enable &#010 "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a&#010 particular operationType.&#010

      &#010 Note that useFlatFields is not generally recommended for use with structures&#010 where multiple simple type fields exist with the same name, however if used with such a&#010 structure, the first field to use a given name wins. "first" means the first field&#010 encountered in a depth first search. "wins" means only the first field will be present as a&#010 field when data binding.

      Specified by:
      getUseFlatFields in interface DataBoundComponent
      Returns:
      Boolean
    • setHiliteProperty

      public Calendar setHiliteProperty(String hiliteProperty)
      Description copied from interface: DataBoundComponent
      Marker that can be set on a record to flag that record as hilited. Should be set to a value&#010 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.
      Specified by:
      setHiliteProperty in interface DataBoundComponent
      Parameters:
      hiliteProperty - hiliteProperty Default value is "_hilite"
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getHiliteProperty

      public String getHiliteProperty()
      Description copied from interface: DataBoundComponent
      Marker that can be set on a record to flag that record as hilited. Should be set to a value&#010 that matches {@link com.smartgwt.client..Hilite#getId id} for a hilite defined on this component.
      Specified by:
      getHiliteProperty in interface DataBoundComponent
      Returns:
      String
    • editFields

      public void editFields()
      Shows a FieldPicker interface allowing end-users to rearrange the order and visibiility of the fields in the associated DataBoundComponent.
    • editHilites

      public void editHilites()
      Description copied from interface: DataBoundComponent
      Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.
      Specified by:
      editHilites in interface DataBoundComponent
    • getHiliteState

      public String getHiliteState()
      Description copied from interface: DataBoundComponent
      Get the current hilites encoded as a String, for saving.
      Specified by:
      getHiliteState in interface DataBoundComponent
      Returns:
      the hilite state
    • setHiliteState

      public Calendar setHiliteState(String hiliteState)
      Description copied from interface: DataBoundComponent
      Set the current hilites based on a hiliteState String previously returned from getHilitesState.
      Specified by:
      setHiliteState in interface DataBoundComponent
      Parameters:
      hiliteState - hilites state encoded as a String
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setHilites

      public Calendar setHilites(Hilite[] hilites)
      Description copied from interface: DataBoundComponent
      Accepts an array of hilite objects and applies them to this DataBoundComponent. See also getHilites for a method of retrieving the hilite array for storage, including hilites manually added by the user.

      NOTE: This is only supported on ListGrid for now.

      Specified by:
      setHilites in interface DataBoundComponent
      Parameters:
      hilites - array of hilite objects
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getHilites

      public Hilite[] getHilites()
      Description copied from interface: DataBoundComponent
      Return the set of hilite-objects currently applied to this DataBoundComponent. These can be saved for storage and then restored to a component later via setHilites().
      Specified by:
      getHilites in interface DataBoundComponent
      Returns:
      array of hilite objects
    • setDragDataAction

      public Calendar setDragDataAction(DragDataAction dragDataAction)
      Description copied from interface: DataBoundComponent
      Indicates what to do with data dragged into another DataBoundComponent. See&#010 DragDataAction type for details.
      Specified by:
      setDragDataAction in interface DataBoundComponent
      Parameters:
      dragDataAction - dragDataAction Default value is Canvas.MOVE
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDragDataAction

      public DragDataAction getDragDataAction()
      Description copied from interface: DataBoundComponent
      Indicates what to do with data dragged into another DataBoundComponent. See&#010 DragDataAction type for details.
      Specified by:
      getDragDataAction in interface DataBoundComponent
      Returns:
      DragDataAction
    • setDragTrackerStyle

      public Calendar setDragTrackerStyle(String dragTrackerStyle)
      Description copied from interface: DataBoundComponent
      CSS Style to apply to the drag tracker when dragging occurs on this component.
      Specified by:
      setDragTrackerStyle in interface DataBoundComponent
      Parameters:
      dragTrackerStyle - dragTrackerStyle Default value is "gridDragTracker"
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getDragTrackerStyle

      public String getDragTrackerStyle()
      Description copied from interface: DataBoundComponent
      CSS Style to apply to the drag tracker when dragging occurs on this component.
      Specified by:
      getDragTrackerStyle in interface DataBoundComponent
      Returns:
      String
    • setCanAddFormulaFields

      public Calendar setCanAddFormulaFields(Boolean canAddFormulaFields)
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.&#010

      &#010 User-added formula fields can be persisted via ListGrid.getFieldState() and &#010 ListGrid.setFieldState(java.lang.String).

      Specified by:
      setCanAddFormulaFields in interface DataBoundComponent
      Parameters:
      canAddFormulaFields - canAddFormulaFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • addSummaryField

      public void addSummaryField()
      Description copied from interface: DataBoundComponent
      Convenience method to display a {@link com.smartgwt.client..SummaryBuilder} to create a new Summary Field. This &#010 is equivalent to calling DataBoundComponentGen#editSummaryField with &#010 no parameter.&#010&#010
      Specified by:
      addSummaryField in interface DataBoundComponent
    • addFormulaField

      public void addFormulaField()
      Description copied from interface: DataBoundComponent
      Convenience method to display a {@link com.smartgwt.client..FormulaBuilder} to create a new Formula Field. This &#010 is equivalent to calling DataBoundComponentGen#editFormulaField with &#010 no parameter.&#010&#010
      Specified by:
      addFormulaField in interface DataBoundComponent
    • getCanAddFormulaFields

      public Boolean getCanAddFormulaFields()
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 field based on values present in other fields, using the {@link com.smartgwt.client..FormulaBuilder}.&#010

      &#010 User-added formula fields can be persisted via ListGrid.getFieldState() and &#010 ListGrid.setFieldState(java.lang.String).

      Specified by:
      getCanAddFormulaFields in interface DataBoundComponent
      Returns:
      Boolean
    • setAddFormulaFieldText

      public Calendar setAddFormulaFieldText(String addFormulaFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      setAddFormulaFieldText in interface DataBoundComponent
      Parameters:
      addFormulaFieldText - addFormulaFieldText Default value is "Add formula column..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddFormulaFieldText

      public String getAddFormulaFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      getAddFormulaFieldText in interface DataBoundComponent
      Returns:
      String
    • setEditFormulaFieldText

      public Calendar setEditFormulaFieldText(String editFormulaFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit a formula field
      Specified by:
      setEditFormulaFieldText in interface DataBoundComponent
      Parameters:
      editFormulaFieldText - editFormulaFieldText Default value is "Edit formula..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getEditFormulaFieldText

      public String getEditFormulaFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit a formula field
      Specified by:
      getEditFormulaFieldText in interface DataBoundComponent
      Returns:
      String
    • setCanAddSummaryFields

      public Calendar setCanAddSummaryFields(Boolean canAddSummaryFields)
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 text field that can contain both user-defined text and the formatted values present in other &#010 fields, using the {@link com.smartgwt.client..SummaryBuilder}.&#010

      &#010 User-added summary fields can be persisted via ListGrid.getFieldState() and &#010 ListGrid.setFieldState(java.lang.String).

      Specified by:
      setCanAddSummaryFields in interface DataBoundComponent
      Parameters:
      canAddSummaryFields - canAddSummaryFields Default value is false
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getCanAddSummaryFields

      public Boolean getCanAddSummaryFields()
      Description copied from interface: DataBoundComponent
      Adds an item to the header context menu allowing users to launch a dialog to define a new&#010 text field that can contain both user-defined text and the formatted values present in other &#010 fields, using the {@link com.smartgwt.client..SummaryBuilder}.&#010

      &#010 User-added summary fields can be persisted via ListGrid.getFieldState() and &#010 ListGrid.setFieldState(java.lang.String).

      Specified by:
      getCanAddSummaryFields in interface DataBoundComponent
      Returns:
      Boolean
    • setAddSummaryFieldText

      public Calendar setAddSummaryFieldText(String addSummaryFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      setAddSummaryFieldText in interface DataBoundComponent
      Parameters:
      addSummaryFieldText - addSummaryFieldText Default value is "Add summary column..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getAddSummaryFieldText

      public String getAddSummaryFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to add a formula field
      Specified by:
      getAddSummaryFieldText in interface DataBoundComponent
      Returns:
      String
    • setEditSummaryFieldText

      public Calendar setEditSummaryFieldText(String editSummaryFieldText)
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit the formatter for a field
      Specified by:
      setEditSummaryFieldText in interface DataBoundComponent
      Parameters:
      editSummaryFieldText - editSummaryFieldText Default value is "Edit summary format..."
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getEditSummaryFieldText

      public String getEditSummaryFieldText()
      Description copied from interface: DataBoundComponent
      Text for a menu item allowing users to edit the formatter for a field
      Specified by:
      getEditSummaryFieldText in interface DataBoundComponent
      Returns:
      String
    • setSavedSearchId

      public Calendar setSavedSearchId(String savedSearchId)
      Description copied from interface: DataBoundComponent
      Optional identifier for saved searches that should be applied to this component.

      By default SavedSearches are associated with a component via its local ID and DataSource ID. This property allows developers to override this behavior and explicitly associate a component with a set of saved searches. This can provide a couple of benefits:
      Firstly this ensures that saved searches will be unambiguously associated with the particular component even if the page changes such that a stored minimal locator would no longer applied to the component, without requiring an explicit Canvas.ID.
      Secondly this allows the same set of saved searches to be applied to more than one component on a page. This may be valueable for cases where the same information from the same dataSource is presented to users in multiple places.

      Note: This is an advanced setting.

      Specified by:
      setSavedSearchId in interface DataBoundComponent
      Parameters:
      savedSearchId - New savedSearchId value. Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getSavedSearchId

      public String getSavedSearchId()
      Description copied from interface: DataBoundComponent
      Optional identifier for saved searches that should be applied to this component.

      By default SavedSearches are associated with a component via its local ID and DataSource ID. This property allows developers to override this behavior and explicitly associate a component with a set of saved searches. This can provide a couple of benefits:
      Firstly this ensures that saved searches will be unambiguously associated with the particular component even if the page changes such that a stored minimal locator would no longer applied to the component, without requiring an explicit Canvas.ID.
      Secondly this allows the same set of saved searches to be applied to more than one component on a page. This may be valueable for cases where the same information from the same dataSource is presented to users in multiple places.

      Specified by:
      getSavedSearchId in interface DataBoundComponent
      Returns:
      Current savedSearchId value. Default value is null
    • setShowSavedSearchesByDS

      public Calendar setShowSavedSearchesByDS(boolean showSavedSearchesByDS) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Whether to associate saved searches by default with the current DataSource of a component when a savedSearchId is not provided. If this property is true, then when the DataSource is changed, existing saved searches will disappear and only be available if the DataSource is set back to its original value.

      If this property is false, saved searches will persist across DataSource changes so that searches that aren't applicable to the current DataSource might still be shown.

      Note: This is an advanced setting

      Specified by:
      setShowSavedSearchesByDS in interface DataBoundComponent
      Parameters:
      showSavedSearchesByDS - New showSavedSearchesByDS value. Default value is true
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowSavedSearchesByDS

      public boolean getShowSavedSearchesByDS()
      Description copied from interface: DataBoundComponent
      Whether to associate saved searches by default with the current DataSource of a component when a savedSearchId is not provided. If this property is true, then when the DataSource is changed, existing saved searches will disappear and only be available if the DataSource is set back to its original value.

      If this property is false, saved searches will persist across DataSource changes so that searches that aren't applicable to the current DataSource might still be shown.

      Specified by:
      getShowSavedSearchesByDS in interface DataBoundComponent
      Returns:
      Current showSavedSearchesByDS value. Default value is true
    • findAll

      public Record[] findAll(AdvancedCriteria adCriteria)
      Filters all objects according to the AdvancedCriteria passed
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      all matching Objects or null if none found
    • find

      public Record find(AdvancedCriteria adCriteria)
      Filters all objects according to the AdvancedCriteria passed and returns the first matching object or null if not found
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      first matching object or null if not found
    • findIndex

      public int findIndex(AdvancedCriteria adCriteria)
      Finds the index of the first Record that matches with the AdvacendCriteria passed.
      Parameters:
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      index of the first matching Record or -1 if not found
    • findNextIndex

      public int findNextIndex(int startIndex, AdvancedCriteria adCriteria, int endIndex)
      Like RecordList.findIndex(java.util.Map), but considering the startIndex and endIndex parameters.
      Parameters:
      startIndex - first index to consider
      adCriteria - AdvancedCriteria to use to filter results
      endIndex - last index to consider
      Returns:
      index of the first matching Record or -1 if not found
    • findNextIndex

      public int findNextIndex(int startIndex, AdvancedCriteria adCriteria)
      Like RecordList.findIndex(java.util.Map), but considering the startIndex parameter.
      Parameters:
      startIndex - first index to consider
      adCriteria - AdvancedCriteria to use to filter results
      Returns:
      index of the first matching Record or -1 if not found
    • selectRecord

      public void selectRecord(Record record)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
    • selectRecord

      public void selectRecord(int record)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
    • selectRecord

      public void selectRecord(int record, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
      newState - new selection state (if null, defaults to true)
    • selectRecord

      public void selectRecord(Record record, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a Record passed in explicitly, or by index.
      Specified by:
      selectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to select
      newState - new selection state (if null, defaults to true)
    • selectRecords

      public void selectRecords(int[] records)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
    • selectRecords

      public void selectRecords(int[] records, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
      newState - new selection state
    • selectRecords

      public void selectRecords(Record[] records)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
    • selectRecords

      public void selectRecords(Record[] records, boolean newState)
      Description copied from interface: DataBoundComponent
      Select/deselect a list of Records passed in explicitly, or by index.
      Specified by:
      selectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to select
      newState - new selection state (if null, defaults to true)
    • deselectRecord

      public void deselectRecord(Record record)
      Description copied from interface: DataBoundComponent
      Deselect a Record passed in explicitly, or by index.

      Synonym for selectRecord(record, false)

      Specified by:
      deselectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to deselect
    • deselectRecord

      public void deselectRecord(int record)
      Description copied from interface: DataBoundComponent
      Deselect a Record passed in explicitly, or by index.

      Synonym for selectRecord(record, false)

      Specified by:
      deselectRecord in interface DataBoundComponent
      Parameters:
      record - record (or row number) to deselect
    • deselectRecords

      public void deselectRecords(int[] records)
      Description copied from interface: DataBoundComponent
      Deselect a list of Records passed in explicitly, or by index.

      Synonym for selectRecords(records, false)

      Specified by:
      deselectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to deselect
    • deselectRecords

      public void deselectRecords(Record[] records)
      Description copied from interface: DataBoundComponent
      Deselect a list of Records passed in explicitly, or by index.

      Synonym for selectRecords(records, false)

      Specified by:
      deselectRecords in interface DataBoundComponent
      Parameters:
      records - records (or row numbers) to deselect
    • selectAllRecords

      public void selectAllRecords()
      Description copied from interface: DataBoundComponent
      Select all records&#010&#010
      Specified by:
      selectAllRecords in interface DataBoundComponent
    • deselectAllRecords

      public void deselectAllRecords()
      Description copied from interface: DataBoundComponent
      &#010 Deselect all records&#010&#010
      Specified by:
      deselectAllRecords in interface DataBoundComponent
    • anySelected

      public Boolean anySelected()
      Description copied from interface: DataBoundComponent
      Whether at least one item is selected&#010
      Specified by:
      anySelected in interface DataBoundComponent
      Returns:
      true == at least one item is selected false == nothing at all is selected
    • enableHilite

      public void enableHilite(String hiliteID)
      Description copied from interface: DataBoundComponent
      Enable / disable a hilites&#010&#010
      Specified by:
      enableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to enable
    • enableHilite

      public void enableHilite(String hiliteID, boolean enable)
      Description copied from interface: DataBoundComponent
      Enable / disable a hilites&#010&#010
      Specified by:
      enableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to enable
      enable - new enabled state to apply - if null, defaults to true
    • disableHilite

      public void disableHilite(String hiliteID)
      Description copied from interface: DataBoundComponent
      Disable a hilite&#010&#010
      Specified by:
      disableHilite in interface DataBoundComponent
      Parameters:
      hiliteID - ID of hilite to disable
    • enableHiliting

      public void enableHiliting()
      Description copied from interface: DataBoundComponent
      Enable all hilites.&#010&#010
      Specified by:
      enableHiliting in interface DataBoundComponent
    • enableHiliting

      public void enableHiliting(boolean enable)
      Description copied from interface: DataBoundComponent
      Enable all hilites.&#010&#010
      Specified by:
      enableHiliting in interface DataBoundComponent
      Parameters:
      enable - new enabled state to apply - if null, defaults to true
    • disableHiliting

      public void disableHiliting()
      Description copied from interface: DataBoundComponent
      Disable all hilites.&#010&#010
      Specified by:
      disableHiliting in interface DataBoundComponent
    • getDragData

      public Record[] getDragData()
      Description copied from interface: DataBoundComponent
      During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.

      This method is consulted by&#010 ListGrid.willAcceptDrop().

      Specified by:
      getDragData in interface DataBoundComponent
      Returns:
      Array of Records that are currently selected.
    • transferSelectedData

      public void transferSelectedData(DataBoundComponent source)
      Description copied from interface: DataBoundComponent
      Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by calling DataBoundComponent.getDropValues() for each dropped record.

      To transfer all data in, for example, a ListGrid, call grid.selection.selectAll() first.

      Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to transferSelectedData() and/or the drop() method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, use HasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler). See the Dragging documentation for an overview of list grid drag/drop data transfer.

      Specified by:
      transferSelectedData in interface DataBoundComponent
      Parameters:
      source - source component from which the records will be tranferred
    • transferSelectedData

      public void transferSelectedData(DataBoundComponent source, int index)
      Description copied from interface: DataBoundComponent
      Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction. This method acts on the dropped records exactly as if they had been dropped in an actual drag / drop interaction, including any special databound behavior invoked by calling DataBoundComponent.getDropValues() for each dropped record.

      To transfer all data in, for example, a ListGrid, call grid.selection.selectAll() first.

      Note that drag/drop type transfers of records between components are asynchronous operations: Smart GWT may need to perform server turnarounds to establish whether dropped records already exist in the target component. Therefore, it is possible to issue a call to transferSelectedData() and/or the drop() method of a databound component whilst a transfer is still active. When this happens, Smart GWT adds the second and subsequent transfer requests to a queue and runs them one after the other. If you want to be notified when a transfer process has actually completed, use HasDropCompleteHandlers.addDropCompleteHandler(com.smartgwt.client.widgets.events.DropCompleteHandler). See the Dragging documentation for an overview of list grid drag/drop data transfer.

      Specified by:
      transferSelectedData in interface DataBoundComponent
      Parameters:
      source - source component from which the records will be transferred
      index - target index (drop position) of the rows within this grid.
    • getRecordIndex

      public int getRecordIndex(Record record)
      Description copied from interface: DataBoundComponent
      Get the index of the provided record.&#010

      &#010 Override in subclasses to provide more specific behaviour, for instance, when data holds a&#010 large number of records&#010&#010

      Specified by:
      getRecordIndex in interface DataBoundComponent
      Parameters:
      record - the record whose index is to be retrieved
      Returns:
      indexindex of the record, or -1 if not found
    • getTitleFieldValue

      public String getTitleFieldValue(Record record)
      Description copied from interface: DataBoundComponent
      Get the value of the titleField for the passed record&#010

      &#010 Override in subclasses &#010&#010

      Specified by:
      getTitleFieldValue in interface DataBoundComponent
      Parameters:
      record - the record whose index is to be retrieved
      Returns:
      valuethe value of the titleField for the passed record
    • setTitleField

      public Calendar setTitleField(String titleField)
      Description copied from interface: DataBoundComponent
      Sets the best field to use for a user-visible title for an individual record from this component.
      Specified by:
      setTitleField in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getTitleField

      public String getTitleField()
      Description copied from interface: DataBoundComponent
      Method to return the fieldName which represents the "title" for records in this&#010 Component.
      &#010 If this.titleField is explicitly specified it will always be used.&#010 Otherwise, default implementation will check titleField for databound&#010 components.
      &#010 For non databound components returns the first defined field name of "title", &#010 "name", or "id". If we dont find any field-names that match these&#010 titles, the first field in the component will be used instead.&#010
      Specified by:
      getTitleField in interface DataBoundComponent
      Returns:
      fieldName the title field for this component.
    • getDataSource

      public DataSource getDataSource()
      Description copied from interface: DataBoundComponent
      The DataSource that this component should bind to for default fields and for performing DataSource requests.
      Specified by:
      getDataSource in interface DataBoundComponent
      Returns:
      DataSource
    • setAutoFetchData

      public Calendar setAutoFetchData(Boolean autoFetchData) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() . Criteria for this fetch may be picked up from initialCriteria and textMatchStyle may be specified via DataBoundComponent.getAutoFetchTextMatchStyle().

      NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only initialCriteria and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.

      Specified by:
      setAutoFetchData in interface DataBoundComponent
      Parameters:
      autoFetchData - autoFetchData
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchData

      public Boolean getAutoFetchData()
      Description copied from interface: DataBoundComponent
      If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() . Criteria for this fetch may be picked up from initialCriteria and textMatchStyle may be specified via DataBoundComponent.getAutoFetchTextMatchStyle().

      NOTE: If autoFetchData is set, calling ListGrid.fetchData() before draw will cause two requests to be issued, one from the manual call to fetchData() and one from the autoFetchData setting. The second request will use only initialCriteria and not any other criteria or settings from the first request. Generally, turn off autoFetchData if you are going to manually call fetchData() at any time.

      Specified by:
      getAutoFetchData in interface DataBoundComponent
      Returns:
      autoFetchData autoFetchData
    • setAutoFetchTextMatchStyle

      public Calendar setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
      Specified by:
      setAutoFetchTextMatchStyle in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchTextMatchStyle

      public TextMatchStyle getAutoFetchTextMatchStyle()
      Description copied from interface: DataBoundComponent
      If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
      Specified by:
      getAutoFetchTextMatchStyle in interface DataBoundComponent
      Returns:
      autoFetchTextMatchStyle autoFetchTextMatchStyle
    • setAutoFetchAsFilter

      public Calendar setAutoFetchAsFilter(Boolean autoFetchAsFilter) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
      Specified by:
      setAutoFetchAsFilter in interface DataBoundComponent
      Parameters:
      autoFetchAsFilter - autoFetchAsFilter
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException
    • getAutoFetchAsFilter

      public Boolean getAutoFetchAsFilter()
      Description copied from interface: DataBoundComponent
      If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
      Specified by:
      getAutoFetchAsFilter in interface DataBoundComponent
      Returns:
      auto fetch as filter
    • setInitialCriteria

      public Calendar setInitialCriteria(Criteria initialCriteria) throws IllegalStateException
      Description copied from interface: DataBoundComponent
      Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
      Specified by:
      setInitialCriteria in interface DataBoundComponent
      Parameters:
      initialCriteria - the initial criteria
      Returns:
      DataBoundComponent instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getInitialCriteria

      public Criteria getInitialCriteria()
      Description copied from interface: DataBoundComponent
      Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
      Specified by:
      getInitialCriteria in interface DataBoundComponent
      Returns:
      the criteria
    • setImplicitCriteria

      public Calendar setImplicitCriteria(Criteria implicitCriteria)
      Description copied from interface: DataBoundComponent
      Criteria that are never shown to or edited by the user and are cumulative with any criteria provided via DataBoundComponent.initialCriteria, DataBoundComponent.setCriteria() etc.
      Specified by:
      setImplicitCriteria in interface DataBoundComponent
      Parameters:
      implicitCriteria - New implicitCriteria value. Default value is null
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setImplicitCriteria

      public Boolean setImplicitCriteria(Criteria implicitCriteria, DSCallback callback)
    • setImplicitCriteria

      public Boolean setImplicitCriteria(Criteria criteria, DSCallback callback, Boolean initialFetch)
    • getImplicitCriteria

      public Criteria getImplicitCriteria()
      Description copied from interface: DataBoundComponent
      Criteria that are never shown to or edited by the user and are cumulative with any criteria provided via DataBoundComponent.initialCriteria, DataBoundComponent.setCriteria() etc.
      Specified by:
      getImplicitCriteria in interface DataBoundComponent
      Returns:
      Current implicitCriteria value. Default value is null
    • fetchData

      public void fetchData()
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
    • fetchData

      public void fetchData(Criteria criteria)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
    • fetchData

      public void fetchData(Criteria criteria, DSCallback callback)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required
    • fetchData

      public void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Retrieves data from the DataSource that matches the specified criteria.

      When fetchData() is first called, if data has not already been provided via setData(), this method will create a ResultSet, which will be configured based on component settings such as fetchOperation and dataPageSize, as well as the general purpose dataProperties. The created ResultSet will automatically send a DSRequest to retrieve data from the dataSource, and from then on will automatically manage paging through large datasets, as well as performing filtering and sorting operations inside the browser when possible - see the ResultSet docs for details.

      NOTE: do not use both autoFetchData and a call to fetchData() - this may result in two DSRequests to fetch data. Use either autoFetchData and setAutoFetchCriteria() or a manual call to fetchData() passing criteria.

      Whether a ResultSet was automatically created or provided via setData(), subsequent calls to fetchData() will simply call resultSet.setCriteria().

      Changes to criteria may or may not result in a DSRequest to the server due to client-side filtering. You can call willFetchData(criteria) to determine if new criteria will result in a server fetch.

      If you need to force data to be re-fetched, you can call invalidateCache() and new data will automatically be fetched from the server using the current criteria and sort direction. NOTE: when using invalidateCache() there is no need to also call fetchData() and in fact this could produce unexpected results.

      This method takes an optional callback parameter (set to a DSCallback) to fire when the fetch completes. Note that this callback will not fire if no server fetch is performed. In this case the data is updated synchronously, so as soon as this method completes you can interact with the new data. If necessary, you can use resultSet.willFetchData() to determine whether or not a server fetch will occur when fetchData() is called with new criteria.

      In addition to the callback parameter for this method, developers can use resultSet.addDataArrivedHandler to be notified every time data is loaded.

      Specified by:
      fetchData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required
      requestProperties - additional properties to set on the DSRequest that will be issued
    • filterData

      public void filterData()
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
    • filterData

      public void filterData(Criteria criteria)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
    • filterData

      public void filterData(Criteria criteria, DSCallback callback)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required; see DataBoundComponent.fetchData() for details
    • filterData

      public void filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Retrieves data that matches the provided criteria and displays the matching data in this component.

      This method behaves exactly like ListGrid.fetchData() except that textMatchStyle is automatically set to "substring" so that String-valued fields are matched by case-insensitive substring comparison.

      Specified by:
      filterData in interface DataBoundComponent
      Parameters:
      criteria - Search criteria. If a DynamicForm is passed in as this argument instead of a raw criteria object, will be derived by calling DynamicForm.getValuesAsCriteria()
      callback - callback to invoke when a fetch is complete. Fires only if server contact was required; see DataBoundComponent.fetchData() for details
      requestProperties - for databound components only - optional additional properties to set on the DSRequest that will be issued
    • invalidateCache

      public void invalidateCache()
      Description copied from interface: DataBoundComponent
      Invalidate the current data cache for this databound component via a call to the dataset's invalidateCache() method, for example, ResultSet.invalidateCache().

      NOTE: there is no need to call invalidateCache() when a save operation is performed on a DataSource. Automatic cache synchronization features will automatically update caches - see ResultSet for details. If automatic cache synchronization isn't working, troubleshoot the problem using the steps suggested in the FAQ rather than just calling invalidateCache(). Calling invalidateCache() unnecessarily causes extra server load and added code complexity.

      Calling invalidateCache() will automatically cause a new fetch to be performed with the current set of criteria if data had been previously fetched and the component is currently drawn with data visible - there is no need to manually call fetchData() after invalidateCache() and this could result in duplicate fetches.

      While data is being re-loaded after a call to invalidateCache(), the widget is in a state similar to initial data load - it doesn't know the total length of the dataset and any APIs that act on records or row indices will necessarily fail and should not be called. To detect that the widget is in this state, call ResultSet.lengthIsKnown().

      invalidateCache() only has an effect if this component's dataset is a data manager class that manages a cache (eg ResultSet or ResultTree). If data was provided as a simple Array or List, invalidateCache() does nothing.

      Specified by:
      invalidateCache in interface DataBoundComponent
      See Also:
    • getResultSet

      public ResultSet getResultSet()
      Description copied from interface: DataBoundComponent
      Return the underlying data of this DataBoundComponent as a ResultSet.

      Note that this method should only be called after initial data has been fetched by this DataBoundComponent.

      Specified by:
      getResultSet in interface DataBoundComponent
      Returns:
      ResultSet, or null if the underlying data is not a ResultSet
      See Also:
    • getRecordList

      public RecordList getRecordList()
      Description copied from interface: DataBoundComponent
      Return the underlying data of this DataBoundComponent as a RecordList.

      Depending on the component configuration, the actual JavaScript instance of the returned RecordList may be one of several types:

      • If the component is not bound to a DataSource, the instance is generally an Array of Record.
      • If the component is bound to a DataSource, the instance is a ResultSet.
      • If the component is a grouped ListGrid, the instance is a Tree. To access the ungrouped record list regardless of grouping status, use
        isGrouped() ? getOriginalRecordList() : getRecordList()
      • If the component is a TreeGrid, the instance is a ResultTree.
      The underlying type determines the structure of the returned data. An Array or ResultSet represents a list of records, but a Tree or ResultTree represents a list of open rows in the tree, including groups or other nodes which contain no records.
      Specified by:
      getRecordList in interface DataBoundComponent
      Returns:
      the RecordList
    • getDataAsJSList

      public JavaScriptObject getDataAsJSList()
      Specified by:
      getDataAsJSList in interface DataBoundComponent
    • exportData

      public void exportData()
      Description copied from interface: DataBoundComponent
      Specified by:
      exportData in interface DataBoundComponent
    • exportData

      public void exportData(DSRequest requestProperties)
      Description copied from interface: DataBoundComponent
      Specified by:
      exportData in interface DataBoundComponent
    • exportData

      public void exportData(DSRequest requestProperties, RPCCallback callback)
      Description copied from interface: DataBoundComponent
      Uses a "fetch" operation on the current DataSource to retrieve data that matches the current filter and sort criteria for this component, then exports the resulting data to a file or window in the requested format.

      A variety of DSRequest settings, such as exportAs and exportFilename, affect the exporting process: see exportResults for further detail.

      Note that data exported via this method does not include any client-side formatting and relies on both the Smart GWT server and server-side DataSources. To export client-data with formatters applied, see exportClientData, which still requires the Smart GWT server but does not rely on server-side DataSources.

      For more information on exporting data, see DataSource.exportData.

      Specified by:
      exportData in interface DataBoundComponent
      Parameters:
      requestProperties - additional properties to set on DSRequest that will be issued
      callback - Optional callback. Note that this parameter only applies if you specify exportToClient: false in the request properties, because file downloads don't provide ordinary framework callbacks
      See Also:
    • addFetchDataHandler

      public HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
      Add a fetchData handler.

      Notification function fired on fetchData() or filterData()

      Specified by:
      addFetchDataHandler in interface HasFetchDataHandlers
      Parameters:
      handler - the filterData handler
      Returns:
      HandlerRegistration used to remove this handler
    • addDropCompleteHandler

      public HandlerRegistration addDropCompleteHandler(DropCompleteHandler handler)
      Add a com.smartgwt.client.widgets.DropCompleteHandler. See that class's documentation for a definition of "drop complete", and how it differs from "drag complete" (com.smartgwt.client.widgets.DragCompleteHandler).
      Specified by:
      addDropCompleteHandler in interface HasDropCompleteHandlers
      Parameters:
      handler - the DropCompleteHandler
      Returns:
      HandlerRegistration used to remove this handler
    • addDragCompleteHandler

      public HandlerRegistration addDragCompleteHandler(DragCompleteHandler handler)
      Add a com.smartgwt.client.widgets.DragCompleteHandler. See that class's documentation for a definition of "drag complete", and how it differs from "drop complete" (com.smartgwt.client.widgets.DropCompleteHandler).
      Specified by:
      addDragCompleteHandler in interface HasDragCompleteHandlers
      Parameters:
      handler - the DropCompleteHandler
      Returns:
      HandlerRegistration used to remove this handler
    • getFieldAlignments

      public Alignment[] getFieldAlignments()
      Description copied from interface: DataBoundComponent
      Returna an array of field alignments for this grid
      Specified by:
      getFieldAlignments in interface DataBoundComponent
      Returns:
      array of Alignments
    • getDeepCloneOnEdit

      public Boolean getDeepCloneOnEdit()
      Description copied from interface: DataBoundComponent
      Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. See DataSource.getDeepCloneOnEdit() for details of what this means.

      If this value is not explicitly set, it defaults to the DataSource deepCloneOnEdit value. This value can also be overridden per-field with DataSourceField.setDeepCloneOnEdit(java.lang.Boolean).

      Like the other deepCloneOnEdit settings, this flag only has an effect if you are editing a values object that contains nested objects or arrays, using Canvas.setDataPath(java.lang.String)

      Specified by:
      getDeepCloneOnEdit in interface DataBoundComponent
    • setDeepCloneOnEdit

      public Calendar setDeepCloneOnEdit(Boolean deepCloneOnEdit)
      Description copied from interface: DataBoundComponent
      Before we start editing values in this DataBoundComponent, should we perform a deep clone of the underlying values. See DataSource.getDeepCloneOnEdit() for details of what this means.

      If this value is not explicitly set, it defaults to the DataSource deepCloneOnEdit value. This value can also be overridden per-field with DataSourceField.setDeepCloneOnEdit(java.lang.Boolean).

      Like the other deepCloneOnEdit settings, this flag only has an effect if you are editing a values object that contains nested objects or arrays, using Canvas.setDataPath(java.lang.String)

      Specified by:
      setDeepCloneOnEdit in interface DataBoundComponent
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • setFields

      public Calendar setFields(JavaScriptObject... fields)
      Description copied from interface: DataBoundComponent
      Field setter variant (alternative to setFields(FormItem...), setFields(ListGridField...), etc.) that will accept an array of JavaScriptObject, rather than an array of SmartGWT Java wrappers of the field class type (e.g. FormItem, ListGridField, etc.) This is an advanced method and only for cases where you have the JavaScriptObject for each field but want to avoid having to create each associated SmartGWT Java wrapper.

      Note: use toArray() to create a Java array of JavaScriptObject if you only have the array itself as a single JavaScriptObject.

      Specified by:
      setFields in interface DataBoundComponent
      Parameters:
      fields - the component fields
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getFieldsAsJavaScriptObjects

      public JavaScriptObject[] getFieldsAsJavaScriptObjects()
      Description copied from interface: DataBoundComponent
      Return the fields as JavaScriptObjects rather than as SmartGWT Java wrappers of the field class type (e.g. FormItem, ListGridField, etc.) This avoids building the SmartGWT Java wrappers for the fields in situations where they aren't needed - and for FormItems in particular - where there may not be enough information to determine the correct subclass, such as before the SmartClient instance underlying the DynamicForm has been created.
      Specified by:
      getFieldsAsJavaScriptObjects in interface DataBoundComponent
      Returns:
      the component fields
    • getFieldCount

      public int getFieldCount()
      Description copied from interface: DataBoundComponent
      Return the number of fields.
      Specified by:
      getFieldCount in interface DataBoundComponent
      Returns:
      the number of fields
    • transferRecords

      public void transferRecords(Record[] records, Record targetRecord, Integer index, Canvas sourceWidget, TransferRecordsCallback callback)
      Description copied from interface: DataBoundComponent
      Transfer a list of Records from another component (does not have to be a databound component) into this component. This method is only applicable to list-type components, such as ListGrid or com.smartgwt.client.widgets.tile.TileGridTileGrid. Notably, it does not apply to TreeGrid; the equivalent for treeGrids is transferNodes.

      This method implements the automatic drag-copy and drag-move behaviors of components like ListGrid, and calling it is equivalent to completing a drag and drop of the dropRecords (the default record drop behavior is simply to call transferRecords(), passing in the dropped nodes)

      Note that this method is asynchronous - it may need to perform server turnarounds to prevent duplicates in the target component's data. If you wish to be notified when the transfer process has completed, you can either pass a non-null callback to this method or add a DropCompleteHandler to this component.

      See also transferSelectedData()

      Specified by:
      transferRecords in interface DataBoundComponent
      Parameters:
      records - Recordss to transfer to this component
      targetRecord - The target record (eg, of a drop interaction), for context
      index - Insert point relative to the target record for the transferred records
      sourceWidget - The databound or non-databound component from which the records are to be transferred.
      callback - optional TransferRecordsCallback to be fired when the transfer process has completed (pass null if your code does not need to be called back). The callback will be passed the list of records actually transferred to this component
    • setDragDataCustomizer

      public Calendar setDragDataCustomizer(DragDataCustomizer customizer)
      During a drag-and-drop interaction, this method returns the set of records being dragged out of the component. In the default implementation, this is the list of currently selected records.

      This method is consulted by willAcceptDrop().

      Parameters:
      DragDataCustomizer - customizer
      Returns:
      DataBoundComponent instance, for chaining setter calls
    • getSort

      public SortSpecifier[] getSort()
      Description copied from interface: DataBoundComponent
      Returns the current SortSpecifiers for this component. Will return null if this component has never been sorted, or the underlying SmartClient widget does not exist.
      Specified by:
      getSort in interface DataBoundComponent
      Returns:
      current sort specifiers for this component (null if unsorted or no SC widget)
    • setSort

      public Calendar setSort(SortSpecifier... sortSpecifiers)
      Description copied from interface: DataBoundComponent
      Sort the component on one or more fields.

      Pass in an array of SortSpecifiers to have the component's data sorted by the fields in each specifier.property and in the directions specified. The component can be sorted by any combination of fields, including fields specified in the fields array and unused fields from the underlying dataSource, if there is one.

      If setSort() is called on a component which doesn't yet have a SmartClient widget, the widget will be created. If autoFetchData is set and a DataSource has been set, this will result in data being fetched.

      Specified by:
      setSort in interface DataBoundComponent
      Parameters:
      sortSpecifiers - Array of SortSpecifier objects
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(CalendarLogicalStructure s)
      Setter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
    • getLogicalStructure

      public LogicalStructureObject getLogicalStructure()
      Getter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
      Specified by:
      getLogicalStructure in interface LogicalStructure
      Overrides:
      getLogicalStructure in class Canvas