public class Coordinate 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 |
---|---|
|
Coordinate(FormModule fmd)
Constructor.
|
protected |
Coordinate(long pd2fcrd)
Protected constructor, used internally to create Coordinate
objects.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(FormModule fmd)
Applies this Coordinates settings to the module.
|
int[] |
charSize(int width,
int height,
Font fnt)
Returns the number of (average sized) characters that will
fit into a given area as defined in the Coordinate's units.
|
Coordinate |
clone(FormModule parent,
java.lang.String newName)
Creates a copy of the object as a child of 'parent'
|
void |
extract(FormModule fmd)
Extracts coordinate settings from the module into this object.
|
static Coordinate |
find(FormModule parent,
java.lang.String name)
Find an instance of Coordinate that is a child of a FormModule.
|
int |
getCharacterCellHeight()
Get number property CharacterCellHeight (CHARACTER_CELL_HEIGHT_PTID).
|
int |
getCharacterCellWidth()
Get number property CharacterCellWidth (CHARACTER_CELL_WIDTH_PTID).
|
int |
getCoordinateSystem()
Get number property CoordinateSystem (COORDINATE_SYSTEM_PTID).
|
int |
getRealUnit()
Get number property RealUnit (REAL_UNIT_PTID).
|
int |
getTypeId()
Gets the HtmlForms object type ID.
|
boolean |
isDefaultFontScaling()
Get boolean property DefaultFontScaling (DEFAULT_FONT_SCALING_PTID).
|
void |
setCharacterCellHeight(int value)
Sets number property CharacterCellHeight (CHARACTER_CELL_HEIGHT_PTID).
|
void |
setCharacterCellWidth(int value)
Sets number property CharacterCellWidth (CHARACTER_CELL_WIDTH_PTID).
|
void |
setCoordinateSystem(int value)
Sets number property CoordinateSystem (COORDINATE_SYSTEM_PTID).
|
void |
setDefaultFontScaling(boolean value)
Sets boolean property DefaultFontScaling (DEFAULT_FONT_SCALING_PTID).
|
void |
setRealUnit(int value)
Sets number property RealUnit (REAL_UNIT_PTID).
|
int[] |
stringSize(java.lang.String str,
Font fnt)
Gets the size of a string in units as defined by the
Coordinate object.
|
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
protected Coordinate(long pd2fcrd)
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);
pd2fcrd
- C pointer to Forms objectpublic Coordinate(FormModule fmd)
fmd
- Form modulepublic int getTypeId()
getTypeId
in interface JdapiObject
getTypeId
in class BaseFormsObject
queryType
public Coordinate clone(FormModule parent, java.lang.String newName)
parent
- Parent objectnewName
- Name of object that's being createdpublic static Coordinate find(FormModule parent, java.lang.String name)
parent
- Parent object of object you wish to findname
- Name of object you wish to findpublic void apply(FormModule fmd)
fmd
- Module to apply coordinate settings topublic void extract(FormModule fmd)
fmd
- Module to extract coordinate settings frompublic int[] stringSize(java.lang.String str, Font fnt)
str
- String to get size offnt
- Font string is to be rendered inpublic int[] charSize(int width, int height, Font fnt)
width
- Width in Coordinate's unitsheight
- Height in Coordinate's unitsfnt
- Font to get character sizes frompublic int getCharacterCellHeight()
public void setCharacterCellHeight(int value)
value
- Value to set property topublic int getCharacterCellWidth()
public void setCharacterCellWidth(int value)
value
- Value to set property topublic int getCoordinateSystem()
public void setCoordinateSystem(int value)
value
- Value to set property topublic int getRealUnit()
public void setRealUnit(int value)
value
- Value to set property topublic boolean isDefaultFontScaling()
public void setDefaultFontScaling(boolean value)
value
- Value to set property to