chrriis.uihierarchy.accessor
Class AccessorFactory

java.lang.Object
  extended bychrriis.uihierarchy.accessor.AccessorFactory

public class AccessorFactory
extends Object

The factory that is used to create the accessors.

Version:
1.0 2003.12.2
Author:
Christopher Deckers (chrriis@brainlex.com)

Constructor Summary
AccessorFactory()
          Construct an AccessorFactory.
 
Method Summary
 Accessor createAccessor(UIHConfig uihConfig, HLevel[] hLevels)
          Create an accessor for some levels of a hierarchy.
 Accessor newAccessor(UIHConfig uihConfig, HLevel[] hLevels)
          Create an accessor for some levels of a hierarchy.
 ParentLevelAccessor newParentLevelAccessor(UIHConfig uihConfig, HParentLevel hParentLevel)
          Create an accessor for a single parent level of a hierarchy.
 SingleLevelAccessor newSingleLevelAccessor(UIHConfig uihConfig, HLevel hLevel)
          Create an accessor for a single level of a hierarchy.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessorFactory

public AccessorFactory()
Construct an AccessorFactory. This class can be subclassed to provide custom accessors with additional functionalities.

Method Detail

createAccessor

public final Accessor createAccessor(UIHConfig uihConfig,
                                     HLevel[] hLevels)
Create an accessor for some levels of a hierarchy. This method is final as it performs some checks on the accessors that are created. If you want to provide another factory, then you should override newAccessor(UIHConfig, HLevel[]) which is called when more than one level is to be handled. When only one level is concerned newSingleLevelAccessor(UIHConfig, HLevel) is invoked.

Parameters:
uihConfig - The configuration that this accessor is going to use.
hLevels - The levels for which to create the accessor.
Returns:
The accessor of the levels.

newParentLevelAccessor

public ParentLevelAccessor newParentLevelAccessor(UIHConfig uihConfig,
                                                  HParentLevel hParentLevel)
Create an accessor for a single parent level of a hierarchy. It is called by newSingleLevelAccessor(...) to create an accessor that manipulates a single parent level. This method may be overriden when defining a new factory.

Parameters:
uihConfig - The configuration that this accessor is going to use.
hParentLevel - The parent level for which to create the accessor.
Returns:
The accessor of the parent level.

newSingleLevelAccessor

public SingleLevelAccessor newSingleLevelAccessor(UIHConfig uihConfig,
                                                  HLevel hLevel)
Create an accessor for a single level of a hierarchy. It is called by the framework to create an accessor that manipulates a single level. This method may be overriden when defining a new factory. Unless overriden, this method calls newParentLevelAccessor(...) when the level is a parent level.

Parameters:
uihConfig - The configuration that this accessor is going to use.
hLevel - The level for which to create the accessor.
Returns:
The accessor of the level.

newAccessor

public Accessor newAccessor(UIHConfig uihConfig,
                            HLevel[] hLevels)
Create an accessor for some levels of a hierarchy. It is called by the framework to create an accessor that manipulates more than one level at a time. This method may be overriden when defining a new factory.

Parameters:
uihConfig - The hierarchy configuration that this accessor is going to act on.
hLevels - The levels for which to create the accessor.
Returns:
The accessor of the levels.