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 FieldWidget

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

public class FieldWidget
extends AbstractFieldWidget
implements HTMLRenderer, IContextDependent

FieldWidget renders a table of input fields and text. It currently takes FieldComponentElements and FieldRowComponentElements as inputs.

See Also:
FieldComponentElement, FieldRowComponentElement

Field Summary
protected  boolean addNowrap
           
protected  boolean addRevClassToTD
           
protected  boolean addSpan
           
protected  boolean applyUnderlineStyle
           
protected  String arabicOrientation
           
protected  String blinkStyle
           
static String CLASS_NAME
           
protected  String classesForTD
           
protected  boolean closeTags
           
protected  int codepage
           
protected  String columnSeparatorStyle
           
protected static String COPYRIGHT
          The HsrCopyright.COPYRIGHT field will be updated each release, thereby "magically" updating this class file.
static Properties defaults
          Default settings for this Widget.
protected  String dir
           
protected  String dirText
           
protected  boolean extendedStyleForTD
           
protected  boolean extendedStyleInsideTD
           
protected  String fieldStyleClass
           
protected  HTMLElementFactory htmlElementFactory
           
protected  boolean inCompactRendering
           
protected  boolean inDefaultRendering
           
protected  boolean isBIDI
           
protected  boolean isDBCSSession
           
protected  boolean isInsideVCTView
           
protected  boolean isLinuxRuntime
           
protected  boolean isNumericSwapping
           
protected  boolean isSymmetricSwapping
           
static String MONOSPACE_FONT_STYLE_CLASS
           
protected  boolean omitExtraneousTables
           
protected  boolean optimizedOutput
           
static String PROPERTY_BLINK_STYLE
           
static String PROPERTY_COLUMN_SEPARATOR_STYLE
           
static String PROPERTY_REVERSE_VIDEO_STYLE
           
static String PROPERTY_UNDERLINE_STYLE
           
static String PROPERTY_USE_EXACT_CURSOR_POSITIONING_OPTION
           
protected  String protectedLinkStyleClass
           
protected  boolean reversed
           
protected  String reverseVideoStyle
           
protected  String ScreenOrient
           
protected  String style
           
protected  String stylesForTD
           
protected  String tableCellStyleClass
           
protected  String tableStyleClass
           
protected  String underlineStyle
           
protected  boolean useAccentedCharacters
           
 
Fields inherited from class com.ibm.hats.transform.widgets.AbstractFieldWidget
actionKey, ALIGNMENT_CHAR_BY_CHAR, ALIGNMENT_NORMAL, ALIGNMENT_WORD_BY_WORD, allowPositionOnProtected, characterRendering, LAYOUT_SEPARATED, LAYOUT_TABLE, mapExtendedAttributes, mapForegroundColors, PROPERTY_ADD_NOWRAP_TO_TD, PROPERTY_ADD_REVERSE_COLOR_CLASS_TO_TD_TAG, PROPERTY_ADD_SPAN_TAGS_TO_TEXT, PROPERTY_ALIGNMENT, PROPERTY_APPLY_COLUMN_SEPARATOR_STYLE_TO_INPUTS, PROPERTY_APPLY_EXTENDED_STYLE_TO_INSIDE_TD_TAG, PROPERTY_APPLY_EXTENDED_STYLE_TO_TD_TAG, PROPERTY_APPLY_UNDERLINE_STYLE_TO_INPUTS, PROPERTY_AUTO_KEY_FOR_PROTECTED_FIELD_LINKS, PROPERTY_CHARACTER_RENDERING, PROPERTY_CLASSES_FOR_TD, PROPERTY_ENABLE_NUMERIC_LOCK, PROPERTY_FIELD_STYLE_CLASS, PROPERTY_LAYOUT, PROPERTY_MAP_EXTENDED_ATTRIBUTES, PROPERTY_OMIT_EXTRANEOUS_TABLES, PROPERTY_OPTIMIZED_OUTPUT, PROPERTY_PRESERVE_COLORS, PROPERTY_PROTECTED_LINK_STYLE_CLASS, PROPERTY_READ_ONLY, PROPERTY_RENDER_PROTECTED_TEXT_AS_LINKS, PROPERTY_SHOW_LINKS_FOR_PROTECTED_FIELDS, PROPERTY_STYLES_FOR_TD, PROPERTY_TRIM_LINKS, PROPERTY_USING_MONOSPACE_FONT, PROPERTY_VERTICAL_SEGMENT_ALIGNMENT, readOnly, renderProtectedAsLinks, trimLinks, usingMonoFont, verticalSegmentAlignment
 
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
FieldWidget(ComponentElement[] componentElements, Properties settings)
          Class constructor.
 
Method Summary
protected  String buildCursorPositioningLink(int pos)
          Renders a link which represents repositioning the cursor to the specified position, using the action key from this Widget's settings.
protected  String buildCursorPositioningLink(int pos, String className)
           
protected  String buildCursorPositioningLink(int pos, String foregroundColorStyleClass, String reverseColorStyleClass)
           
protected  void drawField(FieldComponentElement fce, StringBuffer buffer)
           
protected  void drawField(FieldComponentElement fce, StringBuffer buffer, String renderTag)
          Renders an individual FieldComponentElement as a table cell containing text or an input field.
protected  int drawFieldList(FieldRowComponentElement frce, StringBuffer buffer)
           
protected  int drawFieldList(FieldRowComponentElement frce, StringBuffer buffer, boolean buildTable)
          Renders an individual FieldRowComponentElement as a set of table cells.
 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.
 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.
protected  void internalMakeSpan(String text, StringBuffer buffer, String foregroundColorStyleClass, String reverseColorStyleClass, String extendedStyle)
           
protected  void internalMakeSpan(String text, StringBuffer buffer, String foregroundColorStyleClass, String reverseColorStyleClass, String extendedStyle, boolean escapeHTML)
           
 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.
 void setContextAttributes(ContextAttributes contextAttributes)
          Sets the contextAttributes of this Widget
 void setHtmlElementFactory(HTMLElementFactory htmlFactory)
           
 void setSettings(Properties newSettings)
          Sets the Widget's settings.
 
Methods inherited from class com.ibm.hats.transform.widgets.AbstractFieldWidget
getArabicStringSegments, getStringSegments, getTrimmedLinkSegments, isCharacter
 
Methods inherited from class com.ibm.hats.transform.widgets.Widget
convertBidi, draw, getComponentElements, getContextAttribute, getContextAttributes, getCustomComposite, getSettings, insertAlign, insertDir, newInstance, setComponentElements, setContextAttribute
 
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
See Also:
Constant Field Values

PROPERTY_BLINK_STYLE

public static final String PROPERTY_BLINK_STYLE
See Also:
Constant Field Values

PROPERTY_REVERSE_VIDEO_STYLE

public static final String PROPERTY_REVERSE_VIDEO_STYLE
See Also:
Constant Field Values

PROPERTY_UNDERLINE_STYLE

public static final String PROPERTY_UNDERLINE_STYLE
See Also:
Constant Field Values

PROPERTY_COLUMN_SEPARATOR_STYLE

public static final String PROPERTY_COLUMN_SEPARATOR_STYLE
See Also:
Constant Field Values

MONOSPACE_FONT_STYLE_CLASS

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

htmlElementFactory

protected HTMLElementFactory htmlElementFactory

blinkStyle

protected String blinkStyle

underlineStyle

protected String underlineStyle

reverseVideoStyle

protected String reverseVideoStyle

columnSeparatorStyle

protected String columnSeparatorStyle

applyUnderlineStyle

protected boolean applyUnderlineStyle

protectedLinkStyleClass

protected String protectedLinkStyleClass

optimizedOutput

protected boolean optimizedOutput

omitExtraneousTables

protected boolean omitExtraneousTables

addSpan

protected boolean addSpan

addRevClassToTD

protected boolean addRevClassToTD

extendedStyleInsideTD

protected boolean extendedStyleInsideTD

extendedStyleForTD

protected boolean extendedStyleForTD

addNowrap

protected boolean addNowrap

classesForTD

protected String classesForTD

stylesForTD

protected String stylesForTD

tableStyleClass

protected String tableStyleClass

tableCellStyleClass

protected String tableCellStyleClass

fieldStyleClass

protected String fieldStyleClass

style

protected String style

codepage

protected int codepage

isDBCSSession

protected boolean isDBCSSession

useAccentedCharacters

protected boolean useAccentedCharacters

isBIDI

protected boolean isBIDI

dir

protected String dir

dirText

protected String dirText

reversed

protected boolean reversed

isSymmetricSwapping

protected boolean isSymmetricSwapping

isNumericSwapping

protected boolean isNumericSwapping

arabicOrientation

protected String arabicOrientation

ScreenOrient

protected String ScreenOrient

isLinuxRuntime

protected boolean isLinuxRuntime

isInsideVCTView

protected boolean isInsideVCTView

closeTags

protected boolean closeTags

defaults

public static Properties defaults
Default settings for this Widget.


inDefaultRendering

protected boolean inDefaultRendering

inCompactRendering

protected boolean inCompactRendering
Constructor Detail

FieldWidget

public FieldWidget(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

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

drawFieldList

protected int drawFieldList(FieldRowComponentElement frce,
                            StringBuffer buffer)

drawFieldList

protected int drawFieldList(FieldRowComponentElement frce,
                            StringBuffer buffer,
                            boolean buildTable)
Renders an individual FieldRowComponentElement as a set of table cells. Rendering takes place within a table row, depending on widget settings. Calls drawField.

Parameters:
frce - field row to render
buffer - output buffer
Returns:
the colspan used in the row
See Also:
FieldWidget.drawField(FieldComponentElement, StringBuffer)

drawField

protected void drawField(FieldComponentElement fce,
                         StringBuffer buffer)

drawField

protected void drawField(FieldComponentElement fce,
                         StringBuffer buffer,
                         String renderTag)
Renders an individual FieldComponentElement as a table cell containing text or an input field. Rendering takes place within a table row, depending on widget settings.

Parameters:
fce - the field to render
buffer - output buffer

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

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

buildCursorPositioningLink

protected String buildCursorPositioningLink(int pos)
Renders a link which represents repositioning the cursor to the specified position, using the action key from this Widget's settings.

Parameters:
pos - screen position to send the key to
Returns:
html link

buildCursorPositioningLink

protected String buildCursorPositioningLink(int pos,
                                            String className)

buildCursorPositioningLink

protected String buildCursorPositioningLink(int pos,
                                            String foregroundColorStyleClass,
                                            String reverseColorStyleClass)

internalMakeSpan

protected void internalMakeSpan(String text,
                                StringBuffer buffer,
                                String foregroundColorStyleClass,
                                String reverseColorStyleClass,
                                String extendedStyle)

internalMakeSpan

protected void internalMakeSpan(String text,
                                StringBuffer buffer,
                                String foregroundColorStyleClass,
                                String reverseColorStyleClass,
                                String extendedStyle,
                                boolean escapeHTML)

setSettings

public void setSettings(Properties newSettings)
Description copied from class: Widget
Sets the Widget's settings.

Overrides:
setSettings in class AbstractFieldWidget
Parameters:
newSettings - The Properties to set.

setContextAttributes

public void setContextAttributes(ContextAttributes contextAttributes)
Description copied from class: Widget
Sets the contextAttributes of this Widget

Overrides:
setContextAttributes in class Widget
Parameters:
contextAttributes - The contextAttributes to set

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

setHtmlElementFactory

public void setHtmlElementFactory(HTMLElementFactory htmlFactory)

HATS 7.5.1 (201005110649)