com.cc.framework.ui.painter.def
Class DefRecurrencePatternPainter

java.lang.Object
  extended bycom.cc.framework.ui.painter.ControlPainter
      extended bycom.cc.framework.ui.painter.def.DefPainterBase
          extended bycom.cc.framework.ui.painter.def.DefRecurrencePatternPainter

public class DefRecurrencePatternPainter
extends DefPainterBase

Painter for the Recurrence Pattern control

Version:
$Revision: 1.11 $
Author:
Harald Schulz

Field Summary
 
Fields inherited from class com.cc.framework.ui.painter.ControlPainter
log
 
Constructor Summary
DefRecurrencePatternPainter(PainterContext painterContext, RecurrencePatternControl ctrl)
          Constructor
 
Method Summary
protected  org.apache.ecs.ConcreteElement doCreateDay(java.lang.String prefix, java.util.Locale locale)
          Creates the Section for the "daily" recurrence pattern
protected  org.apache.ecs.html.Option[] doCreateDayMaskOptions(java.util.Locale locale, int selected)
          Creates an option list with the day mask options
protected  org.apache.ecs.ConcreteElement doCreateElement()
          Creates the HTML-Element.
protected  org.apache.ecs.html.Option[] doCreateInstanceOptions(java.util.Locale locale, int selected)
          Creates an option list with the instance options
protected  org.apache.ecs.ConcreteElement doCreateMonthly(java.lang.String prefix, java.util.Locale locale)
          Creates the Section for the "monthly" recurrence pattern
protected  org.apache.ecs.html.Option[] doCreateMonthOptions(java.util.Locale locale, int selected)
          Creates an option list with the twelve month names
protected  org.apache.ecs.ConcreteElement doCreateNone(java.lang.String prefix, java.util.Locale locale)
          Creates the Section for the "none" recurrence pattern
protected  JavaScript doCreateScript(java.lang.String prefix)
          Creates the Java Script Code which is needed by the control
protected  org.apache.ecs.ConcreteElement doCreateSection(RecurrenceType type, org.apache.ecs.ConcreteElement body)
          Creates the wrapper element for a section
protected  org.apache.ecs.ElementContainer doCreateTypeMenu(java.lang.String prefix, java.util.Locale locale)
          Creates the RecurrenceType options on the left side
protected  org.apache.ecs.ConcreteElement doCreateWeekly(java.lang.String prefix, java.util.Locale locale)
          Creates the Section for the "weekly" recurrence pattern
protected  org.apache.ecs.ConcreteElement doCreateYearly(java.lang.String prefix, java.util.Locale locale)
          Creates the Section for the "yearly" recurrence pattern
protected  org.apache.ecs.ElementContainer formatElements(java.lang.String patternId, org.apache.ecs.ConcreteElement[] elements)
          This method works similar to java.text.MessageFormat with the only difference that it concatenates ConcreteElement's into an ElementContainer
protected  RecurrencePatternControl getCtrl()
          Retrieves the control for this painter
protected  java.lang.String htmlfw(java.lang.String resourceId)
          Utility function to HTL encode a framework string
protected  boolean isDisabled()
          Checks if the control should be rendered in disabled mode
 
Methods inherited from class com.cc.framework.ui.painter.def.DefPainterBase
createHelpElement, createHelpElement, doCreateHelpButton, doCreateHelpIcon, getElementClass
 
Methods inherited from class com.cc.framework.ui.painter.ControlPainter
ajaxPaint, attr, attr, attr, beginPaint, createActionPainter, createActionPainter, createElement, createImage, createImage, createImage, createInput, createInput, createSpacer, createSpacer, createSpacer, decorateURL, doAddDecorationsToRow, doAddDecorationsToRow, doAfterCreate, doAttachDecorations, doBeforeCreate, encodeURL, endPaint, forceControlName, getAsString, getAwtColor, getColor, getContextPath, getControlName, getDecorationsOnce, getElementName, getFramePainter, getFrameworkString, getFrameworkString, getImage, getImage, getImage, getImageSrc, getImageSrc, getImageSrc, getLocale, getPageContext, getPainterContext, getPrincipal, getRequest, getResponse, getSession, getSmartCaption, getSmartDetail, getSource, getSource, getStringResource, getStyleId, html, html, html, init, isRunAtClient, localize, localize, localize, paint, removeHtml, removeHtml, request, response, session, showComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefRecurrencePatternPainter

public DefRecurrencePatternPainter(PainterContext painterContext,
                                   RecurrencePatternControl ctrl)
Constructor

Parameters:
painterContext - The PainterContext
ctrl - The Control to render
Method Detail

getCtrl

protected RecurrencePatternControl getCtrl()
Retrieves the control for this painter

Returns:
Control

isDisabled

protected boolean isDisabled()
Checks if the control should be rendered in disabled mode

Returns:
boolean true when the control should be rendered as read only

htmlfw

protected java.lang.String htmlfw(java.lang.String resourceId)
Utility function to HTL encode a framework string

Parameters:
resourceId - Resource Identifier
Returns:
HTML encoded string

formatElements

protected org.apache.ecs.ElementContainer formatElements(java.lang.String patternId,
                                                         org.apache.ecs.ConcreteElement[] elements)
This method works similar to java.text.MessageFormat with the only difference that it concatenates ConcreteElement's into an ElementContainer

Parameters:
patternId - Formatting pattern resource Id
elements - The elements that should be placed in the markups
Returns:
ElementContainer

doCreateElement

protected org.apache.ecs.ConcreteElement doCreateElement()
Description copied from class: ControlPainter
Creates the HTML-Element. This Method must be implemented by the concrete Sub-Class

Specified by:
doCreateElement in class ControlPainter
Returns:
ConcreteElement
See Also:
ControlPainter.doCreateElement()

doCreateScript

protected JavaScript doCreateScript(java.lang.String prefix)
Creates the Java Script Code which is needed by the control

Parameters:
prefix - The controls prefix
Returns:
Java Script Code

doCreateTypeMenu

protected org.apache.ecs.ElementContainer doCreateTypeMenu(java.lang.String prefix,
                                                           java.util.Locale locale)
Creates the RecurrenceType options on the left side

Parameters:
prefix - The controls prefix
locale - Locale to use
Returns:
Options

doCreateSection

protected org.apache.ecs.ConcreteElement doCreateSection(RecurrenceType type,
                                                         org.apache.ecs.ConcreteElement body)
Creates the wrapper element for a section

Parameters:
type - recurrence type of the section
body - sections body
Returns:
section wrapper

doCreateNone

protected org.apache.ecs.ConcreteElement doCreateNone(java.lang.String prefix,
                                                      java.util.Locale locale)
Creates the Section for the "none" recurrence pattern

Parameters:
prefix - The controls prefix
locale - Locale to use
Returns:
Sections

doCreateDay

protected org.apache.ecs.ConcreteElement doCreateDay(java.lang.String prefix,
                                                     java.util.Locale locale)
Creates the Section for the "daily" recurrence pattern

Parameters:
prefix - The controls prefix
locale - Locale to use
Returns:
Sections

doCreateWeekly

protected org.apache.ecs.ConcreteElement doCreateWeekly(java.lang.String prefix,
                                                        java.util.Locale locale)
Creates the Section for the "weekly" recurrence pattern

Parameters:
prefix - The controls prefix
locale - Locale to use
Returns:
Sections

doCreateMonthly

protected org.apache.ecs.ConcreteElement doCreateMonthly(java.lang.String prefix,
                                                         java.util.Locale locale)
Creates the Section for the "monthly" recurrence pattern

Parameters:
prefix - The controls prefix
locale - Locale to use
Returns:
Sections

doCreateYearly

protected org.apache.ecs.ConcreteElement doCreateYearly(java.lang.String prefix,
                                                        java.util.Locale locale)
Creates the Section for the "yearly" recurrence pattern

Parameters:
prefix - The controls prefix
locale - Locale to use
Returns:
Sections

doCreateDayMaskOptions

protected org.apache.ecs.html.Option[] doCreateDayMaskOptions(java.util.Locale locale,
                                                              int selected)
Creates an option list with the day mask options

Parameters:
locale - Locale to use
selected - The selected mask
Returns:
Option Elements

doCreateMonthOptions

protected org.apache.ecs.html.Option[] doCreateMonthOptions(java.util.Locale locale,
                                                            int selected)
Creates an option list with the twelve month names

Parameters:
locale - Locale to use
selected - The selected month index
Returns:
Option Elements

doCreateInstanceOptions

protected org.apache.ecs.html.Option[] doCreateInstanceOptions(java.util.Locale locale,
                                                               int selected)
Creates an option list with the instance options

Parameters:
locale - Locale to use
selected - The selected instance
Returns:
Option Elements


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