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

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.DefYearViewPainter

public class DefYearViewPainter
extends DefSchedulerViewPainter

Scheduler Painter for year view

Version:
$Revision: 1.28 $
Author:
Harald Schulz

Nested Class Summary
 
Nested classes inherited from class com.cc.framework.ui.painter.def.scheduler.DefSchedulerViewPainter
DefSchedulerViewPainter.CompositeElement
 
Field Summary
private  java.lang.String[] daysShort
          Cache for Day short Names
 
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
DefYearViewPainter()
          Constructor
 
Method Summary
protected  int calcDayColumns()
          Calculates the number of day columns
protected  org.apache.ecs.ConcreteElement doCreateBody()
          This method creates the Body of the Scheduling Calendar Control
protected  org.apache.ecs.html.TD doCreateDayCell(java.util.Calendar date, int state, Appointment[] appointments)
          Paints the cell for the given day
protected  org.apache.ecs.html.TR doCreateDayHeader()
          Creates the Days column header row
protected  org.apache.ecs.ConcreteElement doCreateHeader()
          Creates a navigation header element
protected  org.apache.ecs.html.TD doCreateHiddenCell(int colspan)
          Creates a cell for hidden days
protected  org.apache.ecs.ConcreteElement doCreateMetricRow()
          Creates a HTML COLGROUP element that helps to web browser to calculate the layout of a month table
protected  org.apache.ecs.ConcreteElement doCreateMonthHeader(java.util.Calendar date, int monthState)
          Creates a navigation header element
protected  org.apache.ecs.ConcreteElement doCreateMonthMetricRow()
          Creates a HTML COLGROUP element that helps to web browser to calculate the layout of a month table
protected  org.apache.ecs.html.Table doCreateMonthTable(CalendarIterator calIter, int monthState)
          Creates the table for the given month
 org.apache.ecs.ConcreteElement doCreateNavigationButton(boolean up)
          Creates the Roll-Button
 org.apache.ecs.ConcreteElement doCreateNavigationButton(int monthState)
          Creates the navigation button for the given month state
protected  void doPaintDayHeader(org.apache.ecs.html.TD headerCell, int dayOfWeek)
          This method paints one single Header Cell of the Scheduler
protected  java.text.DateFormat getDateFormat(int formatterId)
          Retrieves the formatter for the given format id
protected  java.lang.String getDayLabel(java.util.Calendar date, int state)
          Retrieves a Label Text for the given Day
protected  java.lang.String getDayTooltip(java.util.Calendar date)
          Retrieves a Tooltip Text for the given Day
protected  int getMonthIncrement()
          retrieves the number of month to increment in year view when the user clicks on one of the navigation buttons.
 
Methods inherited from class com.cc.framework.ui.painter.def.scheduler.DefSchedulerViewPainter
addPopup, addPopupWindow, addPopupWindow, createClockImage, createDateFormatter, createNavigationButton, doCreateAppointment, doCreateAppointmentList, 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

daysShort

private java.lang.String[] daysShort
Cache for Day short Names

Constructor Detail

DefYearViewPainter

public DefYearViewPainter()
Constructor

Method Detail

getMonthIncrement

protected int getMonthIncrement()
retrieves the number of month to increment in year view when the user clicks on one of the navigation buttons. A value of 0 resets the the control to the default increment which is the number of visible months (= rows * columns)

Returns:
the number of month to increment

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)

calcDayColumns

protected int calcDayColumns()
Calculates the number of day columns

Returns:
The number of day columns

doPaintDayHeader

protected void doPaintDayHeader(org.apache.ecs.html.TD headerCell,
                                int dayOfWeek)
This method paints one single Header Cell of the Scheduler

Parameters:
headerCell - The Header cell to paint
dayOfWeek - The Day for this column

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)

doCreateNavigationButton

public org.apache.ecs.ConcreteElement doCreateNavigationButton(int monthState)
Creates the navigation button for the given month state

Parameters:
monthState - Month state
Returns:
Navigation button or spacer element

doCreateHeader

protected org.apache.ecs.ConcreteElement doCreateHeader()
Description copied from class: DefSchedulerViewPainter
Creates a navigation header element

Overrides:
doCreateHeader in class DefSchedulerViewPainter
Returns:
Header element for navigation or null
See Also:
DefSchedulerViewPainter.doCreateHeader()

doCreateMonthHeader

protected org.apache.ecs.ConcreteElement doCreateMonthHeader(java.util.Calendar date,
                                                             int monthState)
Creates a navigation header element

Parameters:
date - The date of the month
monthState - The month state
Returns:
Header element for navigation or null

doCreateMetricRow

protected org.apache.ecs.ConcreteElement doCreateMetricRow()
Creates a HTML COLGROUP element that helps to web browser to calculate the layout of a month table

Returns:
COLGROUP Element

doCreateMonthMetricRow

protected org.apache.ecs.ConcreteElement doCreateMonthMetricRow()
Creates a HTML COLGROUP element that helps to web browser to calculate the layout of a month table

Returns:
COLGROUP Element

doCreateDayHeader

protected org.apache.ecs.html.TR doCreateDayHeader()
Creates the Days column header row

Returns:
Header row

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,
                                       int state)
Retrieves a Label Text for the given Day

Parameters:
date - The Date
state - The days state
Returns:
Label Text

doCreateDayCell

protected org.apache.ecs.html.TD doCreateDayCell(java.util.Calendar date,
                                                 int state,
                                                 Appointment[] appointments)
Paints the cell for the given day

Parameters:
date - date
state - days state
appointments - List with appointments
Returns:
the day cell

doCreateHiddenCell

protected org.apache.ecs.html.TD doCreateHiddenCell(int colspan)
Creates a cell for hidden days

Parameters:
colspan - Number of spanned columns
Returns:
cell

doCreateMonthTable

protected org.apache.ecs.html.Table doCreateMonthTable(CalendarIterator calIter,
                                                       int monthState)
Creates the table for the given month

Parameters:
calIter - the iterator to iterate all months days
monthState - state flags of the current month
Returns:
Month table

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()


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