com.cc.framework.ui.painter.html
Class OptionsHelp.IterBase

java.lang.Object
  extended bycom.cc.framework.ui.painter.html.OptionsHelp.IterBase
All Implemented Interfaces:
OptionItem, OptionsIterator
Direct Known Subclasses:
OptionsHelp.IterEnumeration, OptionsHelp.IterIterator, OptionsHelp.IterLineIterator, OptionsHelp.IterList, OptionsHelp.IterOptionListDataModel, OptionsHelp.IterSimpleEnumType2
Enclosing class:
OptionsHelp

private abstract static class OptionsHelp.IterBase
extends java.lang.Object
implements OptionsIterator

Baseclass for Option iterators


Field Summary
private  java.lang.Object curKey
          The current key
private  java.lang.Object curLabel
          The current label
private  java.lang.Object current
          The current bean
private  java.lang.Object curTooltip
          The current tooltip
private  OptionListDesignModel designModel
          The designmodel
 
Constructor Summary
OptionsHelp.IterBase(OptionListDesignModel designModel)
          Constructor
 
Method Summary
protected static java.lang.Object callPropertyGet(java.lang.Object bean, java.lang.String property)
          Processes the Getter-Method on the specified Bean
 boolean filter()
          Returns if the filter is activated (default=true).
 ImageModel getImage()
          Returns the image for the current option element.
 int getIndent()
          Gets an optional indentiation level of the current element.
 java.lang.Object getKey()
          Gets the key of the current iteration element
 java.lang.String getKeyProperty()
          Returns the name of the property which returns the key of the option.
 java.lang.Object getLabel()
          Returns the label of the current element
 java.lang.String getLabelProperty()
          Returns the name of the property which supplies the display text of the option.
 int getMaxLength()
          Returns the maximum number of characters that are displayed for each option element.
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns the value for the given property on the current iteration element
 java.lang.String getStyle()
          Returns the HTML-style that can be directly specified with this attribute.
 java.lang.String getStyleClass()
          Returns the HTML-class attribute that can be specified with this attribute
 java.lang.Object getTooltip()
          Returns the tooltip for the current element
 java.lang.String getTooltipProperty()
          Returns the name of the property which supplies the tooltip text of the option.
 boolean localize()
          If this flag is set to true the framework interprets all labels as resource identifiers and localize them.
protected  void select(java.lang.Object current)
          Selects the object
protected  void select(java.lang.Object bean, java.lang.Object key, java.lang.Object label, java.lang.Object tooltip)
          Selects the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cc.framework.ui.painter.html.OptionsIterator
isDone, next
 

Field Detail

designModel

private OptionListDesignModel designModel
The designmodel


current

private java.lang.Object current
The current bean


curKey

private java.lang.Object curKey
The current key


curLabel

private java.lang.Object curLabel
The current label


curTooltip

private java.lang.Object curTooltip
The current tooltip

Constructor Detail

OptionsHelp.IterBase

public OptionsHelp.IterBase(OptionListDesignModel designModel)
Constructor

Parameters:
designModel - the design model
Method Detail

getKeyProperty

public java.lang.String getKeyProperty()
Returns the name of the property which returns the key of the option.

Returns:
Name of the property

getLabelProperty

public java.lang.String getLabelProperty()
Returns the name of the property which supplies the display text of the option.

Returns:
Name of the property

getTooltipProperty

public java.lang.String getTooltipProperty()
Returns the name of the property which supplies the tooltip text of the option.

Returns:
Name of the property

getImage

public ImageModel getImage()
Returns the image for the current option element.

Specified by:
getImage in interface OptionItem
Returns:
Option Image or null

select

protected void select(java.lang.Object current)
Selects the object

Parameters:
current - Current iteration element

select

protected void select(java.lang.Object bean,
                      java.lang.Object key,
                      java.lang.Object label,
                      java.lang.Object tooltip)
Selects the object

Parameters:
bean - the current bean
key - Current key
label - Current label
tooltip - Current tooltip

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Description copied from interface: OptionItem
Returns the value for the given property on the current iteration element

Specified by:
getProperty in interface OptionItem
Parameters:
propertyName - the property name
Returns:
property value
See Also:
OptionItem.getProperty(java.lang.String)

callPropertyGet

protected static java.lang.Object callPropertyGet(java.lang.Object bean,
                                                  java.lang.String property)
Processes the Getter-Method on the specified Bean

Parameters:
bean - Bean to be processed
property - Name of the Property
Returns:
Object

getIndent

public int getIndent()
Description copied from interface: OptionItem
Gets an optional indentiation level of the current element. This is used when iterating over a tree structure

Specified by:
getIndent in interface OptionItem
Returns:
indentation level
See Also:
OptionItem.getIndent()

localize

public boolean localize()
Description copied from interface: OptionItem
If this flag is set to true the framework interprets all labels as resource identifiers and localize them. If the flag is set to false the lables are treated as string literals without localization.

Specified by:
localize in interface OptionItem
Returns:
true if all labels should be localized
See Also:
OptionItem.localize()

getKey

public final java.lang.Object getKey()
Description copied from interface: OptionItem
Gets the key of the current iteration element

Specified by:
getKey in interface OptionItem
Returns:
Key
See Also:
OptionItem.getKey()

getLabel

public final java.lang.Object getLabel()
Description copied from interface: OptionItem
Returns the label of the current element

Specified by:
getLabel in interface OptionItem
Returns:
Label
See Also:
OptionItem.getLabel()

getTooltip

public final java.lang.Object getTooltip()
Description copied from interface: OptionItem
Returns the tooltip for the current element

Specified by:
getTooltip in interface OptionItem
Returns:
String or null
See Also:
OptionItem.getTooltip()

getMaxLength

public final int getMaxLength()
Description copied from interface: OptionItem
Returns the maximum number of characters that are displayed for each option element.

Specified by:
getMaxLength in interface OptionItem
Returns:
Maximum number of characters to display
See Also:
OptionItem.getMaxLength()

getStyle

public java.lang.String getStyle()
Description copied from interface: OptionItem
Returns the HTML-style that can be directly specified with this attribute.

Specified by:
getStyle in interface OptionItem
Returns:
The HTML-style
See Also:
OptionItem.getStyle()

getStyleClass

public java.lang.String getStyleClass()
Description copied from interface: OptionItem
Returns the HTML-class attribute that can be specified with this attribute

Specified by:
getStyleClass in interface OptionItem
Returns:
The HTML-class
See Also:
OptionItem.getStyleClass()

filter

public boolean filter()
Description copied from interface: OptionItem
Returns if the filter is activated (default=true). This means that all Strings which should be displayed in the HTML page are html encoded

Specified by:
filter in interface OptionItem
Returns:
true if string will be html encoded; false otherwise
See Also:
OptionItem.filter()


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