Class AbstractEventEditor
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.nebula.widgets.compositetable.timeeditor.AbstractEventEditor
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
- Direct Known Subclasses:
DayEditor
,MonthCalendar
public abstract class AbstractEventEditor
extends org.eclipse.swt.widgets.Composite
- Since:
- 3.2
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractEventEditor(org.eclipse.swt.widgets.Composite parent, int style)
-
Method Summary
Modifier and Type Method Description void
addItemInsertHandler(CalendarableItemEventHandler handler)
Adds the handler to the collection of handlers who will be notified when a CalendarableItem is inserted in the receiver, by sending it one of the messages defined in theCalendarableItemInsertHandler
abstract class.protected boolean
fireEvents(CalendarableItemEvent e, java.util.List handlers)
NewEvent
fireInsert(java.util.Date date, boolean allDayEvent)
Requests that the event editor attempt to insert a new element by calling its registered insert handlersint
getDefaultEventDuration()
Returns the default duration of a new event, in hours.abstract void
refresh()
Tells the IEventEditor to refresh all days in its display.void
removeItemInsertHandler(CalendarableItemEventHandler handler)
Removes the handler from the collection of handlers who will be notified when a CalendarableItem is inserted into the receiver, by sending it one of the messages defined in theCalendarableItemInsertHandler
abstract class.void
setDefaultEventDuration(int defaultEventDuration)
Sets the default duration of a new event, in hours.Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
-
Constructor Details
-
AbstractEventEditor
public AbstractEventEditor(org.eclipse.swt.widgets.Composite parent, int style)- Parameters:
parent
- Parent controlstyle
- SWT style bit
-
-
Method Details
-
refresh
public abstract void refresh()Tells the IEventEditor to refresh all days in its display. -
fireInsert
Requests that the event editor attempt to insert a new element by calling its registered insert handlers- Parameters:
date
- The date/time on which to request the insert. The actual date on which the insert is performed may be different. This is a HINT.allDayEvent
- Indicates if the new event should be an all-day event. This is a HINT; the actual event inserted may be a timed event.- Returns:
- NewEvent a NewEvent object describing the event that was inserted.
-
addItemInsertHandler
Adds the handler to the collection of handlers who will be notified when a CalendarableItem is inserted in the receiver, by sending it one of the messages defined in theCalendarableItemInsertHandler
abstract class.itemInserted
is called when the CalendarableItem is inserted.- Parameters:
handler
- the handler which should be notified- Throws:
java.lang.IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the handler is null
org.eclipse.swt.SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- See Also:
CalendarableItemInsertHandler
,removeItemInsertHandler(org.eclipse.nebula.widgets.compositetable.day.CalendarableItemEventHandler)
-
removeItemInsertHandler
Removes the handler from the collection of handlers who will be notified when a CalendarableItem is inserted into the receiver, by sending it one of the messages defined in theCalendarableItemInsertHandler
abstract class.itemInserted
is called when the CalendarableItem is inserted.- Parameters:
handler
- the handler which should be notified- Throws:
java.lang.IllegalArgumentException
-- ERROR_NULL_ARGUMENT - if the handler is null
org.eclipse.swt.SWTException
-- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- See Also:
CalendarableItemInsertHandler
,addItemInsertHandler(org.eclipse.nebula.widgets.compositetable.day.CalendarableItemEventHandler)
-
getDefaultEventDuration
public int getDefaultEventDuration()Returns the default duration of a new event, in hours.- Returns:
- int the number of hours a new event occupies by default.
-
setDefaultEventDuration
public void setDefaultEventDuration(int defaultEventDuration)Sets the default duration of a new event, in hours.- Parameters:
defaultEventDuration
- int the number of hours a new event occupies by default.
-
fireEvents
-