Class Index | File Index

Classes


Class gui.StyleSummary


Defined in: StyleSummary.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
Returns true if all styles specify text as strike-through; otherwise false.
 
Returns true if all styles specify text as underlined; otherwise false.
 
Returns true if all styles are center aligned; otherwise false.
 
Returns true if all styles are justified; otherwise false.
 
Returns true if all styles are left aligned; otherwise false.
 
Returns true if all styles are right aligned; otherwise false.
 
Returns true if all styles specify text as bold; otherwise false.
 
Returns true if all styles specify text as italic; otherwise false.
 
 
Method Summary
Method Attributes Method Name and Description
 
Returns the common font name in the supplied styles; otherwise undefined if there is no common font name
 
Returns the common font size in the supplied styles; otherwise undefined if there is no common font size
<inner>  
getCommonValue(section, propertyName)
Return the common value for a section + propertyName if it has an identical value in all supplied styles.
<inner>  
getPropertyValues(section, propertyName)
Get all values for the section + propertyName across all supplied styles.
<inner>  
lazilyLoaded(section, propertyName, acceptedPropertyValues)
Create a lazily-loaded, cached lookup function that returns true if all section + propertyName values are contained in the supplied acceptedPropertyValues array
Class Detail
gui.StyleSummary(styles)
Parameters:
{!Array.} styles
Field Detail
{!boolean} hasStrikeThrough
Returns true if all styles specify text as strike-through; otherwise false.

{!boolean} hasUnderline
Returns true if all styles specify text as underlined; otherwise false.

{!boolean} isAlignedCenter
Returns true if all styles are center aligned; otherwise false.

{!boolean} isAlignedJustified
Returns true if all styles are justified; otherwise false.

{!boolean} isAlignedLeft
Returns true if all styles are left aligned; otherwise false.

{!boolean} isAlignedRight
Returns true if all styles are right aligned; otherwise false.

{!boolean} isBold
Returns true if all styles specify text as bold; otherwise false.

{!boolean} isItalic
Returns true if all styles specify text as italic; otherwise false.

paragraph

text
Method Detail
{string|undefined} fontName()
Returns the common font name in the supplied styles; otherwise undefined if there is no common font name
Returns:
{string|undefined}

{number|undefined} fontSize()
Returns the common font size in the supplied styles; otherwise undefined if there is no common font size
Returns:
{number|undefined}

<inner> {string|undefined} getCommonValue(section, propertyName)
Return the common value for a section + propertyName if it has an identical value in all supplied styles. If there are multiple values, or one or more styles do not have either the section or propertyName present, this function will return undefined.
Parameters:
{!string} section
Section (e.g., style:text-properties)
{!string} propertyName
Property (e.g., fo:font-weight)
Returns:
{string|undefined}

<inner> {!Array.} getPropertyValues(section, propertyName)
Get all values for the section + propertyName across all supplied styles. If a one or more styles do not have a defined value for the specified propertyName, the returned array will contain an "undefined" value to indicate the property is missing on some of the styles.
Parameters:
{!string} section
Section (e.g., style:text-properties)
{!string} propertyName
Property (e.g., fo:font-weight)
Returns:
{!Array.}

<inner> {!function():!boolean} lazilyLoaded(section, propertyName, acceptedPropertyValues)
Create a lazily-loaded, cached lookup function that returns true if all section + propertyName values are contained in the supplied acceptedPropertyValues array
Parameters:
{!string} section
Section (e.g., style:text-properties)
{!string} propertyName
Property (e.g., fo:font-weight)
{!Array.} acceptedPropertyValues
Array of accepted values
Returns:
{!function():!boolean} Returns true if all values are in the accepted property values

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Aug 06 2015 04:10:40 GMT+0200 (MESZ)