info.rolandkrueger.roklib.util.groupvisibility
Class RadioComponentGroupManager

java.lang.Object
  extended by info.rolandkrueger.roklib.util.groupvisibility.RadioComponentGroupManager
All Implemented Interfaces:
Serializable

public class RadioComponentGroupManager
extends Object
implements Serializable

This class manages a set of components which can be switched on or off in the same way as a group of radio buttons. Component in this context means any object which implements the IVisibilityEnablingConfigurable interface. This may be a UI component or any other object that can be switched on or off.

An example use case for this class is the navigation bar in a web application. Depending on which section the user is visiting, the links for the individual sections in the navigation bar are either selected or not selected. If the user clicks on such a link, its background image may change from an unselected graphic to a selected graphic. All other link images have to show the unselected image accordingly. This behavior is controlled automatically by the RadioComponentGroupManager.

Author:
Roland Krueger
See Also:
VisibilityGroupManager, Serialized Form

Nested Class Summary
static class RadioComponentGroupManager.Mode
           
static class RadioComponentGroupManager.RadioComponentSwitch
           
 
Field Summary
private  Map<String,RadioComponentGroupManager.RadioComponentSwitch> mConditions
           
private  VisibilityGroupManager mManager
           
private  RadioComponentGroupManager.Mode mMode
           
private static long serialVersionUID
           
 
Constructor Summary
RadioComponentGroupManager()
           
RadioComponentGroupManager(int numberOfManagedComponents)
           
RadioComponentGroupManager(int numberOfManagedComponents, RadioComponentGroupManager.Mode mode)
           
RadioComponentGroupManager(RadioComponentGroupManager.Mode mode)
           
 
Method Summary
 RadioComponentGroupManager.RadioComponentSwitch addComponent(String groupId, IVisibilityEnablingConfigurable component)
           
private  void recalculateExpressions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

mManager

private VisibilityGroupManager mManager

mConditions

private Map<String,RadioComponentGroupManager.RadioComponentSwitch> mConditions

mMode

private RadioComponentGroupManager.Mode mMode
Constructor Detail

RadioComponentGroupManager

public RadioComponentGroupManager(RadioComponentGroupManager.Mode mode)

RadioComponentGroupManager

public RadioComponentGroupManager()

RadioComponentGroupManager

public RadioComponentGroupManager(int numberOfManagedComponents,
                                  RadioComponentGroupManager.Mode mode)

RadioComponentGroupManager

public RadioComponentGroupManager(int numberOfManagedComponents)
Method Detail

addComponent

public RadioComponentGroupManager.RadioComponentSwitch addComponent(String groupId,
                                                                    IVisibilityEnablingConfigurable component)

recalculateExpressions

private void recalculateExpressions()


Copyright © 2007-2011. All Rights Reserved.