| java.lang.Object ti.chimera.registry.TypeNodeContract ti.chimera.pref.FontNodeContract
FontNodeContract | public class FontNodeContract extends ti.chimera.registry.TypeNodeContract (Code) | | A
NodeContract which constrains the value to be a font matching the
specified style. Note that some of the styles are mutually exclusive, so
if you specify, for example a style BOLD | NOT_BOLD , then no
possible font will match.
author: ;Rob Clark;a0873619;San Diego;; version: 0.1 |
Field Summary | |
final public static int | BOLD A style flag indicating that only bold fonts are acceptible. | final public static int | ITALIC A style flag indicating that only italic fonts are acceptible. | final public static int | MONOSPACE A style flag indicating that only monospace fonts are acceptible. | final public static int | NOT_BOLD A style flag indicating that only non-bold fonts are acceptible. | final public static int | NOT_ITALIC A style flag indicating that only non-italic fonts are acceptible. | final public static int | NOT_MONOSPACE A style flag indicating that only non-monospace fonts are acceptible. |
Method Summary | |
public boolean | accepts(Object value) Determine if the specified value meets this contract. | public int | getStyle() | public String | toString() The contract implementation should overload toString so
the contract can be displayed to the user in a sane format, for use
in error messages, etc. |
BOLD | final public static int BOLD(Code) | | A style flag indicating that only bold fonts are acceptible.
|
ITALIC | final public static int ITALIC(Code) | | A style flag indicating that only italic fonts are acceptible.
|
MONOSPACE | final public static int MONOSPACE(Code) | | A style flag indicating that only monospace fonts are acceptible.
|
NOT_BOLD | final public static int NOT_BOLD(Code) | | A style flag indicating that only non-bold fonts are acceptible.
|
NOT_ITALIC | final public static int NOT_ITALIC(Code) | | A style flag indicating that only non-italic fonts are acceptible.
|
NOT_MONOSPACE | final public static int NOT_MONOSPACE(Code) | | A style flag indicating that only non-monospace fonts are acceptible.
|
FontNodeContract | public FontNodeContract()(Code) | | Class Constructor.
|
FontNodeContract | public FontNodeContract(int style)(Code) | | Class Constructor.
Parameters: style - a bitmask of constraints on the acceptible font |
accepts | public boolean accepts(Object value)(Code) | | Determine if the specified value meets this contract.
Parameters: value - the value to check true if meets contract |
getStyle | public int getStyle()(Code) | | Get the style
|
toString | public String toString()(Code) | | The contract implementation should overload toString so
the contract can be displayed to the user in a sane format, for use
in error messages, etc.
|
|
|