|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectti.chimera.registry.TypeNodeContract
ti.chimera.pref.FontNodeContract
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.
Field Summary | |
static int |
BOLD
A style flag indicating that only bold fonts are acceptible. |
static int |
ITALIC
A style flag indicating that only italic fonts are acceptible. |
static int |
MONOSPACE
A style flag indicating that only monospace fonts are acceptible. |
static int |
NOT_BOLD
A style flag indicating that only non-bold fonts are acceptible. |
static int |
NOT_ITALIC
A style flag indicating that only non-italic fonts are acceptible. |
static int |
NOT_MONOSPACE
A style flag indicating that only non-monospace fonts are acceptible. |
Fields inherited from interface ti.chimera.registry.NodeContract |
BOOLEAN_CONTRACT, NULL_CONTRACT, NUMBER_CONTRACT, STRING_CONTRACT |
Constructor Summary | |
FontNodeContract()
Class Constructor. |
|
FontNodeContract(int style)
Class Constructor. |
Method Summary | |
boolean |
accepts(java.lang.Object value)
Determine if the specified value meets this contract. |
int |
getStyle()
Get the style |
java.lang.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. |
Methods inherited from class ti.chimera.registry.TypeNodeContract |
getType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int MONOSPACE
public static final int NOT_MONOSPACE
public static final int BOLD
public static final int NOT_BOLD
public static final int ITALIC
public static final int NOT_ITALIC
Constructor Detail |
public FontNodeContract()
public FontNodeContract(int style)
style
- a bitmask of constraints on the acceptible fontMethod Detail |
public boolean accepts(java.lang.Object value)
value
meets this contract.
accepts
in interface NodeContract
accepts
in class TypeNodeContract
value
- the value to check
true
if meets contractpublic int getStyle()
public java.lang.String toString()
toString
so
the contract can be displayed to the user in a sane format, for use
in error messages, etc.
toString
in interface NodeContract
toString
in class TypeNodeContract
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |