public class Calendar extends Canvas implements DataBoundComponent, HasBackgroundClickHandlers, HasBackgroundMouseDownHandlers, HasBackgroundMouseUpHandlers, HasCurrentViewChangedHandlers, HasDateChangedHandlers, HasDayBodyClickHandlers, HasDayHeaderClickHandlers, HasEventAddedHandlers, HasEventChangedHandlers, HasEventClickHandlers, HasEventMovedHandlers, HasEventRemoveClickHandlers, HasEventRemovedHandlers, HasEventResizedHandlers, HasEventHoverHTMLHandlers, HasTimelineEventMovedHandlers, HasTimelineEventResizedHandlers
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.
config, configOnly, id, nativeObject, scClassName| Constructor and Description |
|---|
Calendar() |
Calendar(com.google.gwt.core.client.JavaScriptObject jsObj) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addBackgroundClickHandler(BackgroundClickHandler handler)
Add a backgroundClick handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addBackgroundMouseDownHandler(BackgroundMouseDownHandler handler)
Add a backgroundMouseDown handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addBackgroundMouseUpHandler(BackgroundMouseUpHandler handler)
Add a backgroundMouseUp handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addCurrentViewChangedHandler(CurrentViewChangedHandler handler)
Add a currentViewChanged handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDateChangedHandler(DateChangedHandler handler)
Add a dateChanged handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDayBodyClickHandler(DayBodyClickHandler handler)
Add a dayBodyClick handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDayHeaderClickHandler(DayHeaderClickHandler handler)
Add a dayHeaderClick handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addDragCompleteHandler(DragCompleteHandler handler)
Add a
com.smartgwt.client.widgets.DragCompleteHandler. |
com.google.gwt.event.shared.HandlerRegistration |
addDropCompleteHandler(DropCompleteHandler handler)
Add a
com.smartgwt.client.widgets.DropCompleteHandler. |
void |
addEvent(java.util.Date startDate,
java.util.Date endDate,
java.lang.String name,
java.lang.String description)
Create a new event in this calendar instance.
|
void |
addEvent(java.util.Date startDate,
java.util.Date endDate,
java.lang.String name,
java.lang.String description,
java.util.Map otherFields)
Create a new event in this calendar instance.
|
com.google.gwt.event.shared.HandlerRegistration |
addEventAddedHandler(EventAddedHandler handler)
Add a eventAdded handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addEventChangedHandler(EventChangedHandler handler)
Add a eventChanged handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addEventClickHandler(EventClickHandler handler)
Add a eventClick handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addEventHoverHTMLHandler(EventHoverHTMLHandler handler)
Deprecated.
Please use setEventHoverHTMLCustomizer instead, this will be removed in a future release.
|
com.google.gwt.event.shared.HandlerRegistration |
addEventMovedHandler(EventMovedHandler handler)
Add a eventMoved handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addEventRemoveClickHandler(EventRemoveClickHandler handler)
Add a eventRemoveClick handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addEventRemovedHandler(EventRemovedHandler handler)
Add a eventRemoved handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addEventResizedHandler(EventResizedHandler handler)
Add a eventResized handler.
|
com.google.gwt.event.shared.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)
|
void |
addLaneEvent(Lane laneName,
java.util.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,
java.util.Date startDate,
java.util.Date endDate) |
void |
addLaneEvent(Lane laneName,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String name) |
void |
addLaneEvent(Lane laneName,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String name,
java.lang.String description) |
void |
addLaneEvent(Lane laneName,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String name,
java.lang.String description,
java.lang.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. |
com.google.gwt.event.shared.HandlerRegistration |
addTimelineEventMovedHandler(TimelineEventMovedHandler handler)
Add a timelineEventMoved handler.
|
com.google.gwt.event.shared.HandlerRegistration |
addTimelineEventResizedHandler(TimelineEventResizedHandler handler)
Add a timelineEventResized handler.
|
java.lang.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(java.lang.String autoChildName,
Canvas defaults)
Changes the defaults for Canvas AutoChildren named
autoChildName. |
static void |
changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
Changes the defaults for FormItem AutoChildren named
autoChildName. |
protected com.google.gwt.core.client.JavaScriptObject |
create() |
boolean |
dateIsWorkday(java.util.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(java.lang.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(java.lang.String hiliteID)
Enable / disable a
hilites
|
void |
enableHilite(java.lang.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. |
java.lang.Integer |
getActiveDay()
Gets the day of the week (0-6) that the mouse is currently over.
|
java.util.Date |
getActiveTime()
Gets a date object representing the date over which the mouse is hovering for the current selected view.
|
java.lang.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()
|
java.lang.String |
getAddEventButtonHoverText()
The text to be displayed when a user hovers over the
add event toolbar button |
java.lang.String |
getAddFormulaFieldText()
Text for a menu item allowing users to add a formula field
|
java.lang.String |
getAddOperation()
Operation ID this component should use when performing add operations.
|
java.lang.String |
getAddSummaryFieldText()
Text for a menu item allowing users to add a formula field
|
java.lang.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. |
java.lang.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() |
java.lang.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. |
java.lang.String |
getBaseStyle()
The base name for the CSS class applied to the grid cells of the day and week views of the calendar.
|
java.lang.Boolean |
getBringEventsToFront()
If set to true, clicking an event will bring it to the front of the zorder.
|
java.lang.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.
|
java.lang.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.
|
java.lang.String |
getCancelButtonTitle()
The title for the cancel button in the event editor
|
java.lang.Boolean |
getCanCreateEvents()
If true, users can create new events.
|
java.lang.Boolean |
getCanDeleteEvents()
Deprecated.
in favor of
canRemoveEvents |
java.lang.String |
getCanDragEventField()
Name of the field on each
CalendarEvent that determines dragability. |
java.lang.Boolean |
getCanDragEvents()
If true, users can drag-reposition existing events.
|
java.lang.Boolean |
getCanEditEvents()
If true, users can edit existing events.
|
java.lang.String |
getCanEditField()
Name of the field on each
CalendarEvent that determines editability. |
java.lang.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. |
java.lang.String |
getCanEditLaneField()
Name of the field on each
CalendarEvent that determines whether that event
can be moved between lanes. |
java.lang.Boolean |
getCanRemoveEvents()
If true, users can remove existing events.
|
java.lang.String |
getCanRemoveField()
Name of the field on each
CalendarEvent that determines whether an event
shows a remove button. |
java.lang.Boolean |
getCanReorderLanes()
If true, lanes can be reordered by dragging them with the mouse.
|
java.lang.Boolean |
getCanResizeTimelineEvents()
Can
Timeline events be stretched by their left and right edges? |
java.util.Date |
getCellDate(java.lang.Integer rowNum,
java.lang.Integer colNum)
Return the Date instance associated with the passed co-ordinates in the current view.
|
java.util.Date |
getChosenDate()
The date for which events are displayed in the day, week, and month tabs of the calendar.
|
java.lang.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.
|
com.google.gwt.core.client.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. |
java.lang.String |
getDateCSSText(java.util.Date date,
java.lang.Integer rowNum,
java.lang.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.
|
java.util.Date |
getDateFromPoint()
Returns a Date instance representing the point at the passed offsets into the body of the current view.
|
java.util.Date |
getDateFromPoint(java.lang.Integer x) |
java.util.Date |
getDateFromPoint(java.lang.Integer x,
java.lang.Integer y) |
java.util.Date |
getDateFromPoint(java.lang.Integer x,
java.lang.Integer y,
java.lang.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. |
java.lang.String |
getDateLabelText(java.lang.String viewName,
java.util.Date startDate,
java.util.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. |
java.lang.String |
getDatePickerHoverText()
The text to be displayed when a user hovers over the
date picker toolbar button |
java.lang.String |
getDateStyle(java.util.Date date,
java.lang.Integer rowNum,
java.lang.Integer colNum,
ListGrid viewer)
Return the CSS styleName for the cell associated with the passed date and/or rowNum & colNum.
|
java.lang.String |
getDayBodyBaseStyle()
The base name for the CSS class applied to the day body of the month view of the calendar.
|
protected java.lang.String |
getDayBodyHTML(java.util.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.
|
java.lang.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. |
java.lang.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. |
java.lang.String |
getDescriptionField()
The name of the description field in a
CalendarEvent. |
java.lang.String |
getDetailsButtonTitle()
The title for the edit button in the quick event dialog
|
java.lang.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.
|
java.lang.String |
getDragTrackerStyle()
CSS Style to apply to the drag tracker when dragging occurs on this component.
|
java.util.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. |
java.lang.String |
getDuplicateDragMessage()
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. |
java.lang.String |
getEditFormulaFieldText()
Text for a menu item allowing users to edit a formula field
|
java.lang.String |
getEditSummaryFieldText()
Text for a menu item allowing users to edit the formatter for a field
|
java.util.Date |
getEndDate()
The end date of the calendar timeline view.
|
java.lang.String |
getEndDateField()
The name of the end date field in a
CalendarEvent. |
java.lang.Boolean |
getEventAutoArrange()
If set to true, enables the auto-arrangement of events that share time in the calendar.
|
java.lang.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()
|
Window |
getEventEditorLayout()
|
java.lang.String |
getEventEndDateFieldTitle()
The title for the end date field in the quick and advanced event dialogs
|
java.lang.String |
getEventLaneFieldTitle()
The title for the
laneField field in the quick and
advanced event dialogs |
java.lang.String |
getEventNameFieldTitle()
The title for the event name field in the quick and advanced event dialogs
|
java.lang.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. |
java.lang.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.
|
java.lang.Integer |
getEventSnapGap()
|
java.lang.String |
getEventStartDateFieldTitle()
The title for the start date field in the quick and advanced event dialogs
|
EventWindow |
getEventWindow()
Note : This API is non-functional (always returns null) and exists only to make
you aware that this MultiAutoChild exists.
|
java.lang.String |
getEventWindowStyle()
The base name for the CSS class applied to event windows within calendars.
|
java.lang.String |
getEventWindowStyleField()
The name of the field used to override
eventWindowStyle for an individual CalendarEvent. |
java.lang.Boolean |
getExportAll()
Setting exportAll to true prevents the component from passing its list of fields to the
export call.
|
java.lang.String[] |
getExportFields()
The list of field-names to export.
|
java.lang.String |
getFetchOperation()
Operation ID this component should use when performing fetch operations.
|
java.lang.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. |
java.lang.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.
|
java.lang.String |
getHiliteState()
Get the current hilites encoded as a String, for saving.
|
Criteria |
getInitialCriteria()
Criteria to use when
DataBoundComponent.setAutoFetchData(Boolean) is used. |
java.lang.String |
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. |
Lane |
getLaneFromPoint()
Returns the
Lane at the passed co-ordinates. |
Lane |
getLaneFromPoint(java.lang.Integer x) |
Lane |
getLaneFromPoint(java.lang.Integer x,
java.lang.Integer y)
Returns the
Lane at the passed co-ordinates. |
java.lang.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. |
java.lang.String |
getLeadingDateField()
The name of the leading date field for each event.
|
com.smartgwt.logicalstructure.core.LogicalStructureObject |
getLogicalStructure() |
TabSet |
getMainView()
|
java.lang.Integer |
getMinimumDayHeight()
In the
month view when showDayHeaders is true, this is the minimum height
applied to a day cell and its header combined. |
java.lang.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. |
java.lang.String |
getMonthViewHoverHTML(java.util.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.
|
java.lang.String |
getMonthViewTitle()
The title for the
month view. |
java.lang.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. |
java.lang.String |
getNextButtonHoverText()
The text to be displayed when a user hovers over the
next toolbar button |
static Calendar |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj) |
java.lang.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. |
java.lang.String |
getOtherDayBodyBaseStyle()
The base name for the CSS class applied to the day body of the month view of the calendar.
|
java.lang.String |
getOtherDayHeaderBaseStyle()
The base name for the CSS class applied to the day headers of the month view.
|
SortSpecifier[] |
getOverlapSortSpecifiers()
A set of
sort-specifiers for customizing the render order of events that
overlap. |
java.util.Date |
getPeriodEndDate()
Returns the end of the selected week or month depending on the current calendar view.
|
java.util.Date |
getPeriodStartDate()
Returns the start of the selected week or month depending on the current calendar view.
|
java.lang.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. |
java.lang.String |
getPreviousButtonHoverText()
The text to be displayed when a user hovers over the
previous toolbar button. |
java.lang.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. |
java.lang.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.
|
java.lang.String |
getSaveButtonTitle()
The title for the save button in the quick event dialog and the event editor
|
java.lang.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. |
java.lang.String |
getSelectedCellStyle()
The base name for the CSS class applied to a cell that is selected via a mouse drag.
|
java.lang.Boolean |
getShowAddEventButton()
Set to false to hide the
Add Event button. |
java.lang.Boolean |
getShowComplexFields()
Whether to show fields of non-atomic types when a DataBoundComponent is given a
DataSource but no
component.fields.
|
java.lang.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. |
java.lang.Boolean |
getShowDateChooser()
Determines whether the
dateChooser is displayed. |
java.lang.Boolean |
getShowDatePickerButton()
Set to false to hide the
datePickerButton that
allows selecting a new base date for this Calendar. |
java.lang.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. |
java.lang.Boolean |
getShowDayLanes()
|
java.lang.Boolean |
getShowDetailFields()
Whether to show fields marked
detail:true when a DataBoundComponent is given a DataSource but no
component.fields. |
java.lang.Boolean |
getShowEventDescriptions()
If false, the event header will take up the entire space of the event.
|
java.lang.Boolean |
getShowHiddenFields()
Whether to show fields marked
hidden:true when a DataBoundComponent is given a
DataSource but no component.fields.
|
java.lang.Boolean |
getShowNextButton()
Set to false to hide the
Next button. |
java.lang.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. |
java.lang.Boolean |
getShowPreviousButton()
Set to false to hide the
Previous button. |
java.lang.Boolean |
getShowQuickEventDialog()
Determines whether the quick event dialog is displayed when a time is clicked.
|
java.lang.Boolean |
getShowTimelineView()
If set to true, show the
Timeline view. |
java.lang.Boolean |
getShowWeekends()
Suppresses the display of weekend days in the week and month views, and disallows the creation of events on weekends.
|
java.lang.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. |
java.lang.Boolean |
getSizeEventsToGrid()
If true, events will be sized to the grid, even if they start and/or end at times between grid cells.
|
java.util.Date |
getStartDate()
The start date of the calendar
timeline view. |
java.lang.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()
|
java.lang.String |
getTimelineViewTitle()
The title for the
timeline view. |
java.lang.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". |
java.lang.String |
getTitleFieldValue(Record record)
Get the value of the titleField for the passed record
|
java.lang.String |
getTodayBackgroundColor()
The background color for today in the Month view, or in the Timeline view when +{timelineGranularity} is "day".
|
java.lang.String |
getTrailingDateField()
The name of the trailing date field for each event.
|
java.lang.String |
getUpdateOperation()
Operation ID this component should use when performing update operations.
|
java.lang.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.
|
java.lang.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. |
java.util.Date |
getVisibleEndDate()
Returns the last visible date in the currently selected calendar view.
|
java.util.Date |
getVisibleStartDate()
Returns the first visible date in the currently selected calendar view.
|
java.lang.Boolean |
getWeekEventBorderOverlap()
Augments the width of week event windows slightly to avoid duplicate adjacent borders between events.
|
java.lang.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. |
java.lang.String |
getWeekViewTitle()
The title for the
week view. |
java.lang.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. |
java.lang.String |
getWorkdayEnd(java.util.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. |
java.lang.String |
getWorkdayStart(java.util.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 |
refreshEvent(CalendarEvent event)
Refreshes the event's canvas in the current view.
|
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(java.lang.String laneName)
Removes a lane from the calendar in
timelineView
mode. |
void |
scrollToTime(java.lang.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(java.lang.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(java.lang.String addEventButtonHoverText)
The text to be displayed when a user hovers over the
add event toolbar button |
void |
setAddFormulaFieldText(java.lang.String addFormulaFieldText)
Text for a menu item allowing users to add a formula field
|
void |
setAddOperation(java.lang.String addOperation)
Operation ID this component should use when performing add operations.
|
void |
setAddSummaryFieldText(java.lang.String addSummaryFieldText)
Text for a menu item allowing users to add a formula field
|
void |
setAlternateLaneStyles(java.lang.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(java.lang.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(java.lang.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(java.lang.String baseStyle)
The base name for the CSS class applied to the grid cells of the day and week views of the calendar.
|
void |
setBringEventsToFront(java.lang.Boolean bringEventsToFront)
If set to true, clicking an event will bring it to the front of the zorder.
|
void |
setCanAddFormulaFields(java.lang.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(java.lang.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(java.lang.String cancelButtonTitle)
The title for the cancel button in the event editor
|
void |
setCanCreateEvents(java.lang.Boolean canCreateEvents)
If true, users can create new events.
|
void |
setCanDeleteEvents(java.lang.Boolean canDeleteEvents)
Deprecated.
in favor of
canRemoveEvents |
void |
setCanDragEventField(java.lang.String canDragEventField)
Name of the field on each
CalendarEvent that determines dragability. |
void |
setCanDragEvents(java.lang.Boolean canDragEvents)
If true, users can drag-reposition existing events.
|
void |
setCanEditEvents(java.lang.Boolean canEditEvents)
If true, users can edit existing events.
|
void |
setCanEditField(java.lang.String canEditField)
Name of the field on each
CalendarEvent that determines editability. |
void |
setCanEditLane(java.lang.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(java.lang.String canEditLaneField)
Name of the field on each
CalendarEvent that determines whether that event
can be moved between lanes. |
void |
setCanRemoveEvents(java.lang.Boolean canRemoveEvents)
If true, users can remove existing events.
|
void |
setCanRemoveField(java.lang.String canRemoveField)
Name of the field on each
CalendarEvent that determines whether an event
shows a remove button. |
void |
setCanReorderLanes(java.lang.Boolean canReorderLanes)
If true, lanes can be reordered by dragging them with the mouse.
|
void |
setCanResizeTimelineEvents(java.lang.Boolean canResizeTimelineEvents)
Can
Timeline events be stretched by their left and right edges? |
void |
setChosenDate(java.util.Date chosenDate)
The date for which events are displayed in the day, week, and month tabs of the calendar.
|
void |
setColumnsPerPage(java.lang.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(java.lang.String datePickerHoverText)
The text to be displayed when a user hovers over the
date picker toolbar button |
void |
setDayBodyBaseStyle(java.lang.String dayBodyBaseStyle)
The base name for the CSS class applied to the day body of the month view of the calendar.
|
void |
setDayHeaderBaseStyle(java.lang.String dayHeaderBaseStyle)
The base name for the CSS class applied to the day headers of the month view.
|
void |
setDayViewTitle(java.lang.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(java.lang.String descriptionField)
The name of the description field in a
CalendarEvent. |
void |
setDetailsButtonTitle(java.lang.String detailsButtonTitle)
The title for the edit button in the quick event dialog
|
void |
setDisableWeekends(java.lang.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(java.lang.String dragTrackerStyle)
CSS Style to apply to the drag tracker when dragging occurs on this component.
|
void |
setDropValues(java.util.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(java.lang.String duplicateDragMessage)
Message to show when a user attempts to transfer duplicate records into this component, and
preventDuplicates
is enabled. |
void |
setEditFormulaFieldText(java.lang.String editFormulaFieldText)
Text for a menu item allowing users to edit a formula field
|
void |
setEditSummaryFieldText(java.lang.String editSummaryFieldText)
Text for a menu item allowing users to edit the formatter for a field
|
void |
setEndDate(java.util.Date endDate)
The end date of the calendar timeline view.
|
void |
setEndDateField(java.lang.String endDateField)
The name of the end date field in a
CalendarEvent. |
void |
setEventAutoArrange(java.lang.Boolean eventAutoArrange)
If set to true, enables the auto-arrangement of events that share time in the calendar.
|
void |
setEventDescriptionFieldTitle(java.lang.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(java.lang.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(java.lang.String eventLaneFieldTitle)
The title for the
laneField field in the quick and
advanced event dialogs |
void |
setEventNameFieldTitle(java.lang.String eventNameFieldTitle)
The title for the event name field in the quick and advanced event dialogs
|
void |
setEventOverlap(java.lang.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(java.lang.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(java.lang.Integer eventSnapGap)
|
void |
setEventStartDateFieldTitle(java.lang.String eventStartDateFieldTitle)
The title for the start date field in the quick and advanced event dialogs
|
void |
setEventStyle(CalendarEvent event,
java.lang.String styleName)
Update the styleName for the passed event.
|
void |
setEventWindowStyle(java.lang.String eventWindowStyle)
The base name for the CSS class applied to event windows within calendars.
|
void |
setEventWindowStyleField(java.lang.String eventWindowStyleField)
The name of the field used to override
eventWindowStyle for an individual CalendarEvent. |
void |
setExportAll(java.lang.Boolean exportAll)
Setting exportAll to true prevents the component from passing its list of fields to the
export call.
|
void |
setExportFields(java.lang.String[] exportFields)
The list of field-names to export.
|
void |
setFetchOperation(java.lang.String fetchOperation)
Operation ID this component should use when performing fetch operations.
|
void |
setFirstDayOfWeek(java.lang.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(java.lang.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(java.lang.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(java.lang.String 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(java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.String monthViewTitle)
The title for the
month view. |
void |
setNameField(java.lang.String nameField)
The name of the name field in a
CalendarEvent. |
void |
setNextButtonHoverText(java.lang.String nextButtonHoverText)
The text to be displayed when a user hovers over the
next toolbar button |
void |
setOtherDayBlankStyle(java.lang.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(java.lang.String otherDayBodyBaseStyle)
The base name for the CSS class applied to the day body of the month view of the calendar.
|
void |
setOtherDayHeaderBaseStyle(java.lang.String otherDayHeaderBaseStyle)
The base name for the CSS class applied to the day headers of the month view.
|
void |
setOverlapSortSpecifiers(SortSpecifier... overlapSortSpecifiers)
A set of
sort-specifiers for customizing the render order of events that
overlap. |
void |
setPreventDuplicates(java.lang.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(java.lang.String previousButtonHoverText)
The text to be displayed when a user hovers over the
previous toolbar button. |
void |
setProgressiveLoading(java.lang.Boolean progressiveLoading)
Indicates whether or not this component will load its data
progressively |
void |
setRemoveOperation(java.lang.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(java.lang.String saveButtonTitle)
The title for the save button in the quick event dialog and the event editor
|
void |
setScrollToWorkday(java.lang.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(java.lang.String selectedCellStyle)
The base name for the CSS class applied to a cell that is selected via a mouse drag.
|
void |
setShowAddEventButton(java.lang.Boolean showAddEventButton)
Set to false to hide the
Add Event button. |
void |
setShowComplexFields(java.lang.Boolean showComplexFields)
Whether to show fields of non-atomic types when a DataBoundComponent is given a
DataSource but no
component.fields.
|
void |
setShowControlsBar(java.lang.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(java.lang.Boolean showDateChooser)
Determines whether the
dateChooser is displayed. |
void |
setShowDatePickerButton(java.lang.Boolean showDatePickerButton)
Set to false to hide the
datePickerButton that
allows selecting a new base date for this Calendar. |
void |
setShowDayHeaders(java.lang.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(java.lang.Boolean showDayLanes)
|
void |
setShowDayView(java.lang.Boolean showDayView) |
void |
setShowDetailFields(java.lang.Boolean showDetailFields)
Whether to show fields marked
detail:true when a DataBoundComponent is given a DataSource but no
component.fields. |
void |
setShowEventDescriptions(java.lang.Boolean showEventDescriptions)
If false, the event header will take up the entire space of the event.
|
void |
setShowHiddenFields(java.lang.Boolean showHiddenFields)
Whether to show fields marked
hidden:true when a DataBoundComponent is given a
DataSource but no component.fields.
|
void |
setShowMonthView(java.lang.Boolean showMonthView) |
void |
setShowNextButton(java.lang.Boolean showNextButton)
Set to false to hide the
Next button. |
void |
setShowOtherDays(java.lang.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(java.lang.Boolean showPreviousButton)
Set to false to hide the
Previous button. |
void |
setShowQuickEventDialog(java.lang.Boolean showQuickEventDialog)
Determines whether the quick event dialog is displayed when a time is clicked.
|
void |
setShowTimelineView(java.lang.Boolean showTimelineView)
If set to true, show the
Timeline view. |
void |
setShowWeekends(java.lang.Boolean showWeekends)
Suppresses the display of weekend days in the week and month views, and disallows the creation of events on weekends.
|
void |
setShowWeekView(java.lang.Boolean showWeekView) |
void |
setShowWorkday(java.lang.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(java.lang.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(java.util.Date startDate)
The start date of the calendar
timeline view. |
void |
setStartDateField(java.lang.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(java.util.Date start)
Sets the range over which the timeline will display events.
|
void |
setTimelineRange(java.util.Date start,
java.util.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(java.lang.String timelineViewTitle)
The title for the
timeline view. |
void |
setTitleField(java.lang.String titleField)
Sets the best field to use for a user-visible title for an individual record from this component.
|
void |
setTodayBackgroundColor(java.lang.String todayBackgroundColor)
The background color for today in the Month view, or in the Timeline view when +{timelineGranularity} is "day".
|
void |
setTrailingDateField(java.lang.String trailingDateField)
The name of the trailing date field for each event.
|
void |
setUpdateOperation(java.lang.String updateOperation)
Operation ID this component should use when performing update operations.
|
void |
setUseAllDataSourceFields(java.lang.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(java.lang.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(java.lang.Boolean weekEventBorderOverlap)
Augments the width of week event windows slightly to avoid duplicate adjacent borders between events.
|
void |
setWeekPrefix(java.lang.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(java.lang.String weekViewTitle)
The title for the
week view. |
void |
setWorkdayBaseStyle(java.lang.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(java.lang.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(java.lang.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,
java.util.Date startDate,
java.util.Date endDate,
java.lang.String name,
java.lang.String description)
update an event in this calendar.
|
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, getComponentMask, getComponentMaskDefaults, 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, hideComponentMask, 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, setComponentMaskDefaults, 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, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, updateEditNode, updateHover, updateHover, updateShadow, visibleAtPoint, willAcceptDropaddDrawHandler, 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, toStringaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEventsclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetOrCreateJsObjpublic Calendar()
public Calendar(com.google.gwt.core.client.JavaScriptObject jsObj)
public static Calendar getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
public static void changeAutoChildDefaults(java.lang.String autoChildName,
Canvas defaults)
autoChildName.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.AutoChildUsagepublic static void changeAutoChildDefaults(java.lang.String autoChildName,
FormItem defaults)
autoChildName.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.AutoChildUsageprotected com.google.gwt.core.client.JavaScriptObject create()
public ImgButton getAddEventButton() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setAddEventButtonHoverText(java.lang.String addEventButtonHoverText)
throws java.lang.IllegalStateException
add event toolbar buttonaddEventButtonHoverText - Default value is "Add an event"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getAddEventButtonHoverText()
add event toolbar buttonpublic void setAlternateLaneStyles(java.lang.Boolean alternateLaneStyles)
Timeline, or a day view when showDayLanes is true, whether to make lane boundaries
more obvious by showing alternate lanes in a different color.alternateLaneStyles - Default value is nullpublic java.lang.Boolean getAlternateLaneStyles()
Timeline, or a day view when showDayLanes is true, whether to make lane boundaries
more obvious by showing alternate lanes in a different color.public void setBaseStyle(java.lang.String baseStyle)
baseStyle - See CSSStyleName . Default value is "calendar"Appearance overview and related methodspublic java.lang.String getBaseStyle()
CSSStyleNameAppearance overview and related methodspublic void setBringEventsToFront(java.lang.Boolean bringEventsToFront)
throws java.lang.IllegalStateException
bringEventsToFront - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getBringEventsToFront()
public void setCancelButtonTitle(java.lang.String cancelButtonTitle)
throws java.lang.IllegalStateException
cancelButtonTitle - See HTMLString . Default value is "Cancel"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getCancelButtonTitle()
HTMLStringpublic void setCanCreateEvents(java.lang.Boolean canCreateEvents)
throws java.lang.IllegalStateException
canCreateEvents - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanCreateEvents()
public void setCanDeleteEvents(java.lang.Boolean canDeleteEvents)
throws java.lang.IllegalStateException
canRemoveEventscanEditEvents.canDeleteEvents - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanDeleteEvents()
canRemoveEventscanEditEvents.public void setCanDragEventField(java.lang.String canDragEventField)
throws java.lang.IllegalStateException
CalendarEvent that determines dragability.canDragEventField - Default value is "canEdit"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getCanDragEventField()
CalendarEvent that determines dragability.CalendarEventpublic void setCanDragEvents(java.lang.Boolean canDragEvents)
throws java.lang.IllegalStateException
canDragEvents - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanDragEvents()
public void setCanEditEvents(java.lang.Boolean canEditEvents)
throws java.lang.IllegalStateException
canEditEvents - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanEditEvents()
public void setCanEditField(java.lang.String canEditField)
throws java.lang.IllegalStateException
CalendarEvent that determines editability.canEditField - Default value is "canEdit"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getCanEditField()
CalendarEvent that determines editability.CalendarEventpublic void setCanEditLane(java.lang.Boolean canEditLane)
throws java.lang.IllegalStateException
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.
canEditLane - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanEditLane()
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.
public void setCanEditLaneField(java.lang.String canEditLaneField)
throws java.lang.IllegalStateException
CalendarEvent that determines whether that event
can be moved between lanes.canEditLaneField - Default value is "canEditLane"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getCanEditLaneField()
CalendarEvent that determines whether that event
can be moved between lanes.CalendarEventpublic void setCanRemoveEvents(java.lang.Boolean canRemoveEvents)
throws java.lang.IllegalStateException
canEditEvents.canRemoveEvents - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanRemoveEvents()
canEditEvents.public void setCanRemoveField(java.lang.String canRemoveField)
throws java.lang.IllegalStateException
CalendarEvent that determines whether an event
shows a remove button.canRemoveField - Default value is "canRemove"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getCanRemoveField()
CalendarEvent that determines whether an event
shows a remove button.CalendarEventpublic void setCanReorderLanes(java.lang.Boolean canReorderLanes)
throws java.lang.IllegalStateException
canReorderLanes - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanReorderLanes()
public void setCanResizeTimelineEvents(java.lang.Boolean canResizeTimelineEvents)
throws java.lang.IllegalStateException
Timeline events be stretched by their left and right edges?canResizeTimelineEvents - Default value is falsejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getCanResizeTimelineEvents()
Timeline events be stretched by their left and right edges?public void setChosenDate(java.util.Date chosenDate)
chosenDate - the new date to set as the current date. Default value is 'Today'public java.util.Date getChosenDate()
public void setColumnsPerPage(java.lang.Integer columnsPerPage)
throws java.lang.IllegalStateException
timelineGranularity to scroll by. With the
default value of null, the Timeline will scroll by its current length.columnsPerPage - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Integer getColumnsPerPage()
timelineGranularity to scroll by. With the
default value of null, the Timeline will scroll by its current length.public HLayout getControlsBar() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setCurrentViewName(ViewName currentViewName)
currentViewName - The name of the view that should be made visible.. Default value is nullpublic ViewName getCurrentViewName()
public void setData(CalendarEvent[] data)
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.
data - data to show in the list. Default value is nullCalendarEventpublic CalendarEvent[] getData()
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.
CalendarEventpublic void setDataFetchMode(FetchMode dataFetchMode)
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.
setDataFetchMode in interface DataBoundComponentdataFetchMode - Default value is "paged"Databinding overview and related methodspublic FetchMode getDataFetchMode()
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.
getDataFetchMode in interface DataBoundComponentDatabinding overview and related methodspublic DateChooser getDateChooser() throws java.lang.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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setDateEditingStyle(DateEditingStyle dateEditingStyle) throws java.lang.IllegalStateException
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".
dateEditingStyle - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic DateEditingStyle getDateEditingStyle()
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".
public void setDateFormatter(DateDisplayFormat dateFormatter)
Date.setShortDisplayFormat(). Specify any valid DateDisplayFormat.dateFormatter - Default value is nullpublic DateDisplayFormat getDateFormatter()
Date.setShortDisplayFormat(). Specify any valid DateDisplayFormat.public Label getDateLabel() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public ImgButton getDatePickerButton() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setDatePickerHoverText(java.lang.String datePickerHoverText)
throws java.lang.IllegalStateException
date picker toolbar buttondatePickerHoverText - Default value is "Choose a date"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getDatePickerHoverText()
date picker toolbar buttonpublic void setDayBodyBaseStyle(java.lang.String dayBodyBaseStyle)
dayBodyBaseStyle - See CSSStyleName . Default value is "calMonthDayBody"Appearance overview and related methodspublic java.lang.String getDayBodyBaseStyle()
CSSStyleNameAppearance overview and related methodspublic void setDayHeaderBaseStyle(java.lang.String dayHeaderBaseStyle)
dayHeaderBaseStyle - See CSSStyleName . Default value is "calMonthDayHeader"Appearance overview and related methodspublic java.lang.String getDayHeaderBaseStyle()
CSSStyleNameAppearance overview and related methodspublic ListGrid getDayView() throws java.lang.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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setDayViewTitle(java.lang.String dayViewTitle)
throws java.lang.IllegalStateException
day view.dayViewTitle - Default value is "Day"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getDayViewTitle()
day view.public void setDefaultTimelineColumnSpan(int defaultTimelineColumnSpan)
throws java.lang.IllegalStateException
timelineGranularity to give the timeline by default if no endDate is provided. The default is 20.defaultTimelineColumnSpan - Default value is 20java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic int getDefaultTimelineColumnSpan()
timelineGranularity to give the timeline by default if no endDate is provided. The default is 20.public void setDescriptionField(java.lang.String descriptionField)
throws java.lang.IllegalStateException
CalendarEvent.descriptionField - Default value is "description"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getDescriptionField()
CalendarEvent.public void setDetailsButtonTitle(java.lang.String detailsButtonTitle)
throws java.lang.IllegalStateException
detailsButtonTitle - See HTMLString . Default value is "Edit Details"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getDetailsButtonTitle()
HTMLStringpublic void setDisableWeekends(java.lang.Boolean disableWeekends)
throws java.lang.IllegalStateException
weekendDays.disableWeekends - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdVisibility overview and related methodspublic java.lang.Boolean getDisableWeekends()
weekendDays.Visibility overview and related methodspublic void setEndDate(java.util.Date endDate)
throws java.lang.IllegalStateException
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.
endDate - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.util.Date getEndDate()
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.
public void setEndDateField(java.lang.String endDateField)
throws java.lang.IllegalStateException
CalendarEvent.endDateField - Default value is "endDate"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getEndDateField()
CalendarEvent.CalendarEventpublic void setEventAutoArrange(java.lang.Boolean eventAutoArrange)
throws java.lang.IllegalStateException
eventAutoArrange - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getEventAutoArrange()
public void setEventDescriptionFieldTitle(java.lang.String eventDescriptionFieldTitle)
throws java.lang.IllegalStateException
descriptionField field in
the quick and advanced event dialogseventDescriptionFieldTitle - See HTMLString . Default value is "Description"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getEventDescriptionFieldTitle()
descriptionField field in
the quick and advanced event dialogsHTMLStringpublic Window getEventDialog() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setEventDragGap(int eventDragGap)
eventDragGap - Default value is 10public int getEventDragGap()
public DynamicForm getEventEditor() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public Window getEventEditorLayout() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setEventEndDateFieldTitle(java.lang.String eventEndDateFieldTitle)
throws java.lang.IllegalStateException
eventEndDateFieldTitle - See HTMLString . Default value is "To"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getEventEndDateFieldTitle()
HTMLStringpublic void setEventLaneFieldTitle(java.lang.String eventLaneFieldTitle)
throws java.lang.IllegalStateException
laneField field in the quick and
advanced event dialogseventLaneFieldTitle - See HTMLString . Default value is "Lane"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getEventLaneFieldTitle()
laneField field in the quick and
advanced event dialogsHTMLStringpublic void setEventNameFieldTitle(java.lang.String eventNameFieldTitle)
throws java.lang.IllegalStateException
eventNameFieldTitle - See HTMLString . Default value is "Event Name"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getEventNameFieldTitle()
HTMLStringpublic void setEventOverlap(java.lang.Boolean eventOverlap)
throws java.lang.IllegalStateException
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.eventOverlap - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getEventOverlap()
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.public void setEventOverlapIdenticalStartTimes(java.lang.Boolean eventOverlapIdenticalStartTimes)
throws java.lang.IllegalStateException
eventOverlapIdenticalStartTimes - Default value is falsejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getEventOverlapIdenticalStartTimes()
public void setEventOverlapPercent(int eventOverlapPercent)
throws java.lang.IllegalStateException
eventOverlapPercent - Default value is 10java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic int getEventOverlapPercent()
public void setEventSnapGap(java.lang.Integer eventSnapGap)
throws java.lang.IllegalStateException
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".
eventSnapGap - Default value is 20java.lang.IllegalStateException - this property cannot be changed after the component has been createdEditing overview and related methodspublic java.lang.Integer getEventSnapGap()
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".
Editing overview and related methodspublic void setEventStartDateFieldTitle(java.lang.String eventStartDateFieldTitle)
throws java.lang.IllegalStateException
eventStartDateFieldTitle - See HTMLString . Default value is "From"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getEventStartDateFieldTitle()
HTMLStringpublic EventWindow getEventWindow()
Using AutoChildren
for details.
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.
public void setEventWindowStyle(java.lang.String eventWindowStyle)
eventWindowStyle - See CSSStyleName . Default value is "eventWindow"Appearance overview and related methodspublic java.lang.String getEventWindowStyle()
CSSStyleNameAppearance overview and related methodspublic void setEventWindowStyleField(java.lang.String eventWindowStyleField)
throws java.lang.IllegalStateException
eventWindowStyle for an individual CalendarEvent. See eventWindowStyle.eventWindowStyleField - Default value is "eventWindowStyle"java.lang.IllegalStateException - this property cannot be changed after the component has been createdAppearance overview and related methodspublic java.lang.String getEventWindowStyleField()
eventWindowStyle for an individual CalendarEvent. See eventWindowStyle.Appearance overview and related methodspublic void setFirstDayOfWeek(java.lang.Integer firstDayOfWeek)
firstDayOfWeek - Default value is nullpublic java.lang.Integer getFirstDayOfWeek()
public void setHeaderLevels(HeaderLevel... headerLevels)
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.
headerLevels - the array of HeaderLevels to set. Default value is nullpublic HeaderLevel[] getHeaderLevels()
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.
public void setInvalidDateMessage(java.lang.String invalidDateMessage)
throws java.lang.IllegalStateException
eventEditor when the
'To' date is greater than the 'From' date and a save is attempted.invalidDateMessage - Default value is "From must be before To"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getInvalidDateMessage()
eventEditor when the
'To' date is greater than the 'From' date and a save is attempted.public void setLaneFields(ListGridField... laneFields) throws java.lang.IllegalStateException
timelineView, which shows data about the timeline lanes.
Each field shows one attribute of the objects provided as lanes.laneFields - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic ListGridField[] getLaneFields()
timelineView, which shows data about the timeline lanes.
Each field shows one attribute of the objects provided as lanes.public void setLaneNameField(java.lang.String laneNameField)
throws java.lang.IllegalStateException
lane in
which this event will be displayed in Timelines and in the day view, if showDayLanes is true.laneNameField - Default value is "lane"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getLaneNameField()
lane in
which this event will be displayed in Timelines and in the day view, if showDayLanes is true.CalendarEventpublic void setLanes(Lane... lanes)
Lane definitions that represent the rows of the timelineView, or the columns of the dayView if showDayLanes is true.
lanes in the current calendar view. Only has an effect in timeline views, and in day views when showDayLanes is true.lanes - array of lanes to display. Default value is nullpublic Lane[] getLanes()
Lane definitions that represent the rows of the timelineView, or the columns of the dayView if showDayLanes is true.public void setLeadingDateField(java.lang.String leadingDateField)
throws java.lang.IllegalStateException
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.leadingDateField - Default value is "leadingDate"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getLeadingDateField()
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.CalendarEventpublic TabSet getMainView() throws java.lang.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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setMinimumDayHeight(java.lang.Integer minimumDayHeight)
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.
minimumDayHeight - Default value is 80Appearance overview and related methodspublic java.lang.Integer getMinimumDayHeight()
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.
Appearance overview and related methodspublic void setMinLaneWidth(java.lang.Integer minLaneWidth)
throws java.lang.IllegalStateException
vertical lanes in the dayView, this attribute sets the minimum width of each column
or field.minLaneWidth - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Integer getMinLaneWidth()
vertical lanes in the dayView, this attribute sets the minimum width of each column
or field.public ListGrid getMonthView() throws java.lang.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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setMonthViewTitle(java.lang.String monthViewTitle)
throws java.lang.IllegalStateException
month view.monthViewTitle - Default value is "Month"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getMonthViewTitle()
month view.public void setNameField(java.lang.String nameField)
throws java.lang.IllegalStateException
CalendarEvent.nameField - Default value is "name"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getNameField()
CalendarEvent.CalendarEventpublic ImgButton getNextButton() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setNextButtonHoverText(java.lang.String nextButtonHoverText)
throws java.lang.IllegalStateException
next toolbar buttonnextButtonHoverText - Default value is "Next"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getNextButtonHoverText()
next toolbar buttonpublic void setOtherDayBlankStyle(java.lang.String otherDayBlankStyle)
throws java.lang.IllegalStateException
month view, when showOtherDays is false.otherDayBlankStyle - See CSSStyleName . Default value is "calMonthOtherDayBlank"java.lang.IllegalStateException - this property cannot be changed after the component has been createdAppearance overview and related methodspublic java.lang.String getOtherDayBlankStyle()
month view, when showOtherDays is false.CSSStyleNameAppearance overview and related methodspublic void setOtherDayBodyBaseStyle(java.lang.String otherDayBodyBaseStyle)
otherDayBodyBaseStyle - See CSSStyleName . Default value is "calMonthDayBody"Appearance overview and related methodspublic java.lang.String getOtherDayBodyBaseStyle()
CSSStyleNameAppearance overview and related methodspublic void setOtherDayHeaderBaseStyle(java.lang.String otherDayHeaderBaseStyle)
otherDayHeaderBaseStyle - See CSSStyleName . Default value is "calMonthDayHeader"Appearance overview and related methodspublic java.lang.String getOtherDayHeaderBaseStyle()
CSSStyleNameAppearance overview and related methodspublic void setOverlapSortSpecifiers(SortSpecifier... overlapSortSpecifiers)
sort-specifiers for customizing the render order of events that
overlap. In timelines, this dictates the vertical rendering
order of overlapped events in each lane.
In day and week views, it dictates the horizontal rendering order of
overlapped events in each column or Lane.
By default, events that share space in a Lane or column are rendered from
top to bottom, or left to right according to their start-dates - the earliest in a given lane appears
top-most in that lane, or left-most in its column.
Providing overlapSortSpecifiers allows for the
events to be ordered by one or more of the fields stored on the events, or in the underlying data-source, if the Calendar is databound.
overlapSortSpecifiers - Default value is nullpublic SortSpecifier[] getOverlapSortSpecifiers()
sort-specifiers for customizing the render order of events that
overlap. In timelines, this dictates the vertical rendering
order of overlapped events in each lane.
In day and week views, it dictates the horizontal rendering order of
overlapped events in each column or Lane.
By default, events that share space in a Lane or column are rendered from
top to bottom, or left to right according to their start-dates - the earliest in a given lane appears
top-most in that lane, or left-most in its column.
Providing overlapSortSpecifiers allows for the
events to be ordered by one or more of the fields stored on the events, or in the underlying data-source, if the Calendar is databound.
public ImgButton getPreviousButton() throws java.lang.IllegalStateException
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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setPreviousButtonHoverText(java.lang.String previousButtonHoverText)
throws java.lang.IllegalStateException
previous toolbar button.previousButtonHoverText - Default value is "Previous"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getPreviousButtonHoverText()
previous toolbar button.public void setRowHeight(int rowHeight)
rowHeight - Default value is 20public int getRowHeight()
public void setSaveButtonTitle(java.lang.String saveButtonTitle)
throws java.lang.IllegalStateException
saveButtonTitle - See HTMLString . Default value is "Save Event"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getSaveButtonTitle()
HTMLStringpublic void setScrollToWorkday(java.lang.Boolean scrollToWorkday)
throws java.lang.IllegalStateException
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.scrollToWorkday - Default value is falsejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getScrollToWorkday()
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.public void setSelectedCellStyle(java.lang.String selectedCellStyle)
selectedCellStyle - See CSSStyleName . Default value is "calendarCellSelected"Appearance overview and related methodspublic java.lang.String getSelectedCellStyle()
CSSStyleNameAppearance overview and related methodspublic void setShowAddEventButton(java.lang.Boolean showAddEventButton)
Add Event button.showAddEventButton - Default value is nullpublic java.lang.Boolean getShowAddEventButton()
Add Event button.public void setShowControlsBar(java.lang.Boolean showControlsBar)
throws java.lang.IllegalStateException
controlsBar will be hidden, so the autoChildren (previousButton, dateLabel, nextButton, addEventButton, and datePickerButton) will not be created or shown.showControlsBar - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowControlsBar()
controlsBar will be hidden, so the autoChildren (previousButton, dateLabel, nextButton, addEventButton, and datePickerButton) will not be created or shown.public void setShowDateChooser(java.lang.Boolean showDateChooser)
throws java.lang.IllegalStateException
dateChooser is displayed.showDateChooser - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdVisibility overview and related methodspublic java.lang.Boolean getShowDateChooser()
dateChooser is displayed.Visibility overview and related methodspublic void setShowDatePickerButton(java.lang.Boolean showDatePickerButton)
datePickerButton that
allows selecting a new base date for this Calendar.showDatePickerButton - Default value is nullpublic java.lang.Boolean getShowDatePickerButton()
datePickerButton that
allows selecting a new base date for this Calendar.public void setShowDayHeaders(java.lang.Boolean showDayHeaders)
throws java.lang.IllegalStateException
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.showDayHeaders - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdVisibility overview and related methodspublic java.lang.Boolean getShowDayHeaders()
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.Visibility overview and related methodspublic void setShowDayLanes(java.lang.Boolean showDayLanes)
throws java.lang.IllegalStateException
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.
showDayLanes - whether or not to show lanes in the day view. Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowDayLanes()
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.
public void setShowDetailFields(java.lang.Boolean showDetailFields)
throws java.lang.IllegalStateException
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.
setShowDetailFields in interface DataBoundComponentshowDetailFields - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdDatabinding overview and related methodspublic java.lang.Boolean getShowDetailFields()
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.
getShowDetailFields in interface DataBoundComponentDatabinding overview and related methodspublic void setShowEventDescriptions(java.lang.Boolean showEventDescriptions)
throws java.lang.IllegalStateException
showEventDescriptions - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowEventDescriptions()
public void setShowNextButton(java.lang.Boolean showNextButton)
Next button.showNextButton - Default value is nullpublic java.lang.Boolean getShowNextButton()
Next button.public void setShowOtherDays(java.lang.Boolean showOtherDays)
throws java.lang.IllegalStateException
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.showOtherDays - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdVisibility overview and related methodspublic java.lang.Boolean getShowOtherDays()
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.Visibility overview and related methodspublic void setShowPreviousButton(java.lang.Boolean showPreviousButton)
Previous button.showPreviousButton - Default value is nullpublic java.lang.Boolean getShowPreviousButton()
Previous button.public void setShowQuickEventDialog(java.lang.Boolean showQuickEventDialog)
throws java.lang.IllegalStateException
showQuickEventDialog - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdEditing overview and related methodspublic java.lang.Boolean getShowQuickEventDialog()
Editing overview and related methodspublic void setShowTimelineView(java.lang.Boolean showTimelineView)
Timeline view.showTimelineView - Default value is falsepublic java.lang.Boolean getShowTimelineView()
Timeline view.public void setShowWeekends(java.lang.Boolean showWeekends)
throws java.lang.IllegalStateException
weekendDays.
showWeekends to change this property at runtime.showWeekends - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdVisibility overview and related methodspublic java.lang.Boolean getShowWeekends()
weekendDays.Visibility overview and related methodspublic void setShowWorkday(java.lang.Boolean showWorkday)
throws java.lang.IllegalStateException
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().
showWorkday - Default value is falsejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowWorkday()
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().
public void setSizeEventsToGrid(java.lang.Boolean sizeEventsToGrid)
throws java.lang.IllegalStateException
sizeEventsToGrid - Default value is truejava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getSizeEventsToGrid()
public void setStartDate(java.util.Date startDate)
throws java.lang.IllegalStateException
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.
startDate - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.util.Date getStartDate()
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.
public void setStartDateField(java.lang.String startDateField)
throws java.lang.IllegalStateException
CalendarEvent.startDateField - Default value is "startDate"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getStartDateField()
CalendarEvent.CalendarEventpublic void setTimelineGranularity(TimeUnit timelineGranularity) throws java.lang.IllegalStateException
TimeUnit type.timelineGranularity - Default value is "day"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic TimeUnit getTimelineGranularity()
TimeUnit type.public void setTimelineUnitsPerColumn(int timelineUnitsPerColumn)
throws java.lang.IllegalStateException
timelineGranularity each
cell represents.timelineUnitsPerColumn - Default value is 1java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic int getTimelineUnitsPerColumn()
timelineGranularity each
cell represents.public ListGrid getTimelineView() throws java.lang.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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setTimelineViewTitle(java.lang.String timelineViewTitle)
throws java.lang.IllegalStateException
timeline view.timelineViewTitle - Default value is "Timeline"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getTimelineViewTitle()
timeline view.public void setTodayBackgroundColor(java.lang.String todayBackgroundColor)
throws java.lang.IllegalStateException
todayBackgroundColor - Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getTodayBackgroundColor()
public void setTrailingDateField(java.lang.String trailingDateField)
throws java.lang.IllegalStateException
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.trailingDateField - Default value is "trailingDate"java.lang.IllegalStateException - this property cannot be changed after the component has been createdCalendarEventpublic java.lang.String getTrailingDateField()
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.CalendarEventpublic void setWeekEventBorderOverlap(java.lang.Boolean weekEventBorderOverlap)
throws java.lang.IllegalStateException
weekEventBorderOverlap - Default value is falsejava.lang.IllegalStateException - this property cannot be changed after the component has been createdAppearance overview and related methodspublic java.lang.Boolean getWeekEventBorderOverlap()
Appearance overview and related methodspublic void setWeekPrefix(java.lang.String weekPrefix)
throws java.lang.IllegalStateException
week-based HeaderLevels when this calendar is showing a timeline.weekPrefix - See HTMLString . Default value is "Week"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getWeekPrefix()
week-based HeaderLevels when this calendar is showing a timeline.HTMLStringpublic ListGrid getWeekView() throws java.lang.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.
java.lang.IllegalStateException - if this widget has not yet been rendered.public void setWeekViewTitle(java.lang.String weekViewTitle)
throws java.lang.IllegalStateException
week view.weekViewTitle - Default value is "Week"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getWeekViewTitle()
week view.public void setWorkdayBaseStyle(java.lang.String workdayBaseStyle)
throws java.lang.IllegalStateException
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.workdayBaseStyle - See CSSStyleName . Default value is "calendarWorkday"java.lang.IllegalStateException - this property cannot be changed after the component has been createdAppearance overview and related methodspublic java.lang.String getWorkdayBaseStyle()
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.CSSStyleNameAppearance overview and related methodspublic void addLane(Lane lane)
lane - a new Lane object to add to the viewpublic void addLaneEvent(Lane laneName, java.util.Date startDate)
Timelines, and for dayViews with showDayLanes set, create a new event and adds it to a
particular Lane.laneName - the Lane in which to add this eventstartDate - start date of event, or CalendarEvent Objectpublic void addLaneEvent(Lane laneName, java.util.Date startDate, java.util.Date endDate)
Calendar#addLaneEvent()}public void addLaneEvent(Lane laneName, java.util.Date startDate, java.util.Date endDate, java.lang.String name)
Calendar#addLaneEvent()}public void addLaneEvent(Lane laneName, java.util.Date startDate, java.util.Date endDate, java.lang.String name, java.lang.String description)
Calendar#addLaneEvent()}public void addLaneEvent(Lane laneName, java.util.Date startDate, java.util.Date endDate, java.lang.String name, java.lang.String description, java.lang.Object otherFields)
Timelines, and for dayViews with showDayLanes set, create a new event and adds it to a
particular Lane.laneName - the Lane in which to add this eventstartDate - start date of event, or CalendarEvent ObjectendDate - end date of eventname - name of eventdescription - description of eventotherFields - new values of additional fields to be updatedpublic com.google.gwt.event.shared.HandlerRegistration addBackgroundClickHandler(BackgroundClickHandler handler)
Callback fired when the mouse is clicked in a background-cell, ie, one without an event.
addBackgroundClickHandler in interface HasBackgroundClickHandlershandler - the backgroundClick handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addBackgroundMouseDownHandler(BackgroundMouseDownHandler 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.
addBackgroundMouseDownHandler in interface HasBackgroundMouseDownHandlershandler - the backgroundMouseDown handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addBackgroundMouseUpHandler(BackgroundMouseUpHandler 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.
addBackgroundMouseUpHandler in interface HasBackgroundMouseUpHandlershandler - the backgroundMouseUp handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addCurrentViewChangedHandler(CurrentViewChangedHandler handler)
Notification that fires whenever the current view changes via the mainView tabset.
addCurrentViewChangedHandler in interface HasCurrentViewChangedHandlershandler - the currentViewChanged handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDateChangedHandler(DateChangedHandler handler)
Fires whenever the user changes the current date, including picking a specific date or navigating to a new week or month.
addDateChangedHandler in interface HasDateChangedHandlershandler - the dateChanged handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDayBodyClickHandler(DayBodyClickHandler 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.
addDayBodyClickHandler in interface HasDayBodyClickHandlershandler - the dayBodyClick handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDayHeaderClickHandler(DayHeaderClickHandler 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.
addDayHeaderClickHandler in interface HasDayHeaderClickHandlershandler - the dayHeaderClick handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addEventAddedHandler(EventAddedHandler 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
addEventAddedHandler in interface HasEventAddedHandlershandler - the eventAdded handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addEventChangedHandler(EventChangedHandler 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
addEventChangedHandler in interface HasEventChangedHandlershandler - the eventChanged handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addEventClickHandler(EventClickHandler 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.
addEventClickHandler in interface HasEventClickHandlershandler - the eventClick handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addEventMovedHandler(EventMovedHandler 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.
addEventMovedHandler in interface HasEventMovedHandlershandler - the eventMoved handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addEventRemoveClickHandler(EventRemoveClickHandler 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.
addEventRemoveClickHandler in interface HasEventRemoveClickHandlershandler - the eventRemoveClick handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addEventRemovedHandler(EventRemovedHandler 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
addEventRemovedHandler in interface HasEventRemovedHandlershandler - the eventRemoved handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addEventResizedHandler(EventResizedHandler 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.
addEventResizedHandler in interface HasEventResizedHandlershandler - the eventResized handlerHandlerRegistration used to remove this handlerpublic void eventsRendered()
public java.lang.Integer getActiveDay()
getActiveTime()public java.util.Date getActiveTime()
public java.util.Date getCellDate(java.lang.Integer rowNum,
java.lang.Integer colNum)
To determine the date at a more specific point within a cell, see
Calendar.getDateFromPoint().
rowNum - the row number to get the date forcolNum - the column number to get the date forpublic java.lang.String getDateCSSText(java.util.Date date,
java.lang.Integer rowNum,
java.lang.Integer colNum,
ListGrid viewer)
"CSS text" means semicolon-separated style settings, suitable for inclusion in a CSS stylesheet or in a STYLE attribute of an HTML element.
date - the date to return CSS text forrowNum - the row number to get the CSS forcolNum - the column number to get the date forviewer - the ListGrid used by the current Calendar viewgetDateStyle(java.util.Date, java.lang.Integer, java.lang.Integer, com.smartgwt.client.widgets.grid.ListGrid)public java.util.Date getDateFromPoint()
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.
public java.util.Date getDateFromPoint(java.lang.Integer x)
Calendar#getDateFromPoint()}public java.util.Date getDateFromPoint(java.lang.Integer x,
java.lang.Integer y)
Calendar#getDateFromPoint()}public java.util.Date getDateFromPoint(java.lang.Integer x,
java.lang.Integer y,
java.lang.Boolean snapOffsets)
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.
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 truepublic java.lang.String getDateStyle(java.util.Date date,
java.lang.Integer rowNum,
java.lang.Integer colNum,
ListGrid viewer)
date - the date to return the CSS styleName forrowNum - the row number to get the style forcolNum - the column number to get the style forviewer - the ListGrid used by the current Calendar viewgetDateCSSText(java.util.Date, java.lang.Integer, java.lang.Integer, com.smartgwt.client.widgets.grid.ListGrid)public com.google.gwt.event.shared.HandlerRegistration addEventHoverHTMLHandler(EventHoverHTMLHandler handler)
Gets the hover HTML for an event being hovered over. Override here to return custom HTML based upon the parameter event object.
addEventHoverHTMLHandler in interface HasEventHoverHTMLHandlershandler - the eventHoverHTML handlerHandlerRegistration used to remove this handlerpublic Lane getLaneFromPoint()
Lane at the passed co-ordinates. To get the lane under the
mouse, pass null for both x and y.public Lane getLaneFromPoint(java.lang.Integer x)
Calendar#getLaneFromPoint()}public Lane getLaneFromPoint(java.lang.Integer x, java.lang.Integer y)
Lane at the passed co-ordinates. To get the lane under the
mouse, pass null for both x and y.x - the x offset into the body of the selected viewy - the y offset into the body of the selected view. If this param and "x" are both unset,
assumes both offsets from the last mouse event.public java.lang.String getMonthViewHoverHTML(java.util.Date date,
CalendarEvent... events)
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.
date - Date the user is hovering overevents - array of events occurring on the current date. May be empty.public java.util.Date getPeriodEndDate()
Calendar.getVisibleEndDate().public java.util.Date getPeriodStartDate()
Calendar.getVisibleStartDate().public java.util.Date getVisibleEndDate()
public java.util.Date getVisibleStartDate()
public void next()
public void previous()
public void refreshEvent(CalendarEvent event)
monthView.event - The event object to refresh in the current viewpublic void scrollToTime(java.lang.String time)
time - any parsable time-stringpublic void selectTab(int tabnum)
tabnum - the index of the tab to selectpublic void setEventStyle(CalendarEvent event, java.lang.String styleName)
monthView.event - The event object to refresh in the current viewstyleName - The new CSS style to apply to the windows for this event. See CSSStyleNamepublic void setTimelineRange(java.util.Date start)
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.
start - start of rangepublic void setTimelineRange(java.util.Date start,
java.util.Date end)
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.
start - start of rangeend - end of rangepublic void showEventDialog(CalendarEvent event)
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.
event - the event to show in the Editorpublic void showEventEditor()
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().
public void showEventEditor(CalendarEvent event)
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().
event - an existing event to show in the Editorpublic void showNewEventDialog()
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.
public void showNewEventDialog(CalendarEvent event)
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.
event - defaults for the new eventpublic void showNewEventEditor()
event is passed
as the parameter, it is used as defaults for the new event.public void showNewEventEditor(CalendarEvent event)
event is passed
as the parameter, it is used as defaults for the new event.event - defaults for the new event to show in the Editorpublic com.google.gwt.event.shared.HandlerRegistration addTimelineEventMovedHandler(TimelineEventMovedHandler 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.
addTimelineEventMovedHandler in interface HasTimelineEventMovedHandlershandler - the timelineEventMoved handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addTimelineEventResizedHandler(TimelineEventResizedHandler 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.
addTimelineEventResizedHandler in interface HasTimelineEventResizedHandlershandler - the timelineEventResized handlerHandlerRegistration used to remove this handlerpublic static void setDefaultProperties(Calendar calendarProperties)
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.
calendarProperties - properties that should be used as new defaults when instances of this class are createdprotected void onInit_Calendar()
public void setWorkdayEnd(java.lang.String workdayEnd)
throws java.lang.IllegalStateException
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.
workdayEnd - Default value is "5:00pm"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getWorkdayEnd(java.util.Date date)
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.
date - the date to get the workday end forworkdayEnd.public void setWorkdayStart(java.lang.String workdayStart)
throws java.lang.IllegalStateException
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.
workdayStart - Default value is "9:00am"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getWorkdayStart(java.util.Date date)
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.
date - the date to get the workday start forworkdayStart.public boolean dateIsWorkday(java.util.Date date)
workdays,
and returns true if found. Override this method to provide custom logic for determining workday,
for example returning false on holidays.date - the date being testedprotected java.lang.String getDayBodyHTML(java.util.Date date,
CalendarEvent[] events,
Calendar calendar,
int rowNum,
int colNum)
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.
date - JavaScript Date object representing this dayevents - events that fall on this daycalendar - the calendar itselfrowNum - the row number to which the parameter date belongscolNum - the column number to which the parameter date belongspublic java.lang.String getDateLabelText(java.lang.String viewName,
java.util.Date startDate,
java.util.Date endDate)
Note: This is an override point.
viewName - one of "day", "week", "month" or "timeline"startDate - the start of the visible date rangeendDate - the optional end of the visible date range. May be null.public void setEventHoverHTMLCustomizer(EventHoverHTMLCustomizer eventHoverHTMLCustomizer)
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.
eventHoverHTMLCustomizer - the customizer to execute.public void setMonthViewHoverHTMLCustomizer(MonthViewHoverHTMLCustomizer monthViewHoverHTMLCustomizer)
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.
monthViewHoverHTMLCustomizer - the customizer to execute.public void setEventEditorFields(FormItem... eventEditorFields) throws java.lang.IllegalStateException
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.eventEditorFields - eventEditorFields Default value is see belowjava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic void setEventDialogFields(FormItem... eventDialogFields) throws java.lang.IllegalStateException
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.eventDialogFields - eventDialogFields Default value is see belowjava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic void setData(Record[] data)
data - array of Record objects.setData(CalendarEvent[])public void setData(RecordList data)
data - List of Recordspublic void setTimeFormatter(TimeFormatter timeFormatter)
setTimeFormatter(TimeDisplayFormat) instead.timeFormatter - timeFormatter Default value is "toShortPaddedTime"public void setTimeFormatter(TimeDisplayFormat timeFormatter)
timeFormatter - timeFormatter Default value is "toShortPaddedTime"public TimeDisplayFormat getTimeFormatter()
public void removeLane(Lane lane)
timelineView
mode.lane - the lane to removepublic void removeLane(java.lang.String laneName)
timelineView
mode.laneName - the name of the lane to removepublic void addEvent(java.util.Date startDate,
java.util.Date endDate,
java.lang.String name,
java.lang.String description)
startDate - start date of eventendDate - end date of eventname - name of eventdescription - description of eventpublic void addEvent(java.util.Date startDate,
java.util.Date endDate,
java.lang.String name,
java.lang.String description,
java.util.Map otherFields)
startDate - start date of eventendDate - end date of eventname - name of eventdescription - description of eventotherFields - new values of additional fields to be updatedpublic void removeEvent(CalendarEvent event)
event - The event object to remove from the calendarpublic void updateEvent(CalendarEvent event, java.util.Date startDate, java.util.Date endDate, java.lang.String name, java.lang.String description)
event - The event object to remove from the calendarstartDate - start date of eventendDate - end date of eventname - name of eventdescription - description of eventpublic void setShowDayView(java.lang.Boolean showDayView)
throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionpublic void setShowWeekView(java.lang.Boolean showWeekView)
throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionpublic void setShowMonthView(java.lang.Boolean showMonthView)
throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionpublic void setWorkdays(int[] workdays)
throws java.lang.IllegalStateException
showWorkday is trueworkdays - workdays Default value is [1,2,3,4,5]java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic static boolean calendarLoaded()
public void setDataPageSize(int dataPageSize)
DataBoundComponentResultSet 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.
setDataPageSize in interface DataBoundComponentdataPageSize - dataPageSize Default value is 75public int getDataPageSize()
DataBoundComponentResultSet 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.
getDataPageSize in interface DataBoundComponentpublic void setUseAllDataSourceFields(java.lang.Boolean useAllDataSourceFields)
DataBoundComponentfields) 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.
setUseAllDataSourceFields in interface DataBoundComponentuseAllDataSourceFields - useAllDataSourceFields Default value is falsepublic java.lang.Boolean getUseAllDataSourceFields()
DataBoundComponentfields) 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.
getUseAllDataSourceFields in interface DataBoundComponentpublic void setShowHiddenFields(java.lang.Boolean showHiddenFields)
DataBoundComponenthidden: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.
setShowHiddenFields in interface DataBoundComponentshowHiddenFields - showHiddenFields Default value is falsepublic java.lang.Boolean getShowHiddenFields()
DataBoundComponenthidden: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.
getShowHiddenFields in interface DataBoundComponentpublic void setShowComplexFields(java.lang.Boolean showComplexFields)
DataBoundComponentcomponent.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
setShowComplexFields in interface DataBoundComponentshowComplexFields - showComplexFields Default value is truepublic java.lang.Boolean getShowComplexFields()
DataBoundComponentcomponent.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.
getShowComplexFields in interface DataBoundComponentpublic void setFetchOperation(java.lang.String fetchOperation)
DataBoundComponentsetFetchOperation in interface DataBoundComponentfetchOperation - fetchOperation Default value is nullpublic java.lang.String getFetchOperation()
DataBoundComponentgetFetchOperation in interface DataBoundComponentpublic void setUpdateOperation(java.lang.String updateOperation)
DataBoundComponentsetUpdateOperation in interface DataBoundComponentupdateOperation - updateOperation Default value is nullpublic java.lang.String getUpdateOperation()
DataBoundComponentgetUpdateOperation in interface DataBoundComponentpublic void setAddOperation(java.lang.String addOperation)
DataBoundComponentsetAddOperation in interface DataBoundComponentaddOperation - addOperation Default value is nullpublic java.lang.String getAddOperation()
DataBoundComponentgetAddOperation in interface DataBoundComponentpublic void setRemoveOperation(java.lang.String removeOperation)
DataBoundComponentsetRemoveOperation in interface DataBoundComponentremoveOperation - removeOperation Default value is nullpublic java.lang.String getRemoveOperation()
DataBoundComponentgetRemoveOperation in interface DataBoundComponentpublic void setExportFields(java.lang.String[] exportFields)
DataBoundComponentIf exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.
setExportFields in interface DataBoundComponentexportFields - exportFields Default value is nullpublic java.lang.String[] getExportFields()
DataBoundComponentIf exportFields is not provided, the exported output includes all visible fields from this component, sorted as they appear.
getExportFields in interface DataBoundComponentpublic void setExportAll(java.lang.Boolean exportAll)
DataBoundComponentfields.
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.
setExportAll in interface DataBoundComponentexportAll - exportAll Default value is falsepublic java.lang.Boolean getExportAll()
DataBoundComponentfields.
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.
getExportAll in interface DataBoundComponentpublic void setPreventDuplicates(java.lang.Boolean preventDuplicates)
throws java.lang.IllegalStateException
DataBoundComponentDataBoundComponent.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.
setPreventDuplicates in interface DataBoundComponentpreventDuplicates - preventDuplicates Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getPreventDuplicates()
DataBoundComponentDataBoundComponent.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.
getPreventDuplicates in interface DataBoundComponentpublic void setDuplicateDragMessage(java.lang.String duplicateDragMessage)
throws java.lang.IllegalStateException
DataBoundComponentpreventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.setDuplicateDragMessage in interface DataBoundComponentduplicateDragMessage - duplicateDragMessage Default value is "Duplicates not allowed"java.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.String getDuplicateDragMessage()
DataBoundComponentpreventDuplicates
is enabled. If set to null, duplicates will not be reported and the dragged duplicates will not be saved.getDuplicateDragMessage in interface DataBoundComponentpublic void setAddDropValues(java.lang.Boolean addDropValues)
DataBoundComponent
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
setAddDropValues in interface DataBoundComponentaddDropValues - addDropValues Default value is truepublic java.lang.Boolean getAddDropValues()
DataBoundComponent
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
getAddDropValues in interface DataBoundComponentpublic void setDropValues(java.util.Map dropValues)
DataBoundComponentaddDropValues 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
setDropValues in interface DataBoundComponentdropValues - dropValues Default value is nullpublic java.util.Map getDropValues()
DataBoundComponentaddDropValues 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
getDropValues in interface DataBoundComponentdropValues for more details. If multiple records
are being dropped, this method is called for each of them in turn.
This method returns the following:
addDropValues is falseYou can override this method if you need more complex setting of drop values than can be provided by simply supplying a dropValues object.
public void setProgressiveLoading(java.lang.Boolean progressiveLoading)
progressivelyprogressiveLoading - ProgressiveLoading,
DataSource.setProgressiveLoading(java.lang.Boolean)public java.lang.Boolean getProgressiveLoading()
progressivelyProgressiveLoading,
DataSource.getProgressiveLoading()public void setUseFlatFields(java.lang.Boolean useFlatFields)
throws java.lang.IllegalStateException
DataBoundComponentuseFlatFields 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.
setUseFlatFields in interface DataBoundComponentuseFlatFields - useFlatFields Default value is nulljava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic java.lang.Boolean getUseFlatFields()
DataBoundComponentuseFlatFields 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.
getUseFlatFields in interface DataBoundComponentpublic void setHiliteProperty(java.lang.String hiliteProperty)
DataBoundComponentid for a hilite defined on this component.setHiliteProperty in interface DataBoundComponenthiliteProperty - hiliteProperty Default value is "_hilite"public java.lang.String getHiliteProperty()
DataBoundComponentid for a hilite defined on this component.getHiliteProperty in interface DataBoundComponentpublic void editFields()
public void editHilites()
editHilites in interface DataBoundComponentpublic java.lang.String getHiliteState()
getHiliteState in interface DataBoundComponentpublic void setHiliteState(java.lang.String hiliteState)
setHiliteState in interface DataBoundComponenthiliteState - hilites state encoded as a Stringpublic void setHilites(Hilite[] hilites)
getHilites for a method of
retrieving the hilite array for storage, including hilites manually added by the user.setHilites in interface DataBoundComponenthilites - array of hilite objectspublic Hilite[] getHilites()
getHilites in interface DataBoundComponentpublic void setDragDataAction(DragDataAction dragDataAction)
DataBoundComponentsetDragDataAction in interface DataBoundComponentdragDataAction - dragDataAction Default value is Canvas.MOVEpublic DragDataAction getDragDataAction()
DataBoundComponentgetDragDataAction in interface DataBoundComponentpublic void setDragTrackerStyle(java.lang.String dragTrackerStyle)
DataBoundComponentsetDragTrackerStyle in interface DataBoundComponentdragTrackerStyle - dragTrackerStyle Default value is "gridDragTracker"public java.lang.String getDragTrackerStyle()
DataBoundComponentgetDragTrackerStyle in interface DataBoundComponentpublic void setCanAddFormulaFields(java.lang.Boolean canAddFormulaFields)
DataBoundComponentcom.smartgwt.client..FormulaBuilder.
User-added formula fields can be persisted via ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String).
setCanAddFormulaFields in interface DataBoundComponentcanAddFormulaFields - canAddFormulaFields Default value is falsepublic void addSummaryField()
DataBoundComponentcom.smartgwt.client..SummaryBuilder to create a new Summary Field. This
is equivalent to calling DataBoundComponentGen#editSummaryField with
no parameter.
addSummaryField in interface DataBoundComponentpublic void addFormulaField()
DataBoundComponentcom.smartgwt.client..FormulaBuilder to create a new Formula Field. This
is equivalent to calling DataBoundComponentGen#editFormulaField with
no parameter.
addFormulaField in interface DataBoundComponentpublic java.lang.Boolean getCanAddFormulaFields()
DataBoundComponentcom.smartgwt.client..FormulaBuilder.
User-added formula fields can be persisted via ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String).
getCanAddFormulaFields in interface DataBoundComponentpublic void setAddFormulaFieldText(java.lang.String addFormulaFieldText)
DataBoundComponentsetAddFormulaFieldText in interface DataBoundComponentaddFormulaFieldText - addFormulaFieldText Default value is "Add formula column..."public java.lang.String getAddFormulaFieldText()
DataBoundComponentgetAddFormulaFieldText in interface DataBoundComponentpublic void setEditFormulaFieldText(java.lang.String editFormulaFieldText)
DataBoundComponentsetEditFormulaFieldText in interface DataBoundComponenteditFormulaFieldText - editFormulaFieldText Default value is "Edit formula..."public java.lang.String getEditFormulaFieldText()
DataBoundComponentgetEditFormulaFieldText in interface DataBoundComponentpublic void setCanAddSummaryFields(java.lang.Boolean canAddSummaryFields)
DataBoundComponentcom.smartgwt.client..SummaryBuilder.
User-added summary fields can be persisted via ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String).
setCanAddSummaryFields in interface DataBoundComponentcanAddSummaryFields - canAddSummaryFields Default value is falsepublic java.lang.Boolean getCanAddSummaryFields()
DataBoundComponentcom.smartgwt.client..SummaryBuilder.
User-added summary fields can be persisted via ListGrid.getFieldState() and
ListGrid.setFieldState(java.lang.String).
getCanAddSummaryFields in interface DataBoundComponentpublic void setAddSummaryFieldText(java.lang.String addSummaryFieldText)
DataBoundComponentsetAddSummaryFieldText in interface DataBoundComponentaddSummaryFieldText - addSummaryFieldText Default value is "Add summary column..."public java.lang.String getAddSummaryFieldText()
DataBoundComponentgetAddSummaryFieldText in interface DataBoundComponentpublic void setEditSummaryFieldText(java.lang.String editSummaryFieldText)
DataBoundComponentsetEditSummaryFieldText in interface DataBoundComponenteditSummaryFieldText - editSummaryFieldText Default value is "Edit summary format..."public java.lang.String getEditSummaryFieldText()
DataBoundComponentgetEditSummaryFieldText in interface DataBoundComponentpublic Record[] findAll(AdvancedCriteria adCriteria)
adCriteria - AdvancedCriteria to use to filter resultspublic Record find(AdvancedCriteria adCriteria)
adCriteria - AdvancedCriteria to use to filter resultspublic int findIndex(AdvancedCriteria adCriteria)
adCriteria - AdvancedCriteria to use to filter resultspublic int findNextIndex(int startIndex,
AdvancedCriteria adCriteria,
int endIndex)
RecordList.findIndex(java.util.Map), but considering the startIndex and endIndex parameters.startIndex - first index to consideradCriteria - AdvancedCriteria to use to filter resultsendIndex - last index to considerpublic int findNextIndex(int startIndex,
AdvancedCriteria adCriteria)
RecordList.findIndex(java.util.Map), but considering the startIndex parameter.startIndex - first index to consideradCriteria - AdvancedCriteria to use to filter resultspublic void selectRecord(Record record)
DataBoundComponentRecord passed in explicitly, or by index.selectRecord in interface DataBoundComponentrecord - record (or row number) to selectpublic void selectRecord(int record)
DataBoundComponentRecord passed in explicitly, or by index.selectRecord in interface DataBoundComponentrecord - record (or row number) to selectpublic void selectRecord(int record,
boolean newState)
DataBoundComponentRecord passed in explicitly, or by index.selectRecord in interface DataBoundComponentrecord - record (or row number) to selectnewState - new selection state (if null, defaults to true)public void selectRecord(Record record, boolean newState)
DataBoundComponentRecord passed in explicitly, or by index.selectRecord in interface DataBoundComponentrecord - record (or row number) to selectnewState - new selection state (if null, defaults to true)public void selectRecords(int[] records)
DataBoundComponentRecords passed in explicitly, or by index.selectRecords in interface DataBoundComponentrecords - records (or row numbers) to selectpublic void selectRecords(int[] records,
boolean newState)
DataBoundComponentRecords passed in explicitly, or by index.selectRecords in interface DataBoundComponentrecords - records (or row numbers) to selectnewState - new selection statepublic void selectRecords(Record[] records)
DataBoundComponentRecords passed in explicitly, or by index.selectRecords in interface DataBoundComponentrecords - records (or row numbers) to selectpublic void selectRecords(Record[] records, boolean newState)
DataBoundComponentRecords passed in explicitly, or by index.selectRecords in interface DataBoundComponentrecords - records (or row numbers) to selectnewState - new selection state (if null, defaults to true)public void deselectRecord(Record record)
DataBoundComponentRecord passed in explicitly, or by index. Synonym for
selectRecord(record, false)
deselectRecord in interface DataBoundComponentrecord - record (or row number) to deselectpublic void deselectRecord(int record)
DataBoundComponentRecord passed in explicitly, or by index. Synonym for
selectRecord(record, false)
deselectRecord in interface DataBoundComponentrecord - record (or row number) to deselectpublic void deselectRecords(int[] records)
DataBoundComponentRecords passed in explicitly, or by index. Synonym
for selectRecords(records, false)
deselectRecords in interface DataBoundComponentrecords - records (or row numbers) to deselectpublic void deselectRecords(Record[] records)
DataBoundComponentRecords passed in explicitly, or by index. Synonym
for selectRecords(records, false)
deselectRecords in interface DataBoundComponentrecords - records (or row numbers) to deselectpublic void selectAllRecords()
DataBoundComponentselectAllRecords in interface DataBoundComponentpublic void deselectAllRecords()
DataBoundComponentdeselectAllRecords in interface DataBoundComponentpublic java.lang.Boolean anySelected()
DataBoundComponentanySelected in interface DataBoundComponentpublic void enableHilite(java.lang.String hiliteID)
DataBoundComponenthilites
enableHilite in interface DataBoundComponenthiliteID - ID of hilite to enablepublic void enableHilite(java.lang.String hiliteID,
boolean enable)
DataBoundComponenthilites
enableHilite in interface DataBoundComponenthiliteID - ID of hilite to enableenable - new enabled state to apply - if null, defaults to truepublic void disableHilite(java.lang.String hiliteID)
DataBoundComponentdisableHilite in interface DataBoundComponenthiliteID - ID of hilite to disablepublic void enableHiliting()
DataBoundComponentenableHiliting in interface DataBoundComponentpublic void enableHiliting(boolean enable)
DataBoundComponentenableHiliting in interface DataBoundComponentenable - new enabled state to apply - if null, defaults to truepublic void disableHiliting()
DataBoundComponentdisableHiliting in interface DataBoundComponentpublic Record[] getDragData()
DataBoundComponent
This method is consulted by
ListGrid.willAcceptDrop().
getDragData in interface DataBoundComponentRecords that are currently selected.public void transferSelectedData(DataBoundComponent source)
DataBoundComponentDataBoundComponent.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.
transferSelectedData in interface DataBoundComponentsource - source component from which the records will be tranferredpublic void transferSelectedData(DataBoundComponent source, int index)
DataBoundComponentDataBoundComponent.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.
transferSelectedData in interface DataBoundComponentsource - source component from which the records will be tranferredindex - target index (drop position) of the rows within this grid.public int getRecordIndex(Record record)
DataBoundComponentOverride in subclasses to provide more specific behaviour, for instance, when data holds a large number of records
getRecordIndex in interface DataBoundComponentrecord - the record whose index is to be retrievedpublic java.lang.String getTitleFieldValue(Record record)
DataBoundComponentOverride in subclasses
getTitleFieldValue in interface DataBoundComponentrecord - the record whose index is to be retrievedpublic void setTitleField(java.lang.String titleField)
DataBoundComponentsetTitleField in interface DataBoundComponentpublic java.lang.String getTitleField()
DataBoundComponenttitleField for databound
components."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.
getTitleField in interface DataBoundComponentpublic void setDataSource(DataSource dataSource)
DataBoundComponentWhen 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.
setDataSource in interface DataBoundComponentdataSource - DataSource to bind to. Default value is nullpublic DataSource getDataSource()
DataBoundComponentDataSource requests.getDataSource in interface DataBoundComponentpublic void setAutoFetchData(java.lang.Boolean autoFetchData)
throws java.lang.IllegalStateException
DataBoundComponentDataBoundComponent.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.
setAutoFetchData in interface DataBoundComponentautoFetchData - autoFetchDatajava.lang.IllegalStateExceptionpublic java.lang.Boolean getAutoFetchData()
DataBoundComponentDataBoundComponent.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.
getAutoFetchData in interface DataBoundComponentpublic void setAutoFetchTextMatchStyle(TextMatchStyle autoFetchTextMatchStyle) throws java.lang.IllegalStateException
DataBoundComponentautoFetchData is true, this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData() call.setAutoFetchTextMatchStyle in interface DataBoundComponentjava.lang.IllegalStateExceptionpublic TextMatchStyle getAutoFetchTextMatchStyle()
DataBoundComponentautoFetchData is true, this attribute allows the developer to specify a textMatchStyle
for the initial DataBoundComponent.fetchData() call.getAutoFetchTextMatchStyle in interface DataBoundComponentpublic void setAutoFetchAsFilter(java.lang.Boolean autoFetchAsFilter)
throws java.lang.IllegalStateException
DataBoundComponentDataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()setAutoFetchAsFilter in interface DataBoundComponentautoFetchAsFilter - autoFetchAsFilterjava.lang.IllegalStateExceptionpublic java.lang.Boolean getAutoFetchAsFilter()
DataBoundComponentDataBoundComponent.setAutoFetchData(Boolean) is true, this attribute determines whether the initial fetch operation should be
performed via DataBoundComponent.fetchData() or DataBoundComponent.filterData()getAutoFetchAsFilter in interface DataBoundComponentpublic void setInitialCriteria(Criteria initialCriteria) throws java.lang.IllegalStateException
DataBoundComponentDataBoundComponent.setAutoFetchData(Boolean) is used.setInitialCriteria in interface DataBoundComponentinitialCriteria - the initial criteriajava.lang.IllegalStateException - this property cannot be changed after the component has been createdpublic Criteria getInitialCriteria()
DataBoundComponentDataBoundComponent.setAutoFetchData(Boolean) is used.getInitialCriteria in interface DataBoundComponentpublic void fetchData()
DataBoundComponent
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.
fetchData in interface DataBoundComponentpublic void fetchData(Criteria criteria)
DataBoundComponent
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.
fetchData in interface DataBoundComponentcriteria - Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object, will be
derived by calling DynamicForm.getValuesAsCriteria()public void fetchData(Criteria criteria, DSCallback callback)
DataBoundComponent
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.
fetchData in interface DataBoundComponentcriteria - 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 requiredpublic void fetchData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
DataBoundComponent
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.
fetchData in interface DataBoundComponentcriteria - 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 requiredrequestProperties - additional properties to set on the DSRequest
that will be issuedpublic void filterData()
DataBoundComponent 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.
filterData in interface DataBoundComponentpublic void filterData(Criteria criteria)
DataBoundComponent 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.
filterData in interface DataBoundComponentcriteria - Search criteria. If a DynamicForm
is passed in as this argument instead of a raw criteria object, will be
derived by calling DynamicForm.getValuesAsCriteria()public void filterData(Criteria criteria, DSCallback callback)
DataBoundComponent 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.
filterData in interface DataBoundComponentcriteria - 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 detailspublic void filterData(Criteria criteria, DSCallback callback, DSRequest requestProperties)
DataBoundComponent 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.
filterData in interface DataBoundComponentcriteria - 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 detailsrequestProperties - for databound components only - optional additional
properties to set on the DSRequest that will be issuedpublic void invalidateCache()
DataBoundComponentthis.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.
invalidateCache in interface DataBoundComponentpublic ResultSet getResultSet()
DataBoundComponentResultSet.
Note that this method should only be called after initial data has been fetched by this DataBoundComponent.
getResultSet in interface DataBoundComponentDataBoundComponent.fetchData()public RecordList getRecordList()
DataBoundComponentRecordList.
Depending on the component configuration, the actual JavaScript instance of the returned RecordList may be one of several types:
DataSource,
the instance is generally an Array of Record.ResultSet.Tree.
To access the ungrouped record list regardless of grouping status, use
isGrouped() ? getOriginalRecordList() : getRecordList()
TreeGrid,
the instance is a ResultTree.getRecordList in interface DataBoundComponentpublic com.google.gwt.core.client.JavaScriptObject getDataAsJSList()
getDataAsJSList in interface DataBoundComponentpublic void exportData()
DataBoundComponentDataSource
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.
exportData in interface DataBoundComponentDataBoundComponentMethods overview and related methodspublic void exportData(DSRequest requestProperties)
DataBoundComponentDataSource
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.
exportData in interface DataBoundComponentrequestProperties - additional properties to set on the DSRequest that will be issuedDataBoundComponentMethods overview and related methodspublic com.google.gwt.event.shared.HandlerRegistration addFetchDataHandler(FetchDataHandler handler)
Notification function fired on fetchData() or filterData()
addFetchDataHandler in interface HasFetchDataHandlershandler - the filterData handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDropCompleteHandler(DropCompleteHandler handler)
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).addDropCompleteHandler in interface HasDropCompleteHandlershandler - the DropCompleteHandlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addDragCompleteHandler(DragCompleteHandler handler)
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).addDragCompleteHandler in interface HasDragCompleteHandlershandler - the DropCompleteHandlerHandlerRegistration used to remove this handlerpublic com.smartgwt.logicalstructure.core.LogicalStructureObject setLogicalStructure(com.smartgwt.logicalstructure.widgets.calendar.CalendarLogicalStructure s)
public com.smartgwt.logicalstructure.core.LogicalStructureObject getLogicalStructure()
getLogicalStructure in interface LogicalStructuregetLogicalStructure in class Canvas