BrightSide Workbench Full Report + Source Code
org.turro.calendar.CalendarComposer Class Reference
Inheritance diagram for org.turro.calendar.CalendarComposer:
Collaboration diagram for org.turro.calendar.CalendarComposer:

Public Member Functions

void onClick $butDay ()
 
void onClick $butWeek ()
 
void onClick $butMonth ()
 
void onClick $butPrior ()
 
void onClick $butNext ()
 
void onClick $butToday ()
 
void onClick $butRefresh ()
 
void onClick $butCopy ()
 
void onSelect $schedule ()
 
void onDoubleClick $schedule ()
 
void onEventEdit $calendar (CalendarsEvent event)
 
void onEventCreate $calendar (CalendarsEvent event)
 
void onEventUpdate $calendar (CalendarsEvent event)
 
void onDayClick $calendar (ForwardEvent event)
 
void onChange $currentBox ()
 
void doAfterCompose (Component comp) throws Exception
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 53 of file CalendarComposer.java.

Member Function Documentation

◆ $butCopy()

void onClick org.turro.calendar.CalendarComposer.$butCopy ( )

Definition at line 101 of file CalendarComposer.java.

101  {
102  Clients.showNotification(
103  I_.get("Copy to clipboard (Ctrl-C)") +
104  ":<br/><br/>" +
105  ElephantContext.getServerUrl("http") +
106  "/_reqxdc_/calendar?ses=" +
107  Strings.obfuscate(Authentication.getIContact().getId()),
108  true);
109  }
Here is the call graph for this function:

◆ $butDay()

void onClick org.turro.calendar.CalendarComposer.$butDay ( )

Definition at line 61 of file CalendarComposer.java.

61  {
62  calendar.setMode(CalendarMode.DAY_MODE);
63  calendar.refreshModel();
64  setCurrentDate();
65  }
void setMode(CalendarMode mode)
Here is the call graph for this function:

◆ $butMonth()

void onClick org.turro.calendar.CalendarComposer.$butMonth ( )

Definition at line 73 of file CalendarComposer.java.

73  {
74  calendar.setMode(CalendarMode.MONTH_MODE);
75  calendar.refreshModel();
76  setCurrentDate();
77  }
Here is the call graph for this function:

◆ $butNext()

void onClick org.turro.calendar.CalendarComposer.$butNext ( )

Definition at line 84 of file CalendarComposer.java.

84  {
85  calendar.nextPage();
86  setCurrentDate();
87  }
Here is the call graph for this function:

◆ $butPrior()

void onClick org.turro.calendar.CalendarComposer.$butPrior ( )

Definition at line 79 of file CalendarComposer.java.

79  {
80  calendar.previousPage();
81  setCurrentDate();
82  }
Here is the call graph for this function:

◆ $butRefresh()

void onClick org.turro.calendar.CalendarComposer.$butRefresh ( )

Definition at line 95 of file CalendarComposer.java.

95  {
96  calendar.refreshModel();
97  schedule.refresh();
98  setCurrentDate();
99  }
Here is the call graph for this function:

◆ $butToday()

void onClick org.turro.calendar.CalendarComposer.$butToday ( )

Definition at line 89 of file CalendarComposer.java.

89  {
90  calendar.setCurrentDate(java.util.Calendar.getInstance().getTime());
91  calendar.refreshModel();
92  setCurrentDate();
93  }
Here is the call graph for this function:

◆ $butWeek()

void onClick org.turro.calendar.CalendarComposer.$butWeek ( )

Definition at line 67 of file CalendarComposer.java.

67  {
68  calendar.setMode(CalendarMode.WEEK_MODE);
69  calendar.refreshModel();
70  setCurrentDate();
71  }
Here is the call graph for this function:

◆ $calendar() [1/4]

void onEventEdit org.turro.calendar.CalendarComposer.$calendar ( CalendarsEvent  event)

Definition at line 135 of file CalendarComposer.java.

135  {
136  UserCalendarEvent calendarEvent = (UserCalendarEvent) event.getCalendarEvent();
137  if(!Strings.isBlank(calendarEvent.getPath())) {
138  IElephantEntity iee = Entities.getController(calendarEvent.getPath());
139  Object entity = iee.getEntity();
140  if(entity != null) {
141  iee.showEntity();
142  } else {
143  iee.showPath();
144  }
145  }
146  }
Here is the call graph for this function:

◆ $calendar() [2/4]

void onEventCreate org.turro.calendar.CalendarComposer.$calendar ( CalendarsEvent  event)

Definition at line 148 of file CalendarComposer.java.

148  {
149  if(calendarEventCallback != null) {
150  calendarEventCallback.onCreate(event.getBeginDate(), event.getEndDate());
151  Events.postEvent(new Event(Events.ON_CLOSE, Components.from(calendar).parent(Window.class)));
152  schedule.refresh();
153  } else {
154  new CalendarProcess(
155  CalendarEventPlugin.getCalendarEventFor(
156  Authentication.getIContact(),
157  null, null,
158  event.getBeginDate(), event.getEndDate(),
159  null, CalendarEventPlugin.CREATE)
160  ).process(new Command() {
161  @Override
162  public Object execute(Context context) {
163  calendar.refreshModel();
164  setCurrentDate();
165  schedule.refresh();
166  return null;
167  }
168  });
169  }
170  }
abstract void onCreate(Date from, Date to)
Here is the call graph for this function:

◆ $calendar() [3/4]

void onEventUpdate org.turro.calendar.CalendarComposer.$calendar ( CalendarsEvent  event)

Definition at line 172 of file CalendarComposer.java.

172  {
173  UserCalendarEvent calendarEvent = (UserCalendarEvent) event.getCalendarEvent();
174  if(!Strings.isBlank(calendarEvent.getPath())) {
175  if(calendarEventCallback != null && calendarEvent.getPath().equals(calendarEventCallback.getPath())) {
176  calendarEventCallback.onUpdate(event.getBeginDate(), event.getEndDate());
177  Events.postEvent(new Event(Events.ON_CLOSE, Components.from(calendar).parent(Window.class)));
178  schedule.refresh();
179  setTooltips();
180  } else {
181  new CalendarProcess(
182  CalendarEventPlugin.getCalendarEventFor(
183  Authentication.getIContact(),
184  calendarEvent.getBeginDate(), calendarEvent.getEndDate(),
185  event.getBeginDate(), event.getEndDate(),
186  calendarEvent.getPath(), CalendarEventPlugin.UPDATE)
187  ).process(new Command() {
188  @Override
189  public Object execute(Context context) {
190  calendar.refreshModel();
191  schedule.refresh();
192  setTooltips();
193  return null;
194  }
195  });
196  }
197  }
198  }
abstract void onUpdate(Date from, Date to)
Here is the call graph for this function:

◆ $calendar() [4/4]

void onDayClick org.turro.calendar.CalendarComposer.$calendar ( ForwardEvent  event)

Definition at line 200 of file CalendarComposer.java.

200  {
201  calendar.setCurrentDate((Date) event.getOrigin().getData());
202  if(calendar.getMode() == CalendarMode.MONTH_MODE) {
203  calendar.setMode(CalendarMode.WEEK_MODE);
204  } else if(calendar.getMode() == CalendarMode.WEEK_MODE) {
205  calendar.setMode(CalendarMode.DAY_MODE);
206  }
207  calendar.refreshModel();
208  setCurrentDate();
209  }
Here is the call graph for this function:

◆ $currentBox()

void onChange org.turro.calendar.CalendarComposer.$currentBox ( )

Definition at line 211 of file CalendarComposer.java.

211  {
212  calendar.setCurrentDate(currentBox.getValue());
213  calendar.refreshModel();
214  setCurrentDate();
215  }
Here is the call graph for this function:

◆ $schedule() [1/2]

void onSelect org.turro.calendar.CalendarComposer.$schedule ( )

Definition at line 111 of file CalendarComposer.java.

111  {
112  ICalendarEvent ce = schedule.getObjectValue();
113  if(ce != null) {
114  calendar.setCurrentDate(ce.getBeginDate());
115  calendar.refreshModel();
116  setCurrentDate();
117  }
118  }
Here is the call graph for this function:

◆ $schedule() [2/2]

void onDoubleClick org.turro.calendar.CalendarComposer.$schedule ( )

Definition at line 120 of file CalendarComposer.java.

120  {
121  ICalendarEvent ce = schedule.getObjectValue();
122  if(ce != null) {
123  if(!Strings.isBlank(ce.getPath())) {
124  IElephantEntity iee = Entities.getController(ce.getPath());
125  Object entity = iee.getEntity();
126  if(entity != null) {
127  iee.showEntity();
128  } else {
129  iee.showPath();
130  }
131  }
132  }
133  }
Here is the call graph for this function:

◆ doAfterCompose()

void org.turro.calendar.CalendarComposer.doAfterCompose ( Component  comp) throws Exception

Definition at line 238 of file CalendarComposer.java.

238  {
239  super.doAfterCompose(comp);
240  calendarEventCallback = (CalendarEventCallback) Executions.getCurrent().getArg().get("eventCallback");
241  setCurrentDate();
242  schedule.refresh();
243  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: