HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.widgets
Class CalendarWidget

java.lang.Object
  extended by com.ibm.hats.transform.widgets.Widget
      extended by com.ibm.hats.transform.widgets.CalendarWidget
All Implemented Interfaces:
IContextDependent, ICustomPropertySupplier, com.ibm.hats.common.ICustomPropertySupplier2, HTMLRenderer, com.ibm.hats.transform.renderers.TextRenderer

public class CalendarWidget
extends Widget
implements HTMLRenderer, com.ibm.hats.common.ICustomPropertySupplier2, IContextDependent

CalendarWidget renders InputComponentElements as HTML inputs with a popup windows for picking a date from a calendar.

Please refer to the User's Guide for detail on this Widget's settings.

See Also:
InputComponentElement

Field Summary
static String CLASS_NAME
           
static Properties defaults
          Default settings for this Widget.
static String FIELD_SEPARATOR
           
static String FIX_DATE_PATTERN
           
static String LAUNCHER_TYPE_BUTTON
           
static String LAUNCHER_TYPE_IMAGE
           
static String LAUNCHER_TYPE_LINK
           
static String LOCALE_BROWSER
           
static String LOCALE_SELECTED
           
static String LOCALE_SERVER
           
static String PROPERTY_DEFAULT_VALUE
           
static String PROPERTY_IMAGE_FILENAME
           
static String PROPERTY_INLINE_CALENDAR
           
static String PROPERTY_LAUNCHER_BUTTON_STYLE_CLASS
           
static String PROPERTY_LAUNCHER_CAPTION
           
static String PROPERTY_LAUNCHER_LINK_STYLE_CLASS
           
static String PROPERTY_LAUNCHER_TYPE
           
static String PROPERTY_PATTERN
           
static String PROPERTY_PATTERN_LOCALE_SELECTED
           
static String PROPERTY_PATTERN_LOCALE_SOURCE
           
static String PROPERTY_RANGE_END
           
static String PROPERTY_RANGE_START
           
static String PROPERTY_RESTRICT_MAX_DATE
           
static String PROPERTY_RESTRICT_MIN_DATE
           
static String PROPERTY_USE_EXACT_CURSOR_POSITIONING_OPTION
           
 
Fields inherited from class com.ibm.hats.transform.widgets.Widget
componentElements, contextAttributes, settings
 
Fields inherited from interface com.ibm.hats.transform.renderers.HTMLRenderer
COPYRIGHT
 
Fields inherited from interface com.ibm.hats.common.ICustomPropertySupplier2
CLASSNAME, COPYRIGHT
 
Fields inherited from interface com.ibm.hats.common.IContextDependent
COPYRIGHT
 
Constructor Summary
CalendarWidget(ComponentElement[] componentElements, Properties settings)
          Class constructor.
 
Method Summary
static HTMLElement createLauncher(ContextAttributes contextAttributes, String launcherType, String launcherCaption, String launcherButtonStyleClass, String launcherLinkStyleClass, String style, String launcherImageName, ScriptAction action)
          Deprecated. should and will be moved
static HTMLElement createLauncher(Hashtable contextAttributes, String launcherType, String launcherCaption, String launcherButtonStyleClass, String launcherLinkStyleClass, String style, String launcherImageName, ScriptAction action)
          Deprecated.  
 StringBuffer drawHTML()
          Converts ComponentElements into HTML output for embedding within a Transformation page
protected  void drawTextInput(InputComponentElement ice, String newValue, String caption, StringBuffer buffer)
          Renders an individual InputComponentElement as an HTML input field with the specified value and caption.
 Class getCustomComposite()
          Returns a Class object (assignable from com.ibm.hats.studio.composites.BasePropertiesComposite) if a custom composite is to be used to represent the customizable properties for this object or null if dynamic GUI is to be used.
 String getCustomCompositeName()
           
 Vector getCustomProperties(int iPageNumber, Properties properties, ResourceBundle bundle)
          Returns a list of this object's custom properties.
 Vector getCustomPropertiesBiDi(int iPageNumber, Properties properties, ResourceBundle bundle)
           
 Properties getDefaultValues(int iPageNumber)
          Returns this object's default property values.
 int getPropertyPageCount()
          Returns the number of property pages associated with this object.
static String[] interpretPattern(String pattern)
          Deprecated. should not be in this class
 boolean isAllowed(ContextAttributes contextAttributes)
          Gets whether or not this object should be visible in the studio given some context attributes.
 boolean isPropertyAllowed(String name, ContextAttributes contextAttributes)
          Gets whether or not the specified property should be visible in the component or widget settings.
static String meldPatterns(String[] patterns)
          Deprecated. should not be in this class
protected  boolean renderTable()
          Determines whether or not we should render these calendar controls in a table or not.
 
Methods inherited from class com.ibm.hats.transform.widgets.Widget
convertBidi, draw, getComponentElements, getContextAttribute, getContextAttributes, getSettings, insertAlign, insertDir, newInstance, setComponentElements, setContextAttribute, setContextAttributes, setSettings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_NAME

public static final String CLASS_NAME

PROPERTY_PATTERN

public static final String PROPERTY_PATTERN
See Also:
Constant Field Values

PROPERTY_PATTERN_LOCALE_SOURCE

public static final String PROPERTY_PATTERN_LOCALE_SOURCE
See Also:
Constant Field Values

PROPERTY_PATTERN_LOCALE_SELECTED

public static final String PROPERTY_PATTERN_LOCALE_SELECTED
See Also:
Constant Field Values

PROPERTY_LAUNCHER_TYPE

public static final String PROPERTY_LAUNCHER_TYPE
See Also:
Constant Field Values

PROPERTY_LAUNCHER_CAPTION

public static final String PROPERTY_LAUNCHER_CAPTION
See Also:
Constant Field Values

PROPERTY_IMAGE_FILENAME

public static final String PROPERTY_IMAGE_FILENAME
See Also:
Constant Field Values

PROPERTY_RESTRICT_MIN_DATE

public static final String PROPERTY_RESTRICT_MIN_DATE
See Also:
Constant Field Values

PROPERTY_RANGE_START

public static final String PROPERTY_RANGE_START
See Also:
Constant Field Values

PROPERTY_RESTRICT_MAX_DATE

public static final String PROPERTY_RESTRICT_MAX_DATE
See Also:
Constant Field Values

PROPERTY_RANGE_END

public static final String PROPERTY_RANGE_END
See Also:
Constant Field Values

PROPERTY_DEFAULT_VALUE

public static final String PROPERTY_DEFAULT_VALUE
See Also:
Constant Field Values

PROPERTY_LAUNCHER_BUTTON_STYLE_CLASS

public static final String PROPERTY_LAUNCHER_BUTTON_STYLE_CLASS
See Also:
Constant Field Values

PROPERTY_LAUNCHER_LINK_STYLE_CLASS

public static final String PROPERTY_LAUNCHER_LINK_STYLE_CLASS
See Also:
Constant Field Values

PROPERTY_INLINE_CALENDAR

public static final String PROPERTY_INLINE_CALENDAR
See Also:
Constant Field Values

PROPERTY_USE_EXACT_CURSOR_POSITIONING_OPTION

public static final String PROPERTY_USE_EXACT_CURSOR_POSITIONING_OPTION
See Also:
Constant Field Values

LOCALE_BROWSER

public static final String LOCALE_BROWSER
See Also:
Constant Field Values

LOCALE_SERVER

public static final String LOCALE_SERVER
See Also:
Constant Field Values

LOCALE_SELECTED

public static final String LOCALE_SELECTED
See Also:
Constant Field Values

LAUNCHER_TYPE_LINK

public static final String LAUNCHER_TYPE_LINK
See Also:
Constant Field Values

LAUNCHER_TYPE_BUTTON

public static final String LAUNCHER_TYPE_BUTTON
See Also:
Constant Field Values

LAUNCHER_TYPE_IMAGE

public static final String LAUNCHER_TYPE_IMAGE
See Also:
Constant Field Values

FIELD_SEPARATOR

public static final String FIELD_SEPARATOR
See Also:
Constant Field Values

FIX_DATE_PATTERN

public static final String FIX_DATE_PATTERN
See Also:
Constant Field Values

defaults

public static Properties defaults
Default settings for this Widget.

Constructor Detail

CalendarWidget

public CalendarWidget(ComponentElement[] componentElements,
                      Properties settings)
Class constructor.

Parameters:
componentElements - An array of component elements.
settings - The Properties settings.
See Also:
Widget.Widget(ComponentElement[], Properties)
Method Detail

renderTable

protected boolean renderTable()
Determines whether or not we should render these calendar controls in a table or not.

Returns:
true to use a table, false to not use a table

drawHTML

public StringBuffer drawHTML()
Description copied from interface: HTMLRenderer
Converts ComponentElements into HTML output for embedding within a Transformation page

Specified by:
drawHTML in interface HTMLRenderer
Returns:
HTML output

getPropertyPageCount

public int getPropertyPageCount()
Description copied from interface: ICustomPropertySupplier
Returns the number of property pages associated with this object.

Note: Currently only 0 or 1 pages are supported.

Specified by:
getPropertyPageCount in interface ICustomPropertySupplier
Overrides:
getPropertyPageCount in class Widget
Returns:
the number of defined property pages used to configure this object, or 0 if there are none

getCustomPropertiesBiDi

public Vector getCustomPropertiesBiDi(int iPageNumber,
                                      Properties properties,
                                      ResourceBundle bundle)
Overrides:
getCustomPropertiesBiDi in class Widget

getCustomProperties

public Vector getCustomProperties(int iPageNumber,
                                  Properties properties,
                                  ResourceBundle bundle)
Description copied from interface: ICustomPropertySupplier
Returns a list of this object's custom properties. Items must be of type com.ibm.hats.common.HCustomProperty.

Specified by:
getCustomProperties in interface ICustomPropertySupplier
Overrides:
getCustomProperties in class Widget
Parameters:
iPageNumber - page number containing desired properties
properties - existing values for properties defined here
bundle - ResourceBundle containing NLS descriptions for the properties
Returns:
Vector containing all the custom properties for this object, or null if there are none
See Also:
HCustomProperty

getCustomComposite

public Class getCustomComposite()
Description copied from interface: ICustomPropertySupplier
Returns a Class object (assignable from com.ibm.hats.studio.composites.BasePropertiesComposite) if a custom composite is to be used to represent the customizable properties for this object or null if dynamic GUI is to be used. Note: this function only applies to HATS Studio

Specified by:
getCustomComposite in interface ICustomPropertySupplier
Overrides:
getCustomComposite in class Widget
Returns:
custom composite (of type BasePropertiesComposite) or null if dynamic GUI should be used
See Also:
BasePropertiesComposite

getCustomCompositeName

public String getCustomCompositeName()
Specified by:
getCustomCompositeName in interface com.ibm.hats.common.ICustomPropertySupplier2

drawTextInput

protected void drawTextInput(InputComponentElement ice,
                             String newValue,
                             String caption,
                             StringBuffer buffer)
Renders an individual InputComponentElement as an HTML input field with the specified value and caption.

Parameters:
ice - component to render
newValue - value for the HTML input
caption - caption for the HTML input
buffer - output buffer

createLauncher

public static HTMLElement createLauncher(Hashtable contextAttributes,
                                         String launcherType,
                                         String launcherCaption,
                                         String launcherButtonStyleClass,
                                         String launcherLinkStyleClass,
                                         String style,
                                         String launcherImageName,
                                         ScriptAction action)
Deprecated. 

Creates a popup launcher of the specified type with the specified caption or image, and the specified script action to invoke. Currently used by CalendarWidget and PopupWidget.

Parameters:
contextAttributes - needed for generating link to image
launcherType - CalendarWidget.LAUNCHER_TYPE_BUTTON, CalendarWidget.LAUNCHER_TYPE_LINK, or CalendarWidget.LAUNCHER_TYPE_Image
launcherCaption - caption to use for button or link
launcherButtonStyleClass - CSS class for launcher button
launcherLinkStyleClass - CSS class for launcher link
style - style overrides for launcher
launcherImageName - image to use for launcher image
action - javascript action to invoke upon clicking launcher
Returns:
HTMLElement representing the launcher

createLauncher

public static HTMLElement createLauncher(ContextAttributes contextAttributes,
                                         String launcherType,
                                         String launcherCaption,
                                         String launcherButtonStyleClass,
                                         String launcherLinkStyleClass,
                                         String style,
                                         String launcherImageName,
                                         ScriptAction action)
Deprecated. should and will be moved

Creates a popup launcher of the specified type with the specified caption or image, and the specified script action to invoke. Currently used by CalendarWidget and PopupWidget.

Parameters:
contextAttributes - needed for generating link to image
launcherType - CalendarWidget.LAUNCHER_TYPE_BUTTON, CalendarWidget.LAUNCHER_TYPE_LINK, or CalendarWidget.LAUNCHER_TYPE_Image
launcherCaption - caption to use for button or link
launcherButtonStyleClass - CSS class for launcher button
launcherLinkStyleClass - CSS class for launcher link
style - style overrides for launcher
launcherImageName - image to use for launcher image
action - javascript action to invoke upon clicking launcher
Returns:
HTMLElement representing the launcher

interpretPattern

public static String[] interpretPattern(String pattern)
Deprecated. should not be in this class

Parameters:
pattern - The pattern.

meldPatterns

public static String meldPatterns(String[] patterns)
Deprecated. should not be in this class

Parameters:
patterns - An array of String patterns.

getDefaultValues

public Properties getDefaultValues(int iPageNumber)
Description copied from interface: ICustomPropertySupplier
Returns this object's default property values.

Specified by:
getDefaultValues in interface ICustomPropertySupplier
Overrides:
getDefaultValues in class Widget
Parameters:
iPageNumber - page for which to retrieve default properties
Returns:
object's default properties

isAllowed

public boolean isAllowed(ContextAttributes contextAttributes)
Description copied from interface: IContextDependent
Gets whether or not this object should be visible in the studio given some context attributes. The context attributes may contain the Component name when this is called on a Widget, or whether or not we are presenting this Component/Widget choice while configuring Default Rendering.

Specified by:
isAllowed in interface IContextDependent
Returns:
whether or not this Component or Widget is allowed in the specified context

isPropertyAllowed

public boolean isPropertyAllowed(String name,
                                 ContextAttributes contextAttributes)
Description copied from interface: IContextDependent
Gets whether or not the specified property should be visible in the component or widget settings. The context attributes may contain the Component name when this is called on a Widget, or whether or not we are presenting this Component/Widget choice while configuring Default Rendering.

Specified by:
isPropertyAllowed in interface IContextDependent
Parameters:
name - property name
Returns:
whether or not this property is allowed in the specified context

HATS 7.5.1 (201005110649)