PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/ftr-gwt-library-date/src/site/xdoc/custom.xml

http://ftr-gwt-library.googlecode.com/
XML | 70 lines | 42 code | 28 blank | 0 comment | 0 complexity | af1f983d4990320d1aef7b13ec1b8703 MD5 | raw file
 1<?xml version="1.0" encoding="ISO-8859-1"?>
 2<document>
 3  <properties>
 4    <author email="mnouwens@future-earth.eu">Marteijn Nouwens</author>
 5    <title>Create a custom renderer</title>
 6  </properties>
 7  <body>
 8    <p>
 9
10    For most situation you need to create a custom renderer for using your own data object. The object from your back-end must implement the EventData interface. This method defines control methods for the calander like changing the date/time on an object.
11
12    The class EventData is supplied in a seperate jar file that can be included in a interface defenition for the back end.
13
14    Create a subclass of AbstractDateRenderer to define handling of events that are thrown by the calander component.
15
16
17    <h2>public void createNewAfterClick(Date currentDate, DateEventListener listener)</h2>
18
19    This method is called when a mouse click is detected in a calander compenent.
20
21    In the default renderer a dialog is shown. But other things could be done. Here also. When done fire a DateEvent with the action to be taken.
22
23    Action that can be fired are:
24    <ul>
25    <li>  public final static int ADD = 0;</li>
26    <li>  public final static int UPDATE = 1;</li>
27    <li>  public final static int REMOVE = 2;</li>
28    <li>  public final static int DRAG_DROP = 3;</li>
29    <li>  public final static int EDIT = 4;</li>
30    </ul>
31
32    The drag and drop option should not be used when implementing a custom renderer.
33
34    <h2>public void createNewAfterClick(Date currentDate, Date endDate, DateEventListener listener)</h2>
35
36    This method is called when a mouse drag event for a time frame in a day view is detected. It's basicly the same as the previous method with the exaption that an end time is set.
37
38    <h2>public void editAfterClick(EventData data, DateEventListener listener)</h2>
39    The event that will be thrown when an event is clicked. The default component will throw this event but this event can also be invoked by a custom button which you place on you custom rendered component.
40
41    <h2>public DayField createDayField(EventData newData)</h2>
42
43    Here your renderer should create the DayField instance and add the data.
44
45
46    <h2>public AbstractMonthField createMonthPanel(EventData newData) </h2>
47
48    Here your renderer should create the AbstractMonthField instance and add the data.
49
50
51    <h2>public boolean supportDayView()</h2>
52
53    Return's whether the renderer supports the DaysView.
54
55    <h2>public boolean supportMonthView()</h2>
56
57    Return's whether the renderer supports the MonthView.
58
59    <h2>public boolean supportWeekView()</h2>
60
61    Return's whether the renderer supports the WeekView.
62
63    <h2>public boolean enableDragAndDrop()</h2>
64
65    If drag and drop should be enable return true here. If false is returned the drag and drop will be disable and the panel will be shown without drag and drop handles.
66
67
68      </p>
69  </body>
70</document>