org.xwiki.gwt.wysiwyg.client.plugin.font
Class FontFamilyMatcher

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.plugin.font.DefaultStringMatcher
      extended by org.xwiki.gwt.wysiwyg.client.plugin.font.AbstractFontMatcher
          extended by org.xwiki.gwt.wysiwyg.client.plugin.font.FontFamilyMatcher
All Implemented Interfaces:
Matcher<String>

public class FontFamilyMatcher
extends AbstractFontMatcher

Matches values of the font-family CSS property.

Version:
$Id$

Field Summary
static String SANS_SERIF_SUFFIX
          The suffix added to a font family name in order to default it to the generic sans-serif family.
static String SERIF_SUFFIX
          The suffix added to a font family name in order to default it to the generic serif family.
static int TEST_FONT_SIZE
          A larger font size increases the accuracy but may lower the speed of the test.
 
Fields inherited from class org.xwiki.gwt.wysiwyg.client.plugin.font.AbstractFontMatcher
container, left, right
 
Constructor Summary
FontFamilyMatcher()
          Creates a new font family matcher.
 
Method Summary
 boolean match(String leftValue, String rightValue)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_FONT_SIZE

public static final int TEST_FONT_SIZE
A larger font size increases the accuracy but may lower the speed of the test.

See Also:
Constant Field Values

SERIF_SUFFIX

public static final String SERIF_SUFFIX
The suffix added to a font family name in order to default it to the generic serif family.

See Also:
Constant Field Values

SANS_SERIF_SUFFIX

public static final String SANS_SERIF_SUFFIX
The suffix added to a font family name in order to default it to the generic sans-serif family.

See Also:
Constant Field Values
Constructor Detail

FontFamilyMatcher

public FontFamilyMatcher()
Creates a new font family matcher.

Method Detail

match

public boolean match(String leftValue,
                     String rightValue)

Specified by:
match in interface Matcher<String>
Overrides:
match in class DefaultStringMatcher
Parameters:
leftValue - the left value
rightValue - the right value
Returns:
true if the left and right values match, false otherwise
See Also:
Matcher.match(Object, Object)


Copyright © 2004-2012 XWiki. All Rights Reserved.