org.omnaest.utils.structure.table.concrete.internal
Class CellAndStripeResolverImpl<E>

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.internal.CellAndStripeResolverAbstract<E>
      extended by org.omnaest.utils.structure.table.concrete.internal.CellAndStripeResolverImpl<E>
Type Parameters:
E -
All Implemented Interfaces:
Serializable, TableInternal.CellAndStripeResolver<E>, TableInternal.TableComponentInternal, Table.TableComponent

public class CellAndStripeResolverImpl<E>
extends CellAndStripeResolverAbstract<E>

Author:
Omnaest
See Also:
TableInternal, TableInternal.CellAndStripeResolver, CellAndStripeResolverAbstract, Serialized Form

Field Summary
protected  TableInternal.TableContentResolver<E> tableContentResolver
           
 
Constructor Summary
CellAndStripeResolverImpl(TableInternal.TableContentResolver<E> tableContentResolver)
           
 
Method Summary
protected  int determineColumnIndexPositionForCellIndexPosition(int cellIndexPosition)
           
protected  int determineRowIndexPositionForCellIndexPosition(int cellIndexPosition)
           
 Table.Cell<E> resolveCell(TableInternal.StripeData<E> stripeData, int indexPosition)
          Resolves a Table.Cell by a given Table.Stripe and the complementary index position
 Table.Cell<E> resolveCell(TableInternal.StripeData<E> stripeData, Object titleValue)
          Resolves a Table.Cell by a given Table.Stripe and the title value of the orthogonal stripe
 Table.Cell<E> resolveCell(TableInternal.StripeData<E> stripeData, TableInternal.StripeData<E> stripeDataOrthogonal)
          Resolves a Table.Cell by two orthogonal TableInternal.StripeData instances
 Table.Cell<E> resolveOrCreateCell(TableInternal.StripeData<E> stripeData, TableInternal.StripeData<E> stripeDataOrthogonal)
          Tries to resolve or creates a Table.Cell by two orthogonal TableInternal.StripeData instances
 TableInternal.StripeData<E> resolveOrCreateStripeData(Table.Stripe.StripeType stripeType, int indexPosition)
          Tries to resolve a TableInternal.StripeData instance for the given index position and Table.Stripe.StripeType.
 TableInternal.StripeData<E> resolveOrCreateStripeData(Table.Stripe.StripeType stripeType, Object titleValue)
          Tries to resolve a TableInternal.StripeData instance for the given index position and Table.Stripe.StripeType.
 TableInternal.StripeData<E> resolveStripeData(Table.Stripe.StripeType stripeType, int indexPosition)
          Resolves the Table.Stripe for the given Table.Stripe.StripeType and index position from the internal Table reference.
protected  TableInternal.StripeData<E> resolveStripeData(Table.Stripe.StripeType stripeType, Object titleValue)
          Resolves the TableInternal.StripeData instance for the given Table.Stripe.StripeType and the Table.Stripe.Title.getValue()
protected  TableInternal.TableContent<E> resolveTableContent()
           
 
Methods inherited from class org.omnaest.utils.structure.table.concrete.internal.CellAndStripeResolverAbstract
resolveCell, resolveCell, resolveCell, resolveCell, resolveCell, resolveCell, resolveCell, resolveCell, resolveCell, resolveCell, resolveColumnStripeData, resolveColumnStripeData, resolveOrCreateCell, resolveOrCreateCell, resolveOrCreateCell, resolveOrCreateCell, resolveOrCreateCell, resolveOrCreateCell, resolveOrCreateCell, resolveOrCreateCellWithinNewTableArea, resolveOrCreateCellWithinNewTableArea, resolveOrCreateCellWithinNewTableArea, resolveOrCreateCellWithinNewTableArea, resolveOrCreateCellWithinNewTableArea, resolveOrCreateCellWithinNewTableArea, resolveOrCreateColumnStripeData, resolveOrCreateRowStripeData, resolveRowStripeData, resolveRowStripeData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableContentResolver

protected TableInternal.TableContentResolver<E> tableContentResolver
Constructor Detail

CellAndStripeResolverImpl

public CellAndStripeResolverImpl(TableInternal.TableContentResolver<E> tableContentResolver)
Parameters:
tableContentResolver -
Method Detail

resolveCell

public Table.Cell<E> resolveCell(TableInternal.StripeData<E> stripeData,
                                 TableInternal.StripeData<E> stripeDataOrthogonal)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by two orthogonal TableInternal.StripeData instances

Returns:

resolveOrCreateCell

public Table.Cell<E> resolveOrCreateCell(TableInternal.StripeData<E> stripeData,
                                         TableInternal.StripeData<E> stripeDataOrthogonal)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve or creates a Table.Cell by two orthogonal TableInternal.StripeData instances

Returns:

resolveStripeData

protected TableInternal.StripeData<E> resolveStripeData(Table.Stripe.StripeType stripeType,
                                                        Object titleValue)
Description copied from class: CellAndStripeResolverAbstract
Resolves the TableInternal.StripeData instance for the given Table.Stripe.StripeType and the Table.Stripe.Title.getValue()

Specified by:
resolveStripeData in class CellAndStripeResolverAbstract<E>
Returns:

resolveStripeData

public TableInternal.StripeData<E> resolveStripeData(Table.Stripe.StripeType stripeType,
                                                     int indexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves the Table.Stripe for the given Table.Stripe.StripeType and index position from the internal Table reference.

Returns:

resolveOrCreateStripeData

public TableInternal.StripeData<E> resolveOrCreateStripeData(Table.Stripe.StripeType stripeType,
                                                             int indexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve a TableInternal.StripeData instance for the given index position and Table.Stripe.StripeType. If no Table.Stripe instance could be resolved for the given valid index position as many are created until there is an instance available for the given index position.

Returns:

resolveOrCreateStripeData

public TableInternal.StripeData<E> resolveOrCreateStripeData(Table.Stripe.StripeType stripeType,
                                                             Object titleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Tries to resolve a TableInternal.StripeData instance for the given index position and Table.Stripe.StripeType. If no Table.Stripe instance could be resolved for the given valid Table.Stripe.Title.getValue() a new Table.Stripe is created with the given Table.Stripe.Title.getValue().

Returns:

resolveCell

public Table.Cell<E> resolveCell(TableInternal.StripeData<E> stripeData,
                                 int indexPosition)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by a given Table.Stripe and the complementary index position

Returns:

resolveCell

public Table.Cell<E> resolveCell(TableInternal.StripeData<E> stripeData,
                                 Object titleValue)
Description copied from interface: TableInternal.CellAndStripeResolver
Resolves a Table.Cell by a given Table.Stripe and the title value of the orthogonal stripe

Returns:

determineRowIndexPositionForCellIndexPosition

protected int determineRowIndexPositionForCellIndexPosition(int cellIndexPosition)
Specified by:
determineRowIndexPositionForCellIndexPosition in class CellAndStripeResolverAbstract<E>
Returns:

determineColumnIndexPositionForCellIndexPosition

protected int determineColumnIndexPositionForCellIndexPosition(int cellIndexPosition)
Specified by:
determineColumnIndexPositionForCellIndexPosition in class CellAndStripeResolverAbstract<E>
Returns:

resolveTableContent

protected TableInternal.TableContent<E> resolveTableContent()
Returns:


Copyright © 2011. All Rights Reserved.