org.apache.myfaces.trinidadinternal.ui.laf
Class LookAndFeelScorer
java.lang.Object
org.apache.myfaces.trinidadinternal.ui.laf.LookAndFeelScorer
- Direct Known Subclasses:
- NameAndAgentScorer, NameOnlyScorer
public abstract class LookAndFeelScorer
- extends java.lang.Object
The LookAndFeelScorer is responsible for producing a score that is
used in the LookAndFeel selection process. A LookAndFeelScorer
is specified for each LookAndFeel that is registered with the
LookAndFeelManager. When it is time to pick a LookAndFeel,
LookAndFeelScore.score() is called for each LookAndFeel. The
LookAndFeel that produces the highest score is used to render
the response.
- Version:
- $Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/laf/LookAndFeelScorer.java#0 $) $Date: 10-nov-2005.18:50:31 $
- Author:
- The Oracle ADF Faces Team
- See Also:
Score
Method Summary |
abstract Score |
scoreLookAndFeel(UIXRenderingContext context,
java.lang.String lafName)
Generates a Score which is used to determine whether the
LookAndFeel associated with this LookAndFeelScorer is the
best LookAndFeel to use for the current request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DONT_CARE_MATCH
public static final int DONT_CARE_MATCH
- See Also:
Score.DONT_CARE_MATCH
,
Constant Field Values
COMPARISON_MATCH
public static final int COMPARISON_MATCH
- See Also:
Score.COMPARISON_MATCH
,
Constant Field Values
RANGE_MATCH
public static final int RANGE_MATCH
- See Also:
Score.RANGE_MATCH
,
Constant Field Values
EXACT_MATCH
public static final int EXACT_MATCH
- See Also:
Score.EXACT_MATCH
,
Constant Field Values
NO_MATCH
public static final int NO_MATCH
- See Also:
Score.NO_MATCH
,
Constant Field Values
LookAndFeelScorer
public LookAndFeelScorer()
scoreLookAndFeel
public abstract Score scoreLookAndFeel(UIXRenderingContext context,
java.lang.String lafName)
- Generates a Score which is used to determine whether the
LookAndFeel associated with this LookAndFeelScorer is the
best LookAndFeel to use for the current request.
- Parameters:
context
- The RenderingContext for the current request.
LookAndFeelScorers can use the RenderingContext
to get at information which impacts the score,
such as the Agent information.lafName
- The preferred look and feel family name.
This value may be null if there is no
preferred look and feel family. In this case,
LookAndFeelScorer implementations should return
Score.DONT_CARE_MATCH for the name score.
Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.