com.cc.framework.ui.painter.html
Class HtmlSwapSelectPainter.AvailableOptionsIterator

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

protected static class HtmlSwapSelectPainter.AvailableOptionsIterator
extends java.lang.Object
implements OptionsIterator

Iterator that filters on available option elements only

Author:
P001002

Field Summary
private  OptionsComparator cmp
           
private  HtmlSwapSelectPainter.OptionFilter filter
           
private  OptionsIterator iter
           
 
Constructor Summary
HtmlSwapSelectPainter.AvailableOptionsIterator(OptionsIterator iter, java.lang.Object[] values, HtmlSwapSelectPainter.OptionFilter filter)
          Constructor
 
Method Summary
 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.Object getLabel()
          Returns the label of the current element
 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
 boolean isDone()
          Check if the iteration has no more elements
protected  OptionsIterator iter()
           
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iter

private OptionsIterator iter

cmp

private OptionsComparator cmp

filter

private HtmlSwapSelectPainter.OptionFilter filter
Constructor Detail

HtmlSwapSelectPainter.AvailableOptionsIterator

public HtmlSwapSelectPainter.AvailableOptionsIterator(OptionsIterator iter,
                                                      java.lang.Object[] values,
                                                      HtmlSwapSelectPainter.OptionFilter filter)
Constructor

Parameters:
iter - options iterator for all option elements
values - the selected elements
filter - the option filter
Method Detail

isDone

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

Specified by:
isDone in interface OptionsIterator
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

Specified by:
next in interface OptionsIterator
See Also:
OptionsIterator.next()

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

getImage

public ImageModel getImage()
Description copied from interface: OptionItem
Returns the image for the current option element.

Specified by:
getImage in interface OptionItem
Returns:
Option Image or null
See Also:
OptionItem.getImage()

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

getKey

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

getMaxLength

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

getTooltip

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

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

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)

iter

protected OptionsIterator iter()
Returns:
returns the option iterator


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