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 PopupWidget

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

public class PopupWidget
extends Widget
implements HTMLRenderer, IContextDependent

PopupWidget renders input fields which have launchers to pop up a floating box for selecting valid items. It currently takes InputComponentElements as input.

See Also:
InputComponentElement

Field Summary
static String CLASS_NAME
           
protected  int codepage
           
protected static String COPYRIGHT
          The HsrCopyright.COPYRIGHT field will be updated each release, thereby "magically" updating this class file.
static Properties defaults
           
protected  HTMLElementFactory htmlElementFactory
           
protected  boolean isBIDI
           
static String LAUNCHER_TYPE_BUTTON
           
static String LAUNCHER_TYPE_IMAGE
           
static String LAUNCHER_TYPE_LINK
           
static String PROPERTY_CAPTION_VARIABLE
           
static String PROPERTY_CLOSE_CAPTION
           
static String PROPERTY_IMAGE_FILENAME
           
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_LIST_ITEMS
           
static String PROPERTY_SHARED_GVS
           
static String PROPERTY_SOURCE_HINTS
           
static String PROPERTY_SOURCE_STRING
           
static String PROPERTY_SOURCE_VARIABLE
           
static String PROPERTY_USE_EXACT_CURSOR_POSITIONING_OPTION
           
static String PROPERTY_VALUE_VARIABLE
           
 
Fields inherited from class com.ibm.hats.transform.widgets.Widget
componentElements, contextAttributes, settings
 
Fields inherited from interface com.ibm.hats.common.ICustomPropertySupplier
CLASSNAME
 
Constructor Summary
PopupWidget(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)
          Creates a popup launcher of the specified type with the specified caption or image, and the specified script action to invoke.
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
 Vector getCustomProperties(int iPageNumber, Properties properties, ResourceBundle bundle)
          Returns a list of this object's custom properties.
 Properties getDefaultValues(int iPageNumber)
          Returns this object's default property values.
 int getPropertyPageCount()
          Returns the number of property pages associated with this object.
 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.
protected  boolean renderTable()
          Determines whether or not to render popups in a table based on the number of component elements.
 
Methods inherited from class com.ibm.hats.transform.widgets.Widget
convertBidi, draw, getComponentElements, getContextAttribute, getContextAttributes, getCustomComposite, getCustomPropertiesBiDi, 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

COPYRIGHT

protected static final String COPYRIGHT
The HsrCopyright.COPYRIGHT field will be updated each release, thereby "magically" updating this class file.

See Also:
Constant Field Values

CLASS_NAME

public static final String CLASS_NAME

PROPERTY_SOURCE_VARIABLE

public static final String PROPERTY_SOURCE_VARIABLE
See Also:
Constant Field Values

PROPERTY_VALUE_VARIABLE

public static final String PROPERTY_VALUE_VARIABLE
See Also:
Constant Field Values

PROPERTY_CAPTION_VARIABLE

public static final String PROPERTY_CAPTION_VARIABLE
See Also:
Constant Field Values

PROPERTY_SOURCE_STRING

public static final String PROPERTY_SOURCE_STRING
See Also:
Constant Field Values

PROPERTY_SOURCE_HINTS

public static final String PROPERTY_SOURCE_HINTS
See Also:
Constant Field Values

PROPERTY_LIST_ITEMS

public static final String PROPERTY_LIST_ITEMS
See Also:
Constant Field Values

PROPERTY_SHARED_GVS

public static final String PROPERTY_SHARED_GVS
See Also:
Constant Field Values

PROPERTY_CLOSE_CAPTION

public static final String PROPERTY_CLOSE_CAPTION
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

isBIDI

protected boolean isBIDI

codepage

protected int codepage

defaults

public static Properties defaults

htmlElementFactory

protected HTMLElementFactory htmlElementFactory

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_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

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

PROPERTY_IMAGE_FILENAME

public static final String PROPERTY_IMAGE_FILENAME
See Also:
Constant Field Values
Constructor Detail

PopupWidget

public PopupWidget(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 to render popups in a table based on the number of component elements.

Returns:
whether to use a table layout

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

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

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

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

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

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

HATS 7.5.1 (201005110649)