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
Functionality associated with the XFA element.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.adobe.xfa.Element
Element.DualDomNode, Element.ReplaceContentNested classes/interfaces inherited from class com.adobe.xfa.Node
Node.ChangeLogger -
Field Summary
Fields inherited from class com.adobe.xfa.Element
AttrIsDefault, AttrIsFragment, AttrIsTransient, CREATEACTIONFields inherited from class com.adobe.xfa.Node
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE, gsXFANamespacePrefixFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefaultAttribute(int eTag) booleanCompare if two Color objects define the same colorintgetBlue()Get the blue value of the RGB tripletdoubleGet the converted grayscale value of the RGB triplet as a percentageintGet the converted grayscale value of the RGB tripletintgetGreen()Get the green value of the RGB tripletintgetRed()Get the red value of the RGB tripletinthashCode()Returns a hash code value for the object.booleanisContextSensitiveAttribute(int eTag) newAttribute(int eTag, String value) voidsetAttribute(Attribute sValue, int eTag) Sets an attribute of this element.voidsetBlue(int nBlue) Set the blue value for the RGB triplet.voidsetBlueInternal(int nBlue) voidsetColor(int nRed, int nGreen, int nBlue) Set the Color.voidSet the Color.voidsetGreen(int nGreen) Set the green value for the RGB triplet.voidsetGreenInternal(int nGreen) voidsetRed(int nRed) Set the red value for the RGB triplet.voidsetRedInternal(int nRed) toString(char cDelimiter) Return the string value for this color.static StringtoString(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, updateIDValuesMethods 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, updateFromPeerMethods 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, validateUsageFailedIsFatalMethods 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
-
Constructor Details
-
Color
-
-
Method Details
-
toString
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
- Overrides:
defaultAttributein classElement
-
isContextSensitiveAttribute
public boolean isContextSensitiveAttribute(int eTag) - Overrides:
isContextSensitiveAttributein classProtoableNode
-
equals
Compare if two Color objects define the same color -
hashCode
public int hashCode()Returns a hash code value for the object. This method is unsupported. -
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
- Overrides:
newAttributein classElement
-
setAttribute
Description copied from class:ProtoableNodeSets an attribute of this element.- Overrides:
setAttributein 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
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
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.
-