Class Color
- java.lang.Object
-
- com.adobe.xfa.Obj
-
- com.adobe.xfa.Node
-
- com.adobe.xfa.Element
-
- com.adobe.xfa.ProtoableNode
-
- com.adobe.xfa.template.formatting.Color
-
- All Implemented Interfaces:
Peer
public final class Color extends ProtoableNode
Functionality associated with the XFAelement.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adobe.xfa.Element
Element.DualDomNode, Element.ReplaceContent
-
Nested classes/interfaces inherited from class com.adobe.xfa.Node
Node.ChangeLogger
-
-
Field Summary
-
Fields inherited from class com.adobe.xfa.Element
AttrIsDefault, AttrIsFragment, AttrIsTransient, CREATEACTION
-
Fields inherited from class com.adobe.xfa.Node
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE, gsXFANamespacePrefix
-
Fields inherited from interface com.adobe.xfa.ut.Peer
ATTR_CHANGED, CHILD_ADDED, CHILD_REMOVED, DESCENDENT_ADDED, DESCENDENT_ATTR_CHANGED, DESCENDENT_REMOVED, DESCENDENT_VALUE_CHANGED, PARENT_CHANGED, PERMS_LOCK_CLEARED, PERMS_LOCK_SET, PROTO_ATTR_CHANGED, PROTO_CHILD_ADDED, PROTO_CHILD_REMOVED, PROTO_DESCENDENT_ADDED, PROTO_DESCENDENT_ATTR_CHANGED, PROTO_DESCENDENT_REMOVED, PROTO_DESCENDENT_VALUE_CHANGED, PROTO_VALUE_CHANGED, UPDATED, VALUE_CHANGED
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
defaultAttribute(int eTag)
boolean
equals(java.lang.Object object)
Compare if two Color objects define the same colorint
getBlue()
Get the blue value of the RGB tripletdouble
getGrayRate()
Get the converted grayscale value of the RGB triplet as a percentageint
getGrayScale()
Get the converted grayscale value of the RGB tripletint
getGreen()
Get the green value of the RGB tripletint
getRed()
Get the red value of the RGB tripletint
hashCode()
Returns a hash code value for the object.boolean
isContextSensitiveAttribute(int eTag)
Attribute
newAttribute(int eTag, java.lang.String value)
void
setAttribute(Attribute sValue, int eTag)
Sets an attribute of this element.void
setBlue(int nBlue)
Set the blue value for the RGB triplet.void
setBlueInternal(int nBlue)
void
setColor(int nRed, int nGreen, int nBlue)
Set the Color.void
setColor(java.lang.String sColor)
Set the Color.void
setGreen(int nGreen)
Set the green value for the RGB triplet.void
setGreenInternal(int nGreen)
void
setRed(int nRed)
Set the red value for the RGB triplet.void
setRedInternal(int nRed)
java.lang.String
toString(char cDelimiter)
Return the string value for this color.static java.lang.String
toString(int nRed, int nGreen, int nBlue, char cDelimiter)
Return the string value for a given set of RGB values,-
Methods inherited from class com.adobe.xfa.ProtoableNode
clone, createProto, elementGetAttribute, externalProtoFailed, fetchIDValues, getAttribute, getAttributeByName, getElement, getExternalProtoSource, getOneOfChild, getPI, getPI, getProto, getProtoed, getScriptTable, getText, hasExternalProto, hasProto, isDefault, isSpecified, notifyPeers, performResolveProtos, preSave, releaseExternalProtos, reResolveProto, resolveProto, setElement, setOneOfChild, setPermsLock, setProto, updateIDValues
-
Methods inherited from class com.adobe.xfa.Element
appendChild, appendChild, appendPI, appendPI, assignNode, clone, connectPeerToDocument, constructKey, constructKeys, copyContent, defaultElement, defaultElement, establishID, evaluate, explodeQName, findAttr, findSchemaAttr, foundBadAttribute, foundBadAttribute, getAll, getAppModel, getAtom, getAttr, getAttribute, getAttrIndex, getAttrName, getAttrNS, getAttrProp, getAttrQName, getAttrVal, getChildReln, getClassAll, getClassIndex, getClassName, getDeltas, getElement, getElementClass, getElementLocal, getEnum, getEnum, getEventTable, getFirstXFAChild, getFirstXMLChild, getID, getIndex, getInheritedNS, getInstalledLocale, getIsNull, getLastXMLChild, getLineNumber, getLocalName, getModel, getName, getNode, getNodes, getNodeSchema, getNS, getNumAttrs, getOneOfChild, getPrefix, getProperty, getProperty, getSaveXMLSaveTransient, getSchemaType, getScriptMethodInfo, getSibling, getXFAChild, getXMLChild, getXMLName, getXPath, getXsiNilAttribute, inhibitPrettyPrint, inhibitPrettyPrint, insertChild, isContainer, isFragment, isHidden, isHidden, isIndexed, isInstalledLocaleAmbient, isLeaf, isNameSpaceAttr, isPropertySpecified, isPropertySpecified, isPropertyValid, isSpecified, isSpecified, isTransient, isTransparent, isValidAttr, isValidChild, isValidElement, loadXML, loadXML, makeDefault, makeNonDefault, optimizeNameSpace, peekAttribute, peekElement, peekOneOfChild, peekProperty, peekProperty, postSave, privateSetName, processTextChildrenDuringParse, removeAttr, removeAttr, removeChild, removePI, removePI, removeWhiteSpace, removeXsiNilAttribute, replaceChild, resetPostLoadXML, resolveAndEnumerateChildren, resolveNodeCreate, resolvePrefix, saveFilteredXML, saveXML, saveXML, serialize, setAttribute, setAttribute, setAttribute, setAttrProp, setDefaultFlag, setDOMProperties, setIsDataWindowRoot, setIsIndexed, setLineNumber, setLocalName, setModel, setName, setNS, setProperty, setProperty, setQName, setSaveXMLSaveTransient, setTransparent, setXMLName, setXsiNilAttribute, updateFromPeer
-
Methods inherited from class com.adobe.xfa.Node
checkAncestorPerms, checkDescendentPerms, checkPerms, cleanDirtyFlags, compareVersions, getData, getFirstXMLChildElement, getLocked, getNextXFASibling, getNextXMLSibling, getNextXMLSiblingElement, getNodeAsXML, getOwnerDocument, getPIAsXML, getPIName, getPreviousXMLSibling, getPrivateName, getPropName, getSOMExpression, getSOMExpression, getSomName, getUniqueSOMName, getWillDirty, getXFAChildCount, getXFAParent, getXfaPeer, getXMLChildCount, getXMLParent, hasChanged, isDirty, isMapped, isPermsLockSet, isTransient, locateChildByClass, locateChildByName, logValueChangeHelper, performSOMAssignment, remove, resolveNode, resolveNode, resolveNode, resolveNodes, resolveNodes, sendMessenge, setDirty, setDocument, setLocked, setMapped, setPrivateName, setWillDirty, setXfaPeer, unLock, validateSchema, validateUsage, validateUsageFailedIsFatal
-
Methods inherited from class com.adobe.xfa.Obj
addPeer, addPeeredNode, clearPeers, deafen, getClassAtom, getClassTag, getPeer, getScriptProperty, getScriptThis, invokeFunction, isDeaf, isMute, isSameClass, isSameClass, isSameClass, mute, peerRemoved, removePeer, removePeeredNode, setClass, setClassTag, setScriptProperty, unDeafen, unMute
-
-
-
-
Method Detail
-
toString
public static java.lang.String toString(int nRed, int nGreen, int nBlue, char cDelimiter)
Return the string value for a given set of RGB values,- Parameters:
nRed
- - Red RGB valuenGreen
- - Green RGB valuenBlue
- - Blue RGB valuecDelimiter
- - an optional parameter that will return the individual values of the color delimeted by the delimiter string, or commas if omitted.
-
defaultAttribute
public Attribute defaultAttribute(int eTag)
- Overrides:
defaultAttribute
in classElement
-
isContextSensitiveAttribute
public boolean isContextSensitiveAttribute(int eTag)
- Overrides:
isContextSensitiveAttribute
in classProtoableNode
-
equals
public boolean equals(java.lang.Object object)
Compare if two Color objects define the same color- Overrides:
equals
in classjava.lang.Object
- Parameters:
object
- a Color object to compare with this Color- Returns:
- true if they define the same color, false otherwise.
-
hashCode
public int hashCode()
Returns a hash code value for the object. This method is unsupported.- Overrides:
hashCode
in classjava.lang.Object
-
getBlue
public int getBlue()
Get the blue value of the RGB triplet- Returns:
- the blue value for the RGB triplet.
-
getGrayRate
public double getGrayRate()
Get the converted grayscale value of the RGB triplet as a percentage- Returns:
- the greyscale percentage for the RGB triplet.
-
getGrayScale
public int getGrayScale()
Get the converted grayscale value of the RGB triplet- Returns:
- the greyscale value for the RGB triplet.
-
getGreen
public int getGreen()
Get the green value of the RGB triplet- Returns:
- the green value for the RGB triplet.
-
getRed
public int getRed()
Get the red value of the RGB triplet- Returns:
- the red value for the RGB triplet.
-
newAttribute
public Attribute newAttribute(int eTag, java.lang.String value)
- Overrides:
newAttribute
in classElement
-
setAttribute
public void setAttribute(Attribute sValue, int eTag)
Description copied from class:ProtoableNode
Sets an attribute of this element.- Overrides:
setAttribute
in classProtoableNode
- Parameters:
sValue
- the attribute.eTag
- The XFA tag name of the attribute being set.
-
setBlue
public void setBlue(int nBlue)
Set the blue value for the RGB triplet.- Parameters:
nBlue
- the red value for the RGB triplet.
-
setBlueInternal
public void setBlueInternal(int nBlue)
-
setColor
public void setColor(int nRed, int nGreen, int nBlue)
Set the Color.- Parameters:
nRed
- the red value for the RGB triplet.nGreen
- the green value for the RGB triplet.nBlue
- the blue value for the RGB triplet.
-
setColor
public void setColor(java.lang.String sColor)
Set the Color.- Parameters:
sColor
- the string value representing the RGB triplet. This String must be interned.
-
setGreen
public void setGreen(int nGreen)
Set the green value for the RGB triplet.- Parameters:
nGreen
- the red value for the RGB triplet.
-
setGreenInternal
public void setGreenInternal(int nGreen)
-
setRed
public void setRed(int nRed)
Set the red value for the RGB triplet.- Parameters:
nRed
- the red value for the RGB triplet.
-
setRedInternal
public void setRedInternal(int nRed)
-
toString
public java.lang.String toString(char cDelimiter)
Return the string value for this color.- Parameters:
cDelimiter
- - an optional parameter that will return the individual values of the color delimeted by the delimiter string, or commas if omitted.
-
-