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

Public Member Functions

void refresh ()
 
void afterCompose ()
 
- Public Member Functions inherited from org.turro.zkoss.input.CollectionListbox< V >
 CollectionListbox ()
 
 CollectionListbox (Collection< V > collection)
 
void updateCollection ()
 
void updateCollection (Collection< V > collection)
 
boolean isAllowNull ()
 
void setAllowNull (boolean allowNull)
 
Collection< V > getCollection ()
 
void setCollection (Collection< V > collection)
 
boolean isNullAtBottom ()
 
void setNullAtBottom (boolean nullAtBottom)
 
String getNullLabel ()
 
void setNullLabel (String nullLabel)
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericListbox< V >
 GenericListbox ()
 
void setDisabled (boolean value)
 
void clearItems ()
 
void setObjectValue (V value)
 
void setObjectValues (Collection< V > collection)
 
getObjectValue ()
 
Collection< V > getObjectValues ()
 
Collection< V > getDeselectedObjectValues ()
 
boolean isSelectFirst ()
 
void setSelectFirst (boolean selectFirst)
 
Set getDeselectedItems ()
 
void sort ()
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 

Protected Member Functions

String convertToString (ICalendarEvent v)
 
void beforeAppend (Listitem li)
 
- Protected Member Functions inherited from org.turro.zkoss.input.CollectionListbox< V >
void populateList ()
 
boolean equals (V value, V obj)
 
abstract String convertToString (V v)
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.zkoss.input.CollectionListbox< V >
static final String ITEM_SEPARATOR = "|||"
 
- Protected Attributes inherited from org.turro.zkoss.input.GenericListbox< V >
boolean populated = false
 

Detailed Description

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

Definition at line 41 of file ScheduleListbox.java.

Member Function Documentation

◆ afterCompose()

void org.turro.calendar.ScheduleListbox.afterCompose ( )

Reimplemented from org.turro.zkoss.input.GenericListbox< V >.

Definition at line 82 of file ScheduleListbox.java.

82  {
83  addHeaders();
84  super.afterCompose();
85  if(firstTodo != null) {
86  setSelectedItem(firstTodo);
87  }
88  }

◆ beforeAppend()

void org.turro.calendar.ScheduleListbox.beforeAppend ( Listitem  li)
protected

Reimplemented from org.turro.zkoss.input.CollectionListbox< V >.

Definition at line 70 of file ScheduleListbox.java.

70  {
71  ICalendarEvent ce = li.getValue();
72  li.setStyle("vertical-align:top;color:" + ce.getHeaderColor() + ";");
73  if(now.after(ce.getBeginDate())) {
74  li.setSclass("invalid");
75  li.setStyle(li.getStyle() + "background-color:#ddd;");
76  } else if(firstTodo == null) {
77  firstTodo = li;
78  }
79  }
Here is the call graph for this function:

◆ convertToString()

String org.turro.calendar.ScheduleListbox.convertToString ( ICalendarEvent  v)
protected

Definition at line 62 of file ScheduleListbox.java.

62  {
63  return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Application.getUsedLocale())
64  .format(v.getBeginDate()) + ITEM_SEPARATOR +
65  v.getTitle() + SUBITEM_SEPARATOR +
66  Strings.truncateAndWarn(v.getContent(), 50).replaceAll("\\n", SUBITEM_SEPARATOR);
67  }
Here is the call graph for this function:

◆ refresh()

void org.turro.calendar.ScheduleListbox.refresh ( )

Definition at line 46 of file ScheduleListbox.java.

46  {
47  firstTodo = null;
48  now = new Date();
49  Collection events = CalendarPlugin.getCalendarFor(
50  Authentication.getIContact(),
51  new CheckDate(now).addMonths(-3).getDate(),
52  new CheckDate(now).addMonths(1).getDate());
53  if(events != null) {
54  updateCollection(new CalendarEventSet(events, true));
55  if(firstTodo != null) {
56  setSelectedItem(firstTodo);
57  }
58  }
59  }
Here is the call graph for this function:
Here is the caller graph for this function:

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