org.apache.myfaces.trinidad.context
Class AccessibilityProfile

java.lang.Object
  extended by org.apache.myfaces.trinidad.context.AccessibilityProfile

public class AccessibilityProfile
extends Object

Specifies a set of accessibility-related properties that are applied to the current request. AccessibilityProfile instances are obtained by the getInstance() factory method. AccessibilityProfile instances are immutable.


Nested Class Summary
static class AccessibilityProfile.ColorContrast
          Color contrast values
static class AccessibilityProfile.FontSize
          Font size values.
 
Method Summary
 boolean equals(Object o)
           
 AccessibilityProfile.ColorContrast getColorContrast()
          Returns the user's preferred color contrast setting.
static AccessibilityProfile getDefaultInstance()
          Returns an AccessiblityProfile instance with the default preferences.
 AccessibilityProfile.FontSize getFontSize()
          Returns the user's preferred font size setting.
static AccessibilityProfile getInstance(AccessibilityProfile.ColorContrast colorContrast, AccessibilityProfile.FontSize fontSize)
          Returns an AccessibilityProfile instance with the specified properties.
 int hashCode()
           
 boolean isHighContrast()
          Convenience method for testing whether high contrast content is required.
 boolean isLargeFonts()
          Convenience method for testing whether large fonts are required.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static AccessibilityProfile getInstance(AccessibilityProfile.ColorContrast colorContrast,
                                               AccessibilityProfile.FontSize fontSize)
Returns an AccessibilityProfile instance with the specified properties.

Parameters:
colorContrast - Specifies the user's color contrast preference. If null, defaults to ColorContrast.STANDARD.
fontSize - Specifies the user's font size preference. If null, defaults to FontSize.MEDIUM.

getDefaultInstance

public static AccessibilityProfile getDefaultInstance()
Returns an AccessiblityProfile instance with the default preferences.


getColorContrast

public AccessibilityProfile.ColorContrast getColorContrast()
Returns the user's preferred color contrast setting.


getFontSize

public AccessibilityProfile.FontSize getFontSize()
Returns the user's preferred font size setting.


isHighContrast

public final boolean isHighContrast()
Convenience method for testing whether high contrast content is required.


isLargeFonts

public final boolean isLargeFonts()
Convenience method for testing whether large fonts are required.


hashCode

public final int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.