Package com.iizix.prop.font
Class FontFiles
- All Implemented Interfaces:
EventListener
,IClientCachePreload
,IClientCacheResource
,IGProp<GProp<?>[]>
,IPropCnr
,Cloneable
- Direct Known Subclasses:
EditorFontFiles
Container for all font files used in a FontIconsDefintion.
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Additional styles, e.g.static final String
Definition: @font-face CSS, i.e.static final String
The local name of the font, comma separated list.static final String[]
The list of standard fonts that are installed in the system by default.static final int
Default STYLE index.static final String[]
Possible values for font-style.static final String
The undefined font family string.static final int
Bold WEIGHT index.static final int
Default (normal) WEIGHT index.static final String[]
Possible values for font-weight.static final String[]
Possible values for font-weight with description, e.g.Fields inherited from class com.iizix.prop.PropCnr
EMPTY, EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID, nameTable
Fields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2
Fields inherited from interface com.iizix.prop.IClientCacheResource
CACHES
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones the font files.int
Gets the cache value.Gets the descriptive font-weight as e.g.Gets the font-face base declaration without the 'src' and 'font-family' definitions.Gets the font family name to use.getFontFile
(EnvProps env) Returns the font file that is used for the client session in question.getFontFile
(BrowserFontFormat browserFontFormat) Returns the font file that is used for the client session in question.FontFile[]
Gets the font files.Gets the font identification much like the "Font Variation Description" (FVD).Gets the font-style.int
Gets the font-style index value.Gets the font-weight.int
Gets the font-weight index value.Gets the local name(s) specified.getPreloadClientCacheResources
(IClientSessionGyro clientGyro) Returns the list of resources that are required on the client side in the preload-to-cache mechanism.boolean
Returns if the resource (font, image, etc) is to be cached on the client side or not.boolean
Returns if the resource (font, image, etc) is to be cached on the client side when the application starts or not.protected boolean
The font files container is private and not transported to the client.static boolean
isStandardFontFamily
(String fontFamily) Verifies of the font name is a standard font.void
onEventSelf
(GEvent event) Overridden to check for cache clearing...boolean
Font files container uses property index because it's priority based.Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getPredefinedProps, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropDispose, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocus, requestFocusEx, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verify, verifyInternalUseOnly, verifyTree, virtualize
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onRemoteEvent, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warning
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.prop.IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onRemoteEvent, removePropError, removePropListener, renameProp, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warning
Methods inherited from interface com.iizix.prop.IPropCnr
canRequestFocus, canRequestFocus, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized
Field Details
UNDEFINED
The undefined font family string.- See Also:
LOCAL
The local name of the font, comma separated list.- See Also:
ADDITIONAL
Additional styles, e.g. font-variant, font-feature-settings.- See Also:
FONT_FACE_CSS
Definition: @font-face CSS, i.e. the original imported font face declaration.- See Also:
STYLES
Possible values for font-style. Defines how the font should be styled. Default value is "normal".STYLE_DEFAULT
public static final int STYLE_DEFAULTDefault STYLE index.- See Also:
WEIGHTS
Possible values for font-weight. Defines the boldness of the font. Default value is "400" (normal).WEIGHTS_DESCR
Possible values for font-weight with description, e.g. "100 - thin (hairline)".WEIGHT_DEFAULT
public static final int WEIGHT_DEFAULTDefault (normal) WEIGHT index.- See Also:
WEIGHT_BOLD
public static final int WEIGHT_BOLDBold WEIGHT index.- See Also:
STANDARD_FONTS
The list of standard fonts that are installed in the system by default.
Constructor Details
FontFiles
public FontFiles()Constructor.FontFiles
Constructor with name.- Parameters:
atom
- The atom name.
Method Details
isStandardFontFamily
Verifies of the font name is a standard font.- Parameters:
fontFamily
- The font family name.- Returns:
- true if standard, false otherwise.
isPropPrivateAtCreation
protected boolean isPropPrivateAtCreation()The font files container is private and not transported to the client.- Overrides:
isPropPrivateAtCreation
in classGProp<GProp<?>[]>
- Returns:
- true if the property should be set to private at creation, false for default.
usesPropIndex
public boolean usesPropIndex()Font files container uses property index because it's priority based.- Specified by:
usesPropIndex
in interfaceIPropCnr
- Overrides:
usesPropIndex
in classPropCnr
- Returns:
- true if index is used, false for non-index based container.
onEventSelf
Overridden to check for cache clearing...- Specified by:
onEventSelf
in interfaceIGProp<GProp<?>[]>
- Overrides:
onEventSelf
in classGProp<GProp<?>[]>
- Parameters:
event
- The property event.
clone
Clones the font files.getFontFiles
Gets the font files.getFontFile
Returns the font file that is used for the client session in question.- Parameters:
env
- The environment for the client.- Returns:
- The font file to use, or null if not found.
getFontFile
Returns the font file that is used for the client session in question.- Parameters:
browserFontFormat
- The browser font format instance.- Returns:
- The font file to use, or null if not found.
getCacheOperation
public int getCacheOperation()Gets the cache value.- Returns:
- The cache value: 0=no cache, 1=on-first-use (default), 2=preload.
isCachedOnClient
public boolean isCachedOnClient()Returns if the resource (font, image, etc) is to be cached on the client side or not.- Specified by:
isCachedOnClient
in interfaceIClientCacheResource
- Returns:
- true to cache font (default), or false for client session use only.
isCachePreloaded
public boolean isCachePreloaded()Returns if the resource (font, image, etc) is to be cached on the client side when the application starts or not.- Specified by:
isCachePreloaded
in interfaceIClientCacheResource
getPreloadClientCacheResources
Returns the list of resources that are required on the client side in the preload-to-cache mechanism.- Specified by:
getPreloadClientCacheResources
in interfaceIClientCachePreload
- Parameters:
clientGyro
- The client gyro engine.- Returns:
- An array with the resources required.
getFontFamily
Gets the font family name to use.getFontIdentification
Gets the font identification much like the "Font Variation Description" (FVD).- Returns:
- The font identification in form of "font-family:font-style[index]:font-weight[index]" (where "font-*[index]" is the index value).
getLocalNames
Gets the local name(s) specified.- Returns:
- A potentially comma separated string with names, null for none.
getFontFaceBaseDeclaration
Gets the font-face base declaration without the 'src' and 'font-family' definitions. These declarations are font-family, font-stretch, font-style, font-weight and unicode-range plus the additional styles.- Returns:
- String formatted as e.g. "font-style: normal; font-weight: normal;", defaults to empty string meaning "font-style: normal; font-weight: normal; font-stretch: normal; unicode-range: U+0-10FFFF;".
getFontStyle
Gets the font-style.- Returns:
- The font-style declaration.
getFontStyleIndex
public int getFontStyleIndex()Gets the font-style index value.- Returns:
- The font-style declaration index value.
getFontWeight
Gets the font-weight.- Returns:
- The font-weight declaration.
getDescriptiveFontWeight
Gets the descriptive font-weight as e.g. "100 - thin (hairline)".- Returns:
- The descriptive font-weight declaration.
getFontWeightIndex
public int getFontWeightIndex()Gets the font-weight index value.- Returns:
- The font-weight declaration index value.