org.olat.commons.calendar.ui.components
Class WeeklyCalendarComponent

java.lang.Object
  extended by org.olat.core.gui.components.Component
      extended by org.olat.commons.calendar.ui.components.WeeklyCalendarComponent

public class WeeklyCalendarComponent
extends Component


Field Summary
static java.lang.String CMD_ADD
           
static java.lang.String CMD_EDIT
           
static java.lang.String ID_CMD
           
static java.lang.String ID_PARAM
           
static java.lang.String ID_PARAM_SEPARATOR
           
 
Constructor Summary
WeeklyCalendarComponent(java.lang.String name, java.util.Collection calendarWrappers, int viewStartHour, Translator translator)
           
 
Method Summary
 int getDisplayDays()
           
 ComponentRenderer getHTMLRendererSingleton()
           
 KalendarRenderWrapper getKalendarRenderWrapper(java.lang.String calendarID)
           
 int getWeekOfYear()
           
 int getYear()
           
 void nextWeek()
          Go back to next week.
 void previousWeek()
          Go back to previous week.
 void setDate(java.util.Date gotoDate)
          Set focus of calendar-component to certain date.
 void setDisplayDays(int displayDays)
          Set how many days from the beginning of a week should be displayd (e.g.
 void setFocus(int year, int weekOfYear)
          Set this calendars focus to year/weekOfYear.
 void setKalendars(java.util.Collection kalendarRenderWrappers)
           
 void validate(UserRequest ureq, ValidationResult vr)
          called just before the rendering of the -whole tree- takes place, so e.g.
 
Methods inherited from class org.olat.core.gui.components.Component
addListener, debuginfoGetListeners, dispatchRequest, getAndClearLatestFiredEvent, getComponentName, getDispatchID, getExtendedDebugInfo, getLatestDispatchedController, getListenerInfo, getParent, getSpanAsDomReplaceable, getTimestamp, getTranslator, isDirty, isDirtyForUser, isDomReplaceable, isEnabled, isVisible, setDirty, setDomReplaceable, setEnabled, setSpanAsDomReplaceable, setVisible, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_CMD

public static final java.lang.String ID_CMD
See Also:
Constant Field Values

ID_PARAM

public static final java.lang.String ID_PARAM
See Also:
Constant Field Values

ID_PARAM_SEPARATOR

public static final java.lang.String ID_PARAM_SEPARATOR
See Also:
Constant Field Values

CMD_ADD

public static final java.lang.String CMD_ADD
See Also:
Constant Field Values

CMD_EDIT

public static final java.lang.String CMD_EDIT
See Also:
Constant Field Values
Constructor Detail

WeeklyCalendarComponent

public WeeklyCalendarComponent(java.lang.String name,
                               java.util.Collection calendarWrappers,
                               int viewStartHour,
                               Translator translator)
Method Detail

setFocus

public void setFocus(int year,
                     int weekOfYear)
Set this calendars focus to year/weekOfYear.

Parameters:
year -
weekOfYear -

setDisplayDays

public void setDisplayDays(int displayDays)
Set how many days from the beginning of a week should be displayd (e.g. 7=sholw week; 5=MO-FI)

Parameters:
displayDays -

getHTMLRendererSingleton

public ComponentRenderer getHTMLRendererSingleton()
Specified by:
getHTMLRendererSingleton in class Component
See Also:
Component.getHTMLRendererSingleton()

getKalendarRenderWrapper

public KalendarRenderWrapper getKalendarRenderWrapper(java.lang.String calendarID)

setKalendars

public void setKalendars(java.util.Collection kalendarRenderWrappers)

getDisplayDays

public int getDisplayDays()

getWeekOfYear

public int getWeekOfYear()

getYear

public int getYear()

validate

public void validate(UserRequest ureq,
                     ValidationResult vr)
Description copied from class: Component
called just before the rendering of the -whole tree- takes place, so e.g. lazy fetching can be implemented, or issueing a request for a new moduleUri (e.g. for CPComponent, so that the browser loads images correctly). only called when the component is visible

Overrides:
validate in class Component
See Also:
Component.validate(org.olat.core.gui.UserRequest, org.olat.core.gui.render.ValidationResult)

previousWeek

public void previousWeek()
Go back to previous week.


nextWeek

public void nextWeek()
Go back to next week.


setDate

public void setDate(java.util.Date gotoDate)
Set focus of calendar-component to certain date. Calculate correct week-of-year and year for certain date.

Parameters:
gotoDate -