本文整理汇总了Java中sun.font.AttributeValues.unsetDefault方法的典型用法代码示例。如果您正苦于以下问题:Java AttributeValues.unsetDefault方法的具体用法?Java AttributeValues.unsetDefault怎么用?Java AttributeValues.unsetDefault使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.font.AttributeValues
的用法示例。
在下文中一共展示了AttributeValues.unsetDefault方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readObject
import sun.font.AttributeValues; //导入方法依赖的package包/类
/**
* Reads the <code>ObjectInputStream</code>.
* Unrecognized keys or values will be ignored.
*
* @param s the <code>ObjectInputStream</code> to read
* @serial
* @see #writeObject(java.io.ObjectOutputStream)
*/
private void readObject(java.io.ObjectInputStream s)
throws java.lang.ClassNotFoundException,
java.io.IOException
{
s.defaultReadObject();
if (pointSize == 0) {
pointSize = (float)size;
}
// Handle fRequestedAttributes.
// in 1.5, we always streamed out the font values plus
// TRANSFORM, SUPERSCRIPT, and WIDTH, regardless of whether the
// values were default or not. In 1.6 we only stream out
// defined values. So, 1.6 streams in from a 1.5 stream,
// it check each of these values and 'undefines' it if the
// value is the default.
if (fRequestedAttributes != null) {
values = getAttributeValues(); // init
AttributeValues extras =
AttributeValues.fromSerializableHashtable(fRequestedAttributes);
if (!AttributeValues.is16Hashtable(fRequestedAttributes)) {
extras.unsetDefault(); // if legacy stream, undefine these
}
values = getAttributeValues().merge(extras);
this.nonIdentityTx = values.anyNonDefault(EXTRA_MASK);
this.hasLayoutAttributes = values.anyNonDefault(LAYOUT_MASK);
fRequestedAttributes = null; // don't need it any more
}
}
示例2: readObject
import sun.font.AttributeValues; //导入方法依赖的package包/类
/**
* Reads the {@code ObjectInputStream}.
* Unrecognized keys or values will be ignored.
*
* @param s the {@code ObjectInputStream} to read
* @serial
* @see #writeObject(java.io.ObjectOutputStream)
*/
private void readObject(java.io.ObjectInputStream s)
throws java.lang.ClassNotFoundException,
java.io.IOException
{
s.defaultReadObject();
if (pointSize == 0) {
pointSize = (float)size;
}
// Handle fRequestedAttributes.
// in 1.5, we always streamed out the font values plus
// TRANSFORM, SUPERSCRIPT, and WIDTH, regardless of whether the
// values were default or not. In 1.6 we only stream out
// defined values. So, 1.6 streams in from a 1.5 stream,
// it check each of these values and 'undefines' it if the
// value is the default.
if (fRequestedAttributes != null) {
values = getAttributeValues(); // init
AttributeValues extras =
AttributeValues.fromSerializableHashtable(fRequestedAttributes);
if (!AttributeValues.is16Hashtable(fRequestedAttributes)) {
extras.unsetDefault(); // if legacy stream, undefine these
}
values = getAttributeValues().merge(extras);
this.nonIdentityTx = values.anyNonDefault(EXTRA_MASK);
this.hasLayoutAttributes = values.anyNonDefault(LAYOUT_MASK);
fRequestedAttributes = null; // don't need it any more
}
}
示例3: readObject
import sun.font.AttributeValues; //导入方法依赖的package包/类
/**
* Reads the <code>ObjectInputStream</code>.
* Unrecognized keys or values will be ignored.
*
* @param s the <code>ObjectInputStream</code> to read
* @serial
* @see #writeObject(java.io.ObjectOutputStream)
*/
private void readObject(java.io.ObjectInputStream s)
throws java.lang.ClassNotFoundException,
java.io.IOException
{
s.defaultReadObject();
if (pointSize == 0) {
pointSize = (float)size;
}
// Handle fRequestedAttributes.
// in 1.5, we always streamed out the font values plus
// TRANSFORM, SUPERSCRIPT, and WIDTH, regardless of whether the
// values were default or not. In 1.6 we only stream out
// defined values. So, 1.6 streams in from a 1.5 stream,
// it check each of these values and 'undefines' it if the
// value is the default.
if (fRequestedAttributes != null) {
values = getAttributeValues(); // init
AttributeValues extras =
AttributeValues.fromSerializableHashtable(fRequestedAttributes);
if (!AttributeValues.is16Hashtable(fRequestedAttributes)) {
extras.unsetDefault(); // if legacy stream, undefine these
}
values = getAttributeValues().merge(extras);
this.nonIdentityTx = values.anyNonDefault(EXTRA_MASK);
this.hasLayoutAttributes = values.anyNonDefault(LAYOUT_MASK);
fRequestedAttributes = null; // don't need it any more
}
}