facets.core.superficial
Class SIndexing.Coupler

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.core.superficial.SIndexing.Coupler
All Implemented Interfaces:
TargetCoupler, java.io.Serializable
Direct Known Subclasses:
FacetFactory.ComboCoupler
Enclosing class:
SIndexing

public static class SIndexing.Coupler
extends Tracer
implements TargetCoupler

Connects an SIndexing to the application.

A SIndexing.Coupler supplies client-specific mechanism and policy for an SIndexing.

See Also:
Serialized Form

Constructor Summary
SIndexing.Coupler()
           
 
Method Summary
 boolean canCycle(SIndexing i)
          Can the indexing loop round when iterating through its indexables?
 java.lang.Object[] getIndexables()
          Can return dynamic indexables.
 void indexSet(SIndexing i)
          Called whenever an index changes.
 java.lang.String[] iterationTitles(SIndexing i)
          Returns titles for iterating buttons or menu items.
 boolean[] liveStates(SIndexing i)
          Returns an array defining the 'enabled' state of each item.
 java.lang.String[] newIndexableTitles(SIndexing i)
          Returns strings to represent the indexables.
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SIndexing.Coupler

public SIndexing.Coupler()
Method Detail

newIndexableTitles

public java.lang.String[] newIndexableTitles(SIndexing i)
Returns strings to represent the indexables.

These will appear in facet lists, or as labels for menu items or radio buttons.

The default returns titles based on the type of the SIndexing's indexables:


indexSet

public void indexSet(SIndexing i)
Called whenever an index changes.


getIndexables

public java.lang.Object[] getIndexables()
Can return dynamic indexables.

Called by SIndexing.indexables() if none set during construction.

Returns:
a non-empty array

iterationTitles

public java.lang.String[] iterationTitles(SIndexing i)
Returns titles for iterating buttons or menu items.

Default implementation returns "Previous","Next".


canCycle

public boolean canCycle(SIndexing i)
Can the indexing loop round when iterating through its indexables?

Default returns false.


liveStates

public boolean[] liveStates(SIndexing i)
Returns an array defining the 'enabled' state of each item.

May be needed for menu items or radio buttons. Default implementation returns states to match i.