com.smartgwt.client.widgets.calendar
Class Calendar

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.smartgwt.client.widgets.BaseWidget
              extended by com.smartgwt.client.widgets.Canvas
                  extended by com.smartgwt.client.widgets.calendar.Calendar
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasBackgroundClickHandlers, HasBackgroundMouseDownHandlers, HasBackgroundMouseUpHandlers, HasCurrentViewChangedHandlers, HasDateChangedHandlers, HasDayBodyClickHandlers, HasDayHeaderClickHandlers, HasEventAddedHandlers, HasEventChangedHandlers, HasEventClickHandlers, HasEventHoverHTMLHandlers, HasEventMovedHandlers, HasEventRemoveClickHandlers, HasEventRemovedHandlers, HasEventResizedHandlers, HasTimelineEventMovedHandlers, HasTimelineEventResizedHandlers, DataBoundComponent, 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, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers
Direct Known Subclasses:
Timeline

public class Calendar
extends Canvas
implements DataBoundComponent, HasBackgroundClickHandlers, HasBackgroundMouseDownHandlers, HasBackgroundMouseUpHandlers, HasCurrentViewChangedHandlers, HasDateChangedHandlers, HasDayBodyClickHandlers, HasDayHeaderClickHandlers, HasEventAddedHandlers, HasEventChangedHandlers, HasEventClickHandlers, HasEventMovedHandlers, HasEventRemoveClickHandlers, HasEventRemovedHandlers, HasEventResizedHandlers, HasEventHoverHTMLHandlers, HasTimelineEventMovedHandlers, HasTimelineEventResizedHandlers

The Calendar component provides several different ways for a user to view and edit a set of events. Note that the ISC_Calendar.js 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.

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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, id, nativeObject, scClassName
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
Calendar()
           
Calendar(JavaScriptObject jsObj)
           
 
Method Summary
 HandlerRegistration addBackgroundClickHandler(BackgroundClickHandler handler)
          Add a backgroundClick handler.
 HandlerRegistration addBackgroundMouseDownHandler(BackgroundMouseDownHandler handler)
          Add a backgroundMouseDown handler.
 HandlerRegistration addBackgroundMouseUpHandler(BackgroundMouseUpHandler handler)
          Add a backgroundMouseUp handler.
 HandlerRegistration addCurrentViewChangedHandler(CurrentViewChangedHandler handler)
          Add a currentViewChanged handler.
 HandlerRegistration addDateChangedHandler(DateChangedHandler handler)
          Add a dateChanged handler.
 HandlerRegistration addDayBodyClickHandler(DayBodyClickHandler handler)
          Add a dayBodyClick handler.
 HandlerRegistration addDayHeaderClickHandler(DayHeaderClickHandler handler)
          Add a dayHeaderClick handler.
 HandlerRegistration addDragCompleteHandler(DragCompleteHandler handler)
          Add a com.smartgwt.client.widgets.DragCompleteHandler.
 HandlerRegistration addDropCompleteHandler(DropCompleteHandler handler)
          Add a com.smartgwt.client.widgets.DropCompleteHandler.
 void addEvent(Date startDate, Date endDate, String name, String description)
          Create a new event in this calendar instance.
 void addEvent(Date startDate, Date endDate, String name, String description, Map otherFields)
          Create a new event in this calendar instance.
 HandlerRegistration addEventAddedHandler(EventAddedHandler handler)
          Add a eventAdded handler.
 HandlerRegistration addEventChangedHandler(EventChangedHandler handler)
          Add a eventChanged handler.
 HandlerRegistration addEventClickHandler(EventClickHandler handler)
          Add a eventClick handler.
 HandlerRegistration addEventHoverHTMLHandler(EventHoverHTMLHandler handler)
          Deprecated. Please use setEventHoverHTMLCustomizer instead, this will be removed in a future release.
 HandlerRegistration addEventMovedHandler(EventMovedHandler handler)
          Add a eventMoved handler.
 HandlerRegistration addEventRemoveClickHandler(EventRemoveClickHandler handler)
          Add a eventRemoveClick handler.
 HandlerRegistration addEventRemovedHandler(EventRemovedHandler handler)
          Add a eventRemoved handler.
 HandlerRegistration addEventResizedHandler(EventResizedHandler handler)
          Add a eventResized handler.
 HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
          Add a fetchData handler.
 void addFormulaField()
          Convenience method to display a com.smartgwt.client..FormulaBuilder to create a new Formula Field.
 void addLane(Lane lane)
          Adds a new Lane to the calendar timelineView, or to the dayView if showDayLanes is true.
 void addLaneEvent(Lane laneName, Date startDate)
          For Timelines, and for dayViews with showDayLanes set, create a new event and adds it to a particular Lane.
 void addLaneEvent(Lane laneName, Date startDate, Date endDate)
           
 void addLaneEvent(Lane laneName, Date startDate, Date endDate, String name)
           
 void addLaneEvent(Lane laneName, Date startDate, Date endDate, String name, String description)
           
 void addLaneEvent(Lane laneName, Date startDate, Date endDate, String name, String description, Object otherFields)
          For Timelines, and for dayViews with showDayLanes set, create a new event and adds it to a particular Lane.
 void addSummaryField()
          Convenience method to display a com.smartgwt.client..SummaryBuilder to create a new Summary Field.
 HandlerRegistration addTimelineEventMovedHandler(TimelineEventMovedHandler handler)
          Add a timelineEventMoved handler.
 HandlerRegistration addTimelineEventResizedHandler(TimelineEventResizedHandler handler)
          Add a timelineEventResized handler.
 Boolean anySelected()
          Whether at least one item is selected
static boolean calendarLoaded()
          Static method indicating whether the optional Calendar module is loaded for the page.
static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
          Changes the defaults for Canvas AutoChildren named autoChildName.
static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
          Changes the defaults for FormItem AutoChildren named autoChildName.
protected  JavaScriptObject create()
           
 boolean dateIsWorkday(Date date)
          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.
 void deselectAllRecords()
           Deselect all records
 void deselectRecord(int record)
          Deselect a Record passed in explicitly, or by index.
 void deselectRecord(Record record)
          Deselect a Record passed in explicitly, or by index.
 void deselectRecords(int[] records)
          Deselect a list of Records passed in explicitly, or by index.
 void deselectRecords(Record[] records)
          Deselect a list of Records passed in explicitly, or by index.
 void disableHilite(String hiliteID)
          Disable a hilite
 void disableHiliting()
          Disable all hilites.
 void editFields()
          Shows a FieldPicker interface allowing end-users to rearrange the order and visibiility of the fields in the associated DataBoundComponent.
 void editHilites()
          Shows a HiliteEditor interface allowing end-users to edit the data-hilites currently in use by this DataBoundComponent.
 void enableHilite(String hiliteID)
          Enable / disable a hilites
 void enableHilite(String hiliteID, boolean enable)
          Enable / disable a hilites
 void enableHiliting()
          Enable all hilites.
 void enableHiliting(boolean enable)
          Enable all hilites.
 void eventsRendered()
          A notification method fired when the events in the current view have been refreshed.
 void exportData()
          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.
 void exportData(DSRequest requestProperties)
          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.
 void fetchData()
          Retrieves data from the DataSource that matches the specified criteria.
 void fetchData(Criteria criteria)
          Retrieves data from the DataSource that matches the specified criteria.
 void fetchData(Criteria criteria, DSCallback callback)
          Retrieves data from the DataSource that matches the specified criteria.
 void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
          Retrieves data from the DataSource that matches the specified criteria.
 void filterData()
          Retrieves data that matches the provided criteria and displays the matching data in this component.
 void filterData(Criteria criteria)
          Retrieves data that matches the provided criteria and displays the matching data in this component.
 void filterData(Criteria criteria, DSCallback callback)
          Retrieves data that matches the provided criteria and displays the matching data in this component.
 void filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
          Retrieves data that matches the provided criteria and displays the matching data in this component.
 Record find(AdvancedCriteria adCriteria)
          Filters all objects according to the AdvancedCriteria passed and returns the first matching object or null if not found
 Record[] findAll(AdvancedCriteria adCriteria)
          Filters all objects according to the AdvancedCriteria passed
 int findIndex(AdvancedCriteria adCriteria)
          Finds the index of the first Record that matches with the AdvacendCriteria passed.
 int findNextIndex(int startIndex, AdvancedCriteria adCriteria)
          Like RecordList.findIndex(java.util.Map), but considering the startIndex parameter.
 int findNextIndex(int startIndex, AdvancedCriteria adCriteria, int endIndex)
          Like RecordList.findIndex(java.util.Map), but considering the startIndex and endIndex parameters.
 Integer getActiveDay()
          Gets the day of the week (0-6) that the mouse is currently over.
 Date getActiveTime()
          Gets a date object representing the date over which the mouse is hovering for the current selected view.
 Boolean getAddDropValues()
          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.
 ImgButton getAddEventButton()
          An ImgButton that appears in a Calendar's week/day/month views and offers an alternative way to create a new event.
 String getAddEventButtonHoverText()
          The text to be displayed when a user hovers over the add event toolbar button
 String getAddFormulaFieldText()
          Text for a menu item allowing users to add a formula field
 String getAddOperation()
          Operation ID this component should use when performing add operations.
 String getAddSummaryFieldText()
          Text for a menu item allowing users to add a formula field
 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.
 Boolean getAutoFetchAsFilter()
          If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
 Boolean getAutoFetchData()
          If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() .
 TextMatchStyle getAutoFetchTextMatchStyle()
          If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
 String getBaseStyle()
          The base name for the CSS class applied to the grid cells of the day and week views of the calendar.
 Boolean getCanAddFormulaFields()
          Adds an item to the header context menu allowing users to launch a dialog to define a new field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.
 Boolean getCanAddSummaryFields()
          Adds an item to the header context menu allowing users to launch a dialog to define a new text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.
 String getCancelButtonTitle()
          The title for the cancel button in the event editor
 Boolean getCanCreateEvents()
          If true, users can create new events.
 Boolean getCanDeleteEvents()
          Deprecated. in favor of canRemoveEvents
 String getCanDragEventField()
          Name of the field on each CalendarEvent that determines dragability.
 Boolean getCanDragEvents()
          If true, users can drag-reposition existing events.
 Boolean getCanEditEvents()
          If true, users can edit existing events.
 String getCanEditField()
          Name of the field on each CalendarEvent that determines editability.
 Boolean getCanEditLane()
          Can we edit the lane of the event, specified by the laneNameField? If so, the event can be dragged to a different lane and, when it's editor is shown, an additional drop-down widget is provided allowing the user to select a different lane.
 String getCanEditLaneField()
          Name of the field on each CalendarEvent that determines whether that event can be moved between lanes.
 Boolean getCanRemoveEvents()
          If true, users can remove existing events.
 String getCanRemoveField()
          Name of the field on each CalendarEvent that determines whether an event shows a remove button.
 Boolean getCanReorderLanes()
          If true, lanes can be reordered by dragging them with the mouse.
 Boolean getCanResizeTimelineEvents()
          Can Timeline events be stretched by their left and right edges?
 Date getCellDate(Integer rowNum, Integer colNum)
          Return the Date instance associated with the passed co-ordinates in the current view.
 Date getChosenDate()
          The date for which events are displayed in the day, week, and month tabs of the calendar.
 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.
 HLayout getControlsBar()
          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.
 ViewName getCurrentViewName()
          The name of the view that should be visible initially by default.
 CalendarEvent[] getData()
          A List of CalendarEvent objects, specifying the data to be used to populate the calendar.
 JavaScriptObject getDataAsJSList()
           
 FetchMode getDataFetchMode()
          How to fetch and manage records retrieve from the server.
 int getDataPageSize()
          When using data paging, how many records to fetch at a time.
 DataSource getDataSource()
          The DataSource that this component should bind to for default fields and for performing DataSource requests.
 DateChooser getDateChooser()
          DateChooser used to select the date for which events will be displayed.
 String getDateCSSText(Date date, Integer rowNum, Integer colNum, ListGrid viewer)
          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.
 DateEditingStyle getDateEditingStyle()
          Indicates the type of controls to use in event-windows.
 DateDisplayFormat getDateFormatter()
          Date formatter for displaying events.
 Date getDateFromPoint()
          Returns a Date instance representing the point at the passed offsets into the body of the current view.
 Date getDateFromPoint(Integer x)
           
 Date getDateFromPoint(Integer x, Integer y)
           
 Date getDateFromPoint(Integer x, Integer y, Boolean snapOffsets)
          Returns a Date instance representing the point at the passed offsets into the body of the current view.
 Label getDateLabel()
          The com.smartgwt.client.types.AutoChild Label used to display the current date or range above the selected calendar view.
 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.
 ImgButton getDatePickerButton()
          An ImgButton that appears above the various views of the calendar and offers alternative access to a DateChooser to pick the current day.
 String getDatePickerHoverText()
          The text to be displayed when a user hovers over the date picker toolbar button
 String getDateStyle(Date date, Integer rowNum, Integer colNum, ListGrid viewer)
          Return the CSS styleName for the cell associated with the passed date and/or rowNum & colNum.
 String getDayBodyBaseStyle()
          The base name for the CSS class applied to the day body of the month view of the calendar.
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.
 String getDayHeaderBaseStyle()
          The base name for the CSS class applied to the day headers of the month view.
 ListGrid getDayView()
          ListGrid used to display events that pertain to a given day.
 String getDayViewTitle()
          The title for the day view.
 int getDefaultTimelineColumnSpan()
          The number of columns of the timelineGranularity to give the timeline by default if no endDate is provided.
 String getDescriptionField()
          The name of the description field in a CalendarEvent.
 String getDetailsButtonTitle()
          The title for the edit button in the quick event dialog
 Boolean getDisableWeekends()
          If set, weekend days appear in disabled style and events cannot be created on weekends.
 Record[] getDragData()
          During a drag-and-drop interaction, this method returns the set of records being dragged out of the component.
 DragDataAction getDragDataAction()
          Indicates what to do with data dragged into another DataBoundComponent.
 String getDragTrackerStyle()
          CSS Style to apply to the drag tracker when dragging occurs on this component.
 Map getDropValues()
          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.
 String getDuplicateDragMessage()
          Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled.
 String getEditFormulaFieldText()
          Text for a menu item allowing users to edit a formula field
 String getEditSummaryFieldText()
          Text for a menu item allowing users to edit the formatter for a field
 Date getEndDate()
          The end date of the calendar timeline view.
 String getEndDateField()
          The name of the end date field in a CalendarEvent.
 Boolean getEventAutoArrange()
          If set to true, enables the auto-arrangement of events that share time in the calendar.
 String getEventDescriptionFieldTitle()
          The title for the descriptionField field in the quick and advanced event dialogs
 Window getEventDialog()
          An com.smartgwt.client.types.AutoChild of type Window that displays a quick event entry form in a popup window.
 int getEventDragGap()
          The number of pixels to leave to the right of events so overlapping events can still be added using the mouse.
 DynamicForm getEventEditor()
          An com.smartgwt.client.types.AutoChild of type DynamicForm which displays event data.
 Window getEventEditorLayout()
          An com.smartgwt.client.types.AutoChild of type Window that displays the full event editor
 String getEventEndDateFieldTitle()
          The title for the end date field in the quick and advanced event dialogs
 String getEventLaneFieldTitle()
          The title for the laneField field in the quick and advanced event dialogs
 String getEventNameFieldTitle()
          The title for the event name field in the quick and advanced event dialogs
 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.
 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.
 int getEventOverlapPercent()
          The size of the overlap, presented as a percentage of the width of events sharing timeslots.
 Integer getEventSnapGap()
          In day and week views, determines the number of vertical pixels by which an event can be moved or resized when dragging.
 String getEventStartDateFieldTitle()
          The title for the start date field in the quick and advanced event dialogs
 EventWindow getEventWindow()
          To display events in day and week views, the Calendar creates instance of EventWindow for each event.
 String getEventWindowStyle()
          The base name for the CSS class applied to event windows within calendars.
 String getEventWindowStyleField()
          The name of the field used to override eventWindowStyle for an individual CalendarEvent.
 Boolean getExportAll()
          Setting exportAll to true prevents the component from passing its list of fields to the export call.
 String[] getExportFields()
          The list of field-names to export.
 String getFetchOperation()
          Operation ID this component should use when performing fetch operations.
 Integer getFirstDayOfWeek()
          The numeric day (0-6) which the calendar should consider as the first day of the week - if unset, the default is taken from the current locale.
 HeaderLevel[] getHeaderLevels()
          Configures the levels of headers shown above the event area, and their time units.
 String getHiliteProperty()
          Marker that can be set on a record to flag that record as hilited.
 Hilite[] getHilites()
          Return the set of hilite-objects currently applied to this DataBoundComponent.
 String getHiliteState()
          Get the current hilites encoded as a String, for saving.
 Criteria getInitialCriteria()
          Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
 Boolean getInvalidDateMessage()
          The message to display in the eventEditor when the 'To' date is greater than the 'From' date and a save is attempted.
 ListGridField[] getLaneFields()
          Field definitions for the frozen area of the timelineView, which shows data about the timeline lanes.
 String getLaneNameField()
          The name of the field which will determine the lane in which this event will be displayed in Timelines and in the day view, if showDayLanes is true.
 Lane[] getLanes()
          An array of Lane definitions that represent the rows of the timelineView, or the columns of the dayView if showDayLanes is true.
 String getLeadingDateField()
          The name of the leading date field for each event.
 com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
           
 TabSet getMainView()
          TabSet for managing calendar views when multiple views are available (eg, day and month).
 Integer getMinimumDayHeight()
          In the month view when showDayHeaders is true, this is the minimum height applied to a day cell and its header combined.
 Integer getMinLaneWidth()
          When showing vertical lanes in the dayView, this attribute sets the minimum width of each column or field.
 ListGrid getMonthView()
          ListGrid used to display events that pertain to a given month.
 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.
 String getMonthViewTitle()
          The title for the month view.
 String getNameField()
          The name of the name field in a CalendarEvent.
 ImgButton getNextButton()
          An ImgButton that appears above the week/day/month views of the calendar and allows the user to move the calendar forwards in time.
 String getNextButtonHoverText()
          The text to be displayed when a user hovers over the next toolbar button
static Calendar getOrCreateRef(JavaScriptObject jsObj)
           
 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.
 String getOtherDayBodyBaseStyle()
          The base name for the CSS class applied to the day body of the month view of the calendar.
 String getOtherDayHeaderBaseStyle()
          The base name for the CSS class applied to the day headers of the month view.
 SortSpecifier[] getOverlapSortSpecifiers()
          For timelines that allow overlapping events, an array of sort-specifiers that dictate the vertical rendering order of overlapped events in each lane.
 Date getPeriodEndDate()
          Returns the end of the selected week or month depending on the current calendar view.
 Date getPeriodStartDate()
          Returns the start of the selected week or month depending on the current calendar view.
 Boolean getPreventDuplicates()
          If set, detect and prevent duplicate records from being transferred to this component, either via drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent).
 ImgButton getPreviousButton()
          An ImgButton that appears above the week/day/month views of the calendar and allows the user to move the calendar backwards in time.
 String getPreviousButtonHoverText()
          The text to be displayed when a user hovers over the previous toolbar button.
 Boolean getProgressiveLoading()
          Indicates whether or not this component will load its data progressively
 int getRecordIndex(Record record)
          Get the index of the provided record.
 RecordList getRecordList()
          Return the underlying data of this DataBoundComponent as a RecordList.
 String getRemoveOperation()
          Operation ID this component should use when performing remove operations.
 ResultSet getResultSet()
          Return the underlying data of this DataBoundComponent as a ResultSet.
 int getRowHeight()
          The height of time-slots in the calendar.
 String getSaveButtonTitle()
          The title for the save button in the quick event dialog and the event editor
 Boolean getScrollToWorkday()
          If set, causes the workday hours to be sized to fill the available space in the day view and week view, and automatically scrolls these views to the start of the workday when the calendar is first displayed and whenever the user switches to a new day or week.
 String getSelectedCellStyle()
          The base name for the CSS class applied to a cell that is selected via a mouse drag.
 Boolean getShowAddEventButton()
          Set to false to hide the Add Event button.
 Boolean getShowComplexFields()
          Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.
 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.
 Boolean getShowDateChooser()
          Determines whether the dateChooser is displayed.
 Boolean getShowDatePickerButton()
          Set to false to hide the datePickerButton that allows selecting a new base date for this Calendar.
 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.
 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.
 Boolean getShowDetailFields()
          Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no component.fields.
 Boolean getShowEventDescriptions()
          If false, the event header will take up the entire space of the event.
 Boolean getShowHiddenFields()
          Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.
 Boolean getShowNextButton()
          Set to false to hide the Next button.
 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.
 Boolean getShowPreviousButton()
          Set to false to hide the Previous button.
 Boolean getShowQuickEventDialog()
          Determines whether the quick event dialog is displayed when a time is clicked.
 Boolean getShowTimelineView()
          If set to true, show the Timeline view.
 Boolean getShowWeekends()
          Suppresses the display of weekend days in the week and month views, and disallows the creation of events on weekends.
 Boolean getShowWorkday()
          If set, causes the calendar to use workdayBaseStyle for cells falling within the workday as defined by workdayStart and workdayEnd, in both the weekView and dayView.
 Boolean getSizeEventsToGrid()
          If true, events will be sized to the grid, even if they start and/or end at times between grid cells.
 Date getStartDate()
          The start date of the calendar timeline view.
 String getStartDateField()
          The name of the start date field in a CalendarEvent.
 TimeDisplayFormat getTimeFormatter()
          Display format to use for the time portion of events' date information.
 TimeUnit getTimelineGranularity()
          The granularity with which the timelineView will display events.
 int getTimelineUnitsPerColumn()
          How many units of timelineGranularity each cell represents.
 ListGrid getTimelineView()
          ListGrid used to display events in lanes in a horizontal Timeline view.
 String getTimelineViewTitle()
          The title for the timeline view.
 String getTitleField()
          Method to return the fieldName which represents the "title" for records in this Component.
If this.titleField is explicitly specified it will always be used. Otherwise, default implementation will check titleField for databound components.
For non databound components returns the first defined field name of "title", "name", or "id".
 String getTitleFieldValue(Record record)
          Get the value of the titleField for the passed record
 String getTodayBackgroundColor()
          The background color for today in the Month view, or in the Timeline view when +{timelineGranularity} is "day".
 String getTrailingDateField()
          The name of the trailing date field for each event.
 String getUpdateOperation()
          Operation ID this component should use when performing update operations.
 Boolean getUseAllDataSourceFields()
          If true, the set of fields given by the "default binding" (see fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.
 Boolean getUseFlatFields()
          The useFlatFields flag causes all simple type fields anywhere in a nested set of DataSources to be exposed as a flat list for form binding.
 Date getVisibleEndDate()
          Returns the last visible date in the currently selected calendar view.
 Date getVisibleStartDate()
          Returns the first visible date in the currently selected calendar view.
 Boolean getWeekEventBorderOverlap()
          Augments the width of week event windows slightly to avoid duplicate adjacent borders between events.
 String getWeekPrefix()
          The text to appear before the week number in the title of week-based HeaderLevels when this calendar is showing a timeline.
 ListGrid getWeekView()
          ListGrid used to display events that pertain to a given week.
 String getWeekViewTitle()
          The title for the week view.
 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 Calendar.getWorkdayStart and Calendar.getWorkdayEnd implementations.
 String getWorkdayEnd(Date date)
          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.
 String getWorkdayStart(Date date)
          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.
 void invalidateCache()
          Invalidate the current data cache for this databound component via a call to this.data.invalidateCache().
 void next()
          Move to the next day, week, or month, depending on which tab is selected.
protected  void onInit_Calendar()
           
protected  void onInit()
           
 void previous()
          Move to the previous day, week, month, or timeline range depending on which tab is selected.
 void removeEvent(CalendarEvent event)
          Remove an event from this calendar.
 void removeLane(Lane lane)
          Removes a lane from the calendar in timelineView mode.
 void removeLane(String laneName)
          Removes a lane from the calendar in timelineView mode.
 void scrollToTime(String time)
          Scroll the calendar Day or Week views to the specified time.
 void selectAllRecords()
          Select all records
 void selectRecord(int record)
          Select/deselect a Record passed in explicitly, or by index.
 void selectRecord(int record, boolean newState)
          Select/deselect a Record passed in explicitly, or by index.
 void selectRecord(Record record)
          Select/deselect a Record passed in explicitly, or by index.
 void selectRecord(Record record, boolean newState)
          Select/deselect a Record passed in explicitly, or by index.
 void selectRecords(int[] records)
          Select/deselect a list of Records passed in explicitly, or by index.
 void selectRecords(int[] records, boolean newState)
          Select/deselect a list of Records passed in explicitly, or by index.
 void selectRecords(Record[] records)
          Select/deselect a list of Records passed in explicitly, or by index.
 void selectRecords(Record[] records, boolean newState)
          Select/deselect a list of Records passed in explicitly, or by index.
 void selectTab(int tabnum)
          Selects the calendar view in the passed tab number.
 void setAddDropValues(Boolean addDropValues)
          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.
 void setAddEventButtonHoverText(String addEventButtonHoverText)
          The text to be displayed when a user hovers over the add event toolbar button
 void setAddFormulaFieldText(String addFormulaFieldText)
          Text for a menu item allowing users to add a formula field
 void setAddOperation(String addOperation)
          Operation ID this component should use when performing add operations.
 void setAddSummaryFieldText(String addSummaryFieldText)
          Text for a menu item allowing users to add a formula field
 void 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.
 void setAutoFetchAsFilter(Boolean autoFetchAsFilter)
          If DataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()
 void setAutoFetchData(Boolean autoFetchData)
          If true, when this component is first drawn, automatically call DataBoundComponent.fetchData() or DataBoundComponent.filterData() depending on DataBoundComponent.getAutoFetchAsFilter() .
 void setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle)
          If autoFetchData is true, this attribute allows the developer to specify a textMatchStyle for the initial DataBoundComponent.fetchData() call.
 void setBaseStyle(String baseStyle)
          The base name for the CSS class applied to the grid cells of the day and week views of the calendar.
 void setCanAddFormulaFields(Boolean canAddFormulaFields)
          Adds an item to the header context menu allowing users to launch a dialog to define a new field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.
 void setCanAddSummaryFields(Boolean canAddSummaryFields)
          Adds an item to the header context menu allowing users to launch a dialog to define a new text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.
 void setCancelButtonTitle(String cancelButtonTitle)
          The title for the cancel button in the event editor
 void setCanCreateEvents(Boolean canCreateEvents)
          If true, users can create new events.
 void setCanDeleteEvents(Boolean canDeleteEvents)
          Deprecated. in favor of canRemoveEvents
 void setCanDragEventField(String canDragEventField)
          Name of the field on each CalendarEvent that determines dragability.
 void setCanDragEvents(Boolean canDragEvents)
          If true, users can drag-reposition existing events.
 void setCanEditEvents(Boolean canEditEvents)
          If true, users can edit existing events.
 void setCanEditField(String canEditField)
          Name of the field on each CalendarEvent that determines editability.
 void setCanEditLane(Boolean canEditLane)
          Can we edit the lane of the event, specified by the laneNameField? If so, the event can be dragged to a different lane and, when it's editor is shown, an additional drop-down widget is provided allowing the user to select a different lane.
 void setCanEditLaneField(String canEditLaneField)
          Name of the field on each CalendarEvent that determines whether that event can be moved between lanes.
 void setCanRemoveEvents(Boolean canRemoveEvents)
          If true, users can remove existing events.
 void setCanRemoveField(String canRemoveField)
          Name of the field on each CalendarEvent that determines whether an event shows a remove button.
 void setCanReorderLanes(Boolean canReorderLanes)
          If true, lanes can be reordered by dragging them with the mouse.
 void setCanResizeTimelineEvents(Boolean canResizeTimelineEvents)
          Can Timeline events be stretched by their left and right edges?
 void setChosenDate(Date chosenDate)
          The date for which events are displayed in the day, week, and month tabs of the calendar.
 void setColumnsPerPage(Integer columnsPerPage)
          When using the Next and Previous arrows to scroll a Timeline, this is the number of columns of the timelineGranularity to scroll by.
 void setCurrentViewName(ViewName currentViewName)
          The name of the view that should be visible initially by default.
 void setData(CalendarEvent[] data)
          A List of CalendarEvent objects, specifying the data to be used to populate the calendar.
 void setData(Record[] data)
          An array of Record objects, specifying the data to be used to populate the DataBoundComponent.
 void setData(RecordList data)
          An List of Record objects, specifying the data to be used to populate the DataBoundComponent.
 void setDataFetchMode(FetchMode dataFetchMode)
          How to fetch and manage records retrieve from the server.
 void setDataPageSize(int dataPageSize)
          When using data paging, how many records to fetch at a time.
 void setDataSource(DataSource dataSource)
          Bind to a DataSource.
 void setDateEditingStyle(DateEditingStyle dateEditingStyle)
          Indicates the type of controls to use in event-windows.
 void setDateFormatter(DateDisplayFormat dateFormatter)
          Date formatter for displaying events.
 void setDatePickerHoverText(String datePickerHoverText)
          The text to be displayed when a user hovers over the date picker toolbar button
 void setDayBodyBaseStyle(String dayBodyBaseStyle)
          The base name for the CSS class applied to the day body of the month view of the calendar.
 void setDayHeaderBaseStyle(String dayHeaderBaseStyle)
          The base name for the CSS class applied to the day headers of the month view.
 void setDayViewTitle(String dayViewTitle)
          The title for the day view.
static void setDefaultProperties(Calendar calendarProperties)
          Class level method to set the default properties of this class.
 void setDefaultTimelineColumnSpan(int defaultTimelineColumnSpan)
          The number of columns of the timelineGranularity to give the timeline by default if no endDate is provided.
 void setDescriptionField(String descriptionField)
          The name of the description field in a CalendarEvent.
 void setDetailsButtonTitle(String detailsButtonTitle)
          The title for the edit button in the quick event dialog
 void setDisableWeekends(Boolean disableWeekends)
          If set, weekend days appear in disabled style and events cannot be created on weekends.
 void setDragDataAction(DragDataAction dragDataAction)
          Indicates what to do with data dragged into another DataBoundComponent.
 void setDragTrackerStyle(String dragTrackerStyle)
          CSS Style to apply to the drag tracker when dragging occurs on this component.
 void setDropValues(Map dropValues)
          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.
 void setDuplicateDragMessage(String duplicateDragMessage)
          Message to show when a user attempts to transfer duplicate records into this component, and preventDuplicates is enabled.
 void setEditFormulaFieldText(String editFormulaFieldText)
          Text for a menu item allowing users to edit a formula field
 void setEditSummaryFieldText(String editSummaryFieldText)
          Text for a menu item allowing users to edit the formatter for a field
 void setEndDate(Date endDate)
          The end date of the calendar timeline view.
 void setEndDateField(String endDateField)
          The name of the end date field in a CalendarEvent.
 void setEventAutoArrange(Boolean eventAutoArrange)
          If set to true, enables the auto-arrangement of events that share time in the calendar.
 void setEventDescriptionFieldTitle(String eventDescriptionFieldTitle)
          The title for the descriptionField field in the quick and advanced event dialogs
 void setEventDialogFields(FormItem... eventDialogFields)
          The set of fields for the eventDialog.
 void setEventDragGap(int eventDragGap)
          The number of pixels to leave to the right of events so overlapping events can still be added using the mouse.
 void setEventEditorFields(FormItem... eventEditorFields)
          The set of fields for the eventEditor.
 void setEventEndDateFieldTitle(String eventEndDateFieldTitle)
          The title for the end date field in the quick and advanced event dialogs
 void setEventHoverHTMLCustomizer(EventHoverHTMLCustomizer eventHoverHTMLCustomizer)
          This method returns the hover HTML to be displayed when the user hovers over a cell displayed in the calendar month view tab.
 void setEventLaneFieldTitle(String eventLaneFieldTitle)
          The title for the laneField field in the quick and advanced event dialogs
 void setEventNameFieldTitle(String eventNameFieldTitle)
          The title for the event name field in the quick and advanced event dialogs
 void setEventOverlap(Boolean eventOverlap)
          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.
 void setEventOverlapIdenticalStartTimes(Boolean eventOverlapIdenticalStartTimes)
          When set to true, events that start at the same time will not overlap each other to prevent events having their close button hidden.
 void setEventOverlapPercent(int eventOverlapPercent)
          The size of the overlap, presented as a percentage of the width of events sharing timeslots.
 void setEventSnapGap(Integer eventSnapGap)
          In day and week views, determines the number of vertical pixels by which an event can be moved or resized when dragging.
 void setEventStartDateFieldTitle(String eventStartDateFieldTitle)
          The title for the start date field in the quick and advanced event dialogs
 void setEventWindowStyle(String eventWindowStyle)
          The base name for the CSS class applied to event windows within calendars.
 void setEventWindowStyleField(String eventWindowStyleField)
          The name of the field used to override eventWindowStyle for an individual CalendarEvent.
 void setExportAll(Boolean exportAll)
          Setting exportAll to true prevents the component from passing its list of fields to the export call.
 void setExportFields(String[] exportFields)
          The list of field-names to export.
 void setFetchOperation(String fetchOperation)
          Operation ID this component should use when performing fetch operations.
 void setFirstDayOfWeek(Integer firstDayOfWeek)
          The numeric day (0-6) which the calendar should consider as the first day of the week - if unset, the default is taken from the current locale.
 void setHeaderLevels(HeaderLevel... headerLevels)
          Configures the levels of headers shown above the event area, and their time units.
 void setHiliteProperty(String hiliteProperty)
          Marker that can be set on a record to flag that record as hilited.
 void setHilites(Hilite[] hilites)
          Accepts an array of hilite objects and applies them to this DataBoundComponent.
 void setHiliteState(String hiliteState)
          Set the current hilites based on a hiliteState String previously returned from getHilitesState.
 void setInitialCriteria(Criteria initialCriteria)
          Criteria to use when DataBoundComponent.setAutoFetchData(Boolean) is used.
 void setInvalidDateMessage(Boolean invalidDateMessage)
          The message to display in the eventEditor when the 'To' date is greater than the 'From' date and a save is attempted.
 void setLaneFields(ListGridField... laneFields)
          Field definitions for the frozen area of the timelineView, which shows data about the timeline lanes.
 void setLaneNameField(String laneNameField)
          The name of the field which will determine the lane in which this event will be displayed in Timelines and in the day view, if showDayLanes is true.
 void 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.
 void setLeadingDateField(String leadingDateField)
          The name of the leading date field for each event.
 com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.calendar.CalendarLogicalStructure s)
           
 void 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.
 void setMinLaneWidth(Integer minLaneWidth)
          When showing vertical lanes in the dayView, this attribute sets the minimum width of each column or field.
 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.
 void setMonthViewTitle(String monthViewTitle)
          The title for the month view.
 void setNameField(String nameField)
          The name of the name field in a CalendarEvent.
 void setNextButtonHoverText(String nextButtonHoverText)
          The text to be displayed when a user hovers over the next toolbar button
 void setOtherDayBlankStyle(String otherDayBlankStyle)
          The CSS style applied to both the header and body of days from other months in the month view, when showOtherDays is false.
 void setOtherDayBodyBaseStyle(String otherDayBodyBaseStyle)
          The base name for the CSS class applied to the day body of the month view of the calendar.
 void setOtherDayHeaderBaseStyle(String otherDayHeaderBaseStyle)
          The base name for the CSS class applied to the day headers of the month view.
 void setOverlapSortSpecifiers(SortSpecifier... overlapSortSpecifiers)
          For timelines that allow overlapping events, an array of sort-specifiers that dictate the vertical rendering order of overlapped events in each lane.
 void setPreventDuplicates(Boolean preventDuplicates)
          If set, detect and prevent duplicate records from being transferred to this component, either via drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent).
 void setPreviousButtonHoverText(String previousButtonHoverText)
          The text to be displayed when a user hovers over the previous toolbar button.
 void setProgressiveLoading(Boolean progressiveLoading)
          Indicates whether or not this component will load its data progressively
 void setRemoveOperation(String removeOperation)
          Operation ID this component should use when performing remove operations.
 void setRowHeight(int rowHeight)
          The height of time-slots in the calendar.
 void setSaveButtonTitle(String saveButtonTitle)
          The title for the save button in the quick event dialog and the event editor
 void setScrollToWorkday(Boolean scrollToWorkday)
          If set, causes the workday hours to be sized to fill the available space in the day view and week view, and automatically scrolls these views to the start of the workday when the calendar is first displayed and whenever the user switches to a new day or week.
 void setSelectedCellStyle(String selectedCellStyle)
          The base name for the CSS class applied to a cell that is selected via a mouse drag.
 void setShowAddEventButton(Boolean showAddEventButton)
          Set to false to hide the Add Event button.
 void setShowComplexFields(Boolean showComplexFields)
          Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.
 void setShowControlsBar(Boolean showControlsBar)
          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.
 void setShowDateChooser(Boolean showDateChooser)
          Determines whether the dateChooser is displayed.
 void setShowDatePickerButton(Boolean showDatePickerButton)
          Set to false to hide the datePickerButton that allows selecting a new base date for this Calendar.
 void setShowDayHeaders(Boolean showDayHeaders)
          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.
 void setShowDayLanes(Boolean showDayLanes)
          If set to true, the day view uses lanes to render multiple vertical "lanes" within the day, very much like a vertical Timeline.
 void setShowDayView(Boolean showDayView)
           
 void setShowDetailFields(Boolean showDetailFields)
          Whether to show fields marked detail:true when a DataBoundComponent is given a DataSource but no component.fields.
 void setShowEventDescriptions(Boolean showEventDescriptions)
          If false, the event header will take up the entire space of the event.
 void setShowHiddenFields(Boolean showHiddenFields)
          Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.
 void setShowMonthView(Boolean showMonthView)
           
 void setShowNextButton(Boolean showNextButton)
          Set to false to hide the Next button.
 void setShowOtherDays(Boolean showOtherDays)
          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.
 void setShowPreviousButton(Boolean showPreviousButton)
          Set to false to hide the Previous button.
 void setShowQuickEventDialog(Boolean showQuickEventDialog)
          Determines whether the quick event dialog is displayed when a time is clicked.
 void setShowTimelineView(Boolean showTimelineView)
          If set to true, show the Timeline view.
 void setShowWeekends(Boolean showWeekends)
          Suppresses the display of weekend days in the week and month views, and disallows the creation of events on weekends.
 void setShowWeekView(Boolean showWeekView)
           
 void setShowWorkday(Boolean showWorkday)
          If set, causes the calendar to use workdayBaseStyle for cells falling within the workday as defined by workdayStart and workdayEnd, in both the weekView and dayView.
 void setSizeEventsToGrid(Boolean sizeEventsToGrid)
          If true, events will be sized to the grid, even if they start and/or end at times between grid cells.
 void setStartDate(Date startDate)
          The start date of the calendar timeline view.
 void setStartDateField(String startDateField)
          The name of the start date field in a CalendarEvent.
 void setTimeFormatter(TimeDisplayFormat timeFormatter)
          Display format to use for the time portion of events' date information.
 void setTimeFormatter(TimeFormatter timeFormatter)
          Deprecated. use setTimeFormatter(TimeDisplayFormat) instead.
 void setTimelineGranularity(TimeUnit timelineGranularity)
          The granularity with which the timelineView will display events.
 void setTimelineRange(Date start)
          Sets the range over which the timeline will display events.
 void setTimelineRange(Date start, Date end)
          Sets the range over which the timeline will display events.
 void setTimelineUnitsPerColumn(int timelineUnitsPerColumn)
          How many units of timelineGranularity each cell represents.
 void setTimelineViewTitle(String timelineViewTitle)
          The title for the timeline view.
 void setTitleField(String titleField)
          Sets the best field to use for a user-visible title for an individual record from this component.
 void setTodayBackgroundColor(String todayBackgroundColor)
          The background color for today in the Month view, or in the Timeline view when +{timelineGranularity} is "day".
 void setTrailingDateField(String trailingDateField)
          The name of the trailing date field for each event.
 void setUpdateOperation(String updateOperation)
          Operation ID this component should use when performing update operations.
 void setUseAllDataSourceFields(Boolean useAllDataSourceFields)
          If true, the set of fields given by the "default binding" (see fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.
 void setUseFlatFields(Boolean useFlatFields)
          The useFlatFields flag causes all simple type fields anywhere in a nested set of DataSources to be exposed as a flat list for form binding.
 void setWeekEventBorderOverlap(Boolean weekEventBorderOverlap)
          Augments the width of week event windows slightly to avoid duplicate adjacent borders between events.
 void setWeekPrefix(String weekPrefix)
          The text to appear before the week number in the title of week-based HeaderLevels when this calendar is showing a timeline.
 void setWeekViewTitle(String weekViewTitle)
          The title for the week view.
 void setWorkdayBaseStyle(String workdayBaseStyle)
          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 Calendar.getWorkdayStart and Calendar.getWorkdayEnd implementations.
 void setWorkdayEnd(String workdayEnd)
          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.
 void setWorkdays(int[] workdays)
          Array of days that are considered workdays when showWorkday is true
 void setWorkdayStart(String workdayStart)
          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.
 void showEventDialog(CalendarEvent event)
          Open the Quick Event dialog showing minimal information about an existing event.
 void showEventEditor()
          Show an Event Editor for the passed event.
 void showEventEditor(CalendarEvent event)
          Show an Event Editor for the passed event.
 void showNewEventDialog()
          Open the Quick Event dialog to begin editing a new event.
 void showNewEventDialog(CalendarEvent event)
          Open the Quick Event dialog to begin editing a new event.
 void showNewEventEditor()
          Show an Event Editor for a new event.
 void showNewEventEditor(CalendarEvent event)
          Show an Event Editor for a new event.
 void transferSelectedData(DataBoundComponent source)
          Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction.
 void transferSelectedData(DataBoundComponent source, int index)
          Simulates a drag / drop type transfer of the selected records in some other component to this component, without requiring any user interaction.
 void updateEvent(CalendarEvent event, Date startDate, Date endDate, String name, String description)
          update an event in this calendar.
 
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addChild, addChild, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addScrolledHandler, addShowContextMenuHandler, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsFocus, containsPoint, containsPoint, deparent, depeer, disable, enable, focus, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaRole, getAutoDraw, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getContentElement, getContents, getContextMenu, getCursor, getDataPath, getDefaultHeight, getDefaultWidth, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragType, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getElement, getElement, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFormItemAutoChild, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverComponent, getHoverDelay, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapOrigin, getHSnapOrigin, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getKeepInParentRect, getLayoutAlign, getLeft, getLeftAsString, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMaxHeight, getMaxWidth, getMenuConstructor, getMinHeight, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getNextZIndex, getNoDoubleClicks, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getOverflow, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getParentCanvas, getParentElement, getPeers, getPercentBox, getPercentSource, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrompt, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowDepth, getShadowImage, getShadowOffset, getShadowSoftness, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowResizeBar, getShowShadow, getShrinkElementOnHide, getSkinImgDir, getSnapAxis, getSnapEdge, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapResizeToGrid, getSnapTo, getSnapToGrid, getSnapVDirection, getSnapVGap, getStyleName, getTabIndex, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUseBackMask, getUseDragMask, getUseNativeDrag, getUseOpacityFilter, getValuesManager, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWidth, getVSnapOrigin, getVSnapOrigin, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideContextMenu, imgHTML, imgHTML, imgHTML, intersects, isDirty, isDisabled, isDrawn, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, parentResized, printComponents, redraw, redraw, removeChild, removeChild, removePeer, removePeer, resizeBy, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAlign, setAllowExternalFilters, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoDraw, setAutoHeight, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBottom, setCanAcceptDrop, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setContents, setContextMenu, setCursor, setDataPath, setDefaultHeight, setDefaultProperties, setDefaultWidth, setDisabled, setDisabledCursor, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragType, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setElement, setExtraSpace, setFacetId, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverDelay, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeft, setLeft, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLogicalStructure, setMargin, setMatchElement, setMaxHeight, setMaxWidth, setMenuConstructor, setMinHeight, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setNeverUseFilters, setNoDoubleClicks, setOpacity, setOverflow, setPadding, setPageLeft, setPageTop, setParentCanvas, setParentElement, setPeers, setPercentBox, setPercentSource, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrompt, setRect, setRect, setRedrawOnResize, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setScrollbarConstructor, setScrollbarSize, setShadowDepth, setShadowImage, setShadowOffset, setShadowSoftness, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowResizeBar, setShowShadow, setShrinkElementOnHide, setSkinImgDir, setSmoothFade, setSnapAxis, setSnapEdge, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToGrid, setSnapTo, setSnapToGrid, setSnapVDirection, setSnapVGap, setStyleName, setTabIndex, setTitle, setTooltip, setTop, setTop, setUseBackMask, setUseDragMask, setUseNativeDrag, setUseOpacityFilter, setValuesManager, setVisibility, setVisible, setWidth, setWidth, setWidth, setWidth100, setZIndex, shouldDragScroll, show, showClickMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateEditNode, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDrop
 
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDragTracker, setID, setJavaScriptObject, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.smartgwt.client.widgets.DataBoundComponent
getOrCreateJsObj
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

Calendar

public Calendar()

Calendar

public Calendar(JavaScriptObject jsObj)
Method Detail

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.
See Also:
AutoChildUsage

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.
See Also:
AutoChildUsage

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.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
ImgButton
Throws:
IllegalStateException - if this widget has not yet been rendered.

setAddEventButtonHoverText

public void setAddEventButtonHoverText(String addEventButtonHoverText)
                                throws IllegalStateException
The text to be displayed when a user hovers over the add event toolbar button

Parameters:
addEventButtonHoverText - Default value is "Add an event"
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:
String

setAlternateLaneStyles

public void 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 - Default value is null

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:
Boolean

setBaseStyle

public void 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.

Parameters:
baseStyle - See CSSStyleName . Default value is "calendar"
See Also:
Appearance overview and related methods

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.

Returns:
See CSSStyleName
See Also:
Appearance overview and related methods

setCancelButtonTitle

public void setCancelButtonTitle(String cancelButtonTitle)
                          throws IllegalStateException
The title for the cancel button in the event editor

Parameters:
cancelButtonTitle - Default value is "Cancel"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getCancelButtonTitle

public String getCancelButtonTitle()
The title for the cancel button in the event editor

Returns:
String

setCanCreateEvents

public void setCanCreateEvents(Boolean canCreateEvents)
                        throws IllegalStateException
If true, users can create new events.

Parameters:
canCreateEvents - Default value is true
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:
Boolean

setCanDeleteEvents

public void setCanDeleteEvents(Boolean canDeleteEvents)
                        throws IllegalStateException
Deprecated. in favor of canRemoveEvents

If true, users can delete existing events. Defaults to canEditEvents.

Parameters:
canDeleteEvents - Default value is null
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:
Boolean

setCanDragEventField

public void setCanDragEventField(String canDragEventField)
                          throws IllegalStateException
Name of the field on each CalendarEvent that determines dragability.

Parameters:
canDragEventField - Default value is "canEdit"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

getCanDragEventField

public String getCanDragEventField()
Name of the field on each CalendarEvent that determines dragability.

Returns:
String
See Also:
CalendarEvent

setCanDragEvents

public void setCanDragEvents(Boolean canDragEvents)
                      throws IllegalStateException
If true, users can drag-reposition existing events.

Parameters:
canDragEvents - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getCanDragEvents

public Boolean getCanDragEvents()
If true, users can drag-reposition existing events.

Returns:
Boolean

setCanEditEvents

public void setCanEditEvents(Boolean canEditEvents)
                      throws IllegalStateException
If true, users can edit existing events.

Parameters:
canEditEvents - Default value is true
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:
Boolean

setCanEditField

public void setCanEditField(String canEditField)
                     throws IllegalStateException
Name of the field on each CalendarEvent that determines editability.

Parameters:
canEditField - Default value is "canEdit"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

getCanEditField

public String getCanEditField()
Name of the field on each CalendarEvent that determines editability.

Returns:
String
See Also:
CalendarEvent

setCanEditLane

public void setCanEditLane(Boolean canEditLane)
                    throws IllegalStateException
Can we edit the lane of the event, specified by the laneNameField? If so, the event can be dragged to a different lane and, when it's editor is shown, an additional drop-down widget is provided allowing the user to select a different lane.

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

This setting can be overridden on each event.

Parameters:
canEditLane - Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getCanEditLane

public Boolean getCanEditLane()
Can we edit the lane of the event, specified by the laneNameField? If so, the event can be dragged to a different lane and, when it's editor is shown, an additional drop-down widget is provided allowing the user to select a different lane.

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

This setting can be overridden on each event.

Returns:
Boolean

setCanEditLaneField

public void setCanEditLaneField(String canEditLaneField)
                         throws IllegalStateException
Name of the field on each CalendarEvent that determines whether that event can be moved between lanes.

Parameters:
canEditLaneField - Default value is "canEditLane"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

getCanEditLaneField

public String getCanEditLaneField()
Name of the field on each CalendarEvent that determines whether that event can be moved between lanes.

Returns:
String
See Also:
CalendarEvent

setCanRemoveEvents

public void setCanRemoveEvents(Boolean canRemoveEvents)
                        throws IllegalStateException
If true, users can remove existing events. Defaults to canEditEvents.

Parameters:
canRemoveEvents - Default value is true
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:
Boolean

setCanRemoveField

public void setCanRemoveField(String canRemoveField)
                       throws IllegalStateException
Name of the field on each CalendarEvent that determines whether an event shows a remove button.

Parameters:
canRemoveField - Default value is "canRemove"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

getCanRemoveField

public String getCanRemoveField()
Name of the field on each CalendarEvent that determines whether an event shows a remove button.

Returns:
String
See Also:
CalendarEvent

setCanReorderLanes

public void setCanReorderLanes(Boolean canReorderLanes)
                        throws IllegalStateException
If true, lanes can be reordered by dragging them with the mouse.

Parameters:
canReorderLanes - Default value is null
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 them with the mouse.

Returns:
Boolean

setCanResizeTimelineEvents

public void setCanResizeTimelineEvents(Boolean canResizeTimelineEvents)
                                throws IllegalStateException
Can Timeline events be stretched by their left and right edges?

Parameters:
canResizeTimelineEvents - Default value is false
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getCanResizeTimelineEvents

public Boolean getCanResizeTimelineEvents()
Can Timeline events be stretched by their left and right edges?

Returns:
Boolean

setChosenDate

public void 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'

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:
Date

setColumnsPerPage

public void 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 - Default value is null
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:
Integer

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.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
HLayout
Throws:
IllegalStateException - if this widget has not yet been rendered.

setCurrentViewName

public void 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

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'.

setData

public void 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 Calendar.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
See Also:
CalendarEvent

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 Calendar.fetchData. In this case the data objects will be set to a resultSet rather than a simple array.

Returns:
CalendarEvent[]
See Also:
CalendarEvent

setDataFetchMode

public void 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 fetchMode applies.

Specified by:
setDataFetchMode in interface DataBoundComponent
Parameters:
dataFetchMode - Default value is "paged"
See Also:
Databinding overview and related methods

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 fetchMode applies.

Specified by:
getDataFetchMode in interface DataBoundComponent
Returns:
FetchMode
See Also:
Databinding overview and related methods

getDateChooser

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

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
DateChooser
Throws:
IllegalStateException - if this widget has not yet been rendered.

setDateEditingStyle

public void 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 - Default value is null
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:
DateEditingStyle

setDateFormatter

public void setDateFormatter(DateDisplayFormat dateFormatter)
Date formatter for displaying events. Default is to use the system-wide default short date format, configured via Date.setShortDisplayFormat. Specify any valid DateDisplayFormat.

Parameters:
dateFormatter - Default value is null

getDateFormatter

public DateDisplayFormat getDateFormatter()
Date formatter for displaying events. Default is to use the system-wide default short date format, configured via Date.setShortDisplayFormat. Specify any valid DateDisplayFormat.

Returns:
DateDisplayFormat

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.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
Label
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.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
ImgButton
Throws:
IllegalStateException - if this widget has not yet been rendered.

setDatePickerHoverText

public void setDatePickerHoverText(String datePickerHoverText)
                            throws IllegalStateException
The text to be displayed when a user hovers over the date picker toolbar button

Parameters:
datePickerHoverText - Default value is "Choose a date"
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:
String

setDayBodyBaseStyle

public void 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.

Parameters:
dayBodyBaseStyle - See CSSStyleName . Default value is "calMonthDayBody"
See Also:
Appearance overview and related methods

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.

Returns:
See CSSStyleName
See Also:
Appearance overview and related methods

setDayHeaderBaseStyle

public void 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.

Parameters:
dayHeaderBaseStyle - See CSSStyleName . Default value is "calMonthDayHeader"
See Also:
Appearance overview and related methods

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.

Returns:
See CSSStyleName
See Also:
Appearance overview and related methods

getDayView

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

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
ListGrid
Throws:
IllegalStateException - if this widget has not yet been rendered.

setDayViewTitle

public void setDayViewTitle(String dayViewTitle)
                     throws IllegalStateException
The title for the day view.

Parameters:
dayViewTitle - Default value is "Day"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getDayViewTitle

public String getDayViewTitle()
The title for the day view.

Returns:
String

setDefaultTimelineColumnSpan

public void 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 - Default value is 20
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:
int

setDescriptionField

public void setDescriptionField(String descriptionField)
                         throws IllegalStateException
The name of the description field in a CalendarEvent.

Parameters:
descriptionField - Default value is "description"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getDescriptionField

public String getDescriptionField()
The name of the description field in a CalendarEvent.

Returns:
String

setDetailsButtonTitle

public void setDetailsButtonTitle(String detailsButtonTitle)
                           throws IllegalStateException
The title for the edit button in the quick event dialog

Parameters:
detailsButtonTitle - Default value is "Edit Details"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getDetailsButtonTitle

public String getDetailsButtonTitle()
The title for the edit button in the quick event dialog

Returns:
String

setDisableWeekends

public void setDisableWeekends(Boolean disableWeekends)
                        throws IllegalStateException
If set, weekend days appear in disabled style and events cannot be created on weekends. Which days are considered weekends is controlled by weekendDays.

Parameters:
disableWeekends - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Visibility overview and related methods

getDisableWeekends

public Boolean getDisableWeekends()
If set, weekend days appear in disabled style and events cannot be created on weekends. Which days are considered weekends is controlled by weekendDays.

Returns:
Boolean
See Also:
Visibility overview and related methods

setEndDate

public void 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 this attribute may be automatically altered if showing header-levels, to fit to header boundaries.

Parameters:
endDate - Default value is null
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 this attribute may be automatically altered if showing header-levels, to fit to header boundaries.

Returns:
Date

setEndDateField

public void setEndDateField(String endDateField)
                     throws IllegalStateException
The name of the end date field in a CalendarEvent.

Parameters:
endDateField - Default value is "endDate"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

getEndDateField

public String getEndDateField()
The name of the end date field in a CalendarEvent.

Returns:
String
See Also:
CalendarEvent

setEventAutoArrange

public void 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 - Default value is true
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:
Boolean

setEventDescriptionFieldTitle

public void setEventDescriptionFieldTitle(String eventDescriptionFieldTitle)
                                   throws IllegalStateException
The title for the descriptionField field in the quick and advanced event dialogs

Parameters:
eventDescriptionFieldTitle - Default value is "Description"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getEventDescriptionFieldTitle

public String getEventDescriptionFieldTitle()
The title for the descriptionField field in the quick and advanced event dialogs

Returns:
String

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.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
Window
Throws:
IllegalStateException - if this widget has not yet been rendered.

setEventDragGap

public void setEventDragGap(int eventDragGap)
The number of pixels to leave to the right of events so overlapping events can still be added using the mouse.

Parameters:
eventDragGap - Default value is 10

getEventDragGap

public int getEventDragGap()
The number of pixels to leave to the right of events so overlapping events can still be added using the mouse.

Returns:
int

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

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
DynamicForm
Throws:
IllegalStateException - if this widget has not yet been rendered.

getEventEditorLayout

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

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
Window
Throws:
IllegalStateException - if this widget has not yet been rendered.

setEventEndDateFieldTitle

public void setEventEndDateFieldTitle(String eventEndDateFieldTitle)
                               throws IllegalStateException
The title for the end date field in the quick and advanced event dialogs

Parameters:
eventEndDateFieldTitle - Default value is "To"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getEventEndDateFieldTitle

public String getEventEndDateFieldTitle()
The title for the end date field in the quick and advanced event dialogs

Returns:
String

setEventLaneFieldTitle

public void setEventLaneFieldTitle(String eventLaneFieldTitle)
                            throws IllegalStateException
The title for the laneField field in the quick and advanced event dialogs

Parameters:
eventLaneFieldTitle - Default value is "Lane"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getEventLaneFieldTitle

public String getEventLaneFieldTitle()
The title for the laneField field in the quick and advanced event dialogs

Returns:
String

setEventNameFieldTitle

public void setEventNameFieldTitle(String eventNameFieldTitle)
                            throws IllegalStateException
The title for the event name field in the quick and advanced event dialogs

Parameters:
eventNameFieldTitle - Default value is "Event Name"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getEventNameFieldTitle

public String getEventNameFieldTitle()
The title for the event name field in the quick and advanced event dialogs

Returns:
String

setEventOverlap

public void 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.

Parameters:
eventOverlap - Default value is true
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.

Returns:
Boolean

setEventOverlapIdenticalStartTimes

public void 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 - Default value is false
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:
Boolean

setEventOverlapPercent

public void setEventOverlapPercent(int eventOverlapPercent)
                            throws IllegalStateException
The size of the overlap, presented as a percentage of the width of events sharing timeslots.

Parameters:
eventOverlapPercent - Default value is 10
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:
int

setEventSnapGap

public void setEventSnapGap(Integer eventSnapGap)
                     throws IllegalStateException
In day and week views, determines the number of vertical pixels by which an event can be moved or resized when dragging. The default of 20px means that snapping occurs to each row border, since the default height of each row in those views is also 20px.

For timelines, this attribute affects the number of horizontal pixels used for drag-snapping. Since the default width for headerLevels is 60px, the default eventSnapGap of 20px means that each column is split into 20 minute sections, assuming that the timelineGranularity is "hour".

Parameters:
eventSnapGap - Default value is 20
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Editing overview and related methods

getEventSnapGap

public Integer getEventSnapGap()
In day and week views, determines the number of vertical pixels by which an event can be moved or resized when dragging. The default of 20px means that snapping occurs to each row border, since the default height of each row in those views is also 20px.

For timelines, this attribute affects the number of horizontal pixels used for drag-snapping. Since the default width for headerLevels is 60px, the default eventSnapGap of 20px means that each column is split into 20 minute sections, assuming that the timelineGranularity is "hour".

Returns:
Integer
See Also:
Editing overview and related methods

setEventStartDateFieldTitle

public void setEventStartDateFieldTitle(String eventStartDateFieldTitle)
                                 throws IllegalStateException
The title for the start date field in the quick and advanced event dialogs

Parameters:
eventStartDateFieldTitle - Default value is "From"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getEventStartDateFieldTitle

public String getEventStartDateFieldTitle()
The title for the start date field in the quick and advanced event dialogs

Returns:
String

getEventWindow

public EventWindow getEventWindow()
                           throws IllegalStateException
To display events in day and week views, the Calendar creates instance of EventWindow for each event. Use the com.smartgwt.client.types.AutoChild system to customize these windows.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
EventWindow
Throws:
IllegalStateException - if this widget has not yet been rendered.

setEventWindowStyle

public void setEventWindowStyle(String eventWindowStyle)
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 - See CSSStyleName . Default value is "eventWindow"
See Also:
Appearance overview and related methods

getEventWindowStyle

public String getEventWindowStyle()
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:
See CSSStyleName
See Also:
Appearance overview and related methods

setEventWindowStyleField

public void setEventWindowStyleField(String eventWindowStyleField)
                              throws IllegalStateException
The name of the field used to override eventWindowStyle for an individual CalendarEvent. See eventWindowStyle.

Parameters:
eventWindowStyleField - Default value is "eventWindowStyle"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Appearance overview and related methods

getEventWindowStyleField

public String getEventWindowStyleField()
The name of the field used to override eventWindowStyle for an individual CalendarEvent. See eventWindowStyle.

Returns:
String
See Also:
Appearance overview and related methods

setFirstDayOfWeek

public void setFirstDayOfWeek(Integer firstDayOfWeek)
The numeric day (0-6) which the calendar should consider as the first day of the week - if unset, the default is taken from the current locale.

Parameters:
firstDayOfWeek - Default value is null

getFirstDayOfWeek

public Integer getFirstDayOfWeek()
The numeric day (0-6) which the calendar should consider as the first day of the week - if unset, the default is taken from the current locale.

Returns:
Integer

setHeaderLevels

public void 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

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:
HeaderLevel...

setInvalidDateMessage

public void setInvalidDateMessage(Boolean 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 - Default value is "From must be before To"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getInvalidDateMessage

public Boolean getInvalidDateMessage()
The message to display in the eventEditor when the 'To' date is greater than the 'From' date and a save is attempted.

Returns:
Boolean

setLaneFields

public void 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.

Parameters:
laneFields - Default value is null
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.

Returns:
ListGridField...

setLaneNameField

public void setLaneNameField(String laneNameField)
                      throws IllegalStateException
The name of the field which will determine the lane in which this event will be displayed in Timelines and in the day view, if showDayLanes is true.

Parameters:
laneNameField - Default value is "lane"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

getLaneNameField

public String getLaneNameField()
The name of the field which will determine the lane in which this event will be displayed in Timelines and in the day view, if showDayLanes is true.

Returns:
String
See Also:
CalendarEvent

setLanes

public void 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

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:
Lane...

setLeadingDateField

public void 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 - Default value is "leadingDate"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

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:
String
See Also:
CalendarEvent

getMainView

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

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
TabSet
Throws:
IllegalStateException - if this widget has not yet been rendered.

setMinimumDayHeight

public void 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 - Default value is 80
See Also:
Appearance overview and related methods

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:
Integer
See Also:
Appearance overview and related methods

setMinLaneWidth

public void 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 - Default value is null
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:
Integer

getMonthView

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

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
ListGrid
Throws:
IllegalStateException - if this widget has not yet been rendered.

setMonthViewTitle

public void setMonthViewTitle(String monthViewTitle)
                       throws IllegalStateException
The title for the month view.

Parameters:
monthViewTitle - Default value is "Month"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getMonthViewTitle

public String getMonthViewTitle()
The title for the month view.

Returns:
String

setNameField

public void setNameField(String nameField)
                  throws IllegalStateException
The name of the name field in a CalendarEvent.

Parameters:
nameField - Default value is "name"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

getNameField

public String getNameField()
The name of the name field in a CalendarEvent.

Returns:
String
See Also:
CalendarEvent

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.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
ImgButton
Throws:
IllegalStateException - if this widget has not yet been rendered.

setNextButtonHoverText

public void setNextButtonHoverText(String nextButtonHoverText)
                            throws IllegalStateException
The text to be displayed when a user hovers over the next toolbar button

Parameters:
nextButtonHoverText - Default value is "Next"
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:
String

setOtherDayBlankStyle

public void 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 - See CSSStyleName . Default value is "calMonthOtherDayBlank"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Appearance overview and related methods

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:
See CSSStyleName
See Also:
Appearance overview and related methods

setOtherDayBodyBaseStyle

public void 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.

Parameters:
otherDayBodyBaseStyle - See CSSStyleName . Default value is "calMonthDayBody"
See Also:
Appearance overview and related methods

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.

Returns:
See CSSStyleName
See Also:
Appearance overview and related methods

setOtherDayHeaderBaseStyle

public void 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.

Parameters:
otherDayHeaderBaseStyle - See CSSStyleName . Default value is "calMonthDayHeader"
See Also:
Appearance overview and related methods

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.

Returns:
See CSSStyleName
See Also:
Appearance overview and related methods

setOverlapSortSpecifiers

public void setOverlapSortSpecifiers(SortSpecifier... overlapSortSpecifiers)
For timelines that allow overlapping events, an array of sort-specifiers that dictate the vertical rendering order of overlapped events in each lane.

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

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 timeline is databound.

Parameters:
overlapSortSpecifiers - Default value is null

getOverlapSortSpecifiers

public SortSpecifier[] getOverlapSortSpecifiers()
For timelines that allow overlapping events, an array of sort-specifiers that dictate the vertical rendering order of overlapped events in each lane.

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

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 timeline is databound.

Returns:
SortSpecifier...

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.

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
ImgButton
Throws:
IllegalStateException - if this widget has not yet been rendered.

setPreviousButtonHoverText

public void setPreviousButtonHoverText(String previousButtonHoverText)
                                throws IllegalStateException
The text to be displayed when a user hovers over the previous toolbar button.

Parameters:
previousButtonHoverText - Default value is "Previous"
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:
String

setRowHeight

public void setRowHeight(int rowHeight)
The height of time-slots in the calendar.

Parameters:
rowHeight - Default value is 20

getRowHeight

public int getRowHeight()
The height of time-slots in the calendar.

Returns:
int

setSaveButtonTitle

public void setSaveButtonTitle(String saveButtonTitle)
                        throws IllegalStateException
The title for the save button in the quick event dialog and the event editor

Parameters:
saveButtonTitle - Default value is "Save Event"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getSaveButtonTitle

public String getSaveButtonTitle()
The title for the save button in the quick event dialog and the event editor

Returns:
String

setScrollToWorkday

public void setScrollToWorkday(Boolean scrollToWorkday)
                        throws IllegalStateException
If set, causes the workday hours to be sized to fill the available space in the day view and week view, and automatically scrolls these views to the start of the workday when the calendar is first displayed and whenever the user switches to a new day or week.

Parameters:
scrollToWorkday - Default value is false
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getScrollToWorkday

public Boolean getScrollToWorkday()
If set, causes the workday hours to be sized to fill the available space in the day view and week view, and automatically scrolls these views to the start of the workday when the calendar is first displayed and whenever the user switches to a new day or week.

Returns:
Boolean

setSelectedCellStyle

public void setSelectedCellStyle(String selectedCellStyle)
The base name for the CSS class applied to a cell that is selected via a mouse drag.

Parameters:
selectedCellStyle - See CSSStyleName . Default value is "calendarCellSelected"
See Also:
Appearance overview and related methods

getSelectedCellStyle

public String getSelectedCellStyle()
The base name for the CSS class applied to a cell that is selected via a mouse drag.

Returns:
See CSSStyleName
See Also:
Appearance overview and related methods

setShowAddEventButton

public void setShowAddEventButton(Boolean showAddEventButton)
Set to false to hide the Add Event button.

Parameters:
showAddEventButton - Default value is null

getShowAddEventButton

public Boolean getShowAddEventButton()
Set to false to hide the Add Event button.

Returns:
Boolean

setShowControlsBar

public void 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 - Default value is true
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:
Boolean

setShowDateChooser

public void setShowDateChooser(Boolean showDateChooser)
                        throws IllegalStateException
Determines whether the dateChooser is displayed.

Parameters:
showDateChooser - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Visibility overview and related methods

getShowDateChooser

public Boolean getShowDateChooser()
Determines whether the dateChooser is displayed.

Returns:
Boolean
See Also:
Visibility overview and related methods

setShowDatePickerButton

public void setShowDatePickerButton(Boolean showDatePickerButton)
Set to false to hide the datePickerButton that allows selecting a new base date for this Calendar.

Parameters:
showDatePickerButton - Default value is null

getShowDatePickerButton

public Boolean getShowDatePickerButton()
Set to false to hide the datePickerButton that allows selecting a new base date for this Calendar.

Returns:
Boolean

setShowDayHeaders

public void 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 - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Visibility overview and related methods

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:
Boolean
See Also:
Visibility overview and related methods

setShowDayLanes

public void 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
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:
Boolean

setShowDetailFields

public void 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 - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Databinding overview and related methods

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:
Boolean
See Also:
Databinding overview and related methods

setShowEventDescriptions

public void setShowEventDescriptions(Boolean showEventDescriptions)
                              throws IllegalStateException
If false, the event header will take up the entire space of the event. This is useful when you want to be able to drag reposition by the entire event and not just the header.

Parameters:
showEventDescriptions - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getShowEventDescriptions

public Boolean getShowEventDescriptions()
If false, the event header will take up the entire space of the event. This is useful when you want to be able to drag reposition by the entire event and not just the header.

Returns:
Boolean

setShowNextButton

public void setShowNextButton(Boolean showNextButton)
Set to false to hide the Next button.

Parameters:
showNextButton - Default value is null

getShowNextButton

public Boolean getShowNextButton()
Set to false to hide the Next button.

Returns:
Boolean

setShowOtherDays

public void 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 - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Visibility overview and related methods

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:
Boolean
See Also:
Visibility overview and related methods

setShowPreviousButton

public void setShowPreviousButton(Boolean showPreviousButton)
Set to false to hide the Previous button.

Parameters:
showPreviousButton - Default value is null

getShowPreviousButton

public Boolean getShowPreviousButton()
Set to false to hide the Previous button.

Returns:
Boolean

setShowQuickEventDialog

public void 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 - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Editing overview and related methods

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:
Boolean
See Also:
Editing overview and related methods

setShowTimelineView

public void setShowTimelineView(Boolean showTimelineView)
If set to true, show the Timeline view.

Parameters:
showTimelineView - Default value is false

getShowTimelineView

public Boolean getShowTimelineView()
If set to true, show the Timeline view.

Returns:
Boolean

setShowWeekends

public void setShowWeekends(Boolean showWeekends)
                     throws IllegalStateException
Suppresses the display of weekend days in the week and month 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 showWeekends to change this property at runtime.

Parameters:
showWeekends - Default value is true
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Visibility overview and related methods

getShowWeekends

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

Returns:
Boolean
See Also:
Visibility overview and related methods

setShowWorkday

public void setShowWorkday(Boolean showWorkday)
                    throws IllegalStateException
If set, causes the calendar to use workdayBaseStyle for cells falling within the workday as defined by workdayStart and workdayEnd, in both the weekView and dayView.

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

Parameters:
showWorkday - Default value is false
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getShowWorkday

public Boolean getShowWorkday()
If set, causes the calendar to use workdayBaseStyle for cells falling within the workday as defined by workdayStart and workdayEnd, in both the weekView and dayView.

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

Returns:
Boolean

setSizeEventsToGrid

public void 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 - Default value is true
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:
Boolean

setStartDate

public void 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 this attribute may be automatically altered if showing header-levels, to fit to header boundaries.

Parameters:
startDate - Default value is null
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 this attribute may be automatically altered if showing header-levels, to fit to header boundaries.

Returns:
Date

setStartDateField

public void setStartDateField(String startDateField)
                       throws IllegalStateException
The name of the start date field in a CalendarEvent.

Parameters:
startDateField - Default value is "startDate"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

getStartDateField

public String getStartDateField()
The name of the start date field in a CalendarEvent.

Returns:
String
See Also:
CalendarEvent

setTimelineGranularity

public void setTimelineGranularity(TimeUnit timelineGranularity)
                            throws IllegalStateException
The granularity with which the timelineView will display events. Possible values are those available in the built-in TimeUnit type.

Parameters:
timelineGranularity - Default value is "day"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getTimelineGranularity

public TimeUnit getTimelineGranularity()
The granularity with which the timelineView will display events. Possible values are those available in the built-in TimeUnit type.

Returns:
TimeUnit

setTimelineUnitsPerColumn

public void setTimelineUnitsPerColumn(int timelineUnitsPerColumn)
                               throws IllegalStateException
How many units of timelineGranularity each cell represents.

Parameters:
timelineUnitsPerColumn - Default value is 1
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:
int

getTimelineView

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

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
ListGrid
Throws:
IllegalStateException - if this widget has not yet been rendered.

setTimelineViewTitle

public void setTimelineViewTitle(String timelineViewTitle)
                          throws IllegalStateException
The title for the timeline view.

Parameters:
timelineViewTitle - Default value is "Timeline"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getTimelineViewTitle

public String getTimelineViewTitle()
The title for the timeline view.

Returns:
String

setTodayBackgroundColor

public void setTodayBackgroundColor(String todayBackgroundColor)
                             throws IllegalStateException
The background color for today in the Month view, or in the Timeline view when +{timelineGranularity} is "day".

Parameters:
todayBackgroundColor - Default value is null
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getTodayBackgroundColor

public String getTodayBackgroundColor()
The background color for today in the Month view, or in the Timeline view when +{timelineGranularity} is "day".

Returns:
String

setTrailingDateField

public void 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 - Default value is "trailingDate"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
CalendarEvent

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:
String
See Also:
CalendarEvent

setWeekEventBorderOverlap

public void setWeekEventBorderOverlap(Boolean weekEventBorderOverlap)
                               throws IllegalStateException
Augments the width of week event windows slightly to avoid duplicate adjacent borders between events.

Parameters:
weekEventBorderOverlap - Default value is false
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Appearance overview and related methods

getWeekEventBorderOverlap

public Boolean getWeekEventBorderOverlap()
Augments the width of week event windows slightly to avoid duplicate adjacent borders between events.

Returns:
Boolean
See Also:
Appearance overview and related methods

setWeekPrefix

public void 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 - Default value is "Week"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

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:
String

getWeekView

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

For an overview of how to use and configure AutoChildren, see Using AutoChildren.

Returns:
ListGrid
Throws:
IllegalStateException - if this widget has not yet been rendered.

setWeekViewTitle

public void setWeekViewTitle(String weekViewTitle)
                      throws IllegalStateException
The title for the week view.

Parameters:
weekViewTitle - Default value is "Week"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getWeekViewTitle

public String getWeekViewTitle()
The title for the week view.

Returns:
String

setWorkdayBaseStyle

public void 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 Calendar.getWorkdayStart and Calendar.getWorkdayEnd implementations.

Parameters:
workdayBaseStyle - See CSSStyleName . Default value is "calendarWorkday"
Throws:
IllegalStateException - this property cannot be changed after the component has been created
See Also:
Appearance overview and related methods

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 Calendar.getWorkdayStart and Calendar.getWorkdayEnd implementations.

Returns:
See CSSStyleName
See Also:
Appearance overview and related methods

addLane

public void addLane(Lane lane)
Adds a new Lane to the calendar timelineView, or to the dayView if showDayLanes is true.

Parameters:
lane - a new Lane object to add to the view

addLaneEvent

public void addLaneEvent(Lane laneName,
                         Date startDate)
For Timelines, and for dayViews with showDayLanes set, create 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:
Calendar#addLaneEvent()}

addLaneEvent

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

addLaneEvent

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

addLaneEvent

public void addLaneEvent(Lane laneName,
                         Date startDate,
                         Date endDate,
                         String name,
                         String description,
                         Object otherFields)
For Timelines, and for dayViews with showDayLanes set, create 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

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

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.

Not called if the day falls outside the current month and 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 showOtherDays is false.

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

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 to 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 which are editable. 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

addEventMovedHandler

public HandlerRegistration addEventMovedHandler(EventMovedHandler handler)
Add a eventMoved handler.

Called when an event is moved via dragging by a user. Call CalendarEventMoved.cancel() from within EventMovedHandler.onEventMoved(com.smartgwt.client.widgets.calendar.events.CalendarEventMoved) to disallow the move.

Specified by:
addEventMovedHandler in interface HasEventMovedHandlers
Parameters:
handler - the eventMoved handler
Returns:
HandlerRegistration used to remove this handler

addEventRemoveClickHandler

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

Called whenever the close icon of an event is clicked within the day or week view. Return false to cancel the removal.

Implement this method to do something like, for example, showing a confirmation dialog before an event is removed.

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

addEventResizedHandler

public HandlerRegistration addEventResizedHandler(EventResizedHandler handler)
Add a eventResized handler.

Called when an event is resized via dragging by a user. 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.

Specified by:
addEventResizedHandler in interface HasEventResizedHandlers
Parameters:
handler - the eventResized handler
Returns:
HandlerRegistration used to remove this handler

eventsRendered

public void eventsRendered()
A notification method fired when the events in the current view have been refreshed.


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()

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(Integer rowNum,
                        Integer colNum)
Return the Date instance associated with the passed co-ordinates in the current view. If the cell at the passed co-ordinates is not a date-cell, returns null.

To determine the date at a more specific point within a cell, see Calendar.getDateFromPoint.

Parameters:
rowNum - the row number to get the date for
colNum - the column number to get the date for
Returns:
the date, if any, associated with the passed co-ords in the current view

getDateCSSText

public String getDateCSSText(Date date,
                             Integer rowNum,
                             Integer colNum,
                             ListGrid viewer)
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 to get the CSS for
colNum - the column number to get the date for
viewer - the ListGrid used by the current Calendar view
Returns:
CSS text for the associated cell
See Also:
getDateStyle(java.util.Date, java.lang.Integer, java.lang.Integer, com.smartgwt.client.widgets.grid.ListGrid)

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 Calendar.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:
Calendar#getDateFromPoint()}

getDateFromPoint

public Date getDateFromPoint(Integer x,
                             Integer y)
See Also:
Calendar#getDateFromPoint()}

getDateFromPoint

public Date getDateFromPoint(Integer x,
                             Integer y,
                             Boolean snapOffsets)
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 Calendar.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
Returns:
the date, if any, associated with the passed co-ords in the current view

getDateStyle

public String getDateStyle(Date date,
                           Integer rowNum,
                           Integer colNum,
                           ListGrid viewer)
Return the CSS styleName for the cell associated with the passed date and/or rowNum & colNum.

Parameters:
date - the date to return CSS text for
rowNum - the row number to get the CSS for
colNum - the column number to get the date for
viewer - the ListGrid used by the current Calendar view
Returns:
CSS style for the cell associated with the passed date
See Also:
getDateCSSText(java.util.Date, java.lang.Integer, java.lang.Integer, com.smartgwt.client.widgets.grid.ListGrid)

addEventHoverHTMLHandler

public HandlerRegistration addEventHoverHTMLHandler(EventHoverHTMLHandler handler)
Deprecated. Please use setEventHoverHTMLCustomizer instead, this will be removed in a future release.

Add a eventHoverHTML handler.

Gets the hover HTML for an event being hovered over. Override here to return custom HTML based upon the parameter event object.

Specified by:
addEventHoverHTMLHandler in interface HasEventHoverHTMLHandlers
Parameters:
handler - the eventHoverHTML handler
Returns:
HandlerRegistration used to remove this handler

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

getPeriodEndDate

public Date getPeriodEndDate()
Returns the end 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 Calendar.getVisibleEndDate.

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 Calendar.getVisibleStartDate.

Returns:
period start date

getVisibleEndDate

public Date getVisibleEndDate()
Returns the last visible date in the currently selected calendar view.

Returns:
last visible date

getVisibleStartDate

public Date getVisibleStartDate()
Returns the first visible date in the currently selected calendar view.

Returns:
first visible date

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.


scrollToTime

public void scrollToTime(String time)
Scroll the calendar Day or Week views to the specified time.

Parameters:
time - any parsable time-string

selectTab

public void selectTab(int tabnum)
Selects the calendar view in the passed tab number.

Parameters:
tabnum - the index of the tab to select

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

showEventDialog

public void showEventDialog(CalendarEvent event)
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.

Parameters:
event - the event to show in the Editor

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 eventDialogFields.

If no event is passed, a new Event with no default values is created via Calendar.showNewEventEditor.


showEventEditor

public void showEventEditor(CalendarEvent event)
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 eventDialogFields.

If no event is passed, a new Event with no default values is created via Calendar.showNewEventEditor.

Parameters:
event - an existing event to show in the Editor

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.


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.

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

addTimelineEventMovedHandler

public HandlerRegistration addTimelineEventMovedHandler(TimelineEventMovedHandler handler)
Add a timelineEventMoved handler.

Called when a Timeline event is moved via dragging by a user. Call TimelineEventMoved.cancel() from within TimelineEventMovedHandler.onTimelineEventMoved(com.smartgwt.client.widgets.calendar.events.TimelineEventMoved) to disallow the move.

Specified by:
addTimelineEventMovedHandler in interface HasTimelineEventMovedHandlers
Parameters:
handler - the timelineEventMoved handler
Returns:
HandlerRegistration used to remove this handler

addTimelineEventResizedHandler

public HandlerRegistration addTimelineEventResizedHandler(TimelineEventResizedHandler handler)
Add a timelineEventResized handler.

Called when a Timeline event is resized via dragging by a user. Call TimelineEventResized.cancel() from within TimelineEventResizedHandler.onTimelineEventResized(com.smartgwt.client.widgets.calendar.events.TimelineEventResized) to disallow the resize.

Specified by:
addTimelineEventResizedHandler in interface HasTimelineEventResizedHandlers
Parameters:
handler - the timelineEventResized 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

onInit

protected void onInit()
Overrides:
onInit in class Canvas

onInit_Calendar

protected void onInit_Calendar()

setWorkdayEnd

public void 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 Calendar.getWorkdayStart and Calendar.getWorkdayEnd.

Parameters:
workdayEnd - Default value is "5:00pm"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getWorkdayEnd

public String getWorkdayEnd(Date date)
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 Calendar.getWorkdayStart and Calendar.getWorkdayEnd.

Parameters:
date - the date to get the workday end for
Returns:
Returns the end of the working day on the passed date. By default, this method returns the value of workdayEnd.

setWorkdayStart

public void 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 Calendar.getWorkdayStart and Calendar.getWorkdayEnd.

Parameters:
workdayStart - Default value is "9:00am"
Throws:
IllegalStateException - this property cannot be changed after the component has been created

getWorkdayStart

public String getWorkdayStart(Date date)
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 Calendar.getWorkdayStart and Calendar.getWorkdayEnd.

Parameters:
date - the date to get the workday start for
Returns:
Returns the start of the working day on the passed date. By default, this method returns the value of workdayStart.

dateIsWorkday

public boolean dateIsWorkday(Date date)
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.

Parameters:
date - the date being tested
Returns:
Returns true if the date passed should be considered a workday

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

setEventHoverHTMLCustomizer

public void setEventHoverHTMLCustomizer(EventHoverHTMLCustomizer eventHoverHTMLCustomizer)
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:
eventHoverHTMLCustomizer - 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.

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(CalendarEvent[])

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. use setTimeFormatter(TimeDisplayFormat) instead.

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

setShowDayView

public void setShowDayView(Boolean showDayView)
                    throws IllegalStateException
Throws:
IllegalStateException

setShowWeekView

public void setShowWeekView(Boolean showWeekView)
                     throws IllegalStateException
Throws:
IllegalStateException

setShowMonthView

public void setShowMonthView(Boolean showMonthView)
                      throws IllegalStateException
Throws:
IllegalStateException

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

setDataPageSize

public void setDataPageSize(int dataPageSize)
Description copied from interface: DataBoundComponent
When using data paging, how many records to fetch at a time. The value of this attribute is passed on to the auto-constructed ResultSet object for this component. In effect, this gives you control over the resultSize attribute for this component.

Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords, 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 75

getDataPageSize

public int getDataPageSize()
Description copied from interface: DataBoundComponent
When using data paging, how many records to fetch at a time. The value of this attribute is passed on to the auto-constructed ResultSet object for this component. In effect, this gives you control over the resultSize attribute for this component.

Note that regardless of the dataPageSize setting, a component will always fetch all of data that it needs to draw. Settings such as showAllRecords, drawAllMaxCells and drawAheadRatio can cause more rows than the configured dataPageSize to be fetched.

Specified by:
getDataPageSize in interface DataBoundComponent
Returns:
int

setUseAllDataSourceFields

public void setUseAllDataSourceFields(Boolean useAllDataSourceFields)
Description copied from interface: DataBoundComponent
If true, the set of fields given by the "default binding" (see fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.

If component.fields contains fields that are not found in the DataSource, they will be shown after the most recently referred to DataSource field. If the new fields appear first, they will be shown first.

Specified by:
setUseAllDataSourceFields in interface DataBoundComponent
Parameters:
useAllDataSourceFields - useAllDataSourceFields Default value is false

getUseAllDataSourceFields

public Boolean getUseAllDataSourceFields()
Description copied from interface: DataBoundComponent
If true, the set of fields given by the "default binding" (see fields) is used, with any fields specified in component.fields acting as overrides that can suppress or modify the display of individual fields, without having to list the entire set of fields that should be shown.

If component.fields contains fields that are not found in the DataSource, they will be shown after the most recently referred to DataSource field. If the new fields appear first, they will be shown first.

Specified by:
getUseAllDataSourceFields in interface DataBoundComponent
Returns:
Boolean

setShowHiddenFields

public void setShowHiddenFields(Boolean showHiddenFields)
Description copied from interface: DataBoundComponent
Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.

The hidden property is used on DataSource fields to mark fields that are never of meaning to an end user.

Specified by:
setShowHiddenFields in interface DataBoundComponent
Parameters:
showHiddenFields - showHiddenFields Default value is false

getShowHiddenFields

public Boolean getShowHiddenFields()
Description copied from interface: DataBoundComponent
Whether to show fields marked hidden:true when a DataBoundComponent is given a DataSource but no component.fields.

The hidden property is used on DataSource fields to mark fields that are never of meaning to an end user.

Specified by:
getShowHiddenFields in interface DataBoundComponent
Returns:
Boolean

setShowComplexFields

public void setShowComplexFields(Boolean showComplexFields)
Description copied from interface: DataBoundComponent
Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.

If true, the component will show fields that declare a complex type, for example, a field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a DataSource that declares the fields of a shipping address (city, street name, etc).

Such fields may need custom formatters or editors in order to create a usable interface, for example, an Address field in a ListGrid might use a custom formatter to combine the relevant fields of an address into one column, and might use a pop-up dialog for editing.

Note : This is an advanced setting

Specified by:
setShowComplexFields in interface DataBoundComponent
Parameters:
showComplexFields - showComplexFields Default value is true

getShowComplexFields

public Boolean getShowComplexFields()
Description copied from interface: DataBoundComponent
Whether to show fields of non-atomic types when a DataBoundComponent is given a DataSource but no component.fields.

If true, the component will show fields that declare a complex type, for example, a field 'shippingAddress' that declares type 'Address', where 'Address' is the ID of a DataSource that declares the fields of a shipping address (city, street name, etc).

Such fields may need custom formatters or editors in order to create a usable interface, for example, an Address field in a ListGrid might use a custom formatter to combine the relevant fields of an address into one column, and might use a pop-up dialog for editing.

Specified by:
getShowComplexFields in interface DataBoundComponent
Returns:
Boolean

setFetchOperation

public void 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

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 void setUpdateOperation(String updateOperation)
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing update operations.

Specified by:
setUpdateOperation in interface DataBoundComponent
Parameters:
updateOperation - updateOperation Default value is null

getUpdateOperation

public String getUpdateOperation()
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing update operations.

Specified by:
getUpdateOperation in interface DataBoundComponent
Returns:
String

setAddOperation

public void setAddOperation(String addOperation)
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing add operations.

Specified by:
setAddOperation in interface DataBoundComponent
Parameters:
addOperation - addOperation Default value is null

getAddOperation

public String getAddOperation()
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing add operations.

Specified by:
getAddOperation in interface DataBoundComponent
Returns:
String

setRemoveOperation

public void setRemoveOperation(String removeOperation)
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing remove operations.

Specified by:
setRemoveOperation in interface DataBoundComponent
Parameters:
removeOperation - removeOperation Default value is null

getRemoveOperation

public String getRemoveOperation()
Description copied from interface: DataBoundComponent
Operation ID this component should use when performing remove operations.

Specified by:
getRemoveOperation in interface DataBoundComponent
Returns:
String

setExportFields

public void 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 limited and sorted as per the list.

If exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.

Specified by:
setExportFields in interface DataBoundComponent
Parameters:
exportFields - exportFields Default value is null

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 limited and sorted as per the list.

If exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.

Specified by:
getExportFields in interface DataBoundComponent
Returns:
the list of field-names to export.

setExportAll

public void setExportAll(Boolean exportAll)
Description copied from interface: DataBoundComponent
Setting exportAll to true prevents the component from passing its list of fields to the export call. The result is the export of all visible fields from fields.

If exportAll is false, an export operation will first consider exportFields, if it's set, and fall back on all visible fields from fields otherwise.

Specified by:
setExportAll in interface DataBoundComponent
Parameters:
exportAll - exportAll Default value is false

getExportAll

public Boolean getExportAll()
Description copied from interface: DataBoundComponent
Setting exportAll to true prevents the component from passing its list of fields to the export call. The result is the export of all visible fields from fields.

If exportAll is false, an export operation will first consider exportFields, if it's set, and fall back on all visible fields from fields otherwise.

Specified by:
getExportAll in interface DataBoundComponent
Returns:
Boolean

setPreventDuplicates

public void 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 drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected, a dialog will appear showing the duplicateDragMessage.

If the component either does not have a DataSource or has a DataSource with no primaryKey declared, duplicate checking is off by default. If duplicate checking is enabled, it looks for an existing record in the dataset that has all of the properties of the dragged record, and considers that a duplicate.

For DragDataAction:"copy" where the target DataSource is related to the source DataSource by foreignKey, a duplicate means that the target list, as filtered by the current criteria, already has a record whose value for the foreignKey field matches the primaryKey of the record being transferred.

For example, consider dragging "employees" to "teams", where "teams" has a field "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target grid has search criteria causing it to show all the members of one team. A duplicate - adding an employee to the same team twice - is when the target grid's dataset contains an record with "employeeId" matching the "id" field of the dropped employee.

Specified by:
setPreventDuplicates in interface DataBoundComponent
Parameters:
preventDuplicates - preventDuplicates Default value is null
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 drag and drop or via DataBoundComponent.transferSelectedData(com.smartgwt.client.widgets.DataBoundComponent). When a duplicate transfer is detected, a dialog will appear showing the duplicateDragMessage.

If the component either does not have a DataSource or has a DataSource with no primaryKey declared, duplicate checking is off by default. If duplicate checking is enabled, it looks for an existing record in the dataset that has all of the properties of the dragged record, and considers that a duplicate.

For DragDataAction:"copy" where the target DataSource is related to the source DataSource by foreignKey, a duplicate means that the target list, as filtered by the current criteria, already has a record whose value for the foreignKey field matches the primaryKey of the record being transferred.

For example, consider dragging "employees" to "teams", where "teams" has a field "teams.employeeId" which is a foreignKey pointing to "employees.id", and the target grid has search criteria causing it to show all the members of one team. A duplicate - adding an employee to the same team twice - is when the target grid's dataset contains an record with "employeeId" matching the "id" field of the dropped employee.

Specified by:
getPreventDuplicates in interface DataBoundComponent
Returns:
Boolean

setDuplicateDragMessage

public void 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 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"
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 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 void 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

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 void 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

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 applicable to databound components - see dropValues for more details. If multiple records are being dropped, this method is called for each of them in turn.

This method returns the following:

  • Nothing, if addDropValues is false
  • dropValues, if that property is set. If the component's criteria object is applicable (as explained in the next item), it is merged into dropValues, with properties in dropValues taking precedence.
  • The component's criteria object, if the most recent textMatchStyle for the component was "exact" and it is simple criteria (ie, not an AdvancedCriteria object)
  • Otherwise nothing

You can override this method if you need more complex setting of drop values than can be provided by simply supplying a dropValues object.


setProgressiveLoading

public void setProgressiveLoading(Boolean progressiveLoading)
Indicates whether or not this component will load its data progressively

Parameters:
progressiveLoading -
See Also:
ProgressiveLoading, DataSource.setProgressiveLoading(java.lang.Boolean)

getProgressiveLoading

public Boolean getProgressiveLoading()
Indicates whether or not this component will load its data progressively

Returns:
See Also:
ProgressiveLoading, DataSource.getProgressiveLoading()

setUseFlatFields

public void setUseFlatFields(Boolean useFlatFields)
                      throws IllegalStateException
Description copied from interface: DataBoundComponent
The useFlatFields flag causes all simple type fields anywhere in a nested set of DataSources to be exposed as a flat list for form binding.

useFlatFields is typically used with imported metadata, such as XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML nesting that aren't meaningful in a user interface, without the cumbersome and fragile process of mapping form fields to XML structures.

For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message schema for a web service operation whose input message looks like this:

 <FindServices>
     <searchFor>search text</searchFor>
     <Options>
         <caseSensitive>false</caseSensitive>
     </Options>
     <IncludeInSearch>
         <serviceName>true</serviceName>
         <documentation>true</documentation>
         <keywords>true</keywords>
     </IncludeInSearch>
 </FindServices>
 
Setting useFlatFields on a DynamicForm that is bound to this input message schema would result in 5 FormItem reflecting the 5 simple type fields in the message.

For this form, the result of DynamicForm.getValues() might look like:

{
    searchFor: "search text",
    caseSensitive: false,
    serviceName: true,
    documentation : true,
    keywords : true
 }
When contacting a WebService, these values can be automatically mapped to the structure of the input message for a web service operation by setting useFlatFields (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting useFlatFields (for use with a DataSource that is 'bound to a WSDL web service' via wsOperation).

Using these two facilities in conjunction (component.useFlatFields and request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user presentation and when providing the data for XML messages.

You can also set useFlatFields to automatically enable "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a particular operationType.

Note that useFlatFields is not generally recommended for use with structures where multiple simple type fields exist with the same name, however if used with such a structure, the first field to use a given name wins. "first" means the first field encountered in a depth first search. "wins" means only the first field will be present as a field when data binding.

Specified by:
setUseFlatFields in interface DataBoundComponent
Parameters:
useFlatFields - useFlatFields Default value is null
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 set of DataSources to be exposed as a flat list for form binding.

useFlatFields is typically used with imported metadata, such as XMLTools.loadXMLSchema(java.lang.String, com.smartgwt.client.data.XSDLoadCallback) from a XMLTools.loadWSDL(java.lang.String, com.smartgwt.client.data.WSDLLoadCallback), as a means of eliminating levels of XML nesting that aren't meaningful in a user interface, without the cumbersome and fragile process of mapping form fields to XML structures.

For example, having called WebService.getInputDS(java.lang.String) to retrieve the input message schema for a web service operation whose input message looks like this:

 <FindServices>
     <searchFor>search text</searchFor>
     <Options>
         <caseSensitive>false</caseSensitive>
     </Options>
     <IncludeInSearch>
         <serviceName>true</serviceName>
         <documentation>true</documentation>
         <keywords>true</keywords>
     </IncludeInSearch>
 </FindServices>
 
Setting useFlatFields on a DynamicForm that is bound to this input message schema would result in 5 FormItem reflecting the 5 simple type fields in the message.

For this form, the result of DynamicForm.getValues() might look like:

{
    searchFor: "search text",
    caseSensitive: false,
    serviceName: true,
    documentation : true,
    keywords : true
 }
When contacting a WebService, these values can be automatically mapped to the structure of the input message for a web service operation by setting useFlatFields (for use with WebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback)) or by setting useFlatFields (for use with a DataSource that is 'bound to a WSDL web service' via wsOperation).

Using these two facilities in conjunction (component.useFlatFields and request.useFlatFields) allows gratuitous nesting to be consistently bypassed in both the user presentation and when providing the data for XML messages.

You can also set useFlatFields to automatically enable "flattened" XML serialization (request.useFlatFields) for all DataSource requests of a particular operationType.

Note that useFlatFields is not generally recommended for use with structures where multiple simple type fields exist with the same name, however if used with such a structure, the first field to use a given name wins. "first" means the first field encountered in a depth first search. "wins" means only the first field will be present as a field when data binding.

Specified by:
getUseFlatFields in interface DataBoundComponent
Returns:
Boolean

setHiliteProperty

public void 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 that matches id for a hilite defined on this component.

Specified by:
setHiliteProperty in interface DataBoundComponent
Parameters:
hiliteProperty - hiliteProperty Default value is "_hilite"

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 that matches 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()
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()
Get the current hilites encoded as a String, for saving.

Specified by:
getHiliteState in interface DataBoundComponent
Returns:
the hilite state

setHiliteState

public void setHiliteState(String hiliteState)
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

setHilites

public void setHilites(Hilite[] hilites)
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.

Specified by:
setHilites in interface DataBoundComponent
Parameters:
hilites - array of hilite objects

getHilites

public Hilite[] getHilites()
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 void setDragDataAction(DragDataAction dragDataAction)
Description copied from interface: DataBoundComponent
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.

Specified by:
setDragDataAction in interface DataBoundComponent
Parameters:
dragDataAction - dragDataAction Default value is Canvas.MOVE

getDragDataAction

public DragDataAction getDragDataAction()
Description copied from interface: DataBoundComponent
Indicates what to do with data dragged into another DataBoundComponent. See DragDataAction type for details.

Specified by:
getDragDataAction in interface DataBoundComponent
Returns:
DragDataAction

setDragTrackerStyle

public void 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"

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 void 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 field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.

User-added formula fields can be persisted via ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String).

Specified by:
setCanAddFormulaFields in interface DataBoundComponent
Parameters:
canAddFormulaFields - canAddFormulaFields Default value is false

addSummaryField

public void addSummaryField()
Description copied from interface: DataBoundComponent
Convenience method to display a com.smartgwt.client..SummaryBuilder to create a new Summary Field. This is equivalent to calling DataBoundComponentGen#editSummaryField with no parameter.

Specified by:
addSummaryField in interface DataBoundComponent

addFormulaField

public void addFormulaField()
Description copied from interface: DataBoundComponent
Convenience method to display a com.smartgwt.client..FormulaBuilder to create a new Formula Field. This is equivalent to calling DataBoundComponentGen#editFormulaField with no parameter.

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 field based on values present in other fields, using the com.smartgwt.client..FormulaBuilder.

User-added formula fields can be persisted via ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String).

Specified by:
getCanAddFormulaFields in interface DataBoundComponent
Returns:
Boolean

setAddFormulaFieldText

public void 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..."

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 void 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..."

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 void 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 text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.

User-added summary fields can be persisted via ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String).

Specified by:
setCanAddSummaryFields in interface DataBoundComponent
Parameters:
canAddSummaryFields - canAddSummaryFields Default value is false

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 text field that can contain both user-defined text and the formatted values present in other fields, using the com.smartgwt.client..SummaryBuilder.

User-added summary fields can be persisted via ListGrid.getFieldState() and ListGrid.setFieldState(java.lang.String).

Specified by:
getCanAddSummaryFields in interface DataBoundComponent
Returns:
Boolean

setAddSummaryFieldText

public void 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..."

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 void 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..."

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

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

Specified by:
selectAllRecords in interface DataBoundComponent

deselectAllRecords

public void deselectAllRecords()
Description copied from interface: DataBoundComponent
Deselect all records

Specified by:
deselectAllRecords in interface DataBoundComponent

anySelected

public Boolean anySelected()
Description copied from interface: DataBoundComponent
Whether at least one item is selected

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

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

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

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.

Specified by:
enableHiliting in interface DataBoundComponent

enableHiliting

public void enableHiliting(boolean enable)
Description copied from interface: DataBoundComponent
Enable all hilites.

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.

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 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 addDropCompleteHandler. 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 addDropCompleteHandler. 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
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.

Override in subclasses to provide more specific behaviour, for instance, when data holds a large number of records

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

Override in subclasses

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 void 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

getTitleField

public String getTitleField()
Description copied from interface: DataBoundComponent
Method to return the fieldName which represents the "title" for records in this Component.
If this.titleField is explicitly specified it will always be used. Otherwise, default implementation will check titleField for databound components.
For non databound components returns the first defined field name of "title", "name", or "id". If we dont find any field-names that match these titles, the first field in the component will be used instead.

Specified by:
getTitleField in interface DataBoundComponent
Returns:
fieldName the title field for this component.

setDataSource

public void setDataSource(DataSource dataSource)
Description copied from interface: DataBoundComponent
Bind to a DataSource. Binding to a DataSource means that the component will use the DataSource to provide default data for its fields.

When binding a previously-bound componenet to a new DataSource, if the component has any existing "fields" or has a dataset, these will be discarded by default, since it is assumed the new DataSource may represent a completely unrelated set of objects. If the old "fields" are still relevant, you may be able to refer to setDataSource(dataSource, fields) as an alternative method if the widget has an implementation of it.

Specified by:
setDataSource in interface DataBoundComponent
Parameters:
dataSource - DataSource to bind to. Default value is null

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 void 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
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 void 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
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 void 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
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 void 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
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

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 this.data.invalidateCache(). If necessary, this will cause a new fetch to be performed with the current set of criteria for this component.

Has no effect if this component is not showing a set of filtered data.

Specified by:
invalidateCache in interface DataBoundComponent

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:
DataBoundComponent.fetchData()

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:

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
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
See Also:
DataBoundComponentMethods overview and related methods

exportData

public void exportData(DSRequest requestProperties)
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 the DSRequest that will be issued
See Also:
DataBoundComponentMethods overview and related methods

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

setLogicalStructure

public com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.calendar.CalendarLogicalStructure s)

getLogicalStructure

public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
Specified by:
getLogicalStructure in interface LogicalStructure
Overrides:
getLogicalStructure in class Canvas