com.cc.framework.ui.painter.def.scheduler
Class DefDayViewPainter

java.lang.Object
  extended bycom.cc.framework.ui.painter.ControlPortionPainter
      extended bycom.cc.framework.ui.painter.def.scheduler.DefSchedulerViewPainter
          extended bycom.cc.framework.ui.painter.def.scheduler.DefDayViewPainter
Direct Known Subclasses:
DefWorkWeekPainter

public class DefDayViewPainter
extends DefSchedulerViewPainter

The Day View Calendar Painter

Version:
$Revision: 1.34 $
Author:
Harald Schulz

Nested Class Summary
protected  class DefDayViewPainter.AppointmentInfo
          This class adds some layout information to an appointment
protected  class DefDayViewPainter.DayInfo
          Column Layout Information
 
Nested classes inherited from class com.cc.framework.ui.painter.def.scheduler.DefSchedulerViewPainter
DefSchedulerViewPainter.CompositeElement
 
Field Summary
private static int METRIC_HOUR_WIDTH
          The width of the "hour" section
private static int METRIC_INTERVAL_WIDTH
          The width of the "minute" section
private static int METRIC_LINE_HIGHT
          The high of one row
private static int METRIC_SEPARATOR_WIDTH
          The width of the column separator
private static int POS_REL_BOTTOM
          Relative to the bottom of the time table
private static int POS_REL_TOP
          Relative to the top of the time table
 
Fields inherited from class com.cc.framework.ui.painter.def.scheduler.DefSchedulerViewPainter
DATEFORMAT_DATETIME, DATEFORMAT_DAY, DATEFORMAT_DETAIL, DATEFORMAT_HOUR, DATEFORMAT_MONTH_OF_YEAR, DATEFORMAT_TIME, DATEFORMAT_WEEK, DATEFORMAT_WEEKDAY, DATEFORMAT_WEEKDAY_SHORT, LABELFORMAT_LONG, LABELFORMAT_SHORT, STATE_APPOINTMENTS, STATE_DAY_IN_MONTH, STATE_FIRST_DAY, STATE_FIRST_MONTH, STATE_HIDDEN, STATE_LAST_MONTH, STATE_LEFTMOST_MONTH, STATE_RIGHTMOST_MONTH, STATE_TODAY
 
Fields inherited from class com.cc.framework.ui.painter.ControlPortionPainter
 
Constructor Summary
DefDayViewPainter()
           
 
Method Summary
private  DefDayViewPainter.DayInfo[] createDayInfo(java.util.Calendar[] dates)
          Creates the information objects for all visible days
protected  org.apache.ecs.ConcreteElement doCreateAllDayArea(DefDayViewPainter.DayInfo[] days)
          Creates the row with the "allday" areas for all visible days
protected  org.apache.ecs.ConcreteElement doCreateBody()
          This method creates the Body of the Scheduling Calendar Control
protected  org.apache.ecs.ConcreteElement doCreateDayHeader(DefDayViewPainter.DayInfo[] days)
          Creates the header with the day labels for a multiple day view
protected  org.apache.ecs.ConcreteElement doCreateDayLabel(DefDayViewPainter.DayInfo dayInfo)
          Creates the days label element
protected  org.apache.ecs.ConcreteElement doCreateMetricRow(DefDayViewPainter.DayInfo[] days)
          Creates the row with metric information that gives the table its column layout
 org.apache.ecs.ConcreteElement doCreateNavigationButton(boolean up)
          Creates the Roll-Button
protected  org.apache.ecs.html.TR doCreateOverflowIndicatorRow(DefDayViewPainter.DayInfo[] days, int pos)
          Creates the row with the "allday" areas for all visible days
protected  int getAppointmentColumns(DefDayViewPainter.DayInfo[] days)
          Calculates the number of HTML table columns (TD's) that are necessary to display the appointments
protected  int getAppointmentsOutOfBoundsCount(DefDayViewPainter.DayInfo[] days, int pos)
          Counts the number of appointments that are out of range
protected  java.text.DateFormat getDateFormat(int formatterId)
          Retrieves the formatter for the given format id
protected  java.lang.String getDayLabel(java.util.Calendar date)
          Retrieves a Label Text for the given Day
protected  java.util.Calendar[] getDays()
          This method is called to retrieve a list of visible Days for the Day view
protected  java.lang.String getDayTooltip(java.util.Calendar date)
          Retrieves a Tooltip Text for the given Day
protected  java.lang.String getHourLabel(java.util.Calendar date)
          This method is called to create the labels for the hour time bar
protected  int getTotalColumns(DefDayViewPainter.DayInfo[] days)
          Calculates the total number of HTML table columns (TD's) for the day view table
protected  int getTotalRows(DefDayViewPainter.DayInfo[] days)
          Calculates the total number of HTML table rows for the day view table
 
Methods inherited from class com.cc.framework.ui.painter.def.scheduler.DefSchedulerViewPainter
addPopup, addPopupWindow, addPopupWindow, createClockImage, createDateFormatter, createNavigationButton, doCreateAppointment, doCreateAppointmentList, doCreateHeader, doCreateMoreButton, doCreateView, getAppointmentLabel, getAppointmentTimeStr, getAppointmentTooltip, getCtrl, getDayClass, getDayOfWeekMask, getDayState, getDetail, getFirstDayOfWeek, getPopups, getPriorityImage, hasPopups, markAsToday, setControlPainter, showDay, showFrame
 
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

METRIC_HOUR_WIDTH

private static final int METRIC_HOUR_WIDTH
The width of the "hour" section

See Also:
Constant Field Values

METRIC_INTERVAL_WIDTH

private static final int METRIC_INTERVAL_WIDTH
The width of the "minute" section

See Also:
Constant Field Values

METRIC_SEPARATOR_WIDTH

private static final int METRIC_SEPARATOR_WIDTH
The width of the column separator

See Also:
Constant Field Values

METRIC_LINE_HIGHT

private static final int METRIC_LINE_HIGHT
The high of one row

See Also:
Constant Field Values

POS_REL_TOP

private static final int POS_REL_TOP
Relative to the top of the time table

See Also:
Constant Field Values

POS_REL_BOTTOM

private static final int POS_REL_BOTTOM
Relative to the bottom of the time table

See Also:
Constant Field Values
Constructor Detail

DefDayViewPainter

public DefDayViewPainter()
Method Detail

createDayInfo

private DefDayViewPainter.DayInfo[] createDayInfo(java.util.Calendar[] dates)
Creates the information objects for all visible days

Parameters:
dates - Days
Returns:
Information Objects

getDateFormat

protected java.text.DateFormat getDateFormat(int formatterId)
Description copied from class: DefSchedulerViewPainter
Retrieves the formatter for the given format id

Overrides:
getDateFormat in class DefSchedulerViewPainter
Parameters:
formatterId - the id of the formatter (DATEFORMAT_xxxx constant)
Returns:
formatter object
See Also:
DefSchedulerViewPainter.getDateFormat(int)

getDays

protected java.util.Calendar[] getDays()
This method is called to retrieve a list of visible Days for the Day view

Returns:
Array with Date Objects

getDayTooltip

protected java.lang.String getDayTooltip(java.util.Calendar date)
Retrieves a Tooltip Text for the given Day

Parameters:
date - the Date
Returns:
Tooltip Text

getDayLabel

protected java.lang.String getDayLabel(java.util.Calendar date)
Retrieves a Label Text for the given Day

Parameters:
date - the Date
Returns:
Label Text

getHourLabel

protected java.lang.String getHourLabel(java.util.Calendar date)
This method is called to create the labels for the hour time bar

Parameters:
date - the date and time
Returns:
hour string

doCreateDayLabel

protected org.apache.ecs.ConcreteElement doCreateDayLabel(DefDayViewPainter.DayInfo dayInfo)
Creates the days label element

Parameters:
dayInfo - the information about the day
Returns:
Label element

doCreateDayHeader

protected org.apache.ecs.ConcreteElement doCreateDayHeader(DefDayViewPainter.DayInfo[] days)
Creates the header with the day labels for a multiple day view

Parameters:
days - Days
Returns:
Header Row

doCreateMetricRow

protected org.apache.ecs.ConcreteElement doCreateMetricRow(DefDayViewPainter.DayInfo[] days)
Creates the row with metric information that gives the table its column layout

Parameters:
days - the visible days list
Returns:
the metric row

doCreateAllDayArea

protected org.apache.ecs.ConcreteElement doCreateAllDayArea(DefDayViewPainter.DayInfo[] days)
Creates the row with the "allday" areas for all visible days

Parameters:
days - the visible days list
Returns:
the "allday" row

getAppointmentsOutOfBoundsCount

protected int getAppointmentsOutOfBoundsCount(DefDayViewPainter.DayInfo[] days,
                                              int pos)
Counts the number of appointments that are out of range

Parameters:
days - the visible days list
pos - The position of the appointment relative to the bounds of the time table (POS_REL_xxx)
Returns:
Number of appointments

getTotalRows

protected int getTotalRows(DefDayViewPainter.DayInfo[] days)
Calculates the total number of HTML table rows for the day view table

Parameters:
days - the visible days list
Returns:
number of table rows

getTotalColumns

protected int getTotalColumns(DefDayViewPainter.DayInfo[] days)
Calculates the total number of HTML table columns (TD's) for the day view table

Parameters:
days - the visible days list
Returns:
number of table columns

getAppointmentColumns

protected int getAppointmentColumns(DefDayViewPainter.DayInfo[] days)
Calculates the number of HTML table columns (TD's) that are necessary to display the appointments

Parameters:
days - the visible days list
Returns:
number of table columns

doCreateOverflowIndicatorRow

protected org.apache.ecs.html.TR doCreateOverflowIndicatorRow(DefDayViewPainter.DayInfo[] days,
                                                              int pos)
Creates the row with the "allday" areas for all visible days

Parameters:
days - the visible days list
pos - The position of the appointment relative to the bounds of the time table (POS_REL_xxx)
Returns:
the "allday" row

doCreateBody

protected org.apache.ecs.ConcreteElement doCreateBody()
Description copied from class: DefSchedulerViewPainter
This method creates the Body of the Scheduling Calendar Control

Specified by:
doCreateBody in class DefSchedulerViewPainter
Returns:
HTML Element
See Also:
DefSchedulerViewPainter.doCreateBody()

doCreateNavigationButton

public org.apache.ecs.ConcreteElement doCreateNavigationButton(boolean up)
Description copied from class: DefSchedulerViewPainter
Creates the Roll-Button

Specified by:
doCreateNavigationButton in class DefSchedulerViewPainter
Parameters:
up - true if the button rolls up
Returns:
ConcreteElement
See Also:
DefSchedulerViewPainter.doCreateNavigationButton(boolean)


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.