oracle.cabo.ui.laf
Class LookAndFeelScorer
java.lang.Object
|
+--oracle.cabo.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.
- See Also:
Score
Method Summary |
abstract Score |
scoreLookAndFeel(RenderingContext 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
COMPARISON_MATCH
public static final int COMPARISON_MATCH
- See Also:
Score.COMPARISON_MATCH
RANGE_MATCH
public static final int RANGE_MATCH
- See Also:
Score.RANGE_MATCH
EXACT_MATCH
public static final int EXACT_MATCH
- See Also:
Score.EXACT_MATCH
NO_MATCH
public static final int NO_MATCH
- See Also:
Score.NO_MATCH
LookAndFeelScorer
public LookAndFeelScorer()
scoreLookAndFeel
public abstract Score scoreLookAndFeel(RenderingContext 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.