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

java.lang.Object
  extended bycom.cc.framework.ui.painter.html.OptionsHelp

public abstract class OptionsHelp
extends java.lang.Object

HelperClass for Option Lists

Version:
$Revision: 1.34 $
Author:
Harald Schulz

Nested Class Summary
private static class OptionsHelp.IterBase
          Baseclass for Option iterators
private static class OptionsHelp.IterEnumeration
          OptionsIterator for Enumeration
private static class OptionsHelp.IterIterator
          OptionsIterator for Iterator
private static class OptionsHelp.IterLineIterator
          OptionsIterator for LineIterator
private static class OptionsHelp.IterList
          OptionsIterator for List
private static class OptionsHelp.IterOptionListDataModel
          OptionsIterator for OptionListDataModel
private static class OptionsHelp.IterSimpleEnumType2
          OptionsIterator for SimpleEnumType2
 
Constructor Summary
private OptionsHelp()
          Constructor
 
Method Summary
static org.apache.ecs.ConcreteElement createDisplayElement(java.lang.Object selected)
          Creates a element with all selected option labels
static org.apache.ecs.ConcreteElement createDisplayElement(java.lang.Object[] selected)
          Creates a element with all selected option labels
static org.apache.ecs.ConcreteElement createDisplayElement(PainterContext ctx, OptionsIterator iter, OptionsComparator cmp)
          Creates a element with all selected option labels
static OptionsIterator createIterator(OptionListDesignModel designModel, java.lang.Object dataModel)
          Creates an iterator for the given option collection
static java.lang.Object[] toArray(java.lang.Object value)
          Transforms an object into an Array
static java.lang.String[] translateSelectedItems(PainterContext ctx, OptionListDesignModel designModel, java.lang.Object dataModel, OptionsComparator cmp)
          Creates a String array with all selected option labels
static java.lang.String[] translateSelectedItems(PainterContext ctx, OptionsIterator iter, OptionsComparator cmp)
          Creates a String array with all selected option labels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionsHelp

private OptionsHelp()
Constructor

Method Detail

createIterator

public static OptionsIterator createIterator(OptionListDesignModel designModel,
                                             java.lang.Object dataModel)
Creates an iterator for the given option collection

Parameters:
designModel - Option list design model
dataModel - options collection
Returns:
Iterator or null

translateSelectedItems

public static java.lang.String[] translateSelectedItems(PainterContext ctx,
                                                        OptionListDesignModel designModel,
                                                        java.lang.Object dataModel,
                                                        OptionsComparator cmp)
Creates a String array with all selected option labels

Parameters:
ctx - Painter Context
designModel - Option list design model
dataModel - options collection
cmp - Comparator
Returns:
Selected Labels

translateSelectedItems

public static java.lang.String[] translateSelectedItems(PainterContext ctx,
                                                        OptionsIterator iter,
                                                        OptionsComparator cmp)
Creates a String array with all selected option labels

Parameters:
ctx - Painter Context
iter - options iterator
cmp - Comparator
Returns:
Selected Labels

createDisplayElement

public static org.apache.ecs.ConcreteElement createDisplayElement(java.lang.Object selected)
Creates a element with all selected option labels

Parameters:
selected - the selected key
Returns:
Selected Labels

createDisplayElement

public static org.apache.ecs.ConcreteElement createDisplayElement(java.lang.Object[] selected)
Creates a element with all selected option labels

Parameters:
selected - array with the selected keys
Returns:
Selected Labels

createDisplayElement

public static org.apache.ecs.ConcreteElement createDisplayElement(PainterContext ctx,
                                                                  OptionsIterator iter,
                                                                  OptionsComparator cmp)
Creates a element with all selected option labels

Parameters:
ctx - Painter Context
iter - options iterator
cmp - Comparator. When no comparator is given the whole list will be rendered
Returns:
Selected Labels

toArray

public static java.lang.Object[] toArray(java.lang.Object value)
Transforms an object into an Array

Parameters:
value - Object
Returns:
Array of objects


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