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

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

protected static class HtmlSwapSelectPainter.OptionItemImpl
extends java.lang.Object
implements OptionItem

Simple option item implementation

Author:
P001002

Field Summary
private  boolean filter
           
private  ImageModel image
           
private  int indent
           
private  java.lang.Object key
           
private  java.lang.Object label
           
private  boolean localize
           
private  int maxLength
           
private  java.lang.String style
           
private  java.lang.String styleClass
           
private  java.lang.Object tooltip
           
 
Constructor Summary
HtmlSwapSelectPainter.OptionItemImpl(java.lang.Object key)
          Constructs an new item for a selected element without corresponding option element
HtmlSwapSelectPainter.OptionItemImpl(OptionsIterator iter)
          Constructs an new item from the current iterator position
 
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 localize()
          If this flag is set to true the framework interprets all labels as resource identifiers and localize them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filter

private boolean filter

image

private ImageModel image

indent

private int indent

key

private java.lang.Object key

label

private java.lang.Object label

maxLength

private int maxLength

style

private java.lang.String style

styleClass

private java.lang.String styleClass

tooltip

private java.lang.Object tooltip

localize

private boolean localize
Constructor Detail

HtmlSwapSelectPainter.OptionItemImpl

public HtmlSwapSelectPainter.OptionItemImpl(OptionsIterator iter)
Constructs an new item from the current iterator position

Parameters:
iter - option element iterator

HtmlSwapSelectPainter.OptionItemImpl

public HtmlSwapSelectPainter.OptionItemImpl(java.lang.Object key)
Constructs an new item for a selected element without corresponding option element

Parameters:
key - option element key
Method Detail

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)


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