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

java.lang.Object
  extended bycom.cc.framework.ui.painter.html.OptionsHelp.IterBase
      extended bycom.cc.framework.ui.painter.html.OptionsHelp.IterEnumeration
All Implemented Interfaces:
OptionItem, OptionsIterator
Enclosing class:
OptionsHelp

private static class OptionsHelp.IterEnumeration
extends OptionsHelp.IterBase

OptionsIterator for Enumeration


Field Summary
private  boolean done
          Out of elements indicator
private  java.util.Enumeration e
          The option elements
 
Constructor Summary
OptionsHelp.IterEnumeration(OptionListDesignModel designModel, java.util.Enumeration e)
          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 isDone()
          Check if the iteration has no more elements
 boolean localize()
          If this flag is set to true the framework interprets all labels as resource identifiers and localize them.
 void next()
          Locates the iterator on the next element of the option list
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
 

Field Detail

e

private java.util.Enumeration e
The option elements


done

private boolean done
Out of elements indicator

Constructor Detail

OptionsHelp.IterEnumeration

public OptionsHelp.IterEnumeration(OptionListDesignModel designModel,
                                   java.util.Enumeration e)
Constructor

Parameters:
designModel - the design model
e - the options enumerator
Method Detail

isDone

public boolean isDone()
Description copied from interface: OptionsIterator
Check if the iteration has no more elements

Returns:
returns true if there is no element left
See Also:
OptionsIterator.isDone()

next

public void next()
Description copied from interface: OptionsIterator
Locates the iterator on the next element of the option list

See Also:
OptionsIterator.next()

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.