public class FontHandle extends ComplexValueHandle
Values of a font family can be a list of font names, a string, a CSS
(pre-defined) string. The CSS values are defined in
DesignChoiceConstants
. For
example, the font family allows values in these formats:
CSS has the following predefined font names:
The application generally does not create font handles directly. It uses the
method in DesignElementHandle
to get a color handle like:
DesignElementHandle elementHandle = element.handle( ); FontHandle fontHandle = elementHandle.getFontProperty( Style.FONT_FAMILY_PROP );
memberContext, propDefn
elementHandle
Constructor and Description |
---|
FontHandle(DesignElementHandle handle)
Constructs a font family handle for an element property.
|
FontHandle(DesignElementHandle handle,
org.eclipse.birt.report.model.core.MemberRef context)
Deprecated.
|
FontHandle(DesignElementHandle handle,
org.eclipse.birt.report.model.core.StructureContext context)
Constructs a font family handle for a structure member.
|
Modifier and Type | Method and Description |
---|---|
IChoice[] |
getCSSFontFamilies()
Returns an array containing CSS (pre-defined) font names.
|
java.lang.String[] |
getFontFamilies()
Returns an array containing all of font names in the correct order.
|
getContext, getDefn, getDisplayValue, getPropertyDefn, getRawValue, getStringValue, getValue, isSet, setStringValue, setValue
getReference
getDesign, getElement, getElementHandle, getModule
public FontHandle(DesignElementHandle handle)
handle
- the element handlepublic FontHandle(DesignElementHandle handle, org.eclipse.birt.report.model.core.StructureContext context)
handle
- the element handlecontext
- the context to the structure member.public FontHandle(DesignElementHandle handle, org.eclipse.birt.report.model.core.MemberRef context)
handle
- the element handlecontext
- the context to the structure memberpublic java.lang.String[] getFontFamilies()
null
if the value
of the font family property is not set.public IChoice[] getCSSFontFamilies()
DesignChoiceConstants
.Copyright © 2008 Actuate Corp. All rights reserved.