mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-13 12:38:07 +00:00
8007295: Reduce number of warnings in awt classes
Reviewed-by: bae, anthony
This commit is contained in:
parent
a99c6a7fe5
commit
b1d7c46e14
@ -277,7 +277,7 @@ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Access
|
||||
* @since 1.4
|
||||
*/
|
||||
public synchronized ItemListener[] getItemListeners() {
|
||||
return (ItemListener[])(getListeners(ItemListener.class));
|
||||
return getListeners(ItemListener.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -163,11 +163,11 @@ public class Cursor implements java.io.Serializable {
|
||||
* hashtable, filesystem dir prefix, filename, and properties for custom cursors support
|
||||
*/
|
||||
|
||||
private static final Hashtable systemCustomCursors = new Hashtable(1);
|
||||
private static final Hashtable<String,Cursor> systemCustomCursors = new Hashtable<>(1);
|
||||
private static final String systemCustomCursorDirPrefix = initCursorDir();
|
||||
|
||||
private static String initCursorDir() {
|
||||
String jhome = (String) java.security.AccessController.doPrivileged(
|
||||
String jhome = java.security.AccessController.doPrivileged(
|
||||
new sun.security.action.GetPropertyAction("java.home"));
|
||||
return jhome +
|
||||
File.separator + "lib" + File.separator + "images" +
|
||||
@ -298,7 +298,7 @@ public class Cursor implements java.io.Serializable {
|
||||
static public Cursor getSystemCustomCursor(final String name)
|
||||
throws AWTException, HeadlessException {
|
||||
GraphicsEnvironment.checkHeadless();
|
||||
Cursor cursor = (Cursor)systemCustomCursors.get(name);
|
||||
Cursor cursor = systemCustomCursors.get(name);
|
||||
|
||||
if (cursor == null) {
|
||||
synchronized(systemCustomCursors) {
|
||||
@ -319,11 +319,11 @@ public class Cursor implements java.io.Serializable {
|
||||
final String fileName =
|
||||
systemCustomCursorProperties.getProperty(key);
|
||||
|
||||
String localized = (String)systemCustomCursorProperties.getProperty(prefix + DotNameSuffix);
|
||||
String localized = systemCustomCursorProperties.getProperty(prefix + DotNameSuffix);
|
||||
|
||||
if (localized == null) localized = name;
|
||||
|
||||
String hotspot = (String)systemCustomCursorProperties.getProperty(prefix + DotHotspotSuffix);
|
||||
String hotspot = systemCustomCursorProperties.getProperty(prefix + DotHotspotSuffix);
|
||||
|
||||
if (hotspot == null)
|
||||
throw new AWTException("no hotspot property defined for cursor: " + name);
|
||||
@ -348,9 +348,9 @@ public class Cursor implements java.io.Serializable {
|
||||
final int fy = y;
|
||||
final String flocalized = localized;
|
||||
|
||||
cursor = (Cursor) java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedExceptionAction() {
|
||||
public Object run() throws Exception {
|
||||
cursor = java.security.AccessController.<Cursor>doPrivileged(
|
||||
new java.security.PrivilegedExceptionAction<Cursor>() {
|
||||
public Cursor run() throws Exception {
|
||||
Toolkit toolkit = Toolkit.getDefaultToolkit();
|
||||
Image image = toolkit.getImage(
|
||||
systemCustomCursorDirPrefix + fileName);
|
||||
@ -447,8 +447,8 @@ public class Cursor implements java.io.Serializable {
|
||||
systemCustomCursorProperties = new Properties();
|
||||
|
||||
try {
|
||||
AccessController.doPrivileged(
|
||||
new java.security.PrivilegedExceptionAction() {
|
||||
AccessController.<Object>doPrivileged(
|
||||
new java.security.PrivilegedExceptionAction<Object>() {
|
||||
public Object run() throws Exception {
|
||||
FileInputStream fis = null;
|
||||
try {
|
||||
|
||||
@ -171,7 +171,7 @@ public class EventQueue {
|
||||
* The modifiers field of the current event, if the current event is an
|
||||
* InputEvent or ActionEvent.
|
||||
*/
|
||||
private WeakReference currentEvent;
|
||||
private WeakReference<AWTEvent> currentEvent;
|
||||
|
||||
/*
|
||||
* Non-zero if a thread is waiting in getNextEvent(int) for an event of
|
||||
@ -809,7 +809,7 @@ public class EventQueue {
|
||||
pushPopLock.lock();
|
||||
try {
|
||||
return (Thread.currentThread() == dispatchThread)
|
||||
? ((AWTEvent)currentEvent.get())
|
||||
? currentEvent.get()
|
||||
: null;
|
||||
} finally {
|
||||
pushPopLock.unlock();
|
||||
@ -1167,7 +1167,7 @@ public class EventQueue {
|
||||
return;
|
||||
}
|
||||
|
||||
currentEvent = new WeakReference(e);
|
||||
currentEvent = new WeakReference<>(e);
|
||||
|
||||
// This series of 'instanceof' checks should be replaced with a
|
||||
// polymorphic type (for example, an interface which declares a
|
||||
|
||||
@ -66,7 +66,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible {
|
||||
|
||||
AWTAccessor.setMenuAccessor(
|
||||
new AWTAccessor.MenuAccessor() {
|
||||
public Vector getItems(Menu menu) {
|
||||
public Vector<MenuComponent> getItems(Menu menu) {
|
||||
return menu.items;
|
||||
}
|
||||
});
|
||||
@ -78,7 +78,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible {
|
||||
* @serial
|
||||
* @see #countItems()
|
||||
*/
|
||||
Vector items = new Vector();
|
||||
Vector<MenuComponent> items = new Vector<>();
|
||||
|
||||
/**
|
||||
* This field indicates whether the menu has the
|
||||
@ -313,7 +313,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible {
|
||||
}
|
||||
|
||||
int nitems = getItemCount();
|
||||
Vector tempItems = new Vector();
|
||||
Vector<MenuItem> tempItems = new Vector<>();
|
||||
|
||||
/* Remove the item at index, nitems-index times
|
||||
storing them in a temporary vector in the
|
||||
@ -330,7 +330,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible {
|
||||
already in the correct order in the temp vector.
|
||||
*/
|
||||
for (int i = 0; i < tempItems.size() ; i++) {
|
||||
add((MenuItem)tempItems.elementAt(i));
|
||||
add(tempItems.elementAt(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -379,7 +379,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible {
|
||||
}
|
||||
|
||||
int nitems = getItemCount();
|
||||
Vector tempItems = new Vector();
|
||||
Vector<MenuItem> tempItems = new Vector<>();
|
||||
|
||||
/* Remove the item at index, nitems-index times
|
||||
storing them in a temporary vector in the
|
||||
@ -396,7 +396,7 @@ public class Menu extends MenuItem implements MenuContainer, Accessible {
|
||||
already in the correct order in the temp vector.
|
||||
*/
|
||||
for (int i = 0; i < tempItems.size() ; i++) {
|
||||
add((MenuItem)tempItems.elementAt(i));
|
||||
add(tempItems.elementAt(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -475,13 +475,13 @@ public class Menu extends MenuItem implements MenuContainer, Accessible {
|
||||
return null;
|
||||
}
|
||||
|
||||
synchronized Enumeration shortcuts() {
|
||||
Vector shortcuts = new Vector();
|
||||
synchronized Enumeration<MenuShortcut> shortcuts() {
|
||||
Vector<MenuShortcut> shortcuts = new Vector<>();
|
||||
int nitems = getItemCount();
|
||||
for (int i = 0 ; i < nitems ; i++) {
|
||||
MenuItem mi = getItem(i);
|
||||
if (mi instanceof Menu) {
|
||||
Enumeration e = ((Menu)mi).shortcuts();
|
||||
Enumeration<MenuShortcut> e = ((Menu)mi).shortcuts();
|
||||
while (e.hasMoreElements()) {
|
||||
shortcuts.addElement(e.nextElement());
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
||||
return menuBar.helpMenu;
|
||||
}
|
||||
|
||||
public Vector getMenus(MenuBar menuBar) {
|
||||
public Vector<Menu> getMenus(MenuBar menuBar) {
|
||||
return menuBar.menus;
|
||||
}
|
||||
});
|
||||
@ -94,7 +94,7 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
||||
* @serial
|
||||
* @see #countMenus()
|
||||
*/
|
||||
Vector menus = new Vector();
|
||||
Vector<Menu> menus = new Vector<>();
|
||||
|
||||
/**
|
||||
* This menu is a special menu dedicated to
|
||||
@ -309,7 +309,7 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
||||
* be called on the toolkit thread.
|
||||
*/
|
||||
final Menu getMenuImpl(int i) {
|
||||
return (Menu)menus.elementAt(i);
|
||||
return menus.elementAt(i);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -321,10 +321,10 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
||||
* @since JDK1.1
|
||||
*/
|
||||
public synchronized Enumeration<MenuShortcut> shortcuts() {
|
||||
Vector shortcuts = new Vector();
|
||||
Vector<MenuShortcut> shortcuts = new Vector<>();
|
||||
int nmenus = getMenuCount();
|
||||
for (int i = 0 ; i < nmenus ; i++) {
|
||||
Enumeration e = getMenu(i).shortcuts();
|
||||
Enumeration<MenuShortcut> e = getMenu(i).shortcuts();
|
||||
while (e.hasMoreElements()) {
|
||||
shortcuts.addElement(e.nextElement());
|
||||
}
|
||||
@ -438,7 +438,7 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
||||
// HeadlessException will be thrown from MenuComponent's readObject
|
||||
s.defaultReadObject();
|
||||
for (int i = 0; i < menus.size(); i++) {
|
||||
Menu m = (Menu)menus.elementAt(i);
|
||||
Menu m = menus.elementAt(i);
|
||||
m.parent = this;
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ public abstract class MenuComponent implements java.io.Serializable {
|
||||
public void setFont(Font f) {
|
||||
font = f;
|
||||
//Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font)
|
||||
MenuComponentPeer peer = (MenuComponentPeer)this.peer;
|
||||
MenuComponentPeer peer = this.peer;
|
||||
if (peer != null) {
|
||||
peer.setFont(f);
|
||||
}
|
||||
@ -303,7 +303,7 @@ public abstract class MenuComponent implements java.io.Serializable {
|
||||
*/
|
||||
public void removeNotify() {
|
||||
synchronized (getTreeLock()) {
|
||||
MenuComponentPeer p = (MenuComponentPeer)this.peer;
|
||||
MenuComponentPeer p = this.peer;
|
||||
if (p != null) {
|
||||
Toolkit.getEventQueue().removeSourceEvents(this, true);
|
||||
this.peer = null;
|
||||
|
||||
@ -564,7 +564,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
||||
* @since 1.4
|
||||
*/
|
||||
public synchronized ActionListener[] getActionListeners() {
|
||||
return (ActionListener[])(getListeners(ActionListener.class));
|
||||
return getListeners(ActionListener.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -92,7 +92,7 @@ public class RenderingHints
|
||||
* {@code equals()} method.
|
||||
*/
|
||||
public abstract static class Key {
|
||||
private static HashMap identitymap = new HashMap(17);
|
||||
private static HashMap<Object,Object> identitymap = new HashMap<>(17);
|
||||
|
||||
private String getIdentity() {
|
||||
// Note that the identity string is dependent on 3 variables:
|
||||
@ -138,7 +138,7 @@ public class RenderingHints
|
||||
}
|
||||
// Note: Use a weak reference to avoid holding on to extra
|
||||
// objects and classes after they should be unloaded.
|
||||
identitymap.put(identity, new WeakReference(k));
|
||||
identitymap.put(identity, new WeakReference<Key>(k));
|
||||
}
|
||||
|
||||
private int privatekey;
|
||||
@ -195,7 +195,7 @@ public class RenderingHints
|
||||
}
|
||||
}
|
||||
|
||||
HashMap hintmap = new HashMap(7);
|
||||
HashMap<Object,Object> hintmap = new HashMap<>(7);
|
||||
|
||||
/**
|
||||
* Antialiasing hint key.
|
||||
@ -1267,12 +1267,13 @@ public class RenderingHints
|
||||
* object.
|
||||
* @return a clone of this instance.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object clone() {
|
||||
RenderingHints rh;
|
||||
try {
|
||||
rh = (RenderingHints) super.clone();
|
||||
if (hintmap != null) {
|
||||
rh.hintmap = (HashMap) hintmap.clone();
|
||||
rh.hintmap = (HashMap<Object,Object>) hintmap.clone();
|
||||
}
|
||||
} catch (CloneNotSupportedException e) {
|
||||
// this shouldn't happen, since we are Cloneable
|
||||
|
||||
@ -71,7 +71,7 @@ public class Clipboard {
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
private Set currentDataFlavors;
|
||||
private Set<DataFlavor> currentDataFlavors;
|
||||
|
||||
/**
|
||||
* Creates a clipboard object.
|
||||
@ -313,7 +313,7 @@ public class Clipboard {
|
||||
if (flavorListeners == null) {
|
||||
return;
|
||||
}
|
||||
Set prevDataFlavors = currentDataFlavors;
|
||||
Set<DataFlavor> prevDataFlavors = currentDataFlavors;
|
||||
currentDataFlavors = getAvailableDataFlavorSet();
|
||||
if (prevDataFlavors.equals(currentDataFlavors)) {
|
||||
return;
|
||||
@ -339,8 +339,8 @@ public class Clipboard {
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
private Set getAvailableDataFlavorSet() {
|
||||
Set set = new HashSet();
|
||||
private Set<DataFlavor> getAvailableDataFlavorSet() {
|
||||
Set<DataFlavor> set = new HashSet<>();
|
||||
Transferable contents = getContents(null);
|
||||
if (contents != null) {
|
||||
DataFlavor[] flavors = contents.getTransferDataFlavors();
|
||||
|
||||
@ -165,7 +165,7 @@ public class DragGestureEvent extends EventObject {
|
||||
* <P>
|
||||
* @return an Iterator for the events comprising the gesture
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Iterator<InputEvent> iterator() { return events.iterator(); }
|
||||
|
||||
/**
|
||||
@ -184,7 +184,7 @@ public class DragGestureEvent extends EventObject {
|
||||
* <P>
|
||||
* @return an array of the events comprising the gesture
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object[] toArray(Object[] array) { return events.toArray(array); }
|
||||
|
||||
/**
|
||||
@ -333,7 +333,6 @@ public class DragGestureEvent extends EventObject {
|
||||
component = (Component)f.get("component", null);
|
||||
origin = (Point)f.get("origin", null);
|
||||
action = f.get("action", 0);
|
||||
|
||||
// Pre-1.4 support. 'events' was previously non-transient
|
||||
try {
|
||||
events = (List)f.get("events", null);
|
||||
@ -351,7 +350,7 @@ public class DragGestureEvent extends EventObject {
|
||||
/*
|
||||
* fields
|
||||
*/
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private transient List events;
|
||||
|
||||
/**
|
||||
|
||||
@ -297,7 +297,7 @@ public abstract class DragGestureRecognizer implements Serializable {
|
||||
* @return the initial event that triggered the drag gesture
|
||||
*/
|
||||
|
||||
public InputEvent getTriggerEvent() { return events.isEmpty() ? null : (InputEvent)events.get(0); }
|
||||
public InputEvent getTriggerEvent() { return events.isEmpty() ? null : events.get(0); }
|
||||
|
||||
/**
|
||||
* Reset the Recognizer, if its currently recognizing a gesture, ignore
|
||||
|
||||
@ -600,7 +600,7 @@ public class DragSource implements Serializable {
|
||||
* @since 1.4
|
||||
*/
|
||||
public DragSourceListener[] getDragSourceListeners() {
|
||||
return (DragSourceListener[])getListeners(DragSourceListener.class);
|
||||
return getListeners(DragSourceListener.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -660,8 +660,7 @@ public class DragSource implements Serializable {
|
||||
* @since 1.4
|
||||
*/
|
||||
public DragSourceMotionListener[] getDragSourceMotionListeners() {
|
||||
return (DragSourceMotionListener[])
|
||||
getListeners(DragSourceMotionListener.class);
|
||||
return getListeners(DragSourceMotionListener.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -896,8 +895,8 @@ public class DragSource implements Serializable {
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int getDragThreshold() {
|
||||
int ts = ((Integer)AccessController.doPrivileged(
|
||||
new GetIntegerAction("awt.dnd.drag.threshold", 0))).intValue();
|
||||
int ts = AccessController.doPrivileged(
|
||||
new GetIntegerAction("awt.dnd.drag.threshold", 0)).intValue();
|
||||
if (ts > 0) {
|
||||
return ts;
|
||||
} else {
|
||||
|
||||
@ -36,6 +36,8 @@ package java.awt.dnd;
|
||||
|
||||
public class InvalidDnDOperationException extends IllegalStateException {
|
||||
|
||||
private static final long serialVersionUID = 5156676500247816278L;
|
||||
|
||||
static private String dft_msg = "The operation requested cannot be performed by the DnD system since it is not in the appropriate state";
|
||||
|
||||
/**
|
||||
|
||||
@ -876,6 +876,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
* they have not been cached.
|
||||
* @see #getType
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
private void calculateType() {
|
||||
int ret = TYPE_IDENTITY;
|
||||
boolean sgn0, sgn1;
|
||||
@ -1038,6 +1039,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
* @see #TYPE_UNIFORM_SCALE
|
||||
* @since 1.2
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
public double getDeterminant() {
|
||||
switch (state) {
|
||||
default:
|
||||
@ -1250,6 +1252,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
m02 = tx * m00 + ty * m01 + m02;
|
||||
m12 = tx * m10 + ty * m11 + m12;
|
||||
@ -1631,6 +1634,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
* Y axis direction
|
||||
* @since 1.2
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
public void scale(double sx, double sy) {
|
||||
int state = this.state;
|
||||
switch (state) {
|
||||
@ -1705,6 +1709,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
case (APPLY_SHEAR | APPLY_SCALE):
|
||||
double M0, M1;
|
||||
@ -2224,6 +2229,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
* @see #preConcatenate
|
||||
* @since 1.2
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
public void concatenate(AffineTransform Tx) {
|
||||
double M0, M1;
|
||||
double T00, T01, T10, T11;
|
||||
@ -2432,6 +2438,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
* @see #concatenate
|
||||
* @since 1.2
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
public void preConcatenate(AffineTransform Tx) {
|
||||
double M0, M1;
|
||||
double T00, T01, T10, T11;
|
||||
@ -2655,6 +2662,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return null;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
det = m00 * m11 - m01 * m10;
|
||||
if (Math.abs(det) <= Double.MIN_VALUE) {
|
||||
@ -2751,6 +2759,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
M00 = m00; M01 = m01; M02 = m02;
|
||||
M10 = m10; M11 = m11; M12 = m12;
|
||||
@ -2885,6 +2894,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return null;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
ptDst.setLocation(x * m00 + y * m01 + m02,
|
||||
x * m10 + y * m11 + m12);
|
||||
@ -2968,6 +2978,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
dst.setLocation(x * m00 + y * m01 + m02,
|
||||
x * m10 + y * m11 + m12);
|
||||
@ -3043,6 +3054,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
M00 = m00; M01 = m01; M02 = m02;
|
||||
M10 = m10; M11 = m11; M12 = m12;
|
||||
@ -3157,6 +3169,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
M00 = m00; M01 = m01; M02 = m02;
|
||||
M10 = m10; M11 = m11; M12 = m12;
|
||||
@ -3252,6 +3265,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
M00 = m00; M01 = m01; M02 = m02;
|
||||
M10 = m10; M11 = m11; M12 = m12;
|
||||
@ -3347,6 +3361,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
M00 = m00; M01 = m01; M02 = m02;
|
||||
M10 = m10; M11 = m11; M12 = m12;
|
||||
@ -3436,6 +3451,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
* inverted.
|
||||
* @since 1.2
|
||||
*/
|
||||
@SuppressWarnings("fallthrough")
|
||||
public Point2D inverseTransform(Point2D ptSrc, Point2D ptDst)
|
||||
throws NoninvertibleTransformException
|
||||
{
|
||||
@ -3547,6 +3563,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
M00 = m00; M01 = m01; M02 = m02;
|
||||
M10 = m10; M11 = m11; M12 = m12;
|
||||
@ -3679,6 +3696,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return null;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
case (APPLY_SHEAR | APPLY_SCALE):
|
||||
ptDst.setLocation(x * m00 + y * m01, x * m10 + y * m11);
|
||||
@ -3754,6 +3772,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
default:
|
||||
stateError();
|
||||
/* NOTREACHED */
|
||||
return;
|
||||
case (APPLY_SHEAR | APPLY_SCALE | APPLY_TRANSLATE):
|
||||
case (APPLY_SHEAR | APPLY_SCALE):
|
||||
M00 = m00; M01 = m01;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user