Class: sun.font.AttributeValues
- public final class AttributeValues
- implements Cloneable
Methods
-
AttributeValuestop
public AttributeValues() -
allDefinedtop
public boolean allDefined(int mask) -
anyDefinedtop
public boolean anyDefined(int mask) -
anyNonDefaulttop
public boolean anyNonDefault(int mask) -
applyIMHighlighttop
public AttributeValues applyIMHighlight()If this has an imHighlight, create copy of this with those attributes applied to it. Otherwise return this unchanged. -
clonetop
public AttributeValues clone()Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:
will be true, and that the expression:x.clone() != x
will be true, but these are not absolute requirements. While it is typically the case that:x.clone().getClass() == x.getClass()
will be true, this is not an absolute requirement.x.clone().equals(x)
By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().
By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.
The method clone for class Object performs a specific cloning operation. First, if the class of this object does not implement the interface Cloneable, then a CloneNotSupportedException is thrown. Note that all arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment; the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation.
The class Object does not itself implement the interface Cloneable, so calling the clone method on an object whose class is Object will result in throwing an exception at run time.
-
defineAlltop
public void defineAll(int mask) -
equalstop
public boolean equals(Object rhs)Indicates whether some other object is "equal to" this one.The
equalsmethod implements an equivalence relation on non-null object references:- It is reflexive: for any non-null reference value
x,x.equals(x)should returntrue. - It is symmetric: for any non-null reference values
xandy,x.equals(y)should returntrueif and only ify.equals(x)returnstrue. - It is transitive: for any non-null reference values
x,y, andz, ifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue. - It is consistent: for any non-null reference values
xandy, multiple invocations of x.equals(y) consistently returntrueor consistently returnfalse, provided no information used inequalscomparisons on the objects is modified. - For any non-null reference value
x,x.equals(null)should returnfalse.
The equals method for class
Objectimplements the most discriminating possible equivalence relation on objects; that is, for any non-null reference valuesxandy, this method returnstrueif and only ifxandyrefer to the same object (x == yhas the valuetrue).Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.
- It is reflexive: for any non-null reference value
-
equalstop
-
equalstop
public boolean equals(AttributeValues rhs) -
extractRotationtop
static private AffineTransform extractRotation(Point2D.Double pt, AffineTransform tx, boolean andTranslation) -
extractXRotationtop
public static AffineTransform extractXRotation(AffineTransform tx, boolean andTranslation) -
extractYRotationtop
public static AffineTransform extractYRotation(AffineTransform tx, boolean andTranslation) -
fromMaptop
public static AttributeValues fromMap(Map<?> map) -
fromMaptop
public static AttributeValues fromMap(Map<?> map, int mask) -
fromSerializableHashtabletop
-
gettop
public Object get(EAttribute a) -
getBackgroundtop
public Paint getBackground() -
getBaselineTransformtop
public AffineTransform getBaselineTransform() -
getBaselineTransformtop
public static AffineTransform getBaselineTransform(Map<?> map) -
getBidiEmbeddingtop
public int getBidiEmbedding() -
getCharReplacementtop
public GraphicAttribute getCharReplacement() -
getCharTransformtop
public AffineTransform getCharTransform() -
getCharTransformtop
public static AffineTransform getCharTransform(Map<?> map) -
getFamilytop
public String getFamily() -
getFonttop
public Font getFont() -
getForegroundtop
public Paint getForeground() -
getInputMethodHighlighttop
public Object getInputMethodHighlight() -
getInputMethodUnderlinetop
public int getInputMethodUnderline() -
getJustificationtop
public float getJustification() -
getJustificationtop
public static float getJustification(Map<?> map) -
getKerningtop
public int getKerning() -
getLigaturestop
public int getLigatures() -
getMasktop
public static int getMask(EAttribute att) -
getMasktop
public static int getMask(EAttribute... atts) -
getNumericShapingtop
public NumericShaper getNumericShaping() -
getNumericShapingtop
public static NumericShaper getNumericShaping(Map<?> map) -
getPosturetop
public float getPosture() -
getRunDirectiontop
public int getRunDirection() -
getSizetop
public float getSize() -
getStrikethroughtop
public boolean getStrikethrough() -
getSuperscripttop
public int getSuperscript() -
getSwapColorstop
public boolean getSwapColors() -
getTrackingtop
public float getTracking() -
getTransformtop
public AffineTransform getTransform() -
getUnderlinetop
public int getUnderline() -
getWeighttop
public float getWeight() -
getWidthtop
public float getWidth() -
hashCodetop
public int hashCode()Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided byjava.util.Hashtable.The general contract of
hashCodeis:- Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the equals(Object)
method, then calling the
hashCodemethod on each of the two objects must produce the same integer result. - It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
-
i_equalstop
private boolean i_equals(EAttribute a, AttributeValues src) -
i_gettop
private Object i_get(EAttribute a) -
i_settop
private void i_set(EAttribute a, Object o) -
i_settop
private void i_set(EAttribute a, AttributeValues src) -
i_validatetop
private boolean i_validate(EAttribute a) -
is16Hashtabletop
-
isDefinedtop
public boolean isDefined(EAttribute a) -
isNonDefaulttop
public boolean isNonDefault(EAttribute a) -
mergetop
public AttributeValues merge(Map<?> map) -
mergetop
public AttributeValues merge(Map<?> map, int mask) -
mergetop
public AttributeValues merge(AttributeValues src) -
mergetop
public AttributeValues merge(AttributeValues src, int mask) -
settop
public void set(EAttribute a, Object o) -
settop
public void set(EAttribute a, AttributeValues src) -
setBackgroundtop
public void setBackground(Paint f) -
setBidiEmbeddingtop
public void setBidiEmbedding(int f) -
setCharReplacementtop
public void setCharReplacement(GraphicAttribute f) -
setDefaulttop
public void setDefault(EAttribute a) -
setFamilytop
public void setFamily(String f) -
setFonttop
public void setFont(Font f) -
setForegroundtop
public void setForeground(Paint f) -
setInputMethodHighlighttop
public void setInputMethodHighlight(InputMethodHighlight f) -
setInputMethodHighlighttop
public void setInputMethodHighlight(Annotation f) -
setInputMethodUnderlinetop
public void setInputMethodUnderline(int f) -
setJustificationtop
public void setJustification(float f) -
setKerningtop
public void setKerning(int f) -
setLigaturestop
public void setLigatures(int f) -
setNumericShapingtop
public void setNumericShaping(NumericShaper f) -
setPosturetop
public void setPosture(float f) -
setRunDirectiontop
public void setRunDirection(int f) -
setSizetop
public void setSize(float f) -
setStrikethroughtop
public void setStrikethrough(boolean f) -
setSuperscripttop
public void setSuperscript(int f) -
setSwapColorstop
public void setSwapColors(boolean f) -
setTrackingtop
public void setTracking(float f) -
setTransformtop
public void setTransform(TransformAttribute f) -
setTransformtop
public void setTransform(AffineTransform f) -
setUnderlinetop
public void setUnderline(int f) -
setWeighttop
public void setWeight(float f) -
setWidthtop
public void setWidth(float f) -
toMaptop
-
toSerializableHashtabletop
-
toStringtop
public String toString()Returns a string representation of the object. In general, thetoStringmethod returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.The
toStringmethod for classObjectreturns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:getClass().getName() + '@' + Integer.toHexString(hashCode())
-
unsettop
public void unset(EAttribute a) -
unsetDefaulttop
public void unsetDefault() -
updatetop
private void update(EAttribute a) -
updateDerivedTransformstop
public void updateDerivedTransforms()
Fields
-
DEFAULT
static final private AttributeValues DEFAULT -
DEFINED_KEY
static final private String DEFINED_KEY = "sun.font.attributevalues.defined_key" -
MASK_ALL
public static final int MASK_ALL -
background
private Paint background -
baselineTransform
private AffineTransform baselineTransform -
bidiEmbedding
private byte bidiEmbedding -
charReplacement
private GraphicAttribute charReplacement -
charTransform
private AffineTransform charTransform -
defined
private int defined -
family
private String family -
font
private Font font -
foreground
private Paint foreground -
imHighlight
private Object imHighlight -
imUnderline
private byte imUnderline -
justification
private float justification -
kerning
private byte kerning -
ligatures
private byte ligatures -
nondefault
private int nondefault -
numericShaping
private NumericShaper numericShaping -
posture
private float posture -
runDirection
private byte runDirection -
size
private float size -
strikethrough
private boolean strikethrough -
superscript
private byte superscript -
swapColors
private boolean swapColors -
tracking
private float tracking -
transform
private AffineTransform transform -
underline
private byte underline -
weight
private float weight -
width
private float width
