public class Font extends BaseFormsObject
In some cases, using methods on this class may result in a
JdapiIllegalStateException being thrown. When this happens, you are using
an object that refers to a Forms object that has been deleted - your
reference is no longer valid. You can check if an instance of this
class is valid by using the isValidFormsObject()
method.
If you code correctly, this should not happen. It will tend to happen
if you keep references (for extended periods) to Forms objects rather
than look them up dynamically. Of course you will only have this
problem if you destroy Forms objects.
BaseAPI
m_clientInfo, m_pd2fob
PROPERTY_DEFAULT_VALUE, PROPERTY_INHERITED_VALUE, PROPERTY_OVERRIDDEN_DEFAULT_VALUE, PROPERTY_OVERRIDDEN_INHERITED_VALUE, PROPERTY_STATE_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
Font(long pd2ffnt)
Protected constructor, used internally to create Font
objects.
|
|
Font(java.lang.String name)
Constructor used to create Font objects.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(JdapiObject jo,
int vat)
Applies this Font's settings to an object.
|
Font |
clone(java.lang.String newName)
Creates a copy of the object as a child of 'parent'.
|
void |
extract(JdapiObject jo,
int vat)
Extracts font settings from the object into this Font object.
|
static Font |
find(java.lang.String name)
Find an instance of Font.
|
java.lang.String |
getFontName()
Get text property FontName (FONT_NAME_PTID).
|
int |
getFontSize()
Get number property FontSize (FONT_SIZE_PTID).
|
int |
getFontSpacing()
Get number property FontSpacing (FONT_SPACING_PTID).
|
int |
getFontStyle()
Get number property FontStyle (FONT_STYLE_PTID).
|
int |
getFontWeight()
Get number property FontWeight (FONT_WEIGHT_PTID).
|
int |
getTypeId()
Gets the HtmlForms object type ID.
|
void |
setFontName(java.lang.String value)
Sets text property FontName (FONT_NAME_PTID).
|
void |
setFontSize(int value)
Sets number property FontSize (FONT_SIZE_PTID).
|
void |
setFontSpacing(int value)
Sets number property FontSpacing (FONT_SPACING_PTID).
|
void |
setFontStyle(int value)
Sets number property FontStyle (FONT_STYLE_PTID).
|
void |
setFontWeight(int value)
Sets number property FontWeight (FONT_WEIGHT_PTID).
|
changeOwner, clearObjectPointer, clone, createSubclassedChild, destroy, equals, getBooleanProperty, getChildObjectProperty, getClassName, getClientInfo, getIntegerProperty, getIntegerPropertyString, getJdapiMetaObject, getMetaProperties, getModule, getName, getObjectPointer, getObjectProperty, getObjProp, getOwnedObjects, getOwner, getPersistentClientInfoBlob, getPersistentClientInfoObject, getPropertyState, getPropertyValueName, getQualifiedName, getStringIDProperty, getStringProperty, getSubclassParent, hasDefaultedProperty, hasInheritedProperty, hasOverriddenProperty, hasProperty, inheritProperty, isSubclassed, isValidFormsObject, move, queryType, reattach, setBooleanProperty, setClientInfo, setIntegerProperty, setObjectProperty, setObjProp, setPersistentClientInfo, setPersistentClientInfo, setStringProperty, setSubclassParent, toString, unsetSubclassParent
public Font(java.lang.String name)
name
- Name of the new objectprotected Font(long pd2ffnt)
Do NOT use this constructor, even within the Jdapi package. If you have a pointer and need to instantiate it's Java representation, get the object via the context cache, e.g.
myBaseObject = Jdapi.getObject(myPointer);
pd2ffnt
- C pointer to Forms objectpublic int getTypeId()
getTypeId
in interface JdapiObject
getTypeId
in class BaseFormsObject
queryType
public Font clone(java.lang.String newName)
newName
- Name of object that's being createdpublic static Font find(java.lang.String name)
name
- Name of object you wish to findpublic void apply(JdapiObject jo, int vat)
jo
- JdapiObject to apply font settings tovat
- The visual attribute type for the font properties.
should be one of: JdapiTypes.VATY_COMMON_CTID, VATY_PROMPT_CTID,
VATY_TITLE_CTID.public void extract(JdapiObject jo, int vat)
jo
- JdapiObject to extract font settings fromvat
- The visual attribute type for the font properties.
should be one of: JdapiTypes.VATY_COMMON_CTID, VATY_PROMPT_CTID,
VATY_TITLE_CTID.public java.lang.String getFontName()
public void setFontName(java.lang.String value)
value
- Value to set property topublic int getFontSize()
public void setFontSize(int value)
value
- Value to set property topublic int getFontSpacing()
public void setFontSpacing(int value)
value
- Value to set property topublic int getFontStyle()
public void setFontStyle(int value)
value
- Value to set property topublic int getFontWeight()
public void setFontWeight(int value)
value
- Value to set property to