|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.ControlPortionPainter com.cc.framework.ui.painter.def.scheduler.DefSchedulerViewPainter
Scheduler View painter. This Painter creates the View Part of the Scheduling Calendar Control
Nested Class Summary | |
protected static class |
DefSchedulerViewPainter.CompositeElement
Composite HTML element |
Field Summary | |
protected static int |
DATEFORMAT_DATETIME
Date format: yyyy.MM.dd 'at' h:mm a |
protected static int |
DATEFORMAT_DAY
Date format: d. |
protected static int |
DATEFORMAT_DETAIL
Date format: variable |
protected static int |
DATEFORMAT_HOUR
Date format: variable |
protected static int |
DATEFORMAT_MONTH_OF_YEAR
Date format: MMMMM yyyy |
protected static int |
DATEFORMAT_TIME
Date format: h:mm a |
protected static int |
DATEFORMAT_WEEK
Date format: 'Week' w 'in' yyyy |
protected static int |
DATEFORMAT_WEEKDAY
Date format: EEE, d MMM yyyy |
protected static int |
DATEFORMAT_WEEKDAY_SHORT
Date format: EEE, d MMM |
private java.util.Map |
formatterCache
This is a cache for DateFormat objects |
protected static int |
LABELFORMAT_LONG
Long Label Format |
protected static int |
LABELFORMAT_SHORT
Short Label Format |
private java.util.Collection |
popups
Popup Window List |
protected static int |
STATE_APPOINTMENTS
This flag is set when the day has appointments assigned |
protected static int |
STATE_DAY_IN_MONTH
Flag for a day that belongs to the selected month |
protected static int |
STATE_FIRST_DAY
Flag for the first visible Day of the month |
protected static int |
STATE_FIRST_MONTH
Flag for the first visible month |
protected static int |
STATE_HIDDEN
This flag is set when the day should be hidden |
protected static int |
STATE_LAST_MONTH
Flag for the last visible month |
protected static int |
STATE_LEFTMOST_MONTH
Flag for the leftmost month |
protected static int |
STATE_RIGHTMOST_MONTH
Flag for the rightmost month |
protected static int |
STATE_TODAY
Flag for the day that is the current day |
private java.util.Calendar |
today
The "today" date |
Fields inherited from class com.cc.framework.ui.painter.ControlPortionPainter |
|
Constructor Summary | |
DefSchedulerViewPainter()
Creates a new ViewPainter |
Method Summary | |
protected void |
addPopup(PopupElement popup)
Adds a popup Window to the popup Window List for this control |
protected PopupElement |
addPopupWindow(java.util.Calendar date,
Appointment[] appointments,
int shown,
org.apache.ecs.ConcreteElement popupAnchor)
This method creates an appointment popup window witch is then added to the internal popup window list of the control. |
protected PopupElement |
addPopupWindow(java.lang.String title,
java.util.Calendar date,
Appointment[] appointments,
org.apache.ecs.ConcreteElement popupAnchor)
This method creates an appointment popup window witch is then added to the internal popup window list of the control. |
protected org.apache.ecs.html.IMG |
createClockImage(java.util.Calendar date)
Creates a image with a clock symbol for the given time |
protected java.text.DateFormat |
createDateFormatter(int formatterId,
java.util.Locale locale)
Creates a formatter object for the given format id |
protected org.apache.ecs.ConcreteElement |
createNavigationButton(java.util.Calendar cal,
SchedulerView view,
boolean up)
Creates the Previous Button |
protected org.apache.ecs.ConcreteElement |
doCreateAppointment(java.util.Calendar date,
Appointment appointment,
int labelFormat)
Creates the HTML element for an simple appointment |
protected org.apache.ecs.ConcreteElement |
doCreateAppointmentList(java.util.Calendar date,
Appointment[] appointments,
int labelFormat)
Creates a appointment list. |
protected abstract org.apache.ecs.ConcreteElement |
doCreateBody()
This method creates the Body of the Scheduling Calendar Control |
protected org.apache.ecs.ConcreteElement |
doCreateHeader()
Creates a navigation header element |
protected org.apache.ecs.ConcreteElement |
doCreateMoreButton(java.util.Calendar date,
Appointment[] appointments,
int shown)
Creates the "more..." |
abstract org.apache.ecs.ConcreteElement |
doCreateNavigationButton(boolean up)
Creates the Roll-Button |
org.apache.ecs.ConcreteElement |
doCreateView()
This method creates the View Part of the Scheduling Calendar Control |
protected java.lang.String |
getAppointmentLabel(java.util.Calendar date,
Appointment appointment,
int labelFormat)
Creates the Appointment Label |
protected java.lang.String |
getAppointmentTimeStr(java.util.Calendar date,
Appointment appointment)
Creates a time string for the given appointment |
protected java.lang.String |
getAppointmentTooltip(java.util.Calendar date,
Appointment appointment,
int labelFormat)
Creates a tooltip for the given appointment |
protected SchedulerControl |
getCtrl()
Liefert das Kontrollelement |
protected java.text.DateFormat |
getDateFormat(int formatterId)
Retrieves the formatter for the given format id |
protected java.lang.String |
getDayClass(int state)
Returns the HTML class for a given days state |
protected int |
getDayOfWeekMask()
this method calculates a mask that contains all the visible days. |
protected int |
getDayState(CalendarIterator iter,
boolean first,
int inherit)
Retrieves the state for the given Day |
java.lang.String |
getDetail()
Retrieves the Detail Text for the Scheduler Control. |
protected int |
getFirstDayOfWeek()
Retrieves the index of the first day of the week |
protected java.util.Iterator |
getPopups()
|
protected ImageModel |
getPriorityImage(AppointmentPriority priority)
Retrieves the Image for the given Appointment Priority |
protected boolean |
hasPopups()
|
protected boolean |
markAsToday(java.util.Calendar date)
Checks if the given Date should be marked as today |
void |
setControlPainter(ControlPainter ctrlPainter)
Sets the ControlPainter |
protected boolean |
showDay(int dayOfWeek)
this method checks if a given day should be displayed. |
protected boolean |
showFrame()
Checks if the frame should be painted |
Methods inherited from class com.cc.framework.ui.painter.ControlPortionPainter |
attr, attr, attr, createActionPainter, createActionPainter, createImage, createImage, createImage, createSpacer, getColor, getControlPainter, getElementClass, getFrameworkString, getFrameworkString, getImage, getImage, getImageSrc, getImageSrc, getLocale, getPageContext, getPainterContext, getPrincipal, getSafeLocale, html, html, html, isRunAtClient, localize, removeHtml, removeHtml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int DATEFORMAT_DETAIL
protected static final int DATEFORMAT_DAY
protected static final int DATEFORMAT_WEEKDAY
protected static final int DATEFORMAT_WEEKDAY_SHORT
protected static final int DATEFORMAT_WEEK
protected static final int DATEFORMAT_MONTH_OF_YEAR
protected static final int DATEFORMAT_TIME
protected static final int DATEFORMAT_DATETIME
protected static final int DATEFORMAT_HOUR
protected static final int STATE_FIRST_DAY
protected static final int STATE_DAY_IN_MONTH
protected static final int STATE_TODAY
protected static final int STATE_HIDDEN
protected static final int STATE_APPOINTMENTS
protected static final int STATE_FIRST_MONTH
protected static final int STATE_LAST_MONTH
protected static final int STATE_LEFTMOST_MONTH
protected static final int STATE_RIGHTMOST_MONTH
protected static final int LABELFORMAT_SHORT
protected static final int LABELFORMAT_LONG
private java.util.Calendar today
private java.util.Map formatterCache
private java.util.Collection popups
Constructor Detail |
public DefSchedulerViewPainter()
Method Detail |
public void setControlPainter(ControlPainter ctrlPainter)
ControlPortionPainter
setControlPainter
in class ControlPortionPainter
ctrlPainter
- The Control PainterControlPortionPainter.setControlPainter(com.cc.framework.ui.painter.ControlPainter)
protected SchedulerControl getCtrl()
protected final int getFirstDayOfWeek()
public java.lang.String getDetail()
protected boolean showFrame()
true
if the frame should be paintedprotected boolean markAsToday(java.util.Calendar date)
date
- The date to check
true
if the day should be marked as todayprotected int getDayOfWeekMask()
protected boolean showDay(int dayOfWeek)
dayOfWeek
- the day
true
if the day should be shownprotected java.text.DateFormat getDateFormat(int formatterId)
formatterId
- the id of the formatter (DATEFORMAT_xxxx constant)
protected java.text.DateFormat createDateFormatter(int formatterId, java.util.Locale locale)
formatterId
- the id of the formatter (DATEFORMAT_xxxx constant)locale
- the locale
protected ImageModel getPriorityImage(AppointmentPriority priority)
priority
- Priority
protected int getDayState(CalendarIterator iter, boolean first, int inherit)
iter
- iteratorfirst
- indicates if this is the first visible day of the monthinherit
- the state that this day should inherit
protected java.lang.String getDayClass(int state)
state
- days state
protected PopupElement addPopupWindow(java.util.Calendar date, Appointment[] appointments, int shown, org.apache.ecs.ConcreteElement popupAnchor)
date
- The dateappointments
- The list of all available appointments for the dayshown
- the number of shown appointmentspopupAnchor
- The anchor element for the popup window
protected PopupElement addPopupWindow(java.lang.String title, java.util.Calendar date, Appointment[] appointments, org.apache.ecs.ConcreteElement popupAnchor)
title
- the popup windows titledate
- the dateappointments
- appointments listpopupAnchor
- the anchor element for the popup window
protected org.apache.ecs.ConcreteElement doCreateAppointmentList(java.util.Calendar date, Appointment[] appointments, int labelFormat)
date
- the day for which to create the appointment listappointments
- the appointments for that daylabelFormat
- the Label format (LABELFORMAT_xxx) be generated
protected org.apache.ecs.html.IMG createClockImage(java.util.Calendar date)
date
- The current date and time
protected java.lang.String getAppointmentLabel(java.util.Calendar date, Appointment appointment, int labelFormat)
date
- The concrete day dateappointment
- The appointmentlabelFormat
- the Label format (LABELFORMAT_xxx) be generated
protected java.lang.String getAppointmentTooltip(java.util.Calendar date, Appointment appointment, int labelFormat)
date
- The concrete day dateappointment
- The appointmentlabelFormat
- the Label format (LABELFORMAT_xxx) be generated
protected java.lang.String getAppointmentTimeStr(java.util.Calendar date, Appointment appointment)
date
- The concrete day dateappointment
- The appointment
protected org.apache.ecs.ConcreteElement doCreateAppointment(java.util.Calendar date, Appointment appointment, int labelFormat)
date
- The dateappointment
- The appointmentlabelFormat
- the Label format (LABELFORMAT_xxx) be generated
protected org.apache.ecs.ConcreteElement doCreateHeader()
null
protected org.apache.ecs.ConcreteElement doCreateMoreButton(java.util.Calendar date, Appointment[] appointments, int shown)
date
- The dateappointments
- The list of all available appointments for the dayshown
- the number of shown appointments
protected org.apache.ecs.ConcreteElement createNavigationButton(java.util.Calendar cal, SchedulerView view, boolean up)
cal
- The Date to change toview
- The Viewup
- Indicates if this a up or down button
public abstract org.apache.ecs.ConcreteElement doCreateNavigationButton(boolean up)
up
- true
if the button rolls up
protected abstract org.apache.ecs.ConcreteElement doCreateBody()
public final org.apache.ecs.ConcreteElement doCreateView()
protected void addPopup(PopupElement popup)
popup
- The Popup window to addprotected boolean hasPopups()
true
if the control has any popup windowsprotected java.util.Iterator getPopups()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |