src/share/classes/sun/font/AttributeValues.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 408,418 ****
}
return result;
}
public Hashtable<Object, Object> toSerializableHashtable() {
! Hashtable ht = new Hashtable();
int hashkey = defined;
for (int m = defined, i = 0; m != 0; ++i) {
EAttribute ea = EAttribute.atts[i];
if ((m & ea.mask) != 0) {
m &= ~ea.mask;
--- 408,418 ----
}
return result;
}
public Hashtable<Object, Object> toSerializableHashtable() {
! Hashtable<Object, Object> ht = new Hashtable<>();
int hashkey = defined;
for (int m = defined, i = 0; m != 0; ++i) {
EAttribute ea = EAttribute.atts[i];
if ((m & ea.mask) != 0) {
m &= ~ea.mask;
*** 796,806 ****
hl = (InputMethodHighlight)imHighlight;
} else {
hl = (InputMethodHighlight)((Annotation)imHighlight).getValue();
}
! Map imStyles = hl.getStyle();
if (imStyles == null) {
Toolkit tk = Toolkit.getDefaultToolkit();
imStyles = tk.mapInputMethodHighlight(hl);
}
--- 796,806 ----
hl = (InputMethodHighlight)imHighlight;
} else {
hl = (InputMethodHighlight)((Annotation)imHighlight).getValue();
}
! Map<TextAttribute, ?> imStyles = hl.getStyle();
if (imStyles == null) {
Toolkit tk = Toolkit.getDefaultToolkit();
imStyles = tk.mapInputMethodHighlight(hl);
}
*** 810,819 ****
--- 810,820 ----
}
return this;
}
+ @SuppressWarnings("unchecked")
public static AffineTransform getBaselineTransform(Map<?, ?> map) {
if (map != null) {
AttributeValues av = null;
if (map instanceof AttributeMap &&
((AttributeMap) map).getValues() != null) {
*** 826,835 ****
--- 827,837 ----
}
}
return null;
}
+ @SuppressWarnings("unchecked")
public static AffineTransform getCharTransform(Map<?, ?> map) {
if (map != null) {
AttributeValues av = null;
if (map instanceof AttributeMap &&
((AttributeMap) map).getValues() != null) {