--- a/jdk/make/data/fontconfig/windows.fontconfig.properties Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/make/data/fontconfig/windows.fontconfig.properties Mon Oct 05 13:45:50 2015 -0700
@@ -40,6 +40,7 @@
allfonts.dingbats=Wingdings
allfonts.lucida=Lucida Sans Regular
allfonts.symbol=Symbol
+allfonts.symbols=Segoe UI Symbol
allfonts.thai=Lucida Sans Regular
allfonts.georgian=Sylfaen
@@ -236,7 +237,7 @@
sequence.allfonts.x-windows-874=alphabetic,thai,dingbats,symbol
-sequence.fallback=lucida,\
+sequence.fallback=lucida,symbols,\
chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\
japanese,korean,chinese-ms950-extb,chinese-ms936-extb,georgian
@@ -298,3 +299,4 @@
filename.Wingdings=WINGDING.TTF
filename.Sylfaen=sylfaen.ttf
+filename.Segoe_UI_Symbol=SEGUISYM.TTF
--- a/jdk/make/lib/Awt2dLibraries.gmk Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/make/lib/Awt2dLibraries.gmk Mon Oct 05 13:45:50 2015 -0700
@@ -959,10 +959,9 @@
$(X_CFLAGS) \
$(X_LIBS) \
$(LIBAWT_LWAWT_CFLAGS), \
- DISABLED_WARNINGS_clang := incomplete-implementation \
+ DISABLED_WARNINGS_clang := incomplete-implementation enum-conversion \
deprecated-declarations objc-method-access bitwise-op-parentheses \
incompatible-pointer-types parentheses-equality extra-tokens, \
- WARNINGS_AS_ERRORS_clang := false, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-L$(INSTALL_LIBRARIES_HERE), \
--- a/jdk/src/demo/share/applets/MoleculeViewer/XYZApp.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/demo/share/applets/MoleculeViewer/XYZApp.java Mon Oct 05 13:45:50 2015 -0700
@@ -504,11 +504,11 @@
private static Applet applet;
private static byte[] data;
- private final static int R = 40;
- private final static int hx = 15;
- private final static int hy = 15;
- private final static int bgGrey = 192;
- private final static int nBalls = 16;
+ private static final int R = 40;
+ private static final int hx = 15;
+ private static final int hy = 15;
+ private static final int bgGrey = 192;
+ private static final int nBalls = 16;
private static int maxr;
private int Rl;
private int Gl;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/ImageTests.java Mon Oct 05 13:45:50 2015 -0700
@@ -771,7 +771,7 @@
}
}
- private static abstract class ImageOpTests extends ImageTests {
+ private abstract static class ImageOpTests extends ImageTests {
ImageOpTests(Group parent, String nodeName, String desc) {
super(parent, nodeName, desc,
new Modifier.Filter() {
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/PixelTests.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/PixelTests.java Mon Oct 05 13:45:50 2015 -0700
@@ -245,7 +245,7 @@
}
}
- public static abstract class BufImgTest extends PixelTests {
+ public abstract static class BufImgTest extends PixelTests {
public BufImgTest(String nodeName, String description) {
super(bufimgtestroot, nodeName, description);
}
@@ -281,7 +281,7 @@
}
}
- public static abstract class RasTest extends PixelTests {
+ public abstract static class RasTest extends PixelTests {
public RasTest(String nodeName, String description) {
super(rastertestroot, nodeName, description);
}
@@ -355,7 +355,7 @@
}
}
- public static abstract class DataBufTest extends PixelTests {
+ public abstract static class DataBufTest extends PixelTests {
public DataBufTest(String nodeName, String description) {
super(dbtestroot, nodeName, description);
}
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/InputTests.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/InputTests.java Mon Oct 05 13:45:50 2015 -0700
@@ -161,7 +161,7 @@
}
}
- protected static abstract class Context {
+ protected abstract static class Context {
int size;
Object input;
int inputType;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/OutputTests.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/OutputTests.java Mon Oct 05 13:45:50 2015 -0700
@@ -156,7 +156,7 @@
}
}
- protected static abstract class Context {
+ protected abstract static class Context {
int size;
Object output;
int outputType;
--- a/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/text/TextMeasureTests.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/text/TextMeasureTests.java Mon Oct 05 13:45:50 2015 -0700
@@ -232,7 +232,7 @@
}
}
- public static abstract class GVMeasureTest extends TextMeasureTests {
+ public abstract static class GVMeasureTest extends TextMeasureTests {
protected GVMeasureTest(Group parent, String nodeName, String description) {
super(parent, nodeName, description);
}
@@ -431,7 +431,7 @@
}
}
- public static abstract class TLMeasureTest extends TextMeasureTests {
+ public abstract static class TLMeasureTest extends TextMeasureTests {
protected TLMeasureTest(Group parent, String nodeName, String description) {
super(parent, nodeName, description);
}
@@ -506,7 +506,7 @@
}
}
- public static abstract class TLExtendedMeasureTest extends TLMeasureTest {
+ public abstract static class TLExtendedMeasureTest extends TLMeasureTest {
protected TLExtendedMeasureTest(Group parent, String nodeName, String description) {
super(parent, nodeName, description);
}
--- a/jdk/src/demo/share/jfc/FileChooserDemo/FileChooserDemo.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/demo/share/jfc/FileChooserDemo/FileChooserDemo.java Mon Oct 05 13:45:50 2015 -0700
@@ -143,11 +143,11 @@
private JTextField customField;
private final ExampleFileView fileView;
private final ExampleFileSystemView fileSystemView;
- private final static Dimension hpad10 = new Dimension(10, 1);
- private final static Dimension vpad20 = new Dimension(1, 20);
- private final static Dimension vpad7 = new Dimension(1, 7);
- private final static Dimension vpad4 = new Dimension(1, 4);
- private final static Insets insets = new Insets(5, 10, 0, 10);
+ private static final Dimension hpad10 = new Dimension(10, 1);
+ private static final Dimension vpad20 = new Dimension(1, 20);
+ private static final Dimension vpad7 = new Dimension(1, 7);
+ private static final Dimension vpad4 = new Dimension(1, 4);
+ private static final Insets insets = new Insets(5, 10, 0, 10);
private final FilePreviewer previewer;
private final JFileChooser chooser;
--- a/jdk/src/demo/share/jfc/Notepad/Notepad.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/demo/share/jfc/Notepad/Notepad.java Mon Oct 05 13:45:50 2015 -0700
@@ -64,7 +64,7 @@
protected static Properties properties;
private static ResourceBundle resources;
- private final static String EXIT_AFTER_PAINT = "-exit";
+ private static final String EXIT_AFTER_PAINT = "-exit";
private static boolean exitAfterFirstPaint;
private static final String[] MENUBAR_KEYS = {"file", "edit", "debug"};
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java Mon Oct 05 13:45:50 2015 -0700
@@ -127,7 +127,7 @@
* @return the class loaded
* @exception ClassNotFoundException if class is not found
*/
- protected final static Class<?> tryToLoadClass(String className,
+ protected static final Class<?> tryToLoadClass(String className,
ClassLoader fallback)
throws ClassNotFoundException
{
@@ -163,7 +163,7 @@
/*
* private initializer
*/
- static private DataFlavor createConstant(Class<?> rc, String prn) {
+ private static DataFlavor createConstant(Class<?> rc, String prn) {
try {
return new DataFlavor(rc, prn);
} catch (Exception e) {
@@ -174,7 +174,7 @@
/*
* private initializer
*/
- static private DataFlavor createConstant(String mt, String prn) {
+ private static DataFlavor createConstant(String mt, String prn) {
try {
return new DataFlavor(mt, prn);
} catch (Exception e) {
@@ -185,7 +185,7 @@
/*
* private initializer
*/
- static private DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
+ private static DataFlavor initHtmlDataFlavor(String htmlFlavorType) {
try {
return new DataFlavor ("text/html; class=java.lang.String;document=" +
htmlFlavorType + ";charset=Unicode");
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java Mon Oct 05 13:45:50 2015 -0700
@@ -62,7 +62,7 @@
private static native void nativeReplyToAppShouldTerminate(final boolean shouldTerminate);
private static native void nativeRegisterForNotification(final int notification);
- final static _AppEventHandler instance = new _AppEventHandler();
+ static final _AppEventHandler instance = new _AppEventHandler();
static _AppEventHandler getInstance() {
return instance;
}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eio/FileManager.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eio/FileManager.java Mon Oct 05 13:45:50 2015 -0700
@@ -69,31 +69,31 @@
* @since Java for Mac OS X 10.5 - 1.5
* @since Java for Mac OS X 10.5 Update 1 - 1.6
*/
- public final static short kOnAppropriateDisk = -32767;
+ public static final short kOnAppropriateDisk = -32767;
/**
* Read-only system hierarchy.
* @since Java for Mac OS X 10.5 - 1.5
* @since Java for Mac OS X 10.5 Update 1 - 1.6
*/
- public final static short kSystemDomain = -32766;
+ public static final short kSystemDomain = -32766;
/**
* All users of a single machine have access to these resources.
* @since Java for Mac OS X 10.5 - 1.5
* @since Java for Mac OS X 10.5 Update 1 - 1.6
*/
- public final static short kLocalDomain = -32765;
+ public static final short kLocalDomain = -32765;
/**
* All users configured to use a common network server has access to these resources.
* @since Java for Mac OS X 10.5 - 1.5
* @since Java for Mac OS X 10.5 Update 1 - 1.6
*/
- public final static short kNetworkDomain = -32764;
+ public static final short kNetworkDomain = -32764;
/**
* Read/write. Resources that are private to the user.
* @since Java for Mac OS X 10.5 - 1.5
* @since Java for Mac OS X 10.5 Update 1 - 1.6
*/
- public final static short kUserDomain = -32763;
+ public static final short kUserDomain = -32763;
/**
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonBorder.java Mon Oct 05 13:45:50 2015 -0700
@@ -38,17 +38,17 @@
public abstract class AquaButtonBorder extends AquaBorder implements Border, UIResource {
public static final RecyclableSingleton<Dynamic> fDynamic = new RecyclableSingletonFromDefaultConstructor<Dynamic>(Dynamic.class);
- static public AquaButtonBorder getDynamicButtonBorder() {
+ public static AquaButtonBorder getDynamicButtonBorder() {
return fDynamic.get();
}
private static final RecyclableSingleton<Toggle> fToggle = new RecyclableSingletonFromDefaultConstructor<Toggle>(Toggle.class);
- static public AquaButtonBorder getToggleButtonBorder() {
+ public static AquaButtonBorder getToggleButtonBorder() {
return fToggle.get();
}
public static final RecyclableSingleton<Toolbar> fToolBar = new RecyclableSingletonFromDefaultConstructor<Toolbar>(Toolbar.class);
- static public Border getToolBarButtonBorder() {
+ public static Border getToolBarButtonBorder() {
return fToolBar.get();
}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonExtendedTypes.java Mon Oct 05 13:45:50 2015 -0700
@@ -63,7 +63,7 @@
return logicalPosition;
}
- static abstract class TypeSpecifier {
+ abstract static class TypeSpecifier {
final String name;
final boolean setIconFont;
@@ -138,7 +138,7 @@
return typeDefinitions.get().get(name);
}
- protected final static RecyclableSingleton<Map<String, TypeSpecifier>> typeDefinitions = new RecyclableSingleton<Map<String, TypeSpecifier>>() {
+ protected static final RecyclableSingleton<Map<String, TypeSpecifier>> typeDefinitions = new RecyclableSingleton<Map<String, TypeSpecifier>>() {
protected Map<String, TypeSpecifier> getInstance() {
return getAllTypes();
}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -221,7 +221,7 @@
return new Dimension(width, height);
}
- public static abstract class LabeledButtonBorder extends AquaButtonBorder {
+ public abstract static class LabeledButtonBorder extends AquaButtonBorder {
public LabeledButtonBorder(final SizeDescriptor sizeDescriptor) {
super(sizeDescriptor);
}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -462,7 +462,7 @@
return d;
}
- final static RecyclableSingleton<AquaHierarchyButtonListener> fHierListener = new RecyclableSingletonFromDefaultConstructor<AquaHierarchyButtonListener>(AquaHierarchyButtonListener.class);
+ static final RecyclableSingleton<AquaHierarchyButtonListener> fHierListener = new RecyclableSingletonFromDefaultConstructor<AquaHierarchyButtonListener>(AquaHierarchyButtonListener.class);
static AquaHierarchyButtonListener getAquaHierarchyButtonListener() {
return fHierListener.get();
}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxButton.java Mon Oct 05 13:45:50 2015 -0700
@@ -35,10 +35,10 @@
@SuppressWarnings("serial") // Superclass is not serializable across versions
class AquaComboBoxButton extends JButton {
- final protected JComboBox<Object> comboBox;
- final protected JList<?> list;
- final protected CellRendererPane rendererPane;
- final protected AquaComboBoxUI ui;
+ protected final JComboBox<Object> comboBox;
+ protected final JList<?> list;
+ protected final CellRendererPane rendererPane;
+ protected final AquaComboBoxUI ui;
protected final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance());
boolean isPopDown;
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java Mon Oct 05 13:45:50 2015 -0700
@@ -26,6 +26,8 @@
package com.apple.laf;
import java.awt.*;
+import java.awt.Insets;
+import java.awt.Rectangle;
import java.awt.event.*;
import javax.swing.*;
@@ -195,24 +197,14 @@
final GraphicsDevice[] gs = ge.getScreenDevices();
//System.err.println(" gs.length = " + gs.length);
final Rectangle comboBoxBounds = comboBox.getBounds();
- if (gs.length == 1) {
- final Dimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();
-
- //System.err.println(" scrSize: "+ scrSize);
-
- // If the combo box is totally off screen, don't show a popup
- if ((p.x + comboBoxBounds.width < 0) || (p.y + comboBoxBounds.height < 0) || (p.x > scrSize.width) || (p.y > scrSize.height)) {
- return null;
- }
- Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(comboBox.getGraphicsConfiguration());
- return new Rectangle(0, insets.top, scrSize.width, scrSize.height - insets.top - insets.bottom);
- }
for (final GraphicsDevice gd : gs) {
final GraphicsConfiguration[] gc = gd.getConfigurations();
for (final GraphicsConfiguration element0 : gc) {
final Rectangle gcBounds = element0.getBounds();
- if (gcBounds.contains(p)) return gcBounds;
+ if (gcBounds.contains(p)) {
+ return getAvailableScreenArea(gcBounds, element0);
+ }
}
}
@@ -222,13 +214,24 @@
final GraphicsConfiguration[] gc = gd.getConfigurations();
for (final GraphicsConfiguration element0 : gc) {
final Rectangle gcBounds = element0.getBounds();
- if (gcBounds.intersects(comboBoxBounds)) return gcBounds;
+ if (gcBounds.intersects(comboBoxBounds)) {
+ if (gcBounds.contains(p)) {
+ return getAvailableScreenArea(gcBounds, element0);
+ }
+ }
}
}
return null;
}
+ private Rectangle getAvailableScreenArea(Rectangle bounds,
+ GraphicsConfiguration gc) {
+ Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
+ return new Rectangle(0, insets.top, bounds.width,
+ bounds.height - insets.top);
+ }
+
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
final int itemCount = comboBox.getModel().getSize();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileSystemModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaFileSystemModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -57,8 +57,8 @@
// private boolean fSortAscending = true;
private boolean fSortNames = true;
private final String[] fColumnNames;
- public final static String SORT_BY_CHANGED = "sortByChanged";
- public final static String SORT_ASCENDING_CHANGED = "sortAscendingChanged";
+ public static final String SORT_BY_CHANGED = "sortByChanged";
+ public static final String SORT_ASCENDING_CHANGED = "sortAscendingChanged";
public AquaFileSystemModel(final JFileChooser filechooser, final JTable filelist, final String[] colNames) {
fileCacheLock = new Object();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java Mon Oct 05 13:45:50 2015 -0700
@@ -73,7 +73,7 @@
public void initIconPainter(final AquaPainter<? extends JRSUIState> painter);
}
- static abstract class JRSUIIcon implements Icon, UIResource {
+ abstract static class JRSUIIcon implements Icon, UIResource {
protected final AquaPainter<JRSUIState> painter = AquaPainter.create(JRSUIState.getInstance());
public void paintIcon(final Component c, final Graphics g, final int x, final int y) {
@@ -81,7 +81,7 @@
}
}
- static abstract class DynamicallySizingJRSUIIcon extends JRSUIIcon {
+ abstract static class DynamicallySizingJRSUIIcon extends JRSUIIcon {
protected final SizeDescriptor sizeDescriptor;
protected SizeVariant sizeVariant;
@@ -109,7 +109,7 @@
}
}
- static abstract class CachingScalingIcon implements Icon, UIResource {
+ abstract static class CachingScalingIcon implements Icon, UIResource {
int width;
int height;
Image image;
@@ -167,7 +167,7 @@
}
- static abstract class ScalingJRSUIIcon implements Icon, UIResource {
+ abstract static class ScalingJRSUIIcon implements Icon, UIResource {
final int width;
final int height;
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameDockIconUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -229,9 +229,9 @@
@SuppressWarnings("serial") // Superclass is not serializable across versions
class DockLabel extends JLabel {
- final static int NUB_HEIGHT = 7;
- final static int ROUND_ADDITIONAL_HEIGHT = 8;
- final static int ROUND_ADDITIONAL_WIDTH = 12;
+ static final int NUB_HEIGHT = 7;
+ static final int ROUND_ADDITIONAL_HEIGHT = 8;
+ static final int ROUND_ADDITIONAL_WIDTH = 12;
DockLabel(final String text) {
super(text);
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java Mon Oct 05 13:45:50 2015 -0700
@@ -529,7 +529,7 @@
// extracted and adapted from DefaultEditorKit in 1.6
@SuppressWarnings("serial") // Superclass is not serializable across versions
- static abstract class DeleteWordAction extends TextAction {
+ abstract static class DeleteWordAction extends TextAction {
public DeleteWordAction(final String name) { super(name); }
public void actionPerformed(final ActionEvent e) {
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaRootPaneUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaRootPaneUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -48,7 +48,7 @@
public class AquaRootPaneUI extends BasicRootPaneUI implements AncestorListener, WindowListener, ContainerListener {
private static final RecyclableSingleton<AquaRootPaneUI> sRootPaneUI = new RecyclableSingletonFromDefaultConstructor<AquaRootPaneUI>(AquaRootPaneUI.class);
- final static int kDefaultButtonPaintDelayBetweenFrames = 50;
+ static final int kDefaultButtonPaintDelayBetweenFrames = 50;
JButton fCurrentDefaultButton = null;
Timer fTimer = null;
static final boolean sUseScreenMenuBar = AquaMenuBarUI.getScreenMenuBarProperty();
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -2011,20 +2011,20 @@
}
private static class Actions extends UIAction {
- final static String NEXT = "navigateNext";
- final static String PREVIOUS = "navigatePrevious";
- final static String RIGHT = "navigateRight";
- final static String LEFT = "navigateLeft";
- final static String UP = "navigateUp";
- final static String DOWN = "navigateDown";
- final static String PAGE_UP = "navigatePageUp";
- final static String PAGE_DOWN = "navigatePageDown";
- final static String REQUEST_FOCUS = "requestFocus";
- final static String REQUEST_FOCUS_FOR_VISIBLE = "requestFocusForVisibleComponent";
- final static String SET_SELECTED = "setSelectedIndex";
- final static String SELECT_FOCUSED = "selectTabWithFocus";
- final static String SCROLL_FORWARD = "scrollTabsForwardAction";
- final static String SCROLL_BACKWARD = "scrollTabsBackwardAction";
+ static final String NEXT = "navigateNext";
+ static final String PREVIOUS = "navigatePrevious";
+ static final String RIGHT = "navigateRight";
+ static final String LEFT = "navigateLeft";
+ static final String UP = "navigateUp";
+ static final String DOWN = "navigateDown";
+ static final String PAGE_UP = "navigatePageUp";
+ static final String PAGE_DOWN = "navigatePageDown";
+ static final String REQUEST_FOCUS = "requestFocus";
+ static final String REQUEST_FOCUS_FOR_VISIBLE = "requestFocusForVisibleComponent";
+ static final String SET_SELECTED = "setSelectedIndex";
+ static final String SELECT_FOCUSED = "selectTabWithFocus";
+ static final String SCROLL_FORWARD = "scrollTabsForwardAction";
+ static final String SCROLL_BACKWARD = "scrollTabsBackwardAction";
Actions(final String key) {
super(key);
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -67,7 +67,7 @@
super.uninstallDefaults();
}
- final static RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
+ static final RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>> TABLE_HEADER_APPLICATORS = new RecyclableSingleton<ClientPropertyApplicator<JTableHeader, JTableHeader>>() {
@Override
@SuppressWarnings("unchecked")
protected ClientPropertyApplicator<JTableHeader, JTableHeader> getInstance() {
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtilControlSize.java Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -27,7 +27,6 @@
import java.awt.*;
import java.beans.*;
-import java.lang.reflect.Method;
import javax.swing.*;
import javax.swing.border.Border;
@@ -38,16 +37,20 @@
import com.apple.laf.AquaUtils.RecyclableSingleton;
import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor;
+import sun.security.action.GetPropertyAction;
+
+import static java.security.AccessController.*;
public class AquaUtilControlSize {
- protected final static String CLIENT_PROPERTY_KEY = "JComponent.sizeVariant";
- protected final static String SYSTEM_PROPERTY_KEY = "swing.component.sizevariant";
+ protected static final String CLIENT_PROPERTY_KEY = "JComponent.sizeVariant";
+ protected static final String SYSTEM_PROPERTY_KEY = "swing.component.sizevariant";
interface Sizeable {
void applySizeFor(final JComponent c, final Size size);
}
- protected static final RecyclableSingleton<PropertySizeListener> sizeListener = new RecyclableSingletonFromDefaultConstructor<PropertySizeListener>(PropertySizeListener.class);
+ protected static final RecyclableSingleton<PropertySizeListener> sizeListener
+ = new RecyclableSingletonFromDefaultConstructor<>(PropertySizeListener.class);
protected static PropertySizeListener getSizeListener() {
return sizeListener.get();
}
@@ -70,13 +73,13 @@
}
private static Size getDefaultSize() {
- final String sizeProperty = java.security.AccessController.doPrivileged(new sun.security.action.GetPropertyAction(SYSTEM_PROPERTY_KEY));
+ final String sizeProperty = doPrivileged(new GetPropertyAction(SYSTEM_PROPERTY_KEY));
final JRSUIConstants.Size size = getSizeFromString(sizeProperty);
if (size != null) return size;
return JRSUIConstants.Size.REGULAR;
}
- protected final static JRSUIConstants.Size defaultSize = getDefaultSize();
+ protected static final JRSUIConstants.Size defaultSize = getDefaultSize();
protected static JRSUIConstants.Size getUserSizeFrom(final JComponent c) {
final Object sizeProp = c.getClientProperty(CLIENT_PROPERTY_KEY);
if (sizeProp == null) return defaultSize;
@@ -85,20 +88,32 @@
return size;
}
- protected static JRSUIConstants.Size applySizeForControl(final JComponent c, final AquaPainter<? extends JRSUIState> painter) {
+ protected static JRSUIConstants.Size applySizeForControl(final JComponent c,
+ final AquaPainter<? extends JRSUIState> painter) {
final JRSUIConstants.Size sizeFromUser = getUserSizeFrom(c);
- final JRSUIConstants.Size size = sizeFromUser == null ? JRSUIConstants.Size.REGULAR : sizeFromUser;
+ final JRSUIConstants.Size size = sizeFromUser == null
+ ? JRSUIConstants.Size.REGULAR
+ : sizeFromUser;
painter.state.set(size);
return size;
}
- protected static Font getFontForSize(final Component c, final JRSUIConstants.Size size) {
+ protected static Font getFontForSize(final Component c,
+ final JRSUIConstants.Size size) {
final Font initialFont = c.getFont();
- if (size == null || !(initialFont instanceof UIResource)) return initialFont;
+ if (size == null || !(initialFont instanceof UIResource)) {
+ return initialFont;
+ }
- if (size == JRSUIConstants.Size.MINI) return initialFont.deriveFont(AquaFonts.getMiniControlTextFont().getSize2D());
- if (size == JRSUIConstants.Size.SMALL) return initialFont.deriveFont(AquaFonts.getSmallControlTextFont().getSize2D());
+ if (size == JRSUIConstants.Size.MINI) {
+ return initialFont.deriveFont(
+ AquaFonts.getMiniControlTextFont().getSize2D());
+ }
+ if (size == JRSUIConstants.Size.SMALL) {
+ return initialFont.deriveFont(
+ AquaFonts.getSmallControlTextFont().getSize2D());
+ }
return initialFont.deriveFont(AquaFonts.getControlTextFont().getSize2D());
}
@@ -115,25 +130,8 @@
c.setBorder(derivedBorder);
}
- // call JComponent.getUI() if it exists, then call Sizeable.applySizeFor() if the UI is "Sizeable"
- // next best thing to -respondsToSelector: :-P
- private static void applyUISizing(final JComponent c, final Size size) {
- try {
- // see if this component has a "getUI" method
- final Class<? extends JComponent> clazz = c.getClass();
- final Method getUIMethod = clazz.getMethod("getUI", new Class<?>[0]);
-
- // see if that UI is one of ours that understands sizing
- final Object ui = getUIMethod.invoke(c, new Object[0]);
- if (!(ui instanceof Sizeable)) return;
-
- // size it!
- final Sizeable sizeable = (Sizeable)ui;
- sizeable.applySizeFor(c, size);
- } catch (final Throwable e) { return; }
- }
-
protected static class PropertySizeListener implements PropertyChangeListener {
+ @Override
public void propertyChange(final PropertyChangeEvent evt) {
final String key = evt.getPropertyName();
if (!CLIENT_PROPERTY_KEY.equalsIgnoreCase(key)) return;
@@ -154,7 +152,10 @@
applyBorderForSize(c, size);
- applyUISizing(c, size);
+ final Object ui = c.getUI();
+ if (ui instanceof Sizeable) {
+ ((Sizeable) ui).applySizeFor(c, size);
+ }
final Font priorFont = c.getFont();
if (!(priorFont instanceof FontUIResource)) return;
@@ -200,6 +201,7 @@
return regular;
}
+ @Override
public String toString() {
return "regular[" + regular + "] small[" + small + "] mini[" + mini + "]";
}
@@ -223,8 +225,14 @@
public SizeVariant(final SizeVariant desc){
this.size = desc.size;
- this.insets = new InsetsUIResource(desc.insets.top, desc.insets.left, desc.insets.bottom, desc.insets.right);
- this.margins = new InsetsUIResource(desc.margins.top, desc.margins.left, desc.margins.bottom, desc.margins.right);
+ this.insets = new InsetsUIResource(desc.insets.top,
+ desc.insets.left,
+ desc.insets.bottom,
+ desc.insets.right);
+ this.margins = new InsetsUIResource(desc.margins.top,
+ desc.margins.left,
+ desc.margins.bottom,
+ desc.margins.right);
this.fontSize = desc.fontSize;
this.w = desc.w;
this.h = desc.h;
@@ -241,7 +249,8 @@
return this;
}
- public SizeVariant alterInsets(final int top, final int left, final int bottom, final int right) {
+ public SizeVariant alterInsets(final int top, final int left,
+ final int bottom, final int right) {
insets = generateInsets(insets, top, left, bottom, right);
return this;
}
@@ -251,7 +260,8 @@
return this;
}
- public SizeVariant alterMargins(final int top, final int left, final int bottom, final int right) {
+ public SizeVariant alterMargins(final int top, final int left,
+ final int bottom, final int right) {
margins = generateInsets(margins, top, left, bottom, right);
return this;
}
@@ -273,8 +283,12 @@
// return this;
// }
- static Insets generateInsets(final Insets i, final int top, final int left, final int bottom, final int right) {
- if (i == null) return new InsetsUIResource(top, left, bottom, right);
+ static Insets generateInsets(final Insets i, final int top,
+ final int left, final int bottom,
+ final int right) {
+ if (i == null) {
+ return new InsetsUIResource(top, left, bottom, right);
+ }
i.top += top;
i.left += left;
i.bottom += bottom;
@@ -282,8 +296,10 @@
return i;
}
+ @Override
public String toString() {
- return "insets:" + insets + ", margins:" + margins + ", fontSize:" + fontSize;// + ", textBaseline:" + textBaseline;
+ return "insets:" + insets + ", margins:" + margins + ", fontSize:"
+ + fontSize;// + ", textBaseline:" + textBaseline;
}
}
}
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/CRenderer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/CRenderer.java Mon Oct 05 13:45:50 2015 -0700
@@ -36,7 +36,7 @@
import sun.lwawt.macosx.*;
public class CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, DrawImagePipe {
- native static void init();
+ static native void init();
// cache of the runtime options
static {
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/CompositeCRenderer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/CompositeCRenderer.java Mon Oct 05 13:45:50 2015 -0700
@@ -35,8 +35,8 @@
import sun.java2d.pipe.*;
public class CompositeCRenderer extends CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, DrawImagePipe, TextPipe {
- final static int fPadding = 4;
- final static int fPaddingHalf = fPadding / 2;
+ static final int fPadding = 4;
+ static final int fPaddingHalf = fPadding / 2;
private static AffineTransform sIdentityMatrix = new AffineTransform();
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java Mon Oct 05 13:45:50 2015 -0700
@@ -43,8 +43,8 @@
* This is the SurfaceData for a CGContextRef.
*/
public abstract class OSXSurfaceData extends BufImgSurfaceData {
- final static float UPPER_BND = Float.MAX_VALUE / 2.0f;
- final static float LOWER_BND = -UPPER_BND;
+ static final float UPPER_BND = Float.MAX_VALUE / 2.0f;
+ static final float LOWER_BND = -UPPER_BND;
protected static CRenderer sQuartzPipe = null;
protected static CTextPipe sCocoaTextPipe = null;
--- a/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/java2d/opengl/CGLSurfaceData.java Mon Oct 05 13:45:50 2015 -0700
@@ -365,7 +365,7 @@
// Mac OS X specific APIs for JOGL/Java2D bridge...
// given a surface create and attach GL context, then return it
- private native static long createCGLContextOnSurface(CGLSurfaceData sd,
+ private static native long createCGLContextOnSurface(CGLSurfaceData sd,
long sharedContext);
public static long createOGLContextOnSurface(Graphics g, long sharedContext) {
@@ -379,7 +379,7 @@
}
// returns whether or not the makeCurrent operation succeeded
- native static boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd,
+ static native boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd,
long ctx);
public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) {
@@ -393,7 +393,7 @@
}
// additional cleanup
- private native static void destroyCGLContext(long ctx);
+ private static native void destroyCGLContext(long ctx);
public static void destroyOGLContext(long ctx) {
if (ctx != 0L) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java Mon Oct 05 13:45:50 2015 -0700
@@ -43,12 +43,12 @@
public abstract class LWToolkit extends SunToolkit implements Runnable {
- private final static int STATE_NONE = 0;
- private final static int STATE_INIT = 1;
- private final static int STATE_MESSAGELOOP = 2;
- private final static int STATE_SHUTDOWN = 3;
- private final static int STATE_CLEANUP = 4;
- private final static int STATE_DONE = 5;
+ private static final int STATE_NONE = 0;
+ private static final int STATE_INIT = 1;
+ private static final int STATE_MESSAGELOOP = 2;
+ private static final int STATE_SHUTDOWN = 3;
+ private static final int STATE_CLEANUP = 4;
+ private static final int STATE_DONE = 5;
private int runState = STATE_NONE;
@@ -454,14 +454,14 @@
/*
* Expose non-public targetToPeer() method.
*/
- public final static Object targetToPeer(Object target) {
+ public static final Object targetToPeer(Object target) {
return SunToolkit.targetToPeer(target);
}
/*
* Expose non-public targetDisposedPeer() method.
*/
- public final static void targetDisposedPeer(Object target, Object peer) {
+ public static final void targetDisposedPeer(Object target, Object peer) {
SunToolkit.targetDisposedPeer(target, peer);
}
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java Mon Oct 05 13:45:50 2015 -0700
@@ -558,9 +558,9 @@
// Duplicated from JavaComponentAccessibility
// Note that values >=0 are indexes into the child array
- final static int JAVA_AX_ALL_CHILDREN = -1;
- final static int JAVA_AX_SELECTED_CHILDREN = -2;
- final static int JAVA_AX_VISIBLE_CHILDREN = -3;
+ static final int JAVA_AX_ALL_CHILDREN = -1;
+ static final int JAVA_AX_SELECTED_CHILDREN = -2;
+ static final int JAVA_AX_VISIBLE_CHILDREN = -3;
// Each child takes up two entries in the array: one for itself and one for its role
public static Object[] getChildrenAndRoles(final Accessible a, final Component c, final int whichChildren, final boolean allowIgnored) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java Mon Oct 05 13:45:50 2015 -0700
@@ -171,7 +171,7 @@
}
@Override
- synchronized protected Long getFormatForNativeAsLong(String str) {
+ protected synchronized Long getFormatForNativeAsLong(String str) {
Long format = predefinedClipboardNameMap.get(str);
if (format == null) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CInputMethod.java Mon Oct 05 13:45:50 2015 -0700
@@ -422,7 +422,7 @@
* Tell the component to commit all of the characters in the string to the current
* text view. This effectively wipes out any text in progress.
*/
- synchronized private void insertText(String aString) {
+ private synchronized void insertText(String aString) {
AttributedString attribString = new AttributedString(aString);
// Set locale information on the new string.
@@ -447,11 +447,11 @@
fCurrentTextLength = rawText.length();
}
- static private final int kCaretPosition = 0;
- static private final int kRawText = 1;
- static private final int kSelectedRawText = 2;
- static private final int kConvertedText = 3;
- static private final int kSelectedConvertedText = 4;
+ private static final int kCaretPosition = 0;
+ private static final int kRawText = 1;
+ private static final int kSelectedRawText = 2;
+ private static final int kConvertedText = 3;
+ private static final int kSelectedConvertedText = 4;
/**
* Convert Cocoa text highlight attributes into Java input method highlighting.
@@ -556,7 +556,7 @@
/**
* Frequent callbacks from NSTextInput. I think we're supposed to commit it here?
*/
- synchronized private void unmarkText() {
+ private synchronized void unmarkText() {
if (fCurrentText == null)
return;
@@ -574,7 +574,7 @@
fCurrentTextLength = 0;
}
- synchronized private boolean hasMarkedText() {
+ private synchronized boolean hasMarkedText() {
return fCurrentText != null;
}
@@ -583,7 +583,7 @@
* Java does not. So, we have to see where the request is and based on that return the right
* substring.
*/
- synchronized private String attributedSubstringFromRange(final int locationIn, final int lengthIn) {
+ private synchronized String attributedSubstringFromRange(final int locationIn, final int lengthIn) {
final String[] retString = new String[1];
try {
@@ -635,7 +635,7 @@
* for the fact that the insert point in Swing can come AFTER the selected text, making this
* potentially incorrect.
*/
- synchronized private int[] selectedRange() {
+ private synchronized int[] selectedRange() {
final int[] returnValue = new int[2];
try {
@@ -683,7 +683,7 @@
* inserted, so we can return that position, and the length of the text in progress. If there is no marked text
* return null.
*/
- synchronized private int[] markedRange() {
+ private synchronized int[] markedRange() {
if (fCurrentText == null)
return null;
@@ -710,7 +710,7 @@
* which is always in front of the in-progress text, we get the offset into the composed text, and we get
* that location from the input method context.
*/
- synchronized private int[] firstRectForCharacterRange(final int absoluteTextOffset) {
+ private synchronized int[] firstRectForCharacterRange(final int absoluteTextOffset) {
final int[] rect = new int[4];
try {
@@ -753,7 +753,7 @@
* The coordinates are in Java screen coordinates. If no character in the composed text was hit, we return -1, indicating
* not found.
*/
- synchronized private int characterIndexForPoint(final int screenX, final int screenY) {
+ private synchronized int characterIndexForPoint(final int screenX, final int screenY) {
final TextHitInfo[] offsetInfo = new TextHitInfo[1];
final int[] insertPositionOffset = new int[1];
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java Mon Oct 05 13:45:50 2015 -0700
@@ -45,8 +45,8 @@
private static class Lock {}
private final Lock lock = new Lock();
- private final static int SHOWING_DELAY = 300;
- private final static int HIDING_DELAY = 2000;
+ private static final int SHOWING_DELAY = 300;
+ private static final int HIDING_DELAY = 2000;
private Rectangle bounds = new Rectangle();
private final WeakReference<LWWindowPeer> ownerPeer;
@@ -406,7 +406,7 @@
private final Lock taskLock = new Lock();
private CancelableRunnable showHideTask;
- private static abstract class CancelableRunnable implements Runnable {
+ private abstract static class CancelableRunnable implements Runnable {
private volatile boolean perform = true;
public final void cancel() {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CocoaConstants.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CocoaConstants.java Mon Oct 05 13:45:50 2015 -0700
@@ -30,35 +30,35 @@
private CocoaConstants(){}
//from the NSEvent class reference:
- public final static int NSLeftMouseDown = 1;
- public final static int NSLeftMouseUp = 2;
- public final static int NSRightMouseDown = 3;
- public final static int NSRightMouseUp = 4;
- public final static int NSMouseMoved = 5;
- public final static int NSLeftMouseDragged = 6;
- public final static int NSRightMouseDragged = 7;
- public final static int NSMouseEntered = 8;
- public final static int NSMouseExited = 9;
- public final static int NSKeyDown = 10;
- public final static int NSKeyUp = 11;
- public final static int NSFlagsChanged = 12;
+ public static final int NSLeftMouseDown = 1;
+ public static final int NSLeftMouseUp = 2;
+ public static final int NSRightMouseDown = 3;
+ public static final int NSRightMouseUp = 4;
+ public static final int NSMouseMoved = 5;
+ public static final int NSLeftMouseDragged = 6;
+ public static final int NSRightMouseDragged = 7;
+ public static final int NSMouseEntered = 8;
+ public static final int NSMouseExited = 9;
+ public static final int NSKeyDown = 10;
+ public static final int NSKeyUp = 11;
+ public static final int NSFlagsChanged = 12;
- public final static int NSScrollWheel = 22;
- public final static int NSOtherMouseDown = 25;
- public final static int NSOtherMouseUp = 26;
- public final static int NSOtherMouseDragged = 27;
+ public static final int NSScrollWheel = 22;
+ public static final int NSOtherMouseDown = 25;
+ public static final int NSOtherMouseUp = 26;
+ public static final int NSOtherMouseDragged = 27;
- public final static int AllLeftMouseEventsMask =
+ public static final int AllLeftMouseEventsMask =
1 << NSLeftMouseDown |
1 << NSLeftMouseUp |
1 << NSLeftMouseDragged;
- public final static int AllRightMouseEventsMask =
+ public static final int AllRightMouseEventsMask =
1 << NSRightMouseDown |
1 << NSRightMouseUp |
1 << NSRightMouseDragged;
- public final static int AllOtherMouseEventsMask =
+ public static final int AllOtherMouseEventsMask =
1 << NSOtherMouseDown |
1 << NSOtherMouseUp |
1 << NSOtherMouseDragged;
@@ -82,24 +82,24 @@
// See http://developer.apple.com/library/mac/#documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
- public final static int kCGMouseButtonLeft = 0;
- public final static int kCGMouseButtonRight = 1;
- public final static int kCGMouseButtonCenter = 2;
+ public static final int kCGMouseButtonLeft = 0;
+ public static final int kCGMouseButtonRight = 1;
+ public static final int kCGMouseButtonCenter = 2;
// See https://wiki.mozilla.org/NPAPI:CocoaEventModel
- public final static int NPCocoaEventDrawRect = 1;
- public final static int NPCocoaEventMouseDown = 2;
- public final static int NPCocoaEventMouseUp = 3;
- public final static int NPCocoaEventMouseMoved = 4;
- public final static int NPCocoaEventMouseEntered = 5;
- public final static int NPCocoaEventMouseExited = 6;
- public final static int NPCocoaEventMouseDragged = 7;
- public final static int NPCocoaEventKeyDown = 8;
- public final static int NPCocoaEventKeyUp = 9;
- public final static int NPCocoaEventFlagsChanged = 10;
- public final static int NPCocoaEventFocusChanged = 11;
- public final static int NPCocoaEventWindowFocusChanged = 12;
- public final static int NPCocoaEventScrollWheel = 13;
- public final static int NPCocoaEventTextInput = 14;
+ public static final int NPCocoaEventDrawRect = 1;
+ public static final int NPCocoaEventMouseDown = 2;
+ public static final int NPCocoaEventMouseUp = 3;
+ public static final int NPCocoaEventMouseMoved = 4;
+ public static final int NPCocoaEventMouseEntered = 5;
+ public static final int NPCocoaEventMouseExited = 6;
+ public static final int NPCocoaEventMouseDragged = 7;
+ public static final int NPCocoaEventKeyDown = 8;
+ public static final int NPCocoaEventKeyUp = 9;
+ public static final int NPCocoaEventFlagsChanged = 10;
+ public static final int NPCocoaEventFocusChanged = 11;
+ public static final int NPCocoaEventWindowFocusChanged = 12;
+ public static final int NPCocoaEventScrollWheel = 13;
+ public static final int NPCocoaEventTextInput = 14;
}
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Mon Oct 05 13:45:50 2015 -0700
@@ -127,10 +127,10 @@
/*
* System colors with default initial values, overwritten by toolkit if system values differ and are available.
*/
- private final static int NUM_APPLE_COLORS = 3;
- public final static int KEYBOARD_FOCUS_COLOR = 0;
- public final static int INACTIVE_SELECTION_BACKGROUND_COLOR = 1;
- public final static int INACTIVE_SELECTION_FOREGROUND_COLOR = 2;
+ private static final int NUM_APPLE_COLORS = 3;
+ public static final int KEYBOARD_FOCUS_COLOR = 0;
+ public static final int INACTIVE_SELECTION_BACKGROUND_COLOR = 1;
+ public static final int INACTIVE_SELECTION_FOREGROUND_COLOR = 2;
private static int[] appleColors = {
0xFF808080, // keyboardFocusColor = Color.gray;
0xFFC0C0C0, // secondarySelectedControlColor
@@ -681,7 +681,7 @@
* @param r a {@code Runnable} to execute
* @param delay a delay in milliseconds
*/
- native static void performOnMainThreadAfterDelay(Runnable r, long delay);
+ static native void performOnMainThreadAfterDelay(Runnable r, long delay);
// DnD support
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.h Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.h Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -26,8 +26,6 @@
#ifndef __AWTEVENT_H
#define __AWTEVENT_H
-#import "LWCToolkit.h"
-
jlong UTC(NSEvent *event);
void DeliverJavaKeyEvent(JNIEnv *env, NSEvent *event, jobject peer);
void DeliverJavaMouseEvent(JNIEnv *env, NSEvent *event, jobject peer);
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m Mon Oct 05 13:45:50 2015 -0700
@@ -23,18 +23,15 @@
* questions.
*/
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
-#import <sys/time.h>
-#include <Carbon/Carbon.h>
-
-#import "jni_util.h"
-#import "LWCToolkit.h"
-#import "ThreadUtilities.h"
-
#import "java_awt_event_InputEvent.h"
#import "java_awt_event_KeyEvent.h"
-#import "java_awt_event_MouseEvent.h"
+#import "LWCToolkit.h"
+
+#import "jni_util.h"
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import <sys/time.h>
+#import <Carbon/Carbon.h>
/*
* Table to map typed characters to their Java virtual key equivalent and back.
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.h Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.h Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -24,7 +24,6 @@
*/
#import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "CDragSource.h"
#import "CDropTarget.h"
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,22 +23,17 @@
* questions.
*/
+#import "jni_util.h"
#import "CGLGraphicsConfig.h"
-
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
-#import "jni_util.h"
-
-#import "ThreadUtilities.h"
#import "AWTView.h"
-#import "AWTEvent.h"
#import "AWTWindow.h"
-#import "LWCToolkit.h"
#import "JavaComponentAccessibility.h"
#import "JavaTextAccessibility.h"
#import "GeomUtilities.h"
#import "OSVersion.h"
-#import "CGLLayer.h"
+#import "ThreadUtilities.h"
+
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
@interface AWTView()
@property (retain) CDropTarget *_dropTarget;
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -27,13 +27,12 @@
#define _AWTWINDOW_H
#import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "CMenuBar.h"
#import "LWCToolkit.h"
-
@class AWTView;
+@class JNFWeakJObjectWrapper;
@interface AWTWindow : NSObject <NSWindowDelegate> {
@private
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m Mon Oct 05 13:45:50 2015 -0700
@@ -25,7 +25,6 @@
#import <Cocoa/Cocoa.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#import "sun_lwawt_macosx_CPlatformWindow.h"
#import "com_apple_eawt_event_GestureHandler.h"
@@ -34,12 +33,8 @@
#import "AWTWindow.h"
#import "AWTView.h"
-#import "CMenu.h"
-#import "CMenuBar.h"
-#import "LWCToolkit.h"
#import "GeomUtilities.h"
#import "ThreadUtilities.h"
-#import "OSVersion.h"
#define MASK(KEY) \
(sun_lwawt_macosx_CPlatformWindow_ ## KEY)
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CDataTransferer.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CDataTransferer.m Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -26,11 +26,9 @@
#import "CDataTransferer.h"
#include "sun_lwawt_macosx_CDataTransferer.h"
-#import <AppKit/AppKit.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "jni_util.h"
-#include "ThreadUtilities.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
// ***** NOTE ***** This dictionary corresponds to the static array predefinedClipboardNames
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsConfig.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsConfig.m Mon Oct 05 13:45:50 2015 -0700
@@ -27,7 +27,7 @@
#include "GeomUtilities.h"
#include "sun_awt_CGraphicsConfig.h"
-
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
/*
* Class: sun_awt_CGraphicsConfig
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsDevice.m Mon Oct 05 13:45:50 2015 -0700
@@ -26,6 +26,8 @@
#import "LWCToolkit.h"
#import "ThreadUtilities.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
+
/*
* Convert the mode string to the more convinient bits per pixel value
*/
@@ -200,7 +202,7 @@
for (NSScreen *screen in screens) {
NSDictionary *screenInfo = [screen deviceDescription];
NSNumber *screenID = [screenInfo objectForKey:@"NSScreenNumber"];
- if ([screenID pointerValue] == displayID){
+ if ([screenID unsignedIntValue] == displayID){
frame = [screen frame];
visibleFrame = [screen visibleFrame];
break;
@@ -333,7 +335,7 @@
for (NSScreen *screen in screens) {
NSDictionary *screenInfo = [screen deviceDescription];
NSNumber *screenID = [screenInfo objectForKey:@"NSScreenNumber"];
- if ([screenID pointerValue] == displayID){
+ if ([screenID unsignedIntValue] == displayID){
if ([screen respondsToSelector:@selector(backingScaleFactor)]) {
ret = [screen backingScaleFactor];
}
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsEnv.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CGraphicsEnv.m Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,12 +23,11 @@
* questions.
*/
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
+#import "AWT_debug.h"
#import "jni_util.h"
-#import "LWCToolkit.h"
-#import "AWT_debug.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
#define MAX_DISPLAYS 64
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -58,6 +58,14 @@
static void javaPrinterJobToNSPrintInfo(JNIEnv* env, jobject srcPrinterJob, jobject srcPageable, NSPrintInfo* dst);
+#ifdef __MAC_10_9 // code for SDK 10.9 or newer
+#define NS_PORTRAIT NSPaperOrientationPortrait
+#define NS_LANDSCAPE NSPaperOrientationLandscape
+#else // code for SDK 10.8 or older
+#define NS_PORTRAIT NSPortraitOrientation
+#define NS_LANDSCAPE NSLandscapeOrientation
+#endif
+
static NSPrintInfo* createDefaultNSPrintInfo(JNIEnv* env, jstring printer)
{
NSPrintInfo* defaultPrintInfo = [[NSPrintInfo sharedPrintInfo] copy];
@@ -143,12 +151,12 @@
NSSize paperSize = [src paperSize];
switch ([src orientation]) {
- case NSPortraitOrientation:
+ case NS_PORTRAIT:
jPaperW = paperSize.width;
jPaperH = paperSize.height;
break;
- case NSLandscapeOrientation:
+ case NS_LANDSCAPE:
jPaperW = paperSize.height;
jPaperH = paperSize.width;
break;
@@ -217,13 +225,12 @@
static JNF_CTOR_CACHE(jm_Paper_ctor, sjc_Paper, "()V");
jint jOrientation;
- NSPrintingOrientation nsOrientation = [src orientation];
- switch (nsOrientation) {
- case NSPortraitOrientation:
+ switch ([src orientation]) {
+ case NS_PORTRAIT:
jOrientation = java_awt_print_PageFormat_PORTRAIT;
break;
- case NSLandscapeOrientation:
+ case NS_LANDSCAPE:
jOrientation = java_awt_print_PageFormat_LANDSCAPE; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
break;
@@ -273,20 +280,20 @@
switch (JNFCallIntMethod(env, srcPageFormat, jm_getOrientation)) { // AWT_THREADING Safe (!appKit)
case java_awt_print_PageFormat_PORTRAIT:
- [dstPrintInfo setOrientation:NSPortraitOrientation];
+ [dstPrintInfo setOrientation:NS_PORTRAIT];
break;
case java_awt_print_PageFormat_LANDSCAPE:
- [dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
+ [dstPrintInfo setOrientation:NS_LANDSCAPE]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
break;
// AppKit printing doesn't support REVERSE_LANDSCAPE. Radar 2960295.
case java_awt_print_PageFormat_REVERSE_LANDSCAPE:
- [dstPrintInfo setOrientation:NSLandscapeOrientation]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
+ [dstPrintInfo setOrientation:NS_LANDSCAPE]; //+++gdb Are LANDSCAPE and REVERSE_LANDSCAPE still inverted?
break;
default:
- [dstPrintInfo setOrientation:NSPortraitOrientation];
+ [dstPrintInfo setOrientation:NS_PORTRAIT];
break;
}
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CTrayIcon.m Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,9 +23,10 @@
* questions.
*/
+#import "jni_util.h"
+
#import <AppKit/AppKit.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import "jni_util.h"
#import "CTrayIcon.h"
#import "ThreadUtilities.h"
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.h Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.h Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -24,8 +24,7 @@
*/
#import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-
+#include "jni.h"
jobject CGToJavaRect(JNIEnv *env, CGRect rect);
CGRect JavaToCGRect(JNIEnv *env, jobject rect);
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/GeomUtilities.m Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -24,6 +24,7 @@
*/
#import "GeomUtilities.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
static JNF_CLASS_CACHE(sjc_Point2D, "java/awt/geom/Point2D");
static JNF_MEMBER_CACHE(jm_pt_getX, sjc_Point2D, "getX", "()D");
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.h Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.h Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,9 +23,9 @@
* questions.
*/
+#include "jni.h"
+
#import <AppKit/AppKit.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-
//#define JAVA_AX_DEBUG 1
//#define JAVA_AX_NO_IGNORES 1
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.h Mon Oct 05 13:45:50 2015 -0700
@@ -23,11 +23,12 @@
* questions.
*/
+#include "jni.h"
+
#import <pthread.h>
#import <assert.h>
#import <Cocoa/Cocoa.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
#define DEBUG 1
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/LWCToolkit.m Mon Oct 05 13:45:50 2015 -0700
@@ -28,15 +28,10 @@
#import <objc/runtime.h>
#import <Cocoa/Cocoa.h>
#import <Security/AuthSession.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
#include "jni_util.h"
-#import "CMenuBar.h"
-#import "InitIDs.h"
#import "LWCToolkit.h"
#import "ThreadUtilities.h"
-#import "AWT_debug.h"
#import "CSystemColors.h"
#import "NSApplicationAWT.h"
#import "PropertiesUtilities.h"
@@ -46,6 +41,8 @@
#import "sizecalc.h"
+#import <JavaRuntimeSupport/JavaRuntimeSupport.h>
+
int gNumberOfButtons;
jint* gButtonDownMasks;
@@ -529,7 +526,7 @@
// Processing all events excluding NSApplicationDefined which need to be processed
// on the main loop only (those events are intended for disposing resources)
NSEvent *event;
- if ((event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSApplicationDefined)
+ if ((event = [NSApp nextEventMatchingMask:(NSAnyEventMask & ~NSApplicationDefinedMask)
untilDate:nil
inMode:NSDefaultRunLoopMode
dequeue:YES]) != nil) {
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLGraphicsConfig.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLGraphicsConfig.m Mon Oct 05 13:45:50 2015 -0700
@@ -23,20 +23,17 @@
* questions.
*/
+#import "sun_java2d_opengl_CGLGraphicsConfig.h"
+
+#import "CGLGraphicsConfig.h"
+#import "CGLSurfaceData.h"
+#import "ThreadUtilities.h"
+
#import <stdlib.h>
#import <string.h>
#import <ApplicationServices/ApplicationServices.h>
#import <JavaNativeFoundation/JavaNativeFoundation.h>
-#import "sun_java2d_opengl_CGLGraphicsConfig.h"
-
-#import "jni.h"
-#import "jni_util.h"
-#import "CGLGraphicsConfig.h"
-#import "CGLSurfaceData.h"
-#import "LWCToolkit.h"
-#import "ThreadUtilities.h"
-
#pragma mark -
#pragma mark "--- Mac OS X specific methods for GL pipeline ---"
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLLayer.h Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLLayer.h Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -26,7 +26,7 @@
#ifndef CGLLayer_h_Included
#define CGLLayer_h_Included
-#import "AWTView.h"
+#import <JavaNativeFoundation/JavaNativeFoundation.h>
@interface CGLLayer : CAOpenGLLayer
{
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLSurfaceData.m Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/opengl/CGLSurfaceData.m Mon Oct 05 13:45:50 2015 -0700
@@ -24,16 +24,13 @@
*/
#import <stdlib.h>
-#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "sun_java2d_opengl_CGLSurfaceData.h"
-#import "jni.h"
#import "jni_util.h"
#import "OGLRenderQueue.h"
#import "CGLGraphicsConfig.h"
#import "CGLSurfaceData.h"
-#import "CGLLayer.h"
#import "ThreadUtilities.h"
/* JDK's glext.h is already included and will prevent the Apple glext.h
--- a/jdk/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/beans/editors/NumberEditor.java Mon Oct 05 13:45:50 2015 -0700
@@ -32,7 +32,7 @@
import java.beans.*;
-abstract public class NumberEditor extends PropertyEditorSupport {
+public abstract class NumberEditor extends PropertyEditorSupport {
public String getJavaInitializationString() {
Object value = getValue();
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/I18N.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/I18N.java Mon Oct 05 13:45:50 2015 -0700
@@ -26,7 +26,7 @@
package com.sun.imageio.plugins.common;
public final class I18N extends I18NImpl {
- private final static String resource_name = "iio-plugin.properties";
+ private static final String resource_name = "iio-plugin.properties";
public static String getString(String key) {
return getString("com.sun.imageio.plugins.common.I18N", resource_name, key);
}
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/common/LZWStringTable.java Mon Oct 05 13:45:50 2015 -0700
@@ -37,16 +37,16 @@
**/
public class LZWStringTable {
/** codesize + Reserved Codes */
- private final static int RES_CODES = 2;
+ private static final int RES_CODES = 2;
- private final static short HASH_FREE = (short)0xFFFF;
- private final static short NEXT_FIRST = (short)0xFFFF;
+ private static final short HASH_FREE = (short)0xFFFF;
+ private static final short NEXT_FIRST = (short)0xFFFF;
- private final static int MAXBITS = 12;
- private final static int MAXSTR = (1 << MAXBITS);
+ private static final int MAXBITS = 12;
+ private static final int MAXSTR = (1 << MAXBITS);
- private final static short HASHSIZE = 9973;
- private final static short HASHSTEP = 2039;
+ private static final short HASHSIZE = 9973;
+ private static final short HASHSTEP = 2039;
byte[] strChr; // after predecessor character
short[] strNxt; // predecessor string
@@ -142,7 +142,7 @@
}
}
- static public int hash(short index, byte lastbyte) {
+ public static int hash(short index, byte lastbyte) {
return (((short)(lastbyte << 8) ^ index) & 0xFFFF) % HASHSIZE;
}
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java Mon Oct 05 13:45:50 2015 -0700
@@ -1773,7 +1773,7 @@
private static final ImageTypeProducer [] defaultTypes =
new ImageTypeProducer [JPEG.NUM_JCS_CODES];
- public synchronized static ImageTypeProducer getTypeProducer(int csCode) {
+ public static synchronized ImageTypeProducer getTypeProducer(int csCode) {
if (csCode < 0 || csCode >= JPEG.NUM_JCS_CODES) {
return null;
}
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java Mon Oct 05 13:45:50 2015 -0700
@@ -56,7 +56,7 @@
*/
class GTKEngine {
- final static GTKEngine INSTANCE = new GTKEngine();
+ static final GTKEngine INSTANCE = new GTKEngine();
/** Size of the image cache */
private static final int CACHE_SIZE = 50;
@@ -523,7 +523,7 @@
native_paint_background(widget, state, x - x0, y - y0, w, h);
}
- private final static ColorModel[] COLOR_MODELS = {
+ private static final ColorModel[] COLOR_MODELS = {
// Transparency.OPAQUE
new DirectColorModel(24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000),
// Transparency.BITMASK
@@ -532,7 +532,7 @@
ColorModel.getRGBdefault(),
};
- private final static int[][] BAND_OFFSETS = {
+ private static final int[][] BAND_OFFSETS = {
{ 0x00ff0000, 0x0000ff00, 0x000000ff }, // OPAQUE
{ 0x00ff0000, 0x0000ff00, 0x000000ff, 0x01000000 }, // BITMASK
{ 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 } // TRANSLUCENT
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java Mon Oct 05 13:45:50 2015 -0700
@@ -63,8 +63,8 @@
ShadowType.ETCHED_IN, ShadowType.OUT
};
- private final static GTKEngine ENGINE = GTKEngine.INSTANCE;
- final static GTKPainter INSTANCE = new GTKPainter();
+ private static final GTKEngine ENGINE = GTKEngine.INSTANCE;
+ static final GTKPainter INSTANCE = new GTKPainter();
private GTKPainter() {
}
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java Mon Oct 05 13:45:50 2015 -0700
@@ -263,7 +263,7 @@
Color frameShadow;
// The width of the border
- public final static int BORDER_SIZE = 5;
+ public static final int BORDER_SIZE = 5;
/** Constructs an FrameBorder for the JComponent <b>comp</b>.
*/
@@ -446,7 +446,7 @@
JInternalFrame frame;
// The size of the bounding box for Motif frame corners.
- public final static int CORNER_SIZE = 24;
+ public static final int CORNER_SIZE = 24;
/** Constructs an InternalFrameBorder for the InternalFrame
* <b>aFrame</b>.
@@ -634,10 +634,10 @@
protected Color highlightColor;
// Space between the border and text
- static protected final int TEXT_SPACING = 2;
+ protected static final int TEXT_SPACING = 2;
// Space for the separator under the title
- static protected final int GROOVE_HEIGHT = 2;
+ protected static final int GROOVE_HEIGHT = 2;
/**
* Creates a MotifPopupMenuBorder instance
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -49,7 +49,7 @@
private static final Object MOTIF_CHECK_BOX_UI_KEY = new Object();
- private final static String propertyPrefix = "CheckBox" + ".";
+ private static final String propertyPrefix = "CheckBox" + ".";
private boolean defaults_initialized = false;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifDesktopIconUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -59,10 +59,10 @@
JPopupMenu systemMenu;
EventListener mml;
- final static int LABEL_HEIGHT = 18;
- final static int LABEL_DIVIDER = 4; // padding between icon and label
+ static final int LABEL_HEIGHT = 18;
+ static final int LABEL_DIVIDER = 4; // padding between icon and label
- final static Font defaultTitleFont =
+ static final Font defaultTitleFont =
new Font(Font.SANS_SERIF, Font.PLAIN, 12);
public static ComponentUI createUI(JComponent c) {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -306,7 +306,7 @@
}
@SuppressWarnings("serial") // anonymous class
- JTextField tmp1 = new JTextField(curDirName) {
+ JTextField tmp1 = new JTextField(curDirName, 35) {
public Dimension getMaximumSize() {
Dimension d = super.getMaximumSize();
d.height = getPreferredSize().height;
@@ -420,7 +420,7 @@
interior.add(fileNameLabel);
@SuppressWarnings("serial") // anonymous class
- JTextField tmp3 = new JTextField() {
+ JTextField tmp3 = new JTextField(35) {
public Dimension getMaximumSize() {
Dimension d = super.getMaximumSize();
d.height = getPreferredSize().height;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifIconFactory.java Mon Oct 05 13:45:50 2015 -0700
@@ -93,7 +93,7 @@
@SuppressWarnings("serial") // Same-version serialization only
private static class CheckBoxIcon implements Icon, UIResource, Serializable {
- final static int csize = 13;
+ static final int csize = 13;
private Color control = UIManager.getColor("control");
private Color foreground = UIManager.getColor("CheckBox.foreground");
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java Mon Oct 05 13:45:50 2015 -0700
@@ -56,7 +56,7 @@
Color shadow;
// The width and height of a title pane button
- public final static int BUTTON_SIZE = 19; // 17 + 1 pixel border
+ public static final int BUTTON_SIZE = 19; // 17 + 1 pixel border
public MotifInternalFrameTitlePane(JInternalFrame frame) {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifScrollPaneUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -47,9 +47,9 @@
*/
public class MotifScrollPaneUI extends BasicScrollPaneUI
{
- private final static Border vsbMarginBorderR = new EmptyBorder(0, 4, 0, 0);
- private final static Border vsbMarginBorderL = new EmptyBorder(0, 0, 0, 4);
- private final static Border hsbMarginBorder = new EmptyBorder(4, 0, 0, 0);
+ private static final Border vsbMarginBorderR = new EmptyBorder(0, 4, 0, 0);
+ private static final Border vsbMarginBorderL = new EmptyBorder(0, 0, 0, 4);
+ private static final Border hsbMarginBorder = new EmptyBorder(4, 0, 0, 0);
private CompoundBorder vsbBorder;
private CompoundBorder hsbBorder;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/AnimationController.java Mon Oct 05 13:45:50 2015 -0700
@@ -69,11 +69,11 @@
*/
class AnimationController implements ActionListener, PropertyChangeListener {
- private final static boolean VISTA_ANIMATION_DISABLED =
+ private static final boolean VISTA_ANIMATION_DISABLED =
AccessController.doPrivileged(new GetBooleanAction("swing.disablevistaanimation"));
- private final static Object ANIMATION_CONTROLLER_KEY =
+ private static final Object ANIMATION_CONTROLLER_KEY =
new StringBuilder("ANIMATION_CONTROLLER_KEY");
private final Map<JComponent, Map<Part, AnimationState>> animationStateMap =
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -53,7 +53,7 @@
private static final Object WINDOWS_CHECK_BOX_UI_KEY = new Object();
- private final static String propertyPrefix = "CheckBox" + ".";
+ private static final String propertyPrefix = "CheckBox" + ".";
private boolean defaults_initialized = false;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -1017,7 +1017,7 @@
}
}
- final static int space = 10;
+ static final int space = 10;
class IndentIcon implements Icon {
Icon icon = null;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java Mon Oct 05 13:45:50 2015 -0700
@@ -321,7 +321,7 @@
@SuppressWarnings("serial") // Same-version serialization only
private static class CheckBoxIcon implements Icon, Serializable
{
- final static int csize = 13;
+ static final int csize = 13;
public void paintIcon(Component c, Graphics g, int x, int y) {
JCheckBox cb = (JCheckBox) c;
ButtonModel model = cb.getModel();
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java Mon Oct 05 13:45:50 2015 -0700
@@ -2271,7 +2271,7 @@
protected Object classicValue, xpValue;
// A constant that lets you specify null when using XP styles.
- private final static Object NULL_VALUE = new Object();
+ private static final Object NULL_VALUE = new Object();
XPValue(Object xpValue, Object classicValue) {
this.xpValue = xpValue;
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -70,7 +70,7 @@
*/
public class WindowsRootPaneUI extends BasicRootPaneUI {
- private final static WindowsRootPaneUI windowsRootPaneUI = new WindowsRootPaneUI();
+ private static final WindowsRootPaneUI windowsRootPaneUI = new WindowsRootPaneUI();
static final AltProcessor altProcessor = new AltProcessor();
public static ComponentUI createUI(JComponent c) {
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsTreeUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -106,8 +106,8 @@
}
}
- static protected final int HALF_SIZE = 4;
- static protected final int SIZE = 9;
+ protected static final int HALF_SIZE = 4;
+ protected static final int SIZE = 9;
/**
* Returns the default cell renderer that is used to do the
@@ -130,7 +130,7 @@
@SuppressWarnings("serial") // Same-version serialization only
public static class ExpandedIcon implements Icon, Serializable {
- static public Icon createExpandedIcon() {
+ public static Icon createExpandedIcon() {
return new ExpandedIcon();
}
@@ -182,7 +182,7 @@
*/
@SuppressWarnings("serial") // Superclass is not serializable across versions
public static class CollapsedIcon extends ExpandedIcon {
- static public Icon createCollapsedIcon() {
+ public static Icon createCollapsedIcon() {
return new CollapsedIcon();
}
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AuFileWriter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AuFileWriter.java Mon Oct 05 13:45:50 2015 -0700
@@ -52,7 +52,7 @@
public final class AuFileWriter extends SunFileWriter {
//$$fb value for length field if length is not known
- public final static int UNKNOWN_SIZE=-1;
+ public static final int UNKNOWN_SIZE=-1;
/**
* Constructs a new AuFileWriter object.
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AudioFloatConverter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AudioFloatConverter.java Mon Oct 05 13:45:50 2015 -0700
@@ -53,11 +53,11 @@
private final AudioFloatConverter converter;
- final private int offset;
+ private final int offset;
- final private int stepsize;
+ private final int stepsize;
- final private byte mask;
+ private final byte mask;
private byte[] mask_buffer;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSRegion.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSRegion.java Mon Oct 05 13:45:50 2015 -0700
@@ -38,7 +38,7 @@
*/
public final class DLSRegion {
- public final static int OPTION_SELFNONEXCLUSIVE = 0x0001;
+ public static final int OPTION_SELFNONEXCLUSIVE = 0x0001;
List<DLSModulator> modulators = new ArrayList<DLSModulator>();
int keyfrom;
int keyto;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSSampleLoop.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSSampleLoop.java Mon Oct 05 13:45:50 2015 -0700
@@ -31,8 +31,8 @@
*/
public final class DLSSampleLoop {
- public final static int LOOP_TYPE_FORWARD = 0;
- public final static int LOOP_TYPE_RELEASE = 1;
+ public static final int LOOP_TYPE_FORWARD = 0;
+ public static final int LOOP_TYPE_RELEASE = 1;
long type;
long start;
long length;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSSoundbank.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/DLSSoundbank.java Mon Oct 05 13:45:50 2015 -0700
@@ -53,7 +53,7 @@
*/
public final class DLSSoundbank implements Soundbank {
- static private class DLSID {
+ private static class DLSID {
long i1;
int s1;
int s2;
@@ -548,7 +548,7 @@
long count = riff.readUnsignedInt();
if (size - 8 != 0)
- riff.skipBytes(size - 8);
+ riff.skip(size - 8);
for (int i = 0; i < count; i++) {
DLSModulator modulator = new DLSModulator();
@@ -568,7 +568,7 @@
long count = riff.readUnsignedInt();
if (size - 8 != 0)
- riff.skipBytes(size - 8);
+ riff.skip(size - 8);
for (int i = 0; i < count; i++) {
DLSModulator modulator = new DLSModulator();
@@ -661,7 +661,7 @@
long loops = riff.readInt();
if (size > 20)
- riff.skipBytes(size - 20);
+ riff.skip(size - 20);
for (int i = 0; i < loops; i++) {
DLSSampleLoop loop = new DLSSampleLoop();
@@ -671,7 +671,7 @@
loop.length = riff.readUnsignedInt();
sampleOptions.loops.add(loop);
if (size2 > 16)
- riff.skipBytes(size2 - 16);
+ riff.skip(size2 - 16);
}
}
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/EmergencySoundbank.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/EmergencySoundbank.java Mon Oct 05 13:45:50 2015 -0700
@@ -37,7 +37,7 @@
*/
public final class EmergencySoundbank {
- private final static String[] general_midi_instruments = {
+ private static final String[] general_midi_instruments = {
"Acoustic Grand Piano",
"Bright Acoustic Piano",
"Electric Grand Piano",
@@ -2564,11 +2564,11 @@
return ins;
}
- static public void ifft(double[] data) {
+ public static void ifft(double[] data) {
new FFT(data.length / 2, 1).transform(data);
}
- static public void fft(double[] data) {
+ public static void fft(double[] data) {
new FFT(data.length / 2, -1).transform(data);
}
@@ -2580,7 +2580,7 @@
}
}
- static public void randomPhase(double[] data) {
+ public static void randomPhase(double[] data) {
for (int i = 0; i < data.length; i += 2) {
double phase = Math.random() * 2 * Math.PI;
double d = data[i];
@@ -2589,7 +2589,7 @@
}
}
- static public void randomPhase(double[] data, Random random) {
+ public static void randomPhase(double[] data, Random random) {
for (int i = 0; i < data.length; i += 2) {
double phase = random.nextDouble() * 2 * Math.PI;
double d = data[i];
@@ -2598,7 +2598,7 @@
}
}
- static public void normalize(double[] data, double target) {
+ public static void normalize(double[] data, double target) {
double maxvalue = 0;
for (int i = 0; i < data.length; i++) {
if (data[i] > maxvalue)
@@ -2613,7 +2613,7 @@
data[i] *= gain;
}
- static public void normalize(float[] data, double target) {
+ public static void normalize(float[] data, double target) {
double maxvalue = 0.5;
for (int i = 0; i < data.length; i++) {
if (data[i * 2] > maxvalue)
@@ -2626,7 +2626,7 @@
data[i * 2] *= gain;
}
- static public double[] realPart(double[] in) {
+ public static double[] realPart(double[] in) {
double[] out = new double[in.length / 2];
for (int i = 0; i < out.length; i++) {
out[i] = in[i * 2];
@@ -2634,7 +2634,7 @@
return out;
}
- static public double[] imgPart(double[] in) {
+ public static double[] imgPart(double[] in) {
double[] out = new double[in.length / 2];
for (int i = 0; i < out.length; i++) {
out[i] = in[i * 2];
@@ -2642,7 +2642,7 @@
return out;
}
- static public float[] toFloat(double[] in) {
+ public static float[] toFloat(double[] in) {
float[] out = new float[in.length];
for (int i = 0; i < out.length; i++) {
out[i] = (float) in[i];
@@ -2650,24 +2650,24 @@
return out;
}
- static public byte[] toBytes(float[] in, AudioFormat format) {
+ public static byte[] toBytes(float[] in, AudioFormat format) {
byte[] out = new byte[in.length * format.getFrameSize()];
return AudioFloatConverter.getConverter(format).toByteArray(in, out);
}
- static public void fadeUp(double[] data, int samples) {
+ public static void fadeUp(double[] data, int samples) {
double dsamples = samples;
for (int i = 0; i < samples; i++)
data[i] *= i / dsamples;
}
- static public void fadeUp(float[] data, int samples) {
+ public static void fadeUp(float[] data, int samples) {
double dsamples = samples;
for (int i = 0; i < samples; i++)
data[i] *= i / dsamples;
}
- static public double[] loopExtend(double[] data, int newsize) {
+ public static double[] loopExtend(double[] data, int newsize) {
double[] outdata = new double[newsize];
int p_len = data.length;
int p_ps = 0;
@@ -2680,7 +2680,7 @@
return outdata;
}
- static public float[] loopExtend(float[] data, int newsize) {
+ public static float[] loopExtend(float[] data, int newsize) {
float[] outdata = new float[newsize];
int p_len = data.length;
int p_ps = 0;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/JavaSoundAudioClip.java Mon Oct 05 13:45:50 2015 -0700
@@ -88,9 +88,9 @@
* with the number of samples in the stream.
*
*/
- private final static long CLIP_THRESHOLD = 1048576;
+ private static final long CLIP_THRESHOLD = 1048576;
//private final static long CLIP_THRESHOLD = 1;
- private final static int STREAM_BUFFER_SIZE = 1024;
+ private static final int STREAM_BUFFER_SIZE = 1024;
public JavaSoundAudioClip(InputStream in) throws IOException {
if (DEBUG || Printer.debug)Printer.debug("JavaSoundAudioClip.<init>");
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/MidiOutDeviceProvider.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/MidiOutDeviceProvider.java Mon Oct 05 13:45:50 2015 -0700
@@ -42,7 +42,7 @@
/** Cache of open MIDI output devices on the system. */
private static MidiDevice[] devices = null;
- private final static boolean enabled;
+ private static final boolean enabled;
// STATIC
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/MidiUtils.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/MidiUtils.java Mon Oct 05 13:45:50 2015 -0700
@@ -44,9 +44,9 @@
*/
public final class MidiUtils {
- public final static int DEFAULT_TEMPO_MPQ = 500000; // 120bpm
- public final static int META_END_OF_TRACK_TYPE = 0x2F;
- public final static int META_TEMPO_TYPE = 0x51;
+ public static final int DEFAULT_TEMPO_MPQ = 500000; // 120bpm
+ public static final int META_END_OF_TRACK_TYPE = 0x2F;
+ public static final int META_TEMPO_TYPE = 0x51;
/**
* Suppresses default constructor, ensuring non-instantiability.
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelConnectionBlock.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelConnectionBlock.java Mon Oct 05 13:45:50 2015 -0700
@@ -39,7 +39,7 @@
//
// source1 * source2 * scale -> destination
//
- private final static ModelSource[] no_sources = new ModelSource[0];
+ private static final ModelSource[] no_sources = new ModelSource[0];
private ModelSource[] sources = no_sources;
private double scale = 1;
private ModelDestination destination;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelTransform.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelTransform.java Mon Oct 05 13:45:50 2015 -0700
@@ -31,5 +31,5 @@
*/
public interface ModelTransform {
- abstract public double transform(double value);
+ public abstract double transform(double value);
}
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/Platform.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/Platform.java Mon Oct 05 13:45:50 2015 -0700
@@ -169,9 +169,9 @@
}
// the following native methods are implemented in Platform.c
- private native static boolean nIsBigEndian();
- private native static String nGetExtraLibraries();
- private native static int nGetLibraryForFeature(int feature);
+ private static native boolean nIsBigEndian();
+ private static native String nGetExtraLibraries();
+ private static native int nGetLibraryForFeature(int feature);
/**
* Read the required system properties.
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/PortMixer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/PortMixer.java Mon Oct 05 13:45:50 2015 -0700
@@ -422,7 +422,7 @@
private boolean closed = false;
// predefined float control types. See also Ports.h
- private final static FloatControl.Type[] FLOAT_CONTROL_TYPES = {
+ private static final FloatControl.Type[] FLOAT_CONTROL_TYPES = {
null,
FloatControl.Type.BALANCE,
FloatControl.Type.MASTER_GAIN,
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/RIFFReader.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/RIFFReader.java Mon Oct 05 13:45:50 2015 -0700
@@ -118,6 +118,7 @@
return ckSize;
}
+ @Override
public int read() throws IOException {
if (avail == 0) {
return -1;
@@ -132,6 +133,7 @@
return b;
}
+ @Override
public int read(byte[] b, int offset, int len) throws IOException {
if (avail == 0) {
return -1;
@@ -172,49 +174,45 @@
}
}
- public long skipBytes(long n) throws IOException {
- if (n < 0)
+ @Override
+ public long skip(final long n) throws IOException {
+ if (n <= 0 || avail == 0) {
return 0;
- long skipped = 0;
- while (skipped != n) {
- long s = skip(n - skipped);
- if (s < 0)
+ }
+ // will not skip more than
+ long remaining = Math.min(n, avail);
+ while (remaining > 0) {
+ // Some input streams like FileInputStream can return more bytes,
+ // when EOF is reached.
+ long ret = Math.min(stream.skip(remaining), remaining);
+ if (ret == 0) {
+ // EOF or not? we need to check.
+ Thread.yield();
+ if (stream.read() == -1) {
+ avail = 0;
+ break;
+ }
+ ret = 1;
+ } else if (ret < 0) {
+ // the skip should not return negative value, but check it also
+ avail = 0;
break;
- if (s == 0)
- Thread.yield();
- skipped += s;
+ }
+ remaining -= ret;
+ avail -= ret;
+ filepointer += ret;
}
- return skipped;
+ return n - remaining;
}
- public long skip(long n) throws IOException {
- if (avail == 0)
- return -1;
- if (n > avail) {
- long len = stream.skip(avail);
- if (len != -1)
- filepointer += len;
- avail = 0;
- return len;
- } else {
- long ret = stream.skip(n);
- if (ret == -1) {
- avail = 0;
- return -1;
- }
- avail -= ret;
- filepointer += ret;
- return ret;
- }
- }
-
+ @Override
public int available() {
return (int)avail;
}
public void finish() throws IOException {
if (avail != 0) {
- skipBytes(avail);
+ skip(avail);
}
}
@@ -337,6 +335,7 @@
return ch1 + (ch2 << 8) | (ch3 << 16) | (ch4 << 24);
}
+ @Override
public void close() throws IOException {
finish();
if (this == root)
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/RealTimeSequencer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/RealTimeSequencer.java Mon Oct 05 13:45:50 2015 -0700
@@ -51,8 +51,8 @@
// STATIC VARIABLES
/** debugging flags */
- private final static boolean DEBUG_PUMP = false;
- private final static boolean DEBUG_PUMP_ALL = false;
+ private static final boolean DEBUG_PUMP = false;
+ private static final boolean DEBUG_PUMP_ALL = false;
/**
* Event Dispatcher thread. Should be using a shared event
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SF2Modulator.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SF2Modulator.java Mon Oct 05 13:45:50 2015 -0700
@@ -31,24 +31,24 @@
*/
public final class SF2Modulator {
- public final static int SOURCE_NONE = 0;
- public final static int SOURCE_NOTE_ON_VELOCITY = 2;
- public final static int SOURCE_NOTE_ON_KEYNUMBER = 3;
- public final static int SOURCE_POLY_PRESSURE = 10;
- public final static int SOURCE_CHANNEL_PRESSURE = 13;
- public final static int SOURCE_PITCH_WHEEL = 14;
- public final static int SOURCE_PITCH_SENSITIVITY = 16;
- public final static int SOURCE_MIDI_CONTROL = 128 * 1;
- public final static int SOURCE_DIRECTION_MIN_MAX = 256 * 0;
- public final static int SOURCE_DIRECTION_MAX_MIN = 256 * 1;
- public final static int SOURCE_POLARITY_UNIPOLAR = 512 * 0;
- public final static int SOURCE_POLARITY_BIPOLAR = 512 * 1;
- public final static int SOURCE_TYPE_LINEAR = 1024 * 0;
- public final static int SOURCE_TYPE_CONCAVE = 1024 * 1;
- public final static int SOURCE_TYPE_CONVEX = 1024 * 2;
- public final static int SOURCE_TYPE_SWITCH = 1024 * 3;
- public final static int TRANSFORM_LINEAR = 0;
- public final static int TRANSFORM_ABSOLUTE = 2;
+ public static final int SOURCE_NONE = 0;
+ public static final int SOURCE_NOTE_ON_VELOCITY = 2;
+ public static final int SOURCE_NOTE_ON_KEYNUMBER = 3;
+ public static final int SOURCE_POLY_PRESSURE = 10;
+ public static final int SOURCE_CHANNEL_PRESSURE = 13;
+ public static final int SOURCE_PITCH_WHEEL = 14;
+ public static final int SOURCE_PITCH_SENSITIVITY = 16;
+ public static final int SOURCE_MIDI_CONTROL = 128 * 1;
+ public static final int SOURCE_DIRECTION_MIN_MAX = 256 * 0;
+ public static final int SOURCE_DIRECTION_MAX_MIN = 256 * 1;
+ public static final int SOURCE_POLARITY_UNIPOLAR = 512 * 0;
+ public static final int SOURCE_POLARITY_BIPOLAR = 512 * 1;
+ public static final int SOURCE_TYPE_LINEAR = 1024 * 0;
+ public static final int SOURCE_TYPE_CONCAVE = 1024 * 1;
+ public static final int SOURCE_TYPE_CONVEX = 1024 * 2;
+ public static final int SOURCE_TYPE_SWITCH = 1024 * 3;
+ public static final int TRANSFORM_LINEAR = 0;
+ public static final int TRANSFORM_ABSOLUTE = 2;
int sourceOperator;
int destinationOperator;
short amount;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SF2Region.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SF2Region.java Mon Oct 05 13:45:50 2015 -0700
@@ -36,67 +36,67 @@
*/
public class SF2Region {
- public final static int GENERATOR_STARTADDRSOFFSET = 0;
- public final static int GENERATOR_ENDADDRSOFFSET = 1;
- public final static int GENERATOR_STARTLOOPADDRSOFFSET = 2;
- public final static int GENERATOR_ENDLOOPADDRSOFFSET = 3;
- public final static int GENERATOR_STARTADDRSCOARSEOFFSET = 4;
- public final static int GENERATOR_MODLFOTOPITCH = 5;
- public final static int GENERATOR_VIBLFOTOPITCH = 6;
- public final static int GENERATOR_MODENVTOPITCH = 7;
- public final static int GENERATOR_INITIALFILTERFC = 8;
- public final static int GENERATOR_INITIALFILTERQ = 9;
- public final static int GENERATOR_MODLFOTOFILTERFC = 10;
- public final static int GENERATOR_MODENVTOFILTERFC = 11;
- public final static int GENERATOR_ENDADDRSCOARSEOFFSET = 12;
- public final static int GENERATOR_MODLFOTOVOLUME = 13;
- public final static int GENERATOR_UNUSED1 = 14;
- public final static int GENERATOR_CHORUSEFFECTSSEND = 15;
- public final static int GENERATOR_REVERBEFFECTSSEND = 16;
- public final static int GENERATOR_PAN = 17;
- public final static int GENERATOR_UNUSED2 = 18;
- public final static int GENERATOR_UNUSED3 = 19;
- public final static int GENERATOR_UNUSED4 = 20;
- public final static int GENERATOR_DELAYMODLFO = 21;
- public final static int GENERATOR_FREQMODLFO = 22;
- public final static int GENERATOR_DELAYVIBLFO = 23;
- public final static int GENERATOR_FREQVIBLFO = 24;
- public final static int GENERATOR_DELAYMODENV = 25;
- public final static int GENERATOR_ATTACKMODENV = 26;
- public final static int GENERATOR_HOLDMODENV = 27;
- public final static int GENERATOR_DECAYMODENV = 28;
- public final static int GENERATOR_SUSTAINMODENV = 29;
- public final static int GENERATOR_RELEASEMODENV = 30;
- public final static int GENERATOR_KEYNUMTOMODENVHOLD = 31;
- public final static int GENERATOR_KEYNUMTOMODENVDECAY = 32;
- public final static int GENERATOR_DELAYVOLENV = 33;
- public final static int GENERATOR_ATTACKVOLENV = 34;
- public final static int GENERATOR_HOLDVOLENV = 35;
- public final static int GENERATOR_DECAYVOLENV = 36;
- public final static int GENERATOR_SUSTAINVOLENV = 37;
- public final static int GENERATOR_RELEASEVOLENV = 38;
- public final static int GENERATOR_KEYNUMTOVOLENVHOLD = 39;
- public final static int GENERATOR_KEYNUMTOVOLENVDECAY = 40;
- public final static int GENERATOR_INSTRUMENT = 41;
- public final static int GENERATOR_RESERVED1 = 42;
- public final static int GENERATOR_KEYRANGE = 43;
- public final static int GENERATOR_VELRANGE = 44;
- public final static int GENERATOR_STARTLOOPADDRSCOARSEOFFSET = 45;
- public final static int GENERATOR_KEYNUM = 46;
- public final static int GENERATOR_VELOCITY = 47;
- public final static int GENERATOR_INITIALATTENUATION = 48;
- public final static int GENERATOR_RESERVED2 = 49;
- public final static int GENERATOR_ENDLOOPADDRSCOARSEOFFSET = 50;
- public final static int GENERATOR_COARSETUNE = 51;
- public final static int GENERATOR_FINETUNE = 52;
- public final static int GENERATOR_SAMPLEID = 53;
- public final static int GENERATOR_SAMPLEMODES = 54;
- public final static int GENERATOR_RESERVED3 = 55;
- public final static int GENERATOR_SCALETUNING = 56;
- public final static int GENERATOR_EXCLUSIVECLASS = 57;
- public final static int GENERATOR_OVERRIDINGROOTKEY = 58;
- public final static int GENERATOR_UNUSED5 = 59;
- public final static int GENERATOR_ENDOPR = 60;
+ public static final int GENERATOR_STARTADDRSOFFSET = 0;
+ public static final int GENERATOR_ENDADDRSOFFSET = 1;
+ public static final int GENERATOR_STARTLOOPADDRSOFFSET = 2;
+ public static final int GENERATOR_ENDLOOPADDRSOFFSET = 3;
+ public static final int GENERATOR_STARTADDRSCOARSEOFFSET = 4;
+ public static final int GENERATOR_MODLFOTOPITCH = 5;
+ public static final int GENERATOR_VIBLFOTOPITCH = 6;
+ public static final int GENERATOR_MODENVTOPITCH = 7;
+ public static final int GENERATOR_INITIALFILTERFC = 8;
+ public static final int GENERATOR_INITIALFILTERQ = 9;
+ public static final int GENERATOR_MODLFOTOFILTERFC = 10;
+ public static final int GENERATOR_MODENVTOFILTERFC = 11;
+ public static final int GENERATOR_ENDADDRSCOARSEOFFSET = 12;
+ public static final int GENERATOR_MODLFOTOVOLUME = 13;
+ public static final int GENERATOR_UNUSED1 = 14;
+ public static final int GENERATOR_CHORUSEFFECTSSEND = 15;
+ public static final int GENERATOR_REVERBEFFECTSSEND = 16;
+ public static final int GENERATOR_PAN = 17;
+ public static final int GENERATOR_UNUSED2 = 18;
+ public static final int GENERATOR_UNUSED3 = 19;
+ public static final int GENERATOR_UNUSED4 = 20;
+ public static final int GENERATOR_DELAYMODLFO = 21;
+ public static final int GENERATOR_FREQMODLFO = 22;
+ public static final int GENERATOR_DELAYVIBLFO = 23;
+ public static final int GENERATOR_FREQVIBLFO = 24;
+ public static final int GENERATOR_DELAYMODENV = 25;
+ public static final int GENERATOR_ATTACKMODENV = 26;
+ public static final int GENERATOR_HOLDMODENV = 27;
+ public static final int GENERATOR_DECAYMODENV = 28;
+ public static final int GENERATOR_SUSTAINMODENV = 29;
+ public static final int GENERATOR_RELEASEMODENV = 30;
+ public static final int GENERATOR_KEYNUMTOMODENVHOLD = 31;
+ public static final int GENERATOR_KEYNUMTOMODENVDECAY = 32;
+ public static final int GENERATOR_DELAYVOLENV = 33;
+ public static final int GENERATOR_ATTACKVOLENV = 34;
+ public static final int GENERATOR_HOLDVOLENV = 35;
+ public static final int GENERATOR_DECAYVOLENV = 36;
+ public static final int GENERATOR_SUSTAINVOLENV = 37;
+ public static final int GENERATOR_RELEASEVOLENV = 38;
+ public static final int GENERATOR_KEYNUMTOVOLENVHOLD = 39;
+ public static final int GENERATOR_KEYNUMTOVOLENVDECAY = 40;
+ public static final int GENERATOR_INSTRUMENT = 41;
+ public static final int GENERATOR_RESERVED1 = 42;
+ public static final int GENERATOR_KEYRANGE = 43;
+ public static final int GENERATOR_VELRANGE = 44;
+ public static final int GENERATOR_STARTLOOPADDRSCOARSEOFFSET = 45;
+ public static final int GENERATOR_KEYNUM = 46;
+ public static final int GENERATOR_VELOCITY = 47;
+ public static final int GENERATOR_INITIALATTENUATION = 48;
+ public static final int GENERATOR_RESERVED2 = 49;
+ public static final int GENERATOR_ENDLOOPADDRSCOARSEOFFSET = 50;
+ public static final int GENERATOR_COARSETUNE = 51;
+ public static final int GENERATOR_FINETUNE = 52;
+ public static final int GENERATOR_SAMPLEID = 53;
+ public static final int GENERATOR_SAMPLEMODES = 54;
+ public static final int GENERATOR_RESERVED3 = 55;
+ public static final int GENERATOR_SCALETUNING = 56;
+ public static final int GENERATOR_EXCLUSIVECLASS = 57;
+ public static final int GENERATOR_OVERRIDINGROOTKEY = 58;
+ public static final int GENERATOR_UNUSED5 = 59;
+ public static final int GENERATOR_ENDOPR = 60;
protected Map<Integer, Short> generators = new HashMap<Integer, Short>();
protected List<SF2Modulator> modulators = new ArrayList<SF2Modulator>();
@@ -108,7 +108,7 @@
return generators.containsKey(generator);
}
- static public short getDefaultValue(int generator) {
+ public static short getDefaultValue(int generator) {
if (generator == 8) return (short)13500;
if (generator == 21) return (short)-12000;
if (generator == 23) return (short)-12000;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftEnvelopeGenerator.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftEnvelopeGenerator.java Mon Oct 05 13:45:50 2015 -0700
@@ -31,15 +31,15 @@
*/
public final class SoftEnvelopeGenerator implements SoftProcess {
- public final static int EG_OFF = 0;
- public final static int EG_DELAY = 1;
- public final static int EG_ATTACK = 2;
- public final static int EG_HOLD = 3;
- public final static int EG_DECAY = 4;
- public final static int EG_SUSTAIN = 5;
- public final static int EG_RELEASE = 6;
- public final static int EG_SHUTDOWN = 7;
- public final static int EG_END = 8;
+ public static final int EG_OFF = 0;
+ public static final int EG_DELAY = 1;
+ public static final int EG_ATTACK = 2;
+ public static final int EG_HOLD = 3;
+ public static final int EG_DECAY = 4;
+ public static final int EG_SUSTAIN = 5;
+ public static final int EG_RELEASE = 6;
+ public static final int EG_SHUTDOWN = 7;
+ public static final int EG_END = 8;
int max_count = 10;
int used_count = 0;
private final int[] stage = new int[max_count];
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftFilter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftFilter.java Mon Oct 05 13:45:50 2015 -0700
@@ -35,13 +35,13 @@
*/
public final class SoftFilter {
- public final static int FILTERTYPE_LP6 = 0x00;
- public final static int FILTERTYPE_LP12 = 0x01;
- public final static int FILTERTYPE_HP12 = 0x11;
- public final static int FILTERTYPE_BP12 = 0x21;
- public final static int FILTERTYPE_NP12 = 0x31;
- public final static int FILTERTYPE_LP24 = 0x03;
- public final static int FILTERTYPE_HP24 = 0x13;
+ public static final int FILTERTYPE_LP6 = 0x00;
+ public static final int FILTERTYPE_LP12 = 0x01;
+ public static final int FILTERTYPE_HP12 = 0x11;
+ public static final int FILTERTYPE_BP12 = 0x21;
+ public static final int FILTERTYPE_NP12 = 0x31;
+ public static final int FILTERTYPE_LP24 = 0x03;
+ public static final int FILTERTYPE_HP24 = 0x13;
//
// 0x0 = 1st-order, 6 dB/oct
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftMainMixer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftMainMixer.java Mon Oct 05 13:45:50 2015 -0700
@@ -53,20 +53,20 @@
SoftAudioBuffer[] buffers;
}
- public final static int CHANNEL_LEFT = 0;
- public final static int CHANNEL_RIGHT = 1;
- public final static int CHANNEL_MONO = 2;
- public final static int CHANNEL_DELAY_LEFT = 3;
- public final static int CHANNEL_DELAY_RIGHT = 4;
- public final static int CHANNEL_DELAY_MONO = 5;
- public final static int CHANNEL_EFFECT1 = 6;
- public final static int CHANNEL_EFFECT2 = 7;
- public final static int CHANNEL_DELAY_EFFECT1 = 8;
- public final static int CHANNEL_DELAY_EFFECT2 = 9;
- public final static int CHANNEL_LEFT_DRY = 10;
- public final static int CHANNEL_RIGHT_DRY = 11;
- public final static int CHANNEL_SCRATCH1 = 12;
- public final static int CHANNEL_SCRATCH2 = 13;
+ public static final int CHANNEL_LEFT = 0;
+ public static final int CHANNEL_RIGHT = 1;
+ public static final int CHANNEL_MONO = 2;
+ public static final int CHANNEL_DELAY_LEFT = 3;
+ public static final int CHANNEL_DELAY_RIGHT = 4;
+ public static final int CHANNEL_DELAY_MONO = 5;
+ public static final int CHANNEL_EFFECT1 = 6;
+ public static final int CHANNEL_EFFECT2 = 7;
+ public static final int CHANNEL_DELAY_EFFECT1 = 8;
+ public static final int CHANNEL_DELAY_EFFECT2 = 9;
+ public static final int CHANNEL_LEFT_DRY = 10;
+ public static final int CHANNEL_RIGHT_DRY = 11;
+ public static final int CHANNEL_SCRATCH1 = 12;
+ public static final int CHANNEL_SCRATCH2 = 13;
boolean active_sensing_on = false;
private long msec_last_activity = -1;
private boolean pusher_silent = false;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftMixingMainMixer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftMixingMainMixer.java Mon Oct 05 13:45:50 2015 -0700
@@ -39,29 +39,29 @@
*/
public final class SoftMixingMainMixer {
- public final static int CHANNEL_LEFT = 0;
+ public static final int CHANNEL_LEFT = 0;
- public final static int CHANNEL_RIGHT = 1;
+ public static final int CHANNEL_RIGHT = 1;
- public final static int CHANNEL_EFFECT1 = 2;
+ public static final int CHANNEL_EFFECT1 = 2;
- public final static int CHANNEL_EFFECT2 = 3;
+ public static final int CHANNEL_EFFECT2 = 3;
- public final static int CHANNEL_EFFECT3 = 4;
+ public static final int CHANNEL_EFFECT3 = 4;
- public final static int CHANNEL_EFFECT4 = 5;
+ public static final int CHANNEL_EFFECT4 = 5;
- public final static int CHANNEL_LEFT_DRY = 10;
+ public static final int CHANNEL_LEFT_DRY = 10;
- public final static int CHANNEL_RIGHT_DRY = 11;
+ public static final int CHANNEL_RIGHT_DRY = 11;
- public final static int CHANNEL_SCRATCH1 = 12;
+ public static final int CHANNEL_SCRATCH1 = 12;
- public final static int CHANNEL_SCRATCH2 = 13;
+ public static final int CHANNEL_SCRATCH2 = 13;
- public final static int CHANNEL_CHANNELMIXER_LEFT = 14;
+ public static final int CHANNEL_CHANNELMIXER_LEFT = 14;
- public final static int CHANNEL_CHANNELMIXER_RIGHT = 15;
+ public static final int CHANNEL_CHANNELMIXER_RIGHT = 15;
private final SoftMixingMixer mixer;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftReverb.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftReverb.java Mon Oct 05 13:45:50 2015 -0700
@@ -35,7 +35,7 @@
*/
public final class SoftReverb implements SoftAudioProcessor {
- private final static class Delay {
+ private static final class Delay {
private float[] delaybuffer;
private int rovepos = 0;
@@ -70,7 +70,7 @@
}
}
- private final static class AllPass {
+ private static final class AllPass {
private final float[] delaybuffer;
private final int delaybuffersize;
@@ -117,7 +117,7 @@
}
}
- private final static class Comb {
+ private static final class Comb {
private final float[] delaybuffer;
private final int delaybuffersize;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftSynthesizer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SoftSynthesizer.java Mon Oct 05 13:45:50 2015 -0700
@@ -178,7 +178,7 @@
static final String INFO_VENDOR = "OpenJDK";
static final String INFO_DESCRIPTION = "Software MIDI Synthesizer";
static final String INFO_VERSION = "1.0";
- final static MidiDevice.Info info = new Info();
+ static final MidiDevice.Info info = new Info();
private static SourceDataLine testline = null;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileWriter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileWriter.java Mon Oct 05 13:45:50 2015 -0700
@@ -307,7 +307,7 @@
return ERROR;
}
- private final static long mask = 0x7F;
+ private static final long mask = 0x7F;
private int writeVarInt(long value) throws IOException {
int len = 1;
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/UlawCodec.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/UlawCodec.java Mon Oct 05 13:45:50 2015 -0700
@@ -43,8 +43,8 @@
/* Tables used for U-law decoding */
- private final static byte[] ULAW_TABH = new byte[256];
- private final static byte[] ULAW_TABL = new byte[256];
+ private static final byte[] ULAW_TABH = new byte[256];
+ private static final byte[] ULAW_TABL = new byte[256];
private static final AudioFormat.Encoding[] ulawEncodings = {AudioFormat.Encoding.ULAW,
AudioFormat.Encoding.PCM_SIGNED};
--- a/jdk/src/java.desktop/share/classes/java/applet/Applet.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/applet/Applet.java Mon Oct 05 13:45:50 2015 -0700
@@ -79,7 +79,7 @@
* likely move it into RUNNING state).
* The stub field will be restored by the reader.
*/
- transient private AppletStub stub;
+ private transient AppletStub stub;
/* version ID for serialized form. */
private static final long serialVersionUID = -5836846270535785031L;
@@ -310,7 +310,7 @@
*
* @since 1.2
*/
- public final static AudioClip newAudioClip(URL url) {
+ public static final AudioClip newAudioClip(URL url) {
return new sun.applet.AppletAudioClip(url);
}
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java Mon Oct 05 13:45:50 2015 -0700
@@ -128,107 +128,107 @@
/**
* The event mask for selecting component events.
*/
- public final static long COMPONENT_EVENT_MASK = 0x01;
+ public static final long COMPONENT_EVENT_MASK = 0x01;
/**
* The event mask for selecting container events.
*/
- public final static long CONTAINER_EVENT_MASK = 0x02;
+ public static final long CONTAINER_EVENT_MASK = 0x02;
/**
* The event mask for selecting focus events.
*/
- public final static long FOCUS_EVENT_MASK = 0x04;
+ public static final long FOCUS_EVENT_MASK = 0x04;
/**
* The event mask for selecting key events.
*/
- public final static long KEY_EVENT_MASK = 0x08;
+ public static final long KEY_EVENT_MASK = 0x08;
/**
* The event mask for selecting mouse events.
*/
- public final static long MOUSE_EVENT_MASK = 0x10;
+ public static final long MOUSE_EVENT_MASK = 0x10;
/**
* The event mask for selecting mouse motion events.
*/
- public final static long MOUSE_MOTION_EVENT_MASK = 0x20;
+ public static final long MOUSE_MOTION_EVENT_MASK = 0x20;
/**
* The event mask for selecting window events.
*/
- public final static long WINDOW_EVENT_MASK = 0x40;
+ public static final long WINDOW_EVENT_MASK = 0x40;
/**
* The event mask for selecting action events.
*/
- public final static long ACTION_EVENT_MASK = 0x80;
+ public static final long ACTION_EVENT_MASK = 0x80;
/**
* The event mask for selecting adjustment events.
*/
- public final static long ADJUSTMENT_EVENT_MASK = 0x100;
+ public static final long ADJUSTMENT_EVENT_MASK = 0x100;
/**
* The event mask for selecting item events.
*/
- public final static long ITEM_EVENT_MASK = 0x200;
+ public static final long ITEM_EVENT_MASK = 0x200;
/**
* The event mask for selecting text events.
*/
- public final static long TEXT_EVENT_MASK = 0x400;
+ public static final long TEXT_EVENT_MASK = 0x400;
/**
* The event mask for selecting input method events.
*/
- public final static long INPUT_METHOD_EVENT_MASK = 0x800;
+ public static final long INPUT_METHOD_EVENT_MASK = 0x800;
/**
* The pseudo event mask for enabling input methods.
* We're using one bit in the eventMask so we don't need
* a separate field inputMethodsEnabled.
*/
- final static long INPUT_METHODS_ENABLED_MASK = 0x1000;
+ static final long INPUT_METHODS_ENABLED_MASK = 0x1000;
/**
* The event mask for selecting paint events.
*/
- public final static long PAINT_EVENT_MASK = 0x2000;
+ public static final long PAINT_EVENT_MASK = 0x2000;
/**
* The event mask for selecting invocation events.
*/
- public final static long INVOCATION_EVENT_MASK = 0x4000;
+ public static final long INVOCATION_EVENT_MASK = 0x4000;
/**
* The event mask for selecting hierarchy events.
*/
- public final static long HIERARCHY_EVENT_MASK = 0x8000;
+ public static final long HIERARCHY_EVENT_MASK = 0x8000;
/**
* The event mask for selecting hierarchy bounds events.
*/
- public final static long HIERARCHY_BOUNDS_EVENT_MASK = 0x10000;
+ public static final long HIERARCHY_BOUNDS_EVENT_MASK = 0x10000;
/**
* The event mask for selecting mouse wheel events.
* @since 1.4
*/
- public final static long MOUSE_WHEEL_EVENT_MASK = 0x20000;
+ public static final long MOUSE_WHEEL_EVENT_MASK = 0x20000;
/**
* The event mask for selecting window state events.
* @since 1.4
*/
- public final static long WINDOW_STATE_EVENT_MASK = 0x40000;
+ public static final long WINDOW_STATE_EVENT_MASK = 0x40000;
/**
* The event mask for selecting window focus events.
* @since 1.4
*/
- public final static long WINDOW_FOCUS_EVENT_MASK = 0x80000;
+ public static final long WINDOW_FOCUS_EVENT_MASK = 0x80000;
/**
* WARNING: there are more mask defined privately. See
@@ -239,7 +239,7 @@
* The maximum value for reserved AWT event IDs. Programs defining
* their own event IDs should use IDs greater than this value.
*/
- public final static int RESERVED_ID_MAX = 1999;
+ public static final int RESERVED_ID_MAX = 1999;
// security stuff
private static Field inputEvent_CanAccessSystemClipboard_Field = null;
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTKeyStroke.java Mon Oct 05 13:45:50 2015 -0700
@@ -32,12 +32,9 @@
import java.util.Map;
import java.util.StringTokenizer;
import java.io.Serializable;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.lang.reflect.Field;
+import sun.swing.SwingAccessor;
/**
* An <code>AWTKeyStroke</code> represents a key action on the
@@ -80,21 +77,6 @@
//A key withing the cache
private static AWTKeyStroke APP_CONTEXT_KEYSTROKE_KEY = new AWTKeyStroke();
- /*
- * Reads keystroke class from AppContext and if null, puts there the
- * AWTKeyStroke class.
- * Must be called under locked AWTKeyStroke
- */
- private static Class<AWTKeyStroke> getAWTKeyStrokeClass() {
- @SuppressWarnings("unchecked")
- Class<AWTKeyStroke> clazz = (Class<AWTKeyStroke>)AppContext.getAppContext().get(AWTKeyStroke.class);
- if (clazz == null) {
- clazz = AWTKeyStroke.class;
- AppContext.getAppContext().put(AWTKeyStroke.class, AWTKeyStroke.class);
- }
- return clazz;
- }
-
private char keyChar = KeyEvent.CHAR_UNDEFINED;
private int keyCode = KeyEvent.VK_UNDEFINED;
private int modifiers;
@@ -160,92 +142,15 @@
}
/**
- * Registers a new class which the factory methods in
- * <code>AWTKeyStroke</code> will use when generating new
- * instances of <code>AWTKeyStroke</code>s. After invoking this
- * method, the factory methods will return instances of the specified
- * Class. The specified Class must be either <code>AWTKeyStroke</code>
- * or derived from <code>AWTKeyStroke</code>, and it must have a
- * no-arg constructor. The constructor can be of any accessibility,
- * including <code>private</code>. This operation
- * flushes the current <code>AWTKeyStroke</code> cache.
+ * The method has no effect and is only left present to avoid introducing
+ * a binary incompatibility.
*
* @param subclass the new Class of which the factory methods should create
* instances
- * @throws IllegalArgumentException if subclass is <code>null</code>,
- * or if subclass does not have a no-arg constructor
- * @throws ClassCastException if subclass is not
- * <code>AWTKeyStroke</code>, or a class derived from
- * <code>AWTKeyStroke</code>
+ * @deprecated
*/
+ @Deprecated
protected static void registerSubclass(Class<?> subclass) {
- if (subclass == null) {
- throw new IllegalArgumentException("subclass cannot be null");
- }
- synchronized (AWTKeyStroke.class) {
- @SuppressWarnings("unchecked")
- Class<AWTKeyStroke> keyStrokeClass = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
- if (keyStrokeClass != null && keyStrokeClass.equals(subclass)){
- // Already registered
- return;
- }
- }
- if (!AWTKeyStroke.class.isAssignableFrom(subclass)) {
- throw new ClassCastException("subclass is not derived from AWTKeyStroke");
- }
-
- Constructor<?> ctor = getCtor(subclass);
-
- String couldNotInstantiate = "subclass could not be instantiated";
-
- if (ctor == null) {
- throw new IllegalArgumentException(couldNotInstantiate);
- }
- try {
- AWTKeyStroke stroke = (AWTKeyStroke)ctor.newInstance((Object[]) null);
- if (stroke == null) {
- throw new IllegalArgumentException(couldNotInstantiate);
- }
- } catch (NoSuchMethodError e) {
- throw new IllegalArgumentException(couldNotInstantiate);
- } catch (ExceptionInInitializerError e) {
- throw new IllegalArgumentException(couldNotInstantiate);
- } catch (InstantiationException e) {
- throw new IllegalArgumentException(couldNotInstantiate);
- } catch (IllegalAccessException e) {
- throw new IllegalArgumentException(couldNotInstantiate);
- } catch (InvocationTargetException e) {
- throw new IllegalArgumentException(couldNotInstantiate);
- }
-
- synchronized (AWTKeyStroke.class) {
- AppContext.getAppContext().put(AWTKeyStroke.class, subclass);
- AppContext.getAppContext().remove(APP_CONTEXT_CACHE_KEY);
- AppContext.getAppContext().remove(APP_CONTEXT_KEYSTROKE_KEY);
- }
- }
-
- /* returns no-arg Constructor for class with accessible flag. No security
- threat as accessible flag is set only for this Constructor object,
- not for Class constructor.
- */
- private static Constructor<?> getCtor(final Class<?> clazz)
- {
- Constructor<?> ctor = AccessController.doPrivileged(new PrivilegedAction<Constructor<?>>() {
- public Constructor<?> run() {
- try {
- Constructor<?> ctor = clazz.getDeclaredConstructor((Class<?>[]) null);
- if (ctor != null) {
- ctor.setAccessible(true);
- }
- return ctor;
- } catch (SecurityException e) {
- } catch (NoSuchMethodException e) {
- }
- return null;
- }
- });
- return ctor;
}
private static synchronized AWTKeyStroke getCachedStroke
@@ -261,18 +166,10 @@
}
if (cacheKey == null) {
- try {
- Class<AWTKeyStroke> clazz = getAWTKeyStrokeClass();
- cacheKey = (AWTKeyStroke)getCtor(clazz).newInstance((Object[]) null);
- AppContext.getAppContext().put(APP_CONTEXT_KEYSTROKE_KEY, cacheKey);
- } catch (InstantiationException e) {
- assert(false);
- } catch (IllegalAccessException e) {
- assert(false);
- } catch (InvocationTargetException e) {
- assert(false);
- }
+ cacheKey = SwingAccessor.getKeyStrokeAccessor().create();
+ AppContext.getAppContext().put(APP_CONTEXT_KEYSTROKE_KEY, cacheKey);
}
+
cacheKey.keyChar = keyChar;
cacheKey.keyCode = keyCode;
cacheKey.modifiers = mapNewModifiers(mapOldModifiers(modifiers));
@@ -806,11 +703,9 @@
*/
protected Object readResolve() throws java.io.ObjectStreamException {
synchronized (AWTKeyStroke.class) {
- if (getClass().equals(getAWTKeyStrokeClass())) {
- return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
- }
+
+ return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
}
- return this;
}
private static int mapOldModifiers(int modifiers) {
--- a/jdk/src/java.desktop/share/classes/java/awt/BasicStroke.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/BasicStroke.java Mon Oct 05 13:45:50 2015 -0700
@@ -117,39 +117,39 @@
* Joins path segments by extending their outside edges until
* they meet.
*/
- @Native public final static int JOIN_MITER = 0;
+ @Native public static final int JOIN_MITER = 0;
/**
* Joins path segments by rounding off the corner at a radius
* of half the line width.
*/
- @Native public final static int JOIN_ROUND = 1;
+ @Native public static final int JOIN_ROUND = 1;
/**
* Joins path segments by connecting the outer corners of their
* wide outlines with a straight segment.
*/
- @Native public final static int JOIN_BEVEL = 2;
+ @Native public static final int JOIN_BEVEL = 2;
/**
* Ends unclosed subpaths and dash segments with no added
* decoration.
*/
- @Native public final static int CAP_BUTT = 0;
+ @Native public static final int CAP_BUTT = 0;
/**
* Ends unclosed subpaths and dash segments with a round
* decoration that has a radius equal to half of the width
* of the pen.
*/
- @Native public final static int CAP_ROUND = 1;
+ @Native public static final int CAP_ROUND = 1;
/**
* Ends unclosed subpaths and dash segments with a square
* projection that extends beyond the end of the segment
* to a distance equal to half of the line width.
*/
- @Native public final static int CAP_SQUARE = 2;
+ @Native public static final int CAP_SQUARE = 2;
float width;
--- a/jdk/src/java.desktop/share/classes/java/awt/Color.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Color.java Mon Oct 05 13:45:50 2015 -0700
@@ -62,145 +62,145 @@
/**
* The color white. In the default sRGB space.
*/
- public final static Color white = new Color(255, 255, 255);
+ public static final Color white = new Color(255, 255, 255);
/**
* The color white. In the default sRGB space.
* @since 1.4
*/
- public final static Color WHITE = white;
+ public static final Color WHITE = white;
/**
* The color light gray. In the default sRGB space.
*/
- public final static Color lightGray = new Color(192, 192, 192);
+ public static final Color lightGray = new Color(192, 192, 192);
/**
* The color light gray. In the default sRGB space.
* @since 1.4
*/
- public final static Color LIGHT_GRAY = lightGray;
+ public static final Color LIGHT_GRAY = lightGray;
/**
* The color gray. In the default sRGB space.
*/
- public final static Color gray = new Color(128, 128, 128);
+ public static final Color gray = new Color(128, 128, 128);
/**
* The color gray. In the default sRGB space.
* @since 1.4
*/
- public final static Color GRAY = gray;
+ public static final Color GRAY = gray;
/**
* The color dark gray. In the default sRGB space.
*/
- public final static Color darkGray = new Color(64, 64, 64);
+ public static final Color darkGray = new Color(64, 64, 64);
/**
* The color dark gray. In the default sRGB space.
* @since 1.4
*/
- public final static Color DARK_GRAY = darkGray;
+ public static final Color DARK_GRAY = darkGray;
/**
* The color black. In the default sRGB space.
*/
- public final static Color black = new Color(0, 0, 0);
+ public static final Color black = new Color(0, 0, 0);
/**
* The color black. In the default sRGB space.
* @since 1.4
*/
- public final static Color BLACK = black;
+ public static final Color BLACK = black;
/**
* The color red. In the default sRGB space.
*/
- public final static Color red = new Color(255, 0, 0);
+ public static final Color red = new Color(255, 0, 0);
/**
* The color red. In the default sRGB space.
* @since 1.4
*/
- public final static Color RED = red;
+ public static final Color RED = red;
/**
* The color pink. In the default sRGB space.
*/
- public final static Color pink = new Color(255, 175, 175);
+ public static final Color pink = new Color(255, 175, 175);
/**
* The color pink. In the default sRGB space.
* @since 1.4
*/
- public final static Color PINK = pink;
+ public static final Color PINK = pink;
/**
* The color orange. In the default sRGB space.
*/
- public final static Color orange = new Color(255, 200, 0);
+ public static final Color orange = new Color(255, 200, 0);
/**
* The color orange. In the default sRGB space.
* @since 1.4
*/
- public final static Color ORANGE = orange;
+ public static final Color ORANGE = orange;
/**
* The color yellow. In the default sRGB space.
*/
- public final static Color yellow = new Color(255, 255, 0);
+ public static final Color yellow = new Color(255, 255, 0);
/**
* The color yellow. In the default sRGB space.
* @since 1.4
*/
- public final static Color YELLOW = yellow;
+ public static final Color YELLOW = yellow;
/**
* The color green. In the default sRGB space.
*/
- public final static Color green = new Color(0, 255, 0);
+ public static final Color green = new Color(0, 255, 0);
/**
* The color green. In the default sRGB space.
* @since 1.4
*/
- public final static Color GREEN = green;
+ public static final Color GREEN = green;
/**
* The color magenta. In the default sRGB space.
*/
- public final static Color magenta = new Color(255, 0, 255);
+ public static final Color magenta = new Color(255, 0, 255);
/**
* The color magenta. In the default sRGB space.
* @since 1.4
*/
- public final static Color MAGENTA = magenta;
+ public static final Color MAGENTA = magenta;
/**
* The color cyan. In the default sRGB space.
*/
- public final static Color cyan = new Color(0, 255, 255);
+ public static final Color cyan = new Color(0, 255, 255);
/**
* The color cyan. In the default sRGB space.
* @since 1.4
*/
- public final static Color CYAN = cyan;
+ public static final Color CYAN = cyan;
/**
* The color blue. In the default sRGB space.
*/
- public final static Color blue = new Color(0, 0, 255);
+ public static final Color blue = new Color(0, 0, 255);
/**
* The color blue. In the default sRGB space.
* @since 1.4
*/
- public final static Color BLUE = blue;
+ public static final Color BLUE = blue;
/**
* The color value.
--- a/jdk/src/java.desktop/share/classes/java/awt/Component.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java Mon Oct 05 13:45:50 2015 -0700
@@ -545,24 +545,24 @@
transient InputMethodListener inputMethodListener;
/** Internal, constants for serialization */
- final static String actionListenerK = "actionL";
- final static String adjustmentListenerK = "adjustmentL";
- final static String componentListenerK = "componentL";
- final static String containerListenerK = "containerL";
- final static String focusListenerK = "focusL";
- final static String itemListenerK = "itemL";
- final static String keyListenerK = "keyL";
- final static String mouseListenerK = "mouseL";
- final static String mouseMotionListenerK = "mouseMotionL";
- final static String mouseWheelListenerK = "mouseWheelL";
- final static String textListenerK = "textL";
- final static String ownedWindowK = "ownedL";
- final static String windowListenerK = "windowL";
- final static String inputMethodListenerK = "inputMethodL";
- final static String hierarchyListenerK = "hierarchyL";
- final static String hierarchyBoundsListenerK = "hierarchyBoundsL";
- final static String windowStateListenerK = "windowStateL";
- final static String windowFocusListenerK = "windowFocusL";
+ static final String actionListenerK = "actionL";
+ static final String adjustmentListenerK = "adjustmentL";
+ static final String componentListenerK = "componentL";
+ static final String containerListenerK = "containerL";
+ static final String focusListenerK = "focusL";
+ static final String itemListenerK = "itemL";
+ static final String keyListenerK = "keyL";
+ static final String mouseListenerK = "mouseL";
+ static final String mouseMotionListenerK = "mouseMotionL";
+ static final String mouseWheelListenerK = "mouseWheelL";
+ static final String textListenerK = "textL";
+ static final String ownedWindowK = "ownedL";
+ static final String windowListenerK = "windowL";
+ static final String inputMethodListenerK = "inputMethodL";
+ static final String hierarchyListenerK = "hierarchyL";
+ static final String hierarchyBoundsListenerK = "hierarchyBoundsL";
+ static final String windowStateListenerK = "windowStateL";
+ static final String windowFocusListenerK = "windowFocusL";
/**
* The <code>eventMask</code> is ONLY set by subclasses via
@@ -6209,7 +6209,7 @@
* @see #isCoalescingEnabled
* @see #checkCoalescing
*/
- transient private boolean coalescingEnabled = checkCoalescing();
+ private transient boolean coalescingEnabled = checkCoalescing();
/**
* Weak map of known coalesceEvent overriders.
@@ -7916,7 +7916,7 @@
}
};
- synchronized static void setRequestFocusController(RequestFocusController requestController)
+ static synchronized void setRequestFocusController(RequestFocusController requestController)
{
if (requestController == null) {
requestFocusController = new DummyRequestFocusController();
@@ -9173,7 +9173,7 @@
* to add/remove ComponentListener and FocusListener to track
* target Component's state.
*/
- private volatile transient int propertyListenersCount = 0;
+ private transient volatile int propertyListenersCount = 0;
/**
* A component listener to track show/hide/resize events
--- a/jdk/src/java.desktop/share/classes/java/awt/Container.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Container.java Mon Oct 05 13:45:50 2015 -0700
@@ -2975,7 +2975,7 @@
}
}
- final static class WakingRunnable implements Runnable {
+ static final class WakingRunnable implements Runnable {
public void run() {
}
}
@@ -3843,7 +3843,7 @@
* Number of PropertyChangeListener objects registered. It's used
* to add/remove ContainerListener to track target Container's state.
*/
- private volatile transient int propertyListenersCount = 0;
+ private transient volatile int propertyListenersCount = 0;
/**
* The handler to fire {@code PropertyChange}
--- a/jdk/src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java Mon Oct 05 13:45:50 2015 -0700
@@ -62,8 +62,8 @@
{
private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy");
- final private int FORWARD_TRAVERSAL = 0;
- final private int BACKWARD_TRAVERSAL = 1;
+ private final int FORWARD_TRAVERSAL = 0;
+ private final int BACKWARD_TRAVERSAL = 1;
/*
* JDK 1.4 serialVersionUID
@@ -84,8 +84,8 @@
* that they need to invoke getFirstComponent or getLastComponent, the
* list should be reused if possible.
*/
- transient private Container cachedRoot;
- transient private List<Component> cachedCycle;
+ private transient Container cachedRoot;
+ private transient List<Component> cachedCycle;
/*
* We suppose to use getFocusTraversalCycle & getComponentIndex methods in order
--- a/jdk/src/java.desktop/share/classes/java/awt/Cursor.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Cursor.java Mon Oct 05 13:45:50 2015 -0700
@@ -124,7 +124,7 @@
/**
* This field is a private replacement for 'predefined' array.
*/
- private final static Cursor[] predefinedPrivate = new Cursor[14];
+ private static final Cursor[] predefinedPrivate = new Cursor[14];
/* Localization names and default values */
static final String[][] cursorProperties = {
@@ -449,5 +449,5 @@
}
}
- private native static void finalizeImpl(long pData);
+ private static native void finalizeImpl(long pData);
}
--- a/jdk/src/java.desktop/share/classes/java/awt/Dialog.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Dialog.java Mon Oct 05 13:45:50 2015 -0700
@@ -193,7 +193,7 @@
*
* @since 1.6
*/
- public final static ModalityType DEFAULT_MODALITY_TYPE = ModalityType.APPLICATION_MODAL;
+ public static final ModalityType DEFAULT_MODALITY_TYPE = ModalityType.APPLICATION_MODAL;
/**
* True if this dialog is modal, false is the dialog is modeless.
@@ -265,7 +265,7 @@
};
/* operations with this list should be synchronized on tree lock*/
- transient static IdentityArrayList<Dialog> modalDialogs = new IdentityArrayList<Dialog>();
+ static transient IdentityArrayList<Dialog> modalDialogs = new IdentityArrayList<Dialog>();
transient IdentityArrayList<Window> blockedWindows = new IdentityArrayList<Window>();
--- a/jdk/src/java.desktop/share/classes/java/awt/DisplayMode.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/DisplayMode.java Mon Oct 05 13:45:50 2015 -0700
@@ -92,7 +92,7 @@
* display mode.
* @see #getBitDepth
*/
- @Native public final static int BIT_DEPTH_MULTI = -1;
+ @Native public static final int BIT_DEPTH_MULTI = -1;
/**
* Returns the bit depth of the display, in bits per pixel. This may be
@@ -110,7 +110,7 @@
* Value of the refresh rate if not known.
* @see #getRefreshRate
*/
- @Native public final static int REFRESH_RATE_UNKNOWN = 0;
+ @Native public static final int REFRESH_RATE_UNKNOWN = 0;
/**
* Returns the refresh rate of the display, in hertz. This may be
--- a/jdk/src/java.desktop/share/classes/java/awt/EventQueue.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/EventQueue.java Mon Oct 05 13:45:50 2015 -0700
@@ -139,7 +139,7 @@
* Dummy runnable to wake up EDT from getNextEvent() after
push/pop is performed
*/
- private final static Runnable dummyRunnable = new Runnable() {
+ private static final Runnable dummyRunnable = new Runnable() {
public void run() {
}
};
--- a/jdk/src/java.desktop/share/classes/java/awt/GraphicsDevice.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/GraphicsDevice.java Mon Oct 05 13:45:50 2015 -0700
@@ -99,18 +99,18 @@
/**
* Device is a raster screen.
*/
- public final static int TYPE_RASTER_SCREEN = 0;
+ public static final int TYPE_RASTER_SCREEN = 0;
/**
* Device is a printer.
*/
- public final static int TYPE_PRINTER = 1;
+ public static final int TYPE_PRINTER = 1;
/**
* Device is an image buffer. This buffer can reside in device
* or system memory but it is not physically viewable by the user.
*/
- public final static int TYPE_IMAGE_BUFFER = 2;
+ public static final int TYPE_IMAGE_BUFFER = 2;
/**
* Kinds of translucency supported by the underlying system.
--- a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java Mon Oct 05 13:45:50 2015 -0700
@@ -216,7 +216,7 @@
return getCurrentKeyboardFocusManager(AppContext.getAppContext());
}
- synchronized static KeyboardFocusManager
+ static synchronized KeyboardFocusManager
getCurrentKeyboardFocusManager(AppContext appcontext)
{
KeyboardFocusManager manager = (KeyboardFocusManager)
@@ -2599,7 +2599,7 @@
* @param comp the component to dispatch the event to
* @param event the event to dispatch to the component
*/
- static private Throwable dispatchAndCatchException(Throwable ex, Component comp, FocusEvent event) {
+ private static Throwable dispatchAndCatchException(Throwable ex, Component comp, FocusEvent event) {
Throwable retEx = null;
try {
comp.dispatchEvent(event);
@@ -2617,7 +2617,7 @@
return ex;
}
- static private void handleException(Throwable ex) {
+ private static void handleException(Throwable ex) {
ex.printStackTrace();
}
--- a/jdk/src/java.desktop/share/classes/java/awt/List.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/List.java Mon Oct 05 13:45:50 2015 -0700
@@ -209,7 +209,7 @@
* The default number of visible rows is 4. A list with
* zero rows is unusable and unsightly.
*/
- final static int DEFAULT_VISIBLE_ROWS = 4;
+ static final int DEFAULT_VISIBLE_ROWS = 4;
/**
* Creates a new scrolling list initialized to display the specified
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java Mon Oct 05 13:45:50 2015 -0700
@@ -123,8 +123,8 @@
/*
* Internal constants for serialization.
*/
- final static String actionListenerK = Component.actionListenerK;
- final static String itemListenerK = Component.itemListenerK;
+ static final String actionListenerK = Component.actionListenerK;
+ static final String itemListenerK = Component.itemListenerK;
/*
* JDK 1.1 serialVersionUID
--- a/jdk/src/java.desktop/share/classes/java/awt/RenderingHints.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/RenderingHints.java Mon Oct 05 13:45:50 2015 -0700
@@ -110,7 +110,7 @@
Integer.toHexString(privatekey);
}
- private synchronized static void recordIdentity(Key k) {
+ private static synchronized void recordIdentity(Key k) {
Object identity = k.getIdentity();
Object otherref = identitymap.get(identity);
if (otherref != null) {
--- a/jdk/src/java.desktop/share/classes/java/awt/SequencedEvent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/SequencedEvent.java Mon Oct 05 13:45:50 2015 -0700
@@ -135,7 +135,7 @@
/**
* true only if event exists and nested source appContext is disposed.
*/
- private final static boolean isOwnerAppContextDisposed(SequencedEvent se) {
+ private static final boolean isOwnerAppContextDisposed(SequencedEvent se) {
if (se != null) {
Object target = se.nested.getSource();
if (target instanceof Component) {
@@ -159,14 +159,14 @@
return this == getFirstWithContext() || disposed;
}
- private final synchronized static SequencedEvent getFirst() {
+ private static final synchronized SequencedEvent getFirst() {
return list.getFirst();
}
/* Disposes all events from disposed AppContext
* return first valid event
*/
- private final static SequencedEvent getFirstWithContext() {
+ private static final SequencedEvent getFirstWithContext() {
SequencedEvent first = getFirst();
while(isOwnerAppContextDisposed(first)) {
first.dispose();
--- a/jdk/src/java.desktop/share/classes/java/awt/SplashScreen.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/SplashScreen.java Mon Oct 05 13:45:50 2015 -0700
@@ -411,14 +411,14 @@
private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.SplashScreen");
- private native static void _update(long splashPtr, int[] data, int x, int y, int width, int height, int scanlineStride);
- private native static boolean _isVisible(long splashPtr);
- private native static Rectangle _getBounds(long splashPtr);
- private native static long _getInstance();
- private native static void _close(long splashPtr);
- private native static String _getImageFileName(long splashPtr);
- private native static String _getImageJarName(long SplashPtr);
- private native static boolean _setImageData(long SplashPtr, byte[] data);
- private native static float _getScaleFactor(long SplashPtr);
+ private static native void _update(long splashPtr, int[] data, int x, int y, int width, int height, int scanlineStride);
+ private static native boolean _isVisible(long splashPtr);
+ private static native Rectangle _getBounds(long splashPtr);
+ private static native long _getInstance();
+ private static native void _close(long splashPtr);
+ private static native String _getImageFileName(long splashPtr);
+ private static native String _getImageJarName(long SplashPtr);
+ private static native boolean _setImageData(long SplashPtr, byte[] data);
+ private static native float _getScaleFactor(long SplashPtr);
}
--- a/jdk/src/java.desktop/share/classes/java/awt/SystemColor.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/SystemColor.java Mon Oct 05 13:45:50 2015 -0700
@@ -58,187 +58,187 @@
* {@link #desktop} system color.
* @see SystemColor#desktop
*/
- @Native public final static int DESKTOP = 0;
+ @Native public static final int DESKTOP = 0;
/**
* The array index for the
* {@link #activeCaption} system color.
* @see SystemColor#activeCaption
*/
- @Native public final static int ACTIVE_CAPTION = 1;
+ @Native public static final int ACTIVE_CAPTION = 1;
/**
* The array index for the
* {@link #activeCaptionText} system color.
* @see SystemColor#activeCaptionText
*/
- @Native public final static int ACTIVE_CAPTION_TEXT = 2;
+ @Native public static final int ACTIVE_CAPTION_TEXT = 2;
/**
* The array index for the
* {@link #activeCaptionBorder} system color.
* @see SystemColor#activeCaptionBorder
*/
- @Native public final static int ACTIVE_CAPTION_BORDER = 3;
+ @Native public static final int ACTIVE_CAPTION_BORDER = 3;
/**
* The array index for the
* {@link #inactiveCaption} system color.
* @see SystemColor#inactiveCaption
*/
- @Native public final static int INACTIVE_CAPTION = 4;
+ @Native public static final int INACTIVE_CAPTION = 4;
/**
* The array index for the
* {@link #inactiveCaptionText} system color.
* @see SystemColor#inactiveCaptionText
*/
- @Native public final static int INACTIVE_CAPTION_TEXT = 5;
+ @Native public static final int INACTIVE_CAPTION_TEXT = 5;
/**
* The array index for the
* {@link #inactiveCaptionBorder} system color.
* @see SystemColor#inactiveCaptionBorder
*/
- @Native public final static int INACTIVE_CAPTION_BORDER = 6;
+ @Native public static final int INACTIVE_CAPTION_BORDER = 6;
/**
* The array index for the
* {@link #window} system color.
* @see SystemColor#window
*/
- @Native public final static int WINDOW = 7;
+ @Native public static final int WINDOW = 7;
/**
* The array index for the
* {@link #windowBorder} system color.
* @see SystemColor#windowBorder
*/
- @Native public final static int WINDOW_BORDER = 8;
+ @Native public static final int WINDOW_BORDER = 8;
/**
* The array index for the
* {@link #windowText} system color.
* @see SystemColor#windowText
*/
- @Native public final static int WINDOW_TEXT = 9;
+ @Native public static final int WINDOW_TEXT = 9;
/**
* The array index for the
* {@link #menu} system color.
* @see SystemColor#menu
*/
- @Native public final static int MENU = 10;
+ @Native public static final int MENU = 10;
/**
* The array index for the
* {@link #menuText} system color.
* @see SystemColor#menuText
*/
- @Native public final static int MENU_TEXT = 11;
+ @Native public static final int MENU_TEXT = 11;
/**
* The array index for the
* {@link #text} system color.
* @see SystemColor#text
*/
- @Native public final static int TEXT = 12;
+ @Native public static final int TEXT = 12;
/**
* The array index for the
* {@link #textText} system color.
* @see SystemColor#textText
*/
- @Native public final static int TEXT_TEXT = 13;
+ @Native public static final int TEXT_TEXT = 13;
/**
* The array index for the
* {@link #textHighlight} system color.
* @see SystemColor#textHighlight
*/
- @Native public final static int TEXT_HIGHLIGHT = 14;
+ @Native public static final int TEXT_HIGHLIGHT = 14;
/**
* The array index for the
* {@link #textHighlightText} system color.
* @see SystemColor#textHighlightText
*/
- @Native public final static int TEXT_HIGHLIGHT_TEXT = 15;
+ @Native public static final int TEXT_HIGHLIGHT_TEXT = 15;
/**
* The array index for the
* {@link #textInactiveText} system color.
* @see SystemColor#textInactiveText
*/
- @Native public final static int TEXT_INACTIVE_TEXT = 16;
+ @Native public static final int TEXT_INACTIVE_TEXT = 16;
/**
* The array index for the
* {@link #control} system color.
* @see SystemColor#control
*/
- @Native public final static int CONTROL = 17;
+ @Native public static final int CONTROL = 17;
/**
* The array index for the
* {@link #controlText} system color.
* @see SystemColor#controlText
*/
- @Native public final static int CONTROL_TEXT = 18;
+ @Native public static final int CONTROL_TEXT = 18;
/**
* The array index for the
* {@link #controlHighlight} system color.
* @see SystemColor#controlHighlight
*/
- @Native public final static int CONTROL_HIGHLIGHT = 19;
+ @Native public static final int CONTROL_HIGHLIGHT = 19;
/**
* The array index for the
* {@link #controlLtHighlight} system color.
* @see SystemColor#controlLtHighlight
*/
- @Native public final static int CONTROL_LT_HIGHLIGHT = 20;
+ @Native public static final int CONTROL_LT_HIGHLIGHT = 20;
/**
* The array index for the
* {@link #controlShadow} system color.
* @see SystemColor#controlShadow
*/
- @Native public final static int CONTROL_SHADOW = 21;
+ @Native public static final int CONTROL_SHADOW = 21;
/**
* The array index for the
* {@link #controlDkShadow} system color.
* @see SystemColor#controlDkShadow
*/
- @Native public final static int CONTROL_DK_SHADOW = 22;
+ @Native public static final int CONTROL_DK_SHADOW = 22;
/**
* The array index for the
* {@link #scrollbar} system color.
* @see SystemColor#scrollbar
*/
- @Native public final static int SCROLLBAR = 23;
+ @Native public static final int SCROLLBAR = 23;
/**
* The array index for the
* {@link #info} system color.
* @see SystemColor#info
*/
- @Native public final static int INFO = 24;
+ @Native public static final int INFO = 24;
/**
* The array index for the
* {@link #infoText} system color.
* @see SystemColor#infoText
*/
- @Native public final static int INFO_TEXT = 25;
+ @Native public static final int INFO_TEXT = 25;
/**
* The number of system colors in the array.
*/
- @Native public final static int NUM_COLORS = 26;
+ @Native public static final int NUM_COLORS = 26;
/******************************************************************************************/
@@ -280,146 +280,146 @@
/**
* The color rendered for the background of the desktop.
*/
- public final static SystemColor desktop = new SystemColor((byte)DESKTOP);
+ public static final SystemColor desktop = new SystemColor((byte)DESKTOP);
/**
* The color rendered for the window-title background of the currently active window.
*/
- public final static SystemColor activeCaption = new SystemColor((byte)ACTIVE_CAPTION);
+ public static final SystemColor activeCaption = new SystemColor((byte)ACTIVE_CAPTION);
/**
* The color rendered for the window-title text of the currently active window.
*/
- public final static SystemColor activeCaptionText = new SystemColor((byte)ACTIVE_CAPTION_TEXT);
+ public static final SystemColor activeCaptionText = new SystemColor((byte)ACTIVE_CAPTION_TEXT);
/**
* The color rendered for the border around the currently active window.
*/
- public final static SystemColor activeCaptionBorder = new SystemColor((byte)ACTIVE_CAPTION_BORDER);
+ public static final SystemColor activeCaptionBorder = new SystemColor((byte)ACTIVE_CAPTION_BORDER);
/**
* The color rendered for the window-title background of inactive windows.
*/
- public final static SystemColor inactiveCaption = new SystemColor((byte)INACTIVE_CAPTION);
+ public static final SystemColor inactiveCaption = new SystemColor((byte)INACTIVE_CAPTION);
/**
* The color rendered for the window-title text of inactive windows.
*/
- public final static SystemColor inactiveCaptionText = new SystemColor((byte)INACTIVE_CAPTION_TEXT);
+ public static final SystemColor inactiveCaptionText = new SystemColor((byte)INACTIVE_CAPTION_TEXT);
/**
* The color rendered for the border around inactive windows.
*/
- public final static SystemColor inactiveCaptionBorder = new SystemColor((byte)INACTIVE_CAPTION_BORDER);
+ public static final SystemColor inactiveCaptionBorder = new SystemColor((byte)INACTIVE_CAPTION_BORDER);
/**
* The color rendered for the background of interior regions inside windows.
*/
- public final static SystemColor window = new SystemColor((byte)WINDOW);
+ public static final SystemColor window = new SystemColor((byte)WINDOW);
/**
* The color rendered for the border around interior regions inside windows.
*/
- public final static SystemColor windowBorder = new SystemColor((byte)WINDOW_BORDER);
+ public static final SystemColor windowBorder = new SystemColor((byte)WINDOW_BORDER);
/**
* The color rendered for text of interior regions inside windows.
*/
- public final static SystemColor windowText = new SystemColor((byte)WINDOW_TEXT);
+ public static final SystemColor windowText = new SystemColor((byte)WINDOW_TEXT);
/**
* The color rendered for the background of menus.
*/
- public final static SystemColor menu = new SystemColor((byte)MENU);
+ public static final SystemColor menu = new SystemColor((byte)MENU);
/**
* The color rendered for the text of menus.
*/
- public final static SystemColor menuText = new SystemColor((byte)MENU_TEXT);
+ public static final SystemColor menuText = new SystemColor((byte)MENU_TEXT);
/**
* The color rendered for the background of text control objects, such as
* textfields and comboboxes.
*/
- public final static SystemColor text = new SystemColor((byte)TEXT);
+ public static final SystemColor text = new SystemColor((byte)TEXT);
/**
* The color rendered for the text of text control objects, such as textfields
* and comboboxes.
*/
- public final static SystemColor textText = new SystemColor((byte)TEXT_TEXT);
+ public static final SystemColor textText = new SystemColor((byte)TEXT_TEXT);
/**
* The color rendered for the background of selected items, such as in menus,
* comboboxes, and text.
*/
- public final static SystemColor textHighlight = new SystemColor((byte)TEXT_HIGHLIGHT);
+ public static final SystemColor textHighlight = new SystemColor((byte)TEXT_HIGHLIGHT);
/**
* The color rendered for the text of selected items, such as in menus, comboboxes,
* and text.
*/
- public final static SystemColor textHighlightText = new SystemColor((byte)TEXT_HIGHLIGHT_TEXT);
+ public static final SystemColor textHighlightText = new SystemColor((byte)TEXT_HIGHLIGHT_TEXT);
/**
* The color rendered for the text of inactive items, such as in menus.
*/
- public final static SystemColor textInactiveText = new SystemColor((byte)TEXT_INACTIVE_TEXT);
+ public static final SystemColor textInactiveText = new SystemColor((byte)TEXT_INACTIVE_TEXT);
/**
* The color rendered for the background of control panels and control objects,
* such as pushbuttons.
*/
- public final static SystemColor control = new SystemColor((byte)CONTROL);
+ public static final SystemColor control = new SystemColor((byte)CONTROL);
/**
* The color rendered for the text of control panels and control objects,
* such as pushbuttons.
*/
- public final static SystemColor controlText = new SystemColor((byte)CONTROL_TEXT);
+ public static final SystemColor controlText = new SystemColor((byte)CONTROL_TEXT);
/**
* The color rendered for light areas of 3D control objects, such as pushbuttons.
* This color is typically derived from the <code>control</code> background color
* to provide a 3D effect.
*/
- public final static SystemColor controlHighlight = new SystemColor((byte)CONTROL_HIGHLIGHT);
+ public static final SystemColor controlHighlight = new SystemColor((byte)CONTROL_HIGHLIGHT);
/**
* The color rendered for highlight areas of 3D control objects, such as pushbuttons.
* This color is typically derived from the <code>control</code> background color
* to provide a 3D effect.
*/
- public final static SystemColor controlLtHighlight = new SystemColor((byte)CONTROL_LT_HIGHLIGHT);
+ public static final SystemColor controlLtHighlight = new SystemColor((byte)CONTROL_LT_HIGHLIGHT);
/**
* The color rendered for shadow areas of 3D control objects, such as pushbuttons.
* This color is typically derived from the <code>control</code> background color
* to provide a 3D effect.
*/
- public final static SystemColor controlShadow = new SystemColor((byte)CONTROL_SHADOW);
+ public static final SystemColor controlShadow = new SystemColor((byte)CONTROL_SHADOW);
/**
* The color rendered for dark shadow areas on 3D control objects, such as pushbuttons.
* This color is typically derived from the <code>control</code> background color
* to provide a 3D effect.
*/
- public final static SystemColor controlDkShadow = new SystemColor((byte)CONTROL_DK_SHADOW);
+ public static final SystemColor controlDkShadow = new SystemColor((byte)CONTROL_DK_SHADOW);
/**
* The color rendered for the background of scrollbars.
*/
- public final static SystemColor scrollbar = new SystemColor((byte)SCROLLBAR);
+ public static final SystemColor scrollbar = new SystemColor((byte)SCROLLBAR);
/**
* The color rendered for the background of tooltips or spot help.
*/
- public final static SystemColor info = new SystemColor((byte)INFO);
+ public static final SystemColor info = new SystemColor((byte)INFO);
/**
* The color rendered for the text of tooltips or spot help.
*/
- public final static SystemColor infoText = new SystemColor((byte)INFO_TEXT);
+ public static final SystemColor infoText = new SystemColor((byte)INFO_TEXT);
/*
* JDK 1.1 serialVersionUID.
--- a/jdk/src/java.desktop/share/classes/java/awt/SystemTray.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/SystemTray.java Mon Oct 05 13:45:50 2015 -0700
@@ -124,7 +124,7 @@
private static SystemTray systemTray;
private int currentIconID = 0; // each TrayIcon added gets a unique ID
- transient private SystemTrayPeer peer;
+ private transient SystemTrayPeer peer;
private static final TrayIcon[] EMPTY_TRAY_ARRAY = new TrayIcon[0];
--- a/jdk/src/java.desktop/share/classes/java/awt/TextComponent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/TextComponent.java Mon Oct 05 13:45:50 2015 -0700
@@ -110,7 +110,7 @@
/**
* A list of listeners that will receive events from this object.
*/
- transient protected TextListener textListener;
+ protected transient TextListener textListener;
/*
* JDK 1.1 serialVersionUID
--- a/jdk/src/java.desktop/share/classes/java/awt/TexturePaintContext.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/TexturePaintContext.java Mon Oct 05 13:45:50 2015 -0700
@@ -237,7 +237,7 @@
private static WeakReference<Raster> xrgbRasRef;
private static WeakReference<Raster> argbRasRef;
- synchronized static WritableRaster makeRaster(ColorModel cm,
+ static synchronized WritableRaster makeRaster(ColorModel cm,
Raster srcRas,
int w, int h)
{
@@ -273,7 +273,7 @@
}
}
- synchronized static void dropRaster(ColorModel cm, Raster outRas) {
+ static synchronized void dropRaster(ColorModel cm, Raster outRas) {
if (outRas == null) {
return;
}
@@ -286,7 +286,7 @@
private static WeakReference<Raster> byteRasRef;
- synchronized static WritableRaster makeByteRaster(Raster srcRas,
+ static synchronized WritableRaster makeByteRaster(Raster srcRas,
int w, int h)
{
if (byteRasRef != null) {
@@ -303,7 +303,7 @@
return srcRas.createCompatibleWritableRaster(w, h);
}
- synchronized static void dropByteRaster(Raster outRas) {
+ static synchronized void dropByteRaster(Raster outRas) {
if (outRas == null) {
return;
}
--- a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java Mon Oct 05 13:45:50 2015 -0700
@@ -1722,7 +1722,7 @@
* Extracts a "pure" AWTEventListener from a AWTEventListenerProxy,
* if the listener is proxied.
*/
- static private AWTEventListener deProxyAWTEventListener(AWTEventListener l)
+ private static AWTEventListener deProxyAWTEventListener(AWTEventListener l)
{
AWTEventListener localL = l;
@@ -2007,7 +2007,7 @@
}
}
- static private class ToolkitEventMulticaster extends AWTEventMulticaster
+ private static class ToolkitEventMulticaster extends AWTEventMulticaster
implements AWTEventListener {
// Implementation cloned from AWTEventMulticaster.
--- a/jdk/src/java.desktop/share/classes/java/awt/Transparency.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Transparency.java Mon Oct 05 13:45:50 2015 -0700
@@ -37,20 +37,20 @@
* Represents image data that is guaranteed to be completely opaque,
* meaning that all pixels have an alpha value of 1.0.
*/
- @Native public final static int OPAQUE = 1;
+ @Native public static final int OPAQUE = 1;
/**
* Represents image data that is guaranteed to be either completely
* opaque, with an alpha value of 1.0, or completely transparent,
* with an alpha value of 0.0.
*/
- @Native public final static int BITMASK = 2;
+ @Native public static final int BITMASK = 2;
/**
* Represents image data that contains or might contain arbitrary
* alpha values between and including 0.0 and 1.0.
*/
- @Native public final static int TRANSLUCENT = 3;
+ @Native public static final int TRANSLUCENT = 3;
/**
* Returns the type of this <code>Transparency</code>.
--- a/jdk/src/java.desktop/share/classes/java/awt/TrayIcon.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/TrayIcon.java Mon Oct 05 13:45:50 2015 -0700
@@ -92,7 +92,7 @@
private int id;
private String actionCommand;
- transient private TrayIconPeer peer;
+ private transient TrayIconPeer peer;
transient MouseListener mouseListener;
transient MouseMotionListener mouseMotionListener;
--- a/jdk/src/java.desktop/share/classes/java/awt/WaitDispatchSupport.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/WaitDispatchSupport.java Mon Oct 05 13:45:50 2015 -0700
@@ -47,7 +47,7 @@
*/
class WaitDispatchSupport implements SecondaryLoop {
- private final static PlatformLogger log =
+ private static final PlatformLogger log =
PlatformLogger.getLogger("java.awt.event.WaitDispatchSupport");
private EventDispatchThread dispatchThread;
@@ -303,7 +303,7 @@
return false;
}
- private final static Object getTreeLock() {
+ private static final Object getTreeLock() {
return Component.LOCK;
}
--- a/jdk/src/java.desktop/share/classes/java/awt/Window.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Window.java Mon Oct 05 13:45:50 2015 -0700
@@ -959,7 +959,7 @@
}
}
- static private final AtomicBoolean
+ private static final AtomicBoolean
beforeFirstWindowShown = new AtomicBoolean(true);
final void closeSplashScreen() {
--- a/jdk/src/java.desktop/share/classes/java/awt/dnd/DropTargetDropEvent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/DropTargetDropEvent.java Mon Oct 05 13:45:50 2015 -0700
@@ -267,7 +267,7 @@
* fields
*/
- static final private Point zero = new Point(0,0);
+ private static final Point zero = new Point(0,0);
/**
* The location of the drag cursor's hotspot in Component coordinates.
--- a/jdk/src/java.desktop/share/classes/java/awt/dnd/InvalidDnDOperationException.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/dnd/InvalidDnDOperationException.java Mon Oct 05 13:45:50 2015 -0700
@@ -38,7 +38,7 @@
private static final long serialVersionUID = -6062568741193956678L;
- static private String dft_msg = "The operation requested cannot be performed by the DnD system since it is not in the appropriate state";
+ private static String dft_msg = "The operation requested cannot be performed by the DnD system since it is not in the appropriate state";
/**
* Create a default Exception
--- a/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/MouseEvent.java Mon Oct 05 13:45:50 2015 -0700
@@ -623,7 +623,7 @@
/* if the button is an extra button and it is released or clicked then in Xsystem its state
is not modified. Exclude this button number from ExtModifiers mask.*/
- transient private boolean shouldExcludeButtonFromExtModifiers = false;
+ private transient boolean shouldExcludeButtonFromExtModifiers = false;
/**
* {@inheritDoc}
--- a/jdk/src/java.desktop/share/classes/java/awt/font/OpenType.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/OpenType.java Mon Oct 05 13:45:50 2015 -0700
@@ -43,307 +43,307 @@
* Character to glyph mapping. Table tag "cmap" in the Open
* Type Specification.
*/
- public final static int TAG_CMAP = 0x636d6170;
+ public static final int TAG_CMAP = 0x636d6170;
/**
* Font header. Table tag "head" in the Open
* Type Specification.
*/
- public final static int TAG_HEAD = 0x68656164;
+ public static final int TAG_HEAD = 0x68656164;
/**
* Naming table. Table tag "name" in the Open
* Type Specification.
*/
- public final static int TAG_NAME = 0x6e616d65;
+ public static final int TAG_NAME = 0x6e616d65;
/**
* Glyph data. Table tag "glyf" in the Open
* Type Specification.
*/
- public final static int TAG_GLYF = 0x676c7966;
+ public static final int TAG_GLYF = 0x676c7966;
/**
* Maximum profile. Table tag "maxp" in the Open
* Type Specification.
*/
- public final static int TAG_MAXP = 0x6d617870;
+ public static final int TAG_MAXP = 0x6d617870;
/**
* CVT preprogram. Table tag "prep" in the Open
* Type Specification.
*/
- public final static int TAG_PREP = 0x70726570;
+ public static final int TAG_PREP = 0x70726570;
/**
* Horizontal metrics. Table tag "hmtx" in the Open
* Type Specification.
*/
- public final static int TAG_HMTX = 0x686d7478;
+ public static final int TAG_HMTX = 0x686d7478;
/**
* Kerning. Table tag "kern" in the Open
* Type Specification.
*/
- public final static int TAG_KERN = 0x6b65726e;
+ public static final int TAG_KERN = 0x6b65726e;
/**
* Horizontal device metrics. Table tag "hdmx" in the Open
* Type Specification.
*/
- public final static int TAG_HDMX = 0x68646d78;
+ public static final int TAG_HDMX = 0x68646d78;
/**
* Index to location. Table tag "loca" in the Open
* Type Specification.
*/
- public final static int TAG_LOCA = 0x6c6f6361;
+ public static final int TAG_LOCA = 0x6c6f6361;
/**
* PostScript Information. Table tag "post" in the Open
* Type Specification.
*/
- public final static int TAG_POST = 0x706f7374;
+ public static final int TAG_POST = 0x706f7374;
/**
* OS/2 and Windows specific metrics. Table tag "OS/2"
* in the Open Type Specification.
*/
- public final static int TAG_OS2 = 0x4f532f32;
+ public static final int TAG_OS2 = 0x4f532f32;
/**
* Control value table. Table tag "cvt "
* in the Open Type Specification.
*/
- public final static int TAG_CVT = 0x63767420;
+ public static final int TAG_CVT = 0x63767420;
/**
* Grid-fitting and scan conversion procedure. Table tag
* "gasp" in the Open Type Specification.
*/
- public final static int TAG_GASP = 0x67617370;
+ public static final int TAG_GASP = 0x67617370;
/**
* Vertical device metrics. Table tag "VDMX" in the Open
* Type Specification.
*/
- public final static int TAG_VDMX = 0x56444d58;
+ public static final int TAG_VDMX = 0x56444d58;
/**
* Vertical metrics. Table tag "vmtx" in the Open
* Type Specification.
*/
- public final static int TAG_VMTX = 0x766d7478;
+ public static final int TAG_VMTX = 0x766d7478;
/**
* Vertical metrics header. Table tag "vhea" in the Open
* Type Specification.
*/
- public final static int TAG_VHEA = 0x76686561;
+ public static final int TAG_VHEA = 0x76686561;
/**
* Horizontal metrics header. Table tag "hhea" in the Open
* Type Specification.
*/
- public final static int TAG_HHEA = 0x68686561;
+ public static final int TAG_HHEA = 0x68686561;
/**
* Adobe Type 1 font data. Table tag "typ1" in the Open
* Type Specification.
*/
- public final static int TAG_TYP1 = 0x74797031;
+ public static final int TAG_TYP1 = 0x74797031;
/**
* Baseline table. Table tag "bsln" in the Open
* Type Specification.
*/
- public final static int TAG_BSLN = 0x62736c6e;
+ public static final int TAG_BSLN = 0x62736c6e;
/**
* Glyph substitution. Table tag "GSUB" in the Open
* Type Specification.
*/
- public final static int TAG_GSUB = 0x47535542;
+ public static final int TAG_GSUB = 0x47535542;
/**
* Digital signature. Table tag "DSIG" in the Open
* Type Specification.
*/
- public final static int TAG_DSIG = 0x44534947;
+ public static final int TAG_DSIG = 0x44534947;
/**
* Font program. Table tag "fpgm" in the Open
* Type Specification.
*/
- public final static int TAG_FPGM = 0x6670676d;
+ public static final int TAG_FPGM = 0x6670676d;
/**
* Font variation. Table tag "fvar" in the Open
* Type Specification.
*/
- public final static int TAG_FVAR = 0x66766172;
+ public static final int TAG_FVAR = 0x66766172;
/**
* Glyph variation. Table tag "gvar" in the Open
* Type Specification.
*/
- public final static int TAG_GVAR = 0x67766172;
+ public static final int TAG_GVAR = 0x67766172;
/**
* Compact font format (Type1 font). Table tag
* "CFF " in the Open Type Specification.
*/
- public final static int TAG_CFF = 0x43464620;
+ public static final int TAG_CFF = 0x43464620;
/**
* Multiple master supplementary data. Table tag
* "MMSD" in the Open Type Specification.
*/
- public final static int TAG_MMSD = 0x4d4d5344;
+ public static final int TAG_MMSD = 0x4d4d5344;
/**
* Multiple master font metrics. Table tag
* "MMFX" in the Open Type Specification.
*/
- public final static int TAG_MMFX = 0x4d4d4658;
+ public static final int TAG_MMFX = 0x4d4d4658;
/**
* Baseline data. Table tag "BASE" in the Open
* Type Specification.
*/
- public final static int TAG_BASE = 0x42415345;
+ public static final int TAG_BASE = 0x42415345;
/**
* Glyph definition. Table tag "GDEF" in the Open
* Type Specification.
*/
- public final static int TAG_GDEF = 0x47444546;
+ public static final int TAG_GDEF = 0x47444546;
/**
* Glyph positioning. Table tag "GPOS" in the Open
* Type Specification.
*/
- public final static int TAG_GPOS = 0x47504f53;
+ public static final int TAG_GPOS = 0x47504f53;
/**
* Justification. Table tag "JSTF" in the Open
* Type Specification.
*/
- public final static int TAG_JSTF = 0x4a535446;
+ public static final int TAG_JSTF = 0x4a535446;
/**
* Embedded bitmap data. Table tag "EBDT" in the Open
* Type Specification.
*/
- public final static int TAG_EBDT = 0x45424454;
+ public static final int TAG_EBDT = 0x45424454;
/**
* Embedded bitmap location. Table tag "EBLC" in the Open
* Type Specification.
*/
- public final static int TAG_EBLC = 0x45424c43;
+ public static final int TAG_EBLC = 0x45424c43;
/**
* Embedded bitmap scaling. Table tag "EBSC" in the Open
* Type Specification.
*/
- public final static int TAG_EBSC = 0x45425343;
+ public static final int TAG_EBSC = 0x45425343;
/**
* Linear threshold. Table tag "LTSH" in the Open
* Type Specification.
*/
- public final static int TAG_LTSH = 0x4c545348;
+ public static final int TAG_LTSH = 0x4c545348;
/**
* PCL 5 data. Table tag "PCLT" in the Open
* Type Specification.
*/
- public final static int TAG_PCLT = 0x50434c54;
+ public static final int TAG_PCLT = 0x50434c54;
/**
* Accent attachment. Table tag "acnt" in the Open
* Type Specification.
*/
- public final static int TAG_ACNT = 0x61636e74;
+ public static final int TAG_ACNT = 0x61636e74;
/**
* Axis variation. Table tag "avar" in the Open
* Type Specification.
*/
- public final static int TAG_AVAR = 0x61766172;
+ public static final int TAG_AVAR = 0x61766172;
/**
* Bitmap data. Table tag "bdat" in the Open
* Type Specification.
*/
- public final static int TAG_BDAT = 0x62646174;
+ public static final int TAG_BDAT = 0x62646174;
/**
* Bitmap location. Table tag "bloc" in the Open
* Type Specification.
*/
- public final static int TAG_BLOC = 0x626c6f63;
+ public static final int TAG_BLOC = 0x626c6f63;
/**
* CVT variation. Table tag "cvar" in the Open
* Type Specification.
*/
- public final static int TAG_CVAR = 0x63766172;
+ public static final int TAG_CVAR = 0x63766172;
/**
* Feature name. Table tag "feat" in the Open
* Type Specification.
*/
- public final static int TAG_FEAT = 0x66656174;
+ public static final int TAG_FEAT = 0x66656174;
/**
* Font descriptors. Table tag "fdsc" in the Open
* Type Specification.
*/
- public final static int TAG_FDSC = 0x66647363;
+ public static final int TAG_FDSC = 0x66647363;
/**
* Font metrics. Table tag "fmtx" in the Open
* Type Specification.
*/
- public final static int TAG_FMTX = 0x666d7478;
+ public static final int TAG_FMTX = 0x666d7478;
/**
* Justification. Table tag "just" in the Open
* Type Specification.
*/
- public final static int TAG_JUST = 0x6a757374;
+ public static final int TAG_JUST = 0x6a757374;
/**
* Ligature caret. Table tag "lcar" in the Open
* Type Specification.
*/
- public final static int TAG_LCAR = 0x6c636172;
+ public static final int TAG_LCAR = 0x6c636172;
/**
* Glyph metamorphosis. Table tag "mort" in the Open
* Type Specification.
*/
- public final static int TAG_MORT = 0x6d6f7274;
+ public static final int TAG_MORT = 0x6d6f7274;
/**
* Optical bounds. Table tag "opbd" in the Open
* Type Specification.
*/
- public final static int TAG_OPBD = 0x6F706264;
+ public static final int TAG_OPBD = 0x6F706264;
/**
* Glyph properties. Table tag "prop" in the Open
* Type Specification.
*/
- public final static int TAG_PROP = 0x70726f70;
+ public static final int TAG_PROP = 0x70726f70;
/**
* Tracking. Table tag "trak" in the Open
* Type Specification.
*/
- public final static int TAG_TRAK = 0x7472616b;
+ public static final int TAG_TRAK = 0x7472616b;
/**
* Returns the version of the <code>OpenType</code> font.
--- a/jdk/src/java.desktop/share/classes/java/awt/geom/Arc2D.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/geom/Arc2D.java Mon Oct 05 13:45:50 2015 -0700
@@ -60,7 +60,7 @@
* connecting the two ends of the arc segment.
* @since 1.2
*/
- public final static int OPEN = 0;
+ public static final int OPEN = 0;
/**
* The closure type for an arc closed by drawing a straight
@@ -68,7 +68,7 @@
* arc segment.
* @since 1.2
*/
- public final static int CHORD = 1;
+ public static final int CHORD = 1;
/**
* The closure type for an arc closed by drawing straight line
@@ -76,7 +76,7 @@
* of the full ellipse and from that point to the end of the arc segment.
* @since 1.2
*/
- public final static int PIE = 2;
+ public static final int PIE = 2;
/**
* This class defines an arc specified in {@code float} precision.
--- a/jdk/src/java.desktop/share/classes/java/awt/geom/Path2D.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/geom/Path2D.java Mon Oct 05 13:45:50 2015 -0700
@@ -2675,7 +2675,7 @@
}
}
- static abstract class Iterator implements PathIterator {
+ abstract static class Iterator implements PathIterator {
int typeIdx;
int pointIdx;
Path2D path;
--- a/jdk/src/java.desktop/share/classes/java/awt/im/InputMethodHighlight.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/im/InputMethodHighlight.java Mon Oct 05 13:45:50 2015 -0700
@@ -71,36 +71,36 @@
/**
* Constant for the raw text state.
*/
- public final static int RAW_TEXT = 0;
+ public static final int RAW_TEXT = 0;
/**
* Constant for the converted text state.
*/
- public final static int CONVERTED_TEXT = 1;
+ public static final int CONVERTED_TEXT = 1;
/**
* Constant for the default highlight for unselected raw text.
*/
- public final static InputMethodHighlight UNSELECTED_RAW_TEXT_HIGHLIGHT =
+ public static final InputMethodHighlight UNSELECTED_RAW_TEXT_HIGHLIGHT =
new InputMethodHighlight(false, RAW_TEXT);
/**
* Constant for the default highlight for selected raw text.
*/
- public final static InputMethodHighlight SELECTED_RAW_TEXT_HIGHLIGHT =
+ public static final InputMethodHighlight SELECTED_RAW_TEXT_HIGHLIGHT =
new InputMethodHighlight(true, RAW_TEXT);
/**
* Constant for the default highlight for unselected converted text.
*/
- public final static InputMethodHighlight UNSELECTED_CONVERTED_TEXT_HIGHLIGHT =
+ public static final InputMethodHighlight UNSELECTED_CONVERTED_TEXT_HIGHLIGHT =
new InputMethodHighlight(false, CONVERTED_TEXT);
/**
* Constant for the default highlight for selected converted text.
*/
- public final static InputMethodHighlight SELECTED_CONVERTED_TEXT_HIGHLIGHT =
+ public static final InputMethodHighlight SELECTED_CONVERTED_TEXT_HIGHLIGHT =
new InputMethodHighlight(true, CONVERTED_TEXT);
--- a/jdk/src/java.desktop/share/classes/java/awt/image/BufferedImage.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/BufferedImage.java Mon Oct 05 13:45:50 2015 -0700
@@ -281,7 +281,7 @@
private static final int DCM_BGR_BLU_MASK = 0xff0000;
- static private native void initIDs();
+ private static native void initIDs();
static {
ColorModel.loadLibraries();
initIDs();
--- a/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/ColorModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -403,7 +403,7 @@
* @return <code>true</code> if alpha is supported in this
* <code>ColorModel</code>; <code>false</code> otherwise.
*/
- final public boolean hasAlpha() {
+ public final boolean hasAlpha() {
return supportsAlpha;
}
@@ -419,7 +419,7 @@
* in the pixel values to be translated by this
* <code>ColorModel</code>; <code>false</code> otherwise.
*/
- final public boolean isAlphaPremultiplied() {
+ public final boolean isAlphaPremultiplied() {
return isAlphaPremultiplied;
}
@@ -430,7 +430,7 @@
* @return the transfer type.
* @since 1.3
*/
- final public int getTransferType() {
+ public final int getTransferType() {
return transferType;
}
@@ -1512,7 +1512,7 @@
* @return the <code>ColorSpace</code> of this
* <code>ColorModel</code>.
*/
- final public ColorSpace getColorSpace() {
+ public final ColorSpace getColorSpace() {
return colorSpace;
}
--- a/jdk/src/java.desktop/share/classes/java/awt/image/DirectColorModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/DirectColorModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -266,7 +266,7 @@
* @return the mask, which indicates which bits of the <code>int</code>
* pixel representation contain the red color sample.
*/
- final public int getRedMask() {
+ public final int getRedMask() {
return maskArray[0];
}
@@ -276,7 +276,7 @@
* @return the mask, which indicates which bits of the <code>int</code>
* pixel representation contain the green color sample.
*/
- final public int getGreenMask() {
+ public final int getGreenMask() {
return maskArray[1];
}
@@ -286,7 +286,7 @@
* @return the mask, which indicates which bits of the <code>int</code>
* pixel representation contain the blue color sample.
*/
- final public int getBlueMask() {
+ public final int getBlueMask() {
return maskArray[2];
}
@@ -296,7 +296,7 @@
* @return the mask, which indicates which bits of the <code>int</code>
* pixel representation contain the alpha sample.
*/
- final public int getAlphaMask() {
+ public final int getAlphaMask() {
if (supportsAlpha) {
return maskArray[3];
} else {
@@ -365,7 +365,7 @@
* @return the red color component for the specified pixel, from
* 0 to 255 in the sRGB <code>ColorSpace</code>.
*/
- final public int getRed(int pixel) {
+ public final int getRed(int pixel) {
if (is_sRGB) {
return getsRGBComponentFromsRGB(pixel, 0);
} else if (is_LinearRGB) {
@@ -388,7 +388,7 @@
* @return the green color component for the specified pixel, from
* 0 to 255 in the sRGB <code>ColorSpace</code>.
*/
- final public int getGreen(int pixel) {
+ public final int getGreen(int pixel) {
if (is_sRGB) {
return getsRGBComponentFromsRGB(pixel, 1);
} else if (is_LinearRGB) {
@@ -411,7 +411,7 @@
* @return the blue color component for the specified pixel, from
* 0 to 255 in the sRGB <code>ColorSpace</code>.
*/
- final public int getBlue(int pixel) {
+ public final int getBlue(int pixel) {
if (is_sRGB) {
return getsRGBComponentFromsRGB(pixel, 2);
} else if (is_LinearRGB) {
@@ -428,7 +428,7 @@
* @return the value of the alpha component of <code>pixel</code>
* from 0 to 255.
*/
- final public int getAlpha(int pixel) {
+ public final int getAlpha(int pixel) {
if (!supportsAlpha) return 255;
int a = ((pixel & maskArray[3]) >>> maskOffsets[3]);
if (scaleFactors[3] != 1.0f) {
@@ -450,7 +450,7 @@
* pixel.
* @see ColorModel#getRGBdefault
*/
- final public int getRGB(int pixel) {
+ public final int getRGB(int pixel) {
if (is_sRGB || is_LinearRGB) {
return (getAlpha(pixel) << 24)
| (getRed(pixel) << 16)
@@ -923,7 +923,7 @@
* @return an array containing the color and alpha components of the
* specified pixel starting at the specified offset.
*/
- final public int[] getComponents(int pixel, int[] components, int offset) {
+ public final int[] getComponents(int pixel, int[] components, int offset) {
if (components == null) {
components = new int[offset+numComponents];
}
@@ -974,7 +974,7 @@
* <code>transferType</code> is not supported by this
* color model
*/
- final public int[] getComponents(Object pixel, int[] components,
+ public final int[] getComponents(Object pixel, int[] components,
int offset) {
int intpixel=0;
switch (transferType) {
@@ -1010,7 +1010,7 @@
* @see WritableRaster
* @see SampleModel
*/
- final public WritableRaster createCompatibleWritableRaster (int w,
+ public final WritableRaster createCompatibleWritableRaster (int w,
int h) {
if ((w <= 0) || (h <= 0)) {
throw new IllegalArgumentException("Width (" + w + ") and height (" + h +
@@ -1173,7 +1173,7 @@
* <code>transferType</code> is not supported by this
* color model
*/
- final public ColorModel coerceData (WritableRaster raster,
+ public final ColorModel coerceData (WritableRaster raster,
boolean isAlphaPremultiplied)
{
if (!supportsAlpha ||
--- a/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -135,7 +135,7 @@
private static int[] opaqueBits = {8, 8, 8};
private static int[] alphaBits = {8, 8, 8, 8};
- static private native void initIDs();
+ private static native void initIDs();
static {
ColorModel.loadLibraries();
initIDs();
@@ -634,7 +634,7 @@
* <code>IndexColorModel</code>.
* @return the size of the color and alpha component arrays.
*/
- final public int getMapSize() {
+ public final int getMapSize() {
return map_size;
}
@@ -650,7 +650,7 @@
* <code>IndexColorModel</code> object, or -1 if there
* is no such pixel
*/
- final public int getTransparentPixel() {
+ public final int getTransparentPixel() {
return transparent_index;
}
@@ -661,7 +661,7 @@
* @param r the specified array into which the elements of the
* array of red color components are copied
*/
- final public void getReds(byte r[]) {
+ public final void getReds(byte r[]) {
for (int i = 0; i < map_size; i++) {
r[i] = (byte) (rgb[i] >> 16);
}
@@ -674,7 +674,7 @@
* @param g the specified array into which the elements of the
* array of green color components are copied
*/
- final public void getGreens(byte g[]) {
+ public final void getGreens(byte g[]) {
for (int i = 0; i < map_size; i++) {
g[i] = (byte) (rgb[i] >> 8);
}
@@ -687,7 +687,7 @@
* @param b the specified array into which the elements of the
* array of blue color components are copied
*/
- final public void getBlues(byte b[]) {
+ public final void getBlues(byte b[]) {
for (int i = 0; i < map_size; i++) {
b[i] = (byte) rgb[i];
}
@@ -700,7 +700,7 @@
* @param a the specified array into which the elements of the
* array of alpha components are copied
*/
- final public void getAlphas(byte a[]) {
+ public final void getAlphas(byte a[]) {
for (int i = 0; i < map_size; i++) {
a[i] = (byte) (rgb[i] >> 24);
}
@@ -717,7 +717,7 @@
* values from this array of color and alpha components
* are copied.
*/
- final public void getRGBs(int rgb[]) {
+ public final void getRGBs(int rgb[]) {
System.arraycopy(this.rgb, 0, rgb, 0, map_size);
}
@@ -776,7 +776,7 @@
* @param pixel the specified pixel
* @return the value of the red color component for the specified pixel
*/
- final public int getRed(int pixel) {
+ public final int getRed(int pixel) {
return (rgb[pixel & pixel_mask] >> 16) & 0xff;
}
@@ -791,7 +791,7 @@
* @param pixel the specified pixel
* @return the value of the green color component for the specified pixel
*/
- final public int getGreen(int pixel) {
+ public final int getGreen(int pixel) {
return (rgb[pixel & pixel_mask] >> 8) & 0xff;
}
@@ -806,7 +806,7 @@
* @param pixel the specified pixel
* @return the value of the blue color component for the specified pixel
*/
- final public int getBlue(int pixel) {
+ public final int getBlue(int pixel) {
return rgb[pixel & pixel_mask] & 0xff;
}
@@ -819,7 +819,7 @@
* @param pixel the specified pixel
* @return the value of the alpha component for the specified pixel
*/
- final public int getAlpha(int pixel) {
+ public final int getAlpha(int pixel) {
return (rgb[pixel & pixel_mask] >> 24) & 0xff;
}
@@ -834,7 +834,7 @@
* @return the color and alpha components of the specified pixel
* @see ColorModel#getRGBdefault
*/
- final public int getRGB(int pixel) {
+ public final int getRGB(int pixel) {
return rgb[pixel & pixel_mask];
}
--- a/jdk/src/java.desktop/share/classes/java/awt/image/Kernel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/Kernel.java Mon Oct 05 13:45:50 2015 -0700
@@ -83,7 +83,7 @@
* Returns the X origin of this <code>Kernel</code>.
* @return the X origin.
*/
- final public int getXOrigin(){
+ public final int getXOrigin(){
return xOrigin;
}
@@ -91,7 +91,7 @@
* Returns the Y origin of this <code>Kernel</code>.
* @return the Y origin.
*/
- final public int getYOrigin() {
+ public final int getYOrigin() {
return yOrigin;
}
@@ -99,7 +99,7 @@
* Returns the width of this <code>Kernel</code>.
* @return the width of this <code>Kernel</code>.
*/
- final public int getWidth() {
+ public final int getWidth() {
return width;
}
@@ -107,7 +107,7 @@
* Returns the height of this <code>Kernel</code>.
* @return the height of this <code>Kernel</code>.
*/
- final public int getHeight() {
+ public final int getHeight() {
return height;
}
@@ -123,7 +123,7 @@
* @throws IllegalArgumentException if <code>data</code> is less
* than the size of this <code>Kernel</code>
*/
- final public float[] getKernelData(float[] data) {
+ public final float[] getKernelData(float[] data) {
if (data == null) {
data = new float[this.data.length];
}
--- a/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/PackedColorModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -240,7 +240,7 @@
* <code>PackedColorModel</code> or if <code>index</code> is
* less than zero
*/
- final public int getMask(int index) {
+ public final int getMask(int index) {
return maskArray[index];
}
@@ -251,7 +251,7 @@
* <code>int</code> pixel
* representation contain the color or alpha samples.
*/
- final public int[] getMasks() {
+ public final int[] getMasks() {
return maskArray.clone();
}
@@ -415,7 +415,7 @@
return true;
}
- private final static int[] createBitsArray(int[]colorMaskArray,
+ private static final int[] createBitsArray(int[]colorMaskArray,
int alphaMask) {
int numColors = colorMaskArray.length;
int numAlpha = (alphaMask == 0 ? 0 : 1);
@@ -438,7 +438,7 @@
return arr;
}
- private final static int[] createBitsArray(int rmask, int gmask, int bmask,
+ private static final int[] createBitsArray(int rmask, int gmask, int bmask,
int amask) {
int[] arr = new int[3 + (amask == 0 ? 0 : 1)];
arr[0] = countBits(rmask);
@@ -466,7 +466,7 @@
return arr;
}
- private final static int countBits(int mask) {
+ private static final int countBits(int mask) {
int count = 0;
if (mask != 0) {
while ((mask & 1) == 0) {
--- a/jdk/src/java.desktop/share/classes/java/awt/image/Raster.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/Raster.java Mon Oct 05 13:45:50 2015 -0700
@@ -167,7 +167,7 @@
/** The parent of this Raster, or null. */
protected Raster parent;
- static private native void initIDs();
+ private static native void initIDs();
static {
ColorModel.loadLibraries();
initIDs();
@@ -1139,7 +1139,7 @@
* @return the X translation from the coordinate space of the
* Raster's SampleModel to that of the Raster.
*/
- final public int getSampleModelTranslateX() {
+ public final int getSampleModelTranslateX() {
return sampleModelTranslateX;
}
@@ -1151,7 +1151,7 @@
* @return the Y translation from the coordinate space of the
* Raster's SampleModel to that of the Raster.
*/
- final public int getSampleModelTranslateY() {
+ public final int getSampleModelTranslateY() {
return sampleModelTranslateY;
}
@@ -1360,35 +1360,35 @@
/** Returns the minimum valid X coordinate of the Raster.
* @return the minimum x coordinate of this <code>Raster</code>.
*/
- final public int getMinX() {
+ public final int getMinX() {
return minX;
}
/** Returns the minimum valid Y coordinate of the Raster.
* @return the minimum y coordinate of this <code>Raster</code>.
*/
- final public int getMinY() {
+ public final int getMinY() {
return minY;
}
/** Returns the width in pixels of the Raster.
* @return the width of this <code>Raster</code>.
*/
- final public int getWidth() {
+ public final int getWidth() {
return width;
}
/** Returns the height in pixels of the Raster.
* @return the height of this <code>Raster</code>.
*/
- final public int getHeight() {
+ public final int getHeight() {
return height;
}
/** Returns the number of bands (samples per pixel) in this Raster.
* @return the number of bands of this <code>Raster</code>.
*/
- final public int getNumBands() {
+ public final int getNumBands() {
return numBands;
}
@@ -1403,7 +1403,7 @@
* as the storage data type of the DataBuffer.
* @return the number of data elements.
*/
- final public int getNumDataElements() {
+ public final int getNumDataElements() {
return sampleModel.getNumDataElements();
}
@@ -1419,7 +1419,7 @@
* be one of the types defined in DataBuffer.
* @return this transfer type.
*/
- final public int getTransferType() {
+ public final int getTransferType() {
return sampleModel.getTransferType();
}
--- a/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/RescaleOp.java Mon Oct 05 13:45:50 2015 -0700
@@ -142,7 +142,7 @@
* this <code>RescaleOp</code>
* @return the scale factors of this <code>RescaleOp</code>.
*/
- final public float[] getScaleFactors (float scaleFactors[]) {
+ public final float[] getScaleFactors (float scaleFactors[]) {
if (scaleFactors == null) {
return this.scaleFactors.clone();
}
@@ -160,7 +160,7 @@
* this <code>RescaleOp</code>
* @return the offsets of this <code>RescaleOp</code>.
*/
- final public float[] getOffsets(float offsets[]) {
+ public final float[] getOffsets(float offsets[]) {
if (offsets == null) {
return this.offsets.clone();
}
@@ -176,7 +176,7 @@
* @return the number of scaling factors and offsets of this
* <code>RescaleOp</code>.
*/
- final public int getNumFactors() {
+ public final int getNumFactors() {
return length;
}
--- a/jdk/src/java.desktop/share/classes/java/awt/image/SampleModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/image/SampleModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -99,7 +99,7 @@
*/
protected int dataType;
- static private native void initIDs();
+ private static native void initIDs();
static {
ColorModel.loadLibraries();
initIDs();
@@ -153,7 +153,7 @@
* @return the width in pixels of the region of image data
* that this <code>SampleModel</code> describes.
*/
- final public int getWidth() {
+ public final int getWidth() {
return width;
}
@@ -161,7 +161,7 @@
* @return the height in pixels of the region of image data
* that this <code>SampleModel</code> describes.
*/
- final public int getHeight() {
+ public final int getHeight() {
return height;
}
@@ -169,7 +169,7 @@
* @return the number of bands of image data that this
* <code>SampleModel</code> describes.
*/
- final public int getNumBands() {
+ public final int getNumBands() {
return numBands;
}
@@ -193,7 +193,7 @@
/** Returns the data type of the DataBuffer storing the pixel data.
* @return the data type.
*/
- final public int getDataType() {
+ public final int getDataType() {
return dataType;
}
--- a/jdk/src/java.desktop/share/classes/java/beans/BeanInfo.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/beans/BeanInfo.java Mon Oct 05 13:45:50 2015 -0700
@@ -159,20 +159,20 @@
/**
* Constant to indicate a 16 x 16 color icon.
*/
- final static int ICON_COLOR_16x16 = 1;
+ static final int ICON_COLOR_16x16 = 1;
/**
* Constant to indicate a 32 x 32 color icon.
*/
- final static int ICON_COLOR_32x32 = 2;
+ static final int ICON_COLOR_32x32 = 2;
/**
* Constant to indicate a 16 x 16 monochrome icon.
*/
- final static int ICON_MONO_16x16 = 3;
+ static final int ICON_MONO_16x16 = 3;
/**
* Constant to indicate a 32 x 32 monochrome icon.
*/
- final static int ICON_MONO_32x32 = 4;
+ static final int ICON_MONO_32x32 = 4;
}
--- a/jdk/src/java.desktop/share/classes/java/beans/Introspector.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/beans/Introspector.java Mon Oct 05 13:45:50 2015 -0700
@@ -102,17 +102,17 @@
* Flag to indicate to use of all beaninfo.
* @since 1.2
*/
- public final static int USE_ALL_BEANINFO = 1;
+ public static final int USE_ALL_BEANINFO = 1;
/**
* Flag to indicate to ignore immediate beaninfo.
* @since 1.2
*/
- public final static int IGNORE_IMMEDIATE_BEANINFO = 2;
+ public static final int IGNORE_IMMEDIATE_BEANINFO = 2;
/**
* Flag to indicate to ignore all beaninfo.
* @since 1.2
*/
- public final static int IGNORE_ALL_BEANINFO = 3;
+ public static final int IGNORE_ALL_BEANINFO = 3;
// Static Caches to speed up introspection.
private static final WeakCache<Class<?>, Method[]> declaredMethodCache = new WeakCache<>();
@@ -139,7 +139,7 @@
// events maps from String names to EventSetDescriptors
private Map<String, EventSetDescriptor> events;
- private final static EventSetDescriptor[] EMPTY_EVENTSETDESCRIPTORS = new EventSetDescriptor[0];
+ private static final EventSetDescriptor[] EMPTY_EVENTSETDESCRIPTORS = new EventSetDescriptor[0];
static final String ADD_PREFIX = "add";
static final String REMOVE_PREFIX = "remove";
--- a/jdk/src/java.desktop/share/classes/java/beans/MetaData.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/beans/MetaData.java Mon Oct 05 13:45:50 2015 -0700
@@ -356,7 +356,7 @@
*
* @author Sergey A. Malenkov
*/
-private static abstract class java_util_Collections extends PersistenceDelegate {
+private abstract static class java_util_Collections extends PersistenceDelegate {
protected boolean mutatesTo(Object oldInstance, Object newInstance) {
if (!super.mutatesTo(oldInstance, newInstance)) {
return false;
@@ -1319,7 +1319,7 @@
}
@SuppressWarnings("rawtypes")
- public synchronized static PersistenceDelegate getPersistenceDelegate(Class type) {
+ public static synchronized PersistenceDelegate getPersistenceDelegate(Class type) {
if (type == null) {
return nullPersistenceDelegate;
}
--- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleRole.java Mon Oct 05 13:45:50 2015 -0700
@@ -588,7 +588,7 @@
*
* @since 1.5
*/
- static public final AccessibleRole EDITBAR =
+ public static final AccessibleRole EDITBAR =
new AccessibleRole("editbar");
/**
@@ -597,7 +597,7 @@
*
* @since 1.5
*/
- static public final AccessibleRole PROGRESS_MONITOR =
+ public static final AccessibleRole PROGRESS_MONITOR =
new AccessibleRole("progressMonitor");
--- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleState.java Mon Oct 05 13:45:50 2015 -0700
@@ -353,7 +353,7 @@
*
* @since 1.5
*/
- static public final AccessibleState TRUNCATED
+ public static final AccessibleState TRUNCATED
= new AccessibleState("truncated");
/**
--- a/jdk/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadataFormatImpl.java Mon Oct 05 13:45:50 2015 -0700
@@ -1252,7 +1252,7 @@
// Standard format descriptor
- private synchronized static void createStandardFormat() {
+ private static synchronized void createStandardFormat() {
if (standardFormat == null) {
standardFormat = new StandardMetadataFormat();
}
--- a/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MediaSize.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/print/attribute/standard/MediaSize.java Mon Oct 05 13:45:50 2015 -0700
@@ -288,7 +288,7 @@
* Class MediaSize.ISO includes {@link MediaSize MediaSize} values for ISO
* media.
*/
- public final static class ISO {
+ public static final class ISO {
/**
* Specifies the ISO A0 size, 841 mm by 1189 mm.
*/
@@ -437,7 +437,7 @@
* Class MediaSize.JIS includes {@link MediaSize MediaSize} values for JIS
* (Japanese) media. *
*/
- public final static class JIS {
+ public static final class JIS {
/**
* Specifies the JIS B0 size, 1030 mm by 1456 mm.
@@ -601,7 +601,7 @@
* Class MediaSize.NA includes {@link MediaSize MediaSize} values for North
* American media.
*/
- public final static class NA {
+ public static final class NA {
/**
* Specifies the North American letter size, 8.5 inches by 11 inches.
@@ -721,7 +721,7 @@
* Class MediaSize.Engineering includes {@link MediaSize MediaSize} values
* for engineering media.
*/
- public final static class Engineering {
+ public static final class Engineering {
/**
* Specifies the engineering A size, 8.5 inch by 11 inch.
@@ -764,7 +764,7 @@
* Class MediaSize.Other includes {@link MediaSize MediaSize} values for
* miscellaneous media.
*/
- public final static class Other {
+ public static final class Other {
/**
* Specifies the executive size, 7.25 inches by 10.5 inches.
*/
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java Mon Oct 05 13:45:50 2015 -0700
@@ -214,7 +214,7 @@
return length;
}
- private final static long mask = 0x7F;
+ private static final long mask = 0x7F;
private void writeVarInt(byte[] data, int off, long value) {
int shift=63; // number of bitwise left-shifts of mask
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java Mon Oct 05 13:45:50 2015 -0700
@@ -335,7 +335,7 @@
/**
* Obtains the version of the device.
*
- * @return textual version information for the device.
+ * @return textual version information for the device
*/
public final String getVersion() {
return version;
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/Synthesizer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/Synthesizer.java Mon Oct 05 13:45:50 2015 -0700
@@ -344,7 +344,7 @@
* Opens the receiver.
*
* @throws MidiUnavailableException if the receiver is cannot be opened,
- * usually because the MIDI device is in use by another application.
+ * usually because the MIDI device is in use by another application
* @throws SecurityException if the receiver cannot be opened due to
* security restrictions
*/
--- a/jdk/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java Mon Oct 05 13:45:50 2015 -0700
@@ -124,7 +124,7 @@
* including the status byte; it should be non-negative and less
* than or equal to {@code data.length}
* @throws InvalidMidiDataException if the parameter values do not specify a
- * valid MIDI meta message.
+ * valid MIDI meta message
* @see #setMessage(byte[], int)
* @see #setMessage(int, byte[], int)
* @see #getData()
--- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioInputStream.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/AudioInputStream.java Mon Oct 05 13:45:50 2015 -0700
@@ -392,7 +392,7 @@
* Marks the current position in this audio input stream.
*
* @param readlimit the maximum number of bytes that can be read before the
- * mark position becomes invalid.
+ * mark position becomes invalid
* @see #reset
* @see #markSupported
*/
--- a/jdk/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java Mon Oct 05 13:45:50 2015 -0700
@@ -82,7 +82,7 @@
* @param position the number of sample frames that the line had already
* processed when the event occurred, or
* {@link AudioSystem#NOT_SPECIFIED}
- * @throws IllegalArgumentException if {@code line} is {@code null}.
+ * @throws IllegalArgumentException if {@code line} is {@code null}
*/
public LineEvent(Line line, Type type, long position) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/AbstractCellEditor.java Mon Oct 05 13:45:50 2015 -0700
@@ -60,7 +60,7 @@
/**
* The change event.
*/
- transient protected ChangeEvent changeEvent = null;
+ protected transient ChangeEvent changeEvent = null;
// Force this to be implemented.
// public Object getCellEditorValue()
--- a/jdk/src/java.desktop/share/classes/javax/swing/BorderFactory.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/BorderFactory.java Mon Oct 05 13:45:50 2015 -0700
@@ -536,7 +536,7 @@
titlePosition, titleFont, titleColor);
}
//// EmptyBorder ///////////////////////////////////////////////////////////
- final static Border emptyBorder = new EmptyBorder(0, 0, 0, 0);
+ static final Border emptyBorder = new EmptyBorder(0, 0, 0, 0);
/**
* Creates an empty border that takes up no space. (The width
--- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultButtonModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -89,33 +89,33 @@
* indicates partial commitment towards choosing/triggering
* the button.
*/
- public final static int ARMED = 1 << 0;
+ public static final int ARMED = 1 << 0;
/**
* Identifies the "selected" bit in the bitmask, which
* indicates that the button has been selected. Only needed for
* certain types of buttons - such as radio button or check box.
*/
- public final static int SELECTED = 1 << 1;
+ public static final int SELECTED = 1 << 1;
/**
* Identifies the "pressed" bit in the bitmask, which
* indicates that the button is pressed.
*/
- public final static int PRESSED = 1 << 2;
+ public static final int PRESSED = 1 << 2;
/**
* Identifies the "enabled" bit in the bitmask, which
* indicates that the button can be selected by
* an input device (such as a mouse pointer).
*/
- public final static int ENABLED = 1 << 3;
+ public static final int ENABLED = 1 << 3;
/**
* Identifies the "rollover" bit in the bitmask, which
* indicates that the mouse is over the button.
*/
- public final static int ROLLOVER = 1 << 4;
+ public static final int ROLLOVER = 1 << 4;
/**
* {@inheritDoc}
--- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java Mon Oct 05 13:45:50 2015 -0700
@@ -50,11 +50,11 @@
*/
@SuppressWarnings("serial") // No Interesting Non-Transient State
public class DefaultDesktopManager implements DesktopManager, java.io.Serializable {
- final static String HAS_BEEN_ICONIFIED_PROPERTY = "wasIconOnce";
+ static final String HAS_BEEN_ICONIFIED_PROPERTY = "wasIconOnce";
- final static int DEFAULT_DRAG_MODE = 0;
- final static int OUTLINE_DRAG_MODE = 1;
- final static int FASTER_DRAG_MODE = 2;
+ static final int DEFAULT_DRAG_MODE = 0;
+ static final int OUTLINE_DRAG_MODE = 1;
+ static final int FASTER_DRAG_MODE = 2;
int dragMode = DEFAULT_DRAG_MODE;
--- a/jdk/src/java.desktop/share/classes/javax/swing/GroupLayout.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/GroupLayout.java Mon Oct 05 13:45:50 2015 -0700
@@ -3391,7 +3391,7 @@
* Represents two springs that should have autopadding inserted between
* them.
*/
- private final static class AutoPreferredGapMatch {
+ private static final class AutoPreferredGapMatch {
public final ComponentSpring source;
public final ComponentSpring target;
--- a/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java Mon Oct 05 13:45:50 2015 -0700
@@ -74,8 +74,8 @@
* images symbolically rather than including the image data
* in the archive.
*/
- transient private String filename;
- transient private URL location;
+ private transient String filename;
+ private transient URL location;
transient Image image;
transient int loadStatus = 0;
@@ -88,7 +88,7 @@
* @deprecated since 1.8
*/
@Deprecated
- protected final static Component component;
+ protected static final Component component;
/**
* Do not use this shared media tracker, which is used to load images.
@@ -96,7 +96,7 @@
* @deprecated since 1.8
*/
@Deprecated
- protected final static MediaTracker tracker;
+ protected static final MediaTracker tracker;
static {
component = AccessController.doPrivileged(new PrivilegedAction<Component>() {
@@ -144,7 +144,7 @@
*/
private static int mediaTrackerID;
- private final static Object TRACKER_KEY = new StringBuilder("TRACKER_KEY");
+ private static final Object TRACKER_KEY = new StringBuilder("TRACKER_KEY");
int width = -1;
int height = -1;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java Mon Oct 05 13:45:50 2015 -0700
@@ -377,8 +377,8 @@
/**
* AA text hints.
*/
- transient private Object aaHint;
- transient private Object lcdRenderingHint;
+ private transient Object aaHint;
+ private transient Object lcdRenderingHint;
static Graphics safelyGetGraphics(Component c) {
return safelyGetGraphics(c, SwingUtilities.getRoot(c));
@@ -2805,7 +2805,7 @@
* @see #setLocale
* @since 1.4
*/
- static public Locale getDefaultLocale() {
+ public static Locale getDefaultLocale() {
Locale l = (Locale) SwingUtilities.appContextGet(defaultLocale);
if( l == null ) {
//REMIND(bcb) choosing the default value is more complicated
@@ -2832,7 +2832,7 @@
* @see #setLocale
* @since 1.4
*/
- static public void setDefaultLocale( Locale l ) {
+ public static void setDefaultLocale( Locale l ) {
SwingUtilities.appContextPut(defaultLocale, l);
}
@@ -3714,7 +3714,7 @@
* to add/remove ContainerListener and FocusListener to track
* target JComponent's state
*/
- private volatile transient int propertyListenersCount = 0;
+ private transient volatile int propertyListenersCount = 0;
/**
* This field duplicates the function of the accessibleAWTFocusHandler field
@@ -4064,8 +4064,6 @@
return aaHint;
} else if (key == RenderingHints.KEY_TEXT_LCD_CONTRAST) {
return lcdRenderingHint;
- } else if (key == SwingUtilities2.COMPONENT_UI_PROPERTY_KEY) {
- return ui;
}
if(clientProperties == null) {
return null;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java Mon Oct 05 13:45:50 2015 -0700
@@ -1537,7 +1537,7 @@
private Hashtable<String, Object> pageProperties;
/** Should be kept in sync with javax.swing.text.html.FormView counterpart. */
- final static String PostDataProperty = "javax.swing.JEditorPane.postdata";
+ static final String PostDataProperty = "javax.swing.JEditorPane.postdata";
/**
* Table of registered type handlers for this editor.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFormattedTextField.java Mon Oct 05 13:45:50 2015 -0700
@@ -860,7 +860,7 @@
* doesn't have focus.
* @since 1.4
*/
- public static abstract class AbstractFormatterFactory {
+ public abstract static class AbstractFormatterFactory {
/**
* Returns an <code>AbstractFormatter</code> that can handle formatting
* of the passed in <code>JFormattedTextField</code>.
@@ -903,7 +903,7 @@
* at the appropriate times.
* @since 1.4
*/
- public static abstract class AbstractFormatter implements Serializable {
+ public abstract static class AbstractFormatter implements Serializable {
private JFormattedTextField ftf;
/**
--- a/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java Mon Oct 05 13:45:50 2015 -0700
@@ -198,31 +198,31 @@
private Component lastFocusOwner;
/** Bound property name. */
- public final static String CONTENT_PANE_PROPERTY = "contentPane";
+ public static final String CONTENT_PANE_PROPERTY = "contentPane";
/** Bound property name. */
- public final static String MENU_BAR_PROPERTY = "JMenuBar";
+ public static final String MENU_BAR_PROPERTY = "JMenuBar";
/** Bound property name. */
- public final static String TITLE_PROPERTY = "title";
+ public static final String TITLE_PROPERTY = "title";
/** Bound property name. */
- public final static String LAYERED_PANE_PROPERTY = "layeredPane";
+ public static final String LAYERED_PANE_PROPERTY = "layeredPane";
/** Bound property name. */
- public final static String ROOT_PANE_PROPERTY = "rootPane";
+ public static final String ROOT_PANE_PROPERTY = "rootPane";
/** Bound property name. */
- public final static String GLASS_PANE_PROPERTY = "glassPane";
+ public static final String GLASS_PANE_PROPERTY = "glassPane";
/** Bound property name. */
- public final static String FRAME_ICON_PROPERTY = "frameIcon";
+ public static final String FRAME_ICON_PROPERTY = "frameIcon";
/**
* Constrained property name indicated that this frame has
* selected status.
*/
- public final static String IS_SELECTED_PROPERTY = "selected";
+ public static final String IS_SELECTED_PROPERTY = "selected";
/** Constrained property name indicating that the internal frame is closed. */
- public final static String IS_CLOSED_PROPERTY = "closed";
+ public static final String IS_CLOSED_PROPERTY = "closed";
/** Constrained property name indicating that the internal frame is maximized. */
- public final static String IS_MAXIMUM_PROPERTY = "maximum";
+ public static final String IS_MAXIMUM_PROPERTY = "maximum";
/** Constrained property name indicating that the internal frame is iconified. */
- public final static String IS_ICON_PROPERTY = "icon";
+ public static final String IS_ICON_PROPERTY = "icon";
private static final Object PROPERTY_CHANGE_LISTENER_KEY =
new StringBuilder("InternalFramePropertyChangeListener");
@@ -2159,7 +2159,7 @@
* @author David Kloba
*/
@SuppressWarnings("serial") // Same-version serialization only
- static public class JDesktopIcon extends JComponent implements Accessible
+ public static class JDesktopIcon extends JComponent implements Accessible
{
JInternalFrame internalFrame;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JLayeredPane.java Mon Oct 05 13:45:50 2015 -0700
@@ -159,25 +159,25 @@
public class JLayeredPane extends JComponent implements Accessible {
/// Watch the values in getObjectForLayer()
/** Convenience object defining the Default layer. Equivalent to new Integer(0).*/
- public final static Integer DEFAULT_LAYER = 0;
+ public static final Integer DEFAULT_LAYER = 0;
/** Convenience object defining the Palette layer. Equivalent to new Integer(100).*/
- public final static Integer PALETTE_LAYER = 100;
+ public static final Integer PALETTE_LAYER = 100;
/** Convenience object defining the Modal layer. Equivalent to new Integer(200).*/
- public final static Integer MODAL_LAYER = 200;
+ public static final Integer MODAL_LAYER = 200;
/** Convenience object defining the Popup layer. Equivalent to new Integer(300).*/
- public final static Integer POPUP_LAYER = 300;
+ public static final Integer POPUP_LAYER = 300;
/** Convenience object defining the Drag layer. Equivalent to new Integer(400).*/
- public final static Integer DRAG_LAYER = 400;
+ public static final Integer DRAG_LAYER = 400;
/** Convenience object defining the Frame Content layer.
* This layer is normally only use to position the contentPane and menuBar
* components of JFrame.
* Equivalent to new Integer(-30000).
* @see JFrame
*/
- public final static Integer FRAME_CONTENT_LAYER = new Integer(-30000);
+ public static final Integer FRAME_CONTENT_LAYER = new Integer(-30000);
/** Bound property */
- public final static String LAYER_PROPERTY = "layeredContainerLayer";
+ public static final String LAYER_PROPERTY = "layeredContainerLayer";
// Hashtable to store layer values for non-JComponent components
private Hashtable<Component,Integer> componentToLayer;
private boolean optimizedDrawingPossible = true;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JList.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JList.java Mon Oct 05 13:45:50 2015 -0700
@@ -161,8 +161,8 @@
* // Display an icon and a string for each object in the list.
*
* class MyCellRenderer extends JLabel implements ListCellRenderer<Object> {
- * final static ImageIcon longIcon = new ImageIcon("long.gif");
- * final static ImageIcon shortIcon = new ImageIcon("short.gif");
+ * static final ImageIcon longIcon = new ImageIcon("long.gif");
+ * static final ImageIcon shortIcon = new ImageIcon("short.gif");
*
* // This is the only method defined by ListCellRenderer.
* // We just reconfigure the JLabel each time we're called.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JOptionPane.java Mon Oct 05 13:45:50 2015 -0700
@@ -394,13 +394,13 @@
public static final String WANTS_INPUT_PROPERTY = "wantsInput";
/** Icon used in pane. */
- transient protected Icon icon;
+ protected transient Icon icon;
/** Message to display. */
- transient protected Object message;
+ protected transient Object message;
/** Options to display to the user. */
- transient protected Object[] options;
+ protected transient Object[] options;
/** Value that should be initially selected in <code>options</code>. */
- transient protected Object initialValue;
+ protected transient Object initialValue;
/** Message type. */
protected int messageType;
/**
@@ -412,7 +412,7 @@
protected int optionType;
/** Currently selected value, will be a valid option, or
* <code>UNINITIALIZED_VALUE</code> or <code>null</code>. */
- transient protected Object value;
+ protected transient Object value;
/** Array of values the user can choose from. Look and feel will
* provide the UI component to choose this from. */
protected transient Object[] selectionValues;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JPopupMenu.java Mon Oct 05 13:45:50 2015 -0700
@@ -1545,7 +1545,7 @@
* A popup menu-specific separator.
*/
@SuppressWarnings("serial")
- static public class Separator extends JSeparator
+ public static class Separator extends JSeparator
{
/**
* Constructs a popup menu-specific Separator.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JProgressBar.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JProgressBar.java Mon Oct 05 13:45:50 2015 -0700
@@ -190,15 +190,15 @@
/**
* The default minimum for a progress bar is 0.
*/
- static final private int defaultMinimum = 0;
+ private static final int defaultMinimum = 0;
/**
* The default maximum for a progress bar is 100.
*/
- static final private int defaultMaximum = 100;
+ private static final int defaultMaximum = 100;
/**
* The default orientation for a progress bar is <code>HORIZONTAL</code>.
*/
- static final private int defaultOrientation = HORIZONTAL;
+ private static final int defaultOrientation = HORIZONTAL;
/**
* Only one <code>ChangeEvent</code> is needed per instance since the
--- a/jdk/src/java.desktop/share/classes/javax/swing/JSplitPane.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JSplitPane.java Mon Oct 05 13:45:50 2015 -0700
@@ -113,7 +113,7 @@
* split along the y axis. For example the two
* <code>Component</code>s will be split one on top of the other.
*/
- public final static int VERTICAL_SPLIT = 0;
+ public static final int VERTICAL_SPLIT = 0;
/**
* Horizontal split indicates the <code>Component</code>s are
@@ -121,75 +121,75 @@
* <code>Component</code>s will be split one to the left of the
* other.
*/
- public final static int HORIZONTAL_SPLIT = 1;
+ public static final int HORIZONTAL_SPLIT = 1;
/**
* Used to add a <code>Component</code> to the left of the other
* <code>Component</code>.
*/
- public final static String LEFT = "left";
+ public static final String LEFT = "left";
/**
* Used to add a <code>Component</code> to the right of the other
* <code>Component</code>.
*/
- public final static String RIGHT = "right";
+ public static final String RIGHT = "right";
/**
* Used to add a <code>Component</code> above the other
* <code>Component</code>.
*/
- public final static String TOP = "top";
+ public static final String TOP = "top";
/**
* Used to add a <code>Component</code> below the other
* <code>Component</code>.
*/
- public final static String BOTTOM = "bottom";
+ public static final String BOTTOM = "bottom";
/**
* Used to add a <code>Component</code> that will represent the divider.
*/
- public final static String DIVIDER = "divider";
+ public static final String DIVIDER = "divider";
/**
* Bound property name for orientation (horizontal or vertical).
*/
- public final static String ORIENTATION_PROPERTY = "orientation";
+ public static final String ORIENTATION_PROPERTY = "orientation";
/**
* Bound property name for continuousLayout.
*/
- public final static String CONTINUOUS_LAYOUT_PROPERTY = "continuousLayout";
+ public static final String CONTINUOUS_LAYOUT_PROPERTY = "continuousLayout";
/**
* Bound property name for border.
*/
- public final static String DIVIDER_SIZE_PROPERTY = "dividerSize";
+ public static final String DIVIDER_SIZE_PROPERTY = "dividerSize";
/**
* Bound property for oneTouchExpandable.
*/
- public final static String ONE_TOUCH_EXPANDABLE_PROPERTY =
+ public static final String ONE_TOUCH_EXPANDABLE_PROPERTY =
"oneTouchExpandable";
/**
* Bound property for lastLocation.
*/
- public final static String LAST_DIVIDER_LOCATION_PROPERTY =
+ public static final String LAST_DIVIDER_LOCATION_PROPERTY =
"lastDividerLocation";
/**
* Bound property for the dividerLocation.
* @since 1.3
*/
- public final static String DIVIDER_LOCATION_PROPERTY = "dividerLocation";
+ public static final String DIVIDER_LOCATION_PROPERTY = "dividerLocation";
/**
* Bound property for weight.
* @since 1.3
*/
- public final static String RESIZE_WEIGHT_PROPERTY = "resizeWeight";
+ public static final String RESIZE_WEIGHT_PROPERTY = "resizeWeight";
/**
* How the views are split.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTable.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTable.java Mon Oct 05 13:45:50 2015 -0700
@@ -343,27 +343,27 @@
protected boolean cellSelectionEnabled;
/** If editing, the <code>Component</code> that is handling the editing. */
- transient protected Component editorComp;
+ protected transient Component editorComp;
/**
* The active cell editor object, that overwrites the screen real estate
* occupied by the current cell and allows the user to change its contents.
* {@code null} if the table isn't currently editing.
*/
- transient protected TableCellEditor cellEditor;
+ protected transient TableCellEditor cellEditor;
/** Identifies the column of the cell being edited. */
- transient protected int editingColumn;
+ protected transient int editingColumn;
/** Identifies the row of the cell being edited. */
- transient protected int editingRow;
+ protected transient int editingRow;
/**
* A table of objects that display the contents of a cell,
* indexed by class as declared in <code>getColumnClass</code>
* in the <code>TableModel</code> interface.
*/
- transient protected Hashtable<Object, Object> defaultRenderersByColumnClass;
+ protected transient Hashtable<Object, Object> defaultRenderersByColumnClass;
// Logicaly, the above is a Hashtable<Class<?>, TableCellRenderer>.
// It is declared otherwise to accomodate using UIDefaults.
@@ -372,7 +372,7 @@
* indexed by class as declared in <code>getColumnClass</code>
* in the <code>TableModel</code> interface.
*/
- transient protected Hashtable<Object, Object> defaultEditorsByColumnClass;
+ protected transient Hashtable<Object, Object> defaultEditorsByColumnClass;
// Logicaly, the above is a Hashtable<Class<?>, TableCellEditor>.
// It is declared otherwise to accomodate using UIDefaults.
@@ -880,7 +880,7 @@
* replaced by <code>new JScrollPane(aTable)</code>.
*/
@Deprecated
- static public JScrollPane createScrollPaneForTable(JTable aTable) {
+ public static JScrollPane createScrollPaneForTable(JTable aTable) {
return new JScrollPane(aTable);
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/JToolBar.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JToolBar.java Mon Oct 05 13:45:50 2015 -0700
@@ -593,7 +593,7 @@
* A toolbar-specific separator. An object with dimension but
* no contents used to divide buttons on a tool bar into groups.
*/
- static public class Separator extends JSeparator
+ public static class Separator extends JSeparator
{
private Dimension separatorSize;
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTree.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTree.java Mon Oct 05 13:45:50 2015 -0700
@@ -155,12 +155,12 @@
/**
* The model that defines the tree displayed by this object.
*/
- transient protected TreeModel treeModel;
+ protected transient TreeModel treeModel;
/**
* Models the set of selected nodes in this tree.
*/
- transient protected TreeSelectionModel selectionModel;
+ protected transient TreeSelectionModel selectionModel;
/**
* True if the root node is displayed, false if its children are
@@ -172,7 +172,7 @@
* The cell used to draw nodes. If <code>null</code>, the UI uses a default
* <code>cellRenderer</code>.
*/
- transient protected TreeCellRenderer cellRenderer;
+ protected transient TreeCellRenderer cellRenderer;
/**
* Height to use for each display row. If this is <= 0 the renderer
@@ -189,7 +189,7 @@
* information must be determined by visiting all the parent
* paths and seeing if they are visible.
*/
- transient private Hashtable<TreePath, Boolean> expandedState;
+ private transient Hashtable<TreePath, Boolean> expandedState;
/**
@@ -227,7 +227,7 @@
* Editor for the entries. Default is <code>null</code>
* (tree is not editable).
*/
- transient protected TreeCellEditor cellEditor;
+ protected transient TreeCellEditor cellEditor;
/**
* Is the tree editable? Default is false.
@@ -277,13 +277,13 @@
/**
* Updates the <code>expandedState</code>.
*/
- transient protected TreeModelListener treeModelListener;
+ protected transient TreeModelListener treeModelListener;
/**
* Used when <code>setExpandedState</code> is invoked,
* will be a <code>Stack</code> of <code>Stack</code>s.
*/
- transient private Stack<Stack<TreePath>> expandedStack;
+ private transient Stack<Stack<TreePath>> expandedStack;
/**
* Lead selection path, may not be <code>null</code>.
@@ -459,40 +459,40 @@
// Bound property names
//
/** Bound property name for <code>cellRenderer</code>. */
- public final static String CELL_RENDERER_PROPERTY = "cellRenderer";
+ public static final String CELL_RENDERER_PROPERTY = "cellRenderer";
/** Bound property name for <code>treeModel</code>. */
- public final static String TREE_MODEL_PROPERTY = "model";
+ public static final String TREE_MODEL_PROPERTY = "model";
/** Bound property name for <code>rootVisible</code>. */
- public final static String ROOT_VISIBLE_PROPERTY = "rootVisible";
+ public static final String ROOT_VISIBLE_PROPERTY = "rootVisible";
/** Bound property name for <code>showsRootHandles</code>. */
- public final static String SHOWS_ROOT_HANDLES_PROPERTY = "showsRootHandles";
+ public static final String SHOWS_ROOT_HANDLES_PROPERTY = "showsRootHandles";
/** Bound property name for <code>rowHeight</code>. */
- public final static String ROW_HEIGHT_PROPERTY = "rowHeight";
+ public static final String ROW_HEIGHT_PROPERTY = "rowHeight";
/** Bound property name for <code>cellEditor</code>. */
- public final static String CELL_EDITOR_PROPERTY = "cellEditor";
+ public static final String CELL_EDITOR_PROPERTY = "cellEditor";
/** Bound property name for <code>editable</code>. */
- public final static String EDITABLE_PROPERTY = "editable";
+ public static final String EDITABLE_PROPERTY = "editable";
/** Bound property name for <code>largeModel</code>. */
- public final static String LARGE_MODEL_PROPERTY = "largeModel";
+ public static final String LARGE_MODEL_PROPERTY = "largeModel";
/** Bound property name for selectionModel. */
- public final static String SELECTION_MODEL_PROPERTY = "selectionModel";
+ public static final String SELECTION_MODEL_PROPERTY = "selectionModel";
/** Bound property name for <code>visibleRowCount</code>. */
- public final static String VISIBLE_ROW_COUNT_PROPERTY = "visibleRowCount";
+ public static final String VISIBLE_ROW_COUNT_PROPERTY = "visibleRowCount";
/** Bound property name for <code>messagesStopCellEditing</code>. */
- public final static String INVOKES_STOP_CELL_EDITING_PROPERTY = "invokesStopCellEditing";
+ public static final String INVOKES_STOP_CELL_EDITING_PROPERTY = "invokesStopCellEditing";
/** Bound property name for <code>scrollsOnExpand</code>. */
- public final static String SCROLLS_ON_EXPAND_PROPERTY = "scrollsOnExpand";
+ public static final String SCROLLS_ON_EXPAND_PROPERTY = "scrollsOnExpand";
/** Bound property name for <code>toggleClickCount</code>. */
- public final static String TOGGLE_CLICK_COUNT_PROPERTY = "toggleClickCount";
+ public static final String TOGGLE_CLICK_COUNT_PROPERTY = "toggleClickCount";
/** Bound property name for <code>leadSelectionPath</code>.
* @since 1.3 */
- public final static String LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
+ public static final String LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
/** Bound property name for anchor selection path.
* @since 1.3 */
- public final static String ANCHOR_SELECTION_PATH_PROPERTY = "anchorSelectionPath";
+ public static final String ANCHOR_SELECTION_PATH_PROPERTY = "anchorSelectionPath";
/** Bound property name for expands selected paths property
* @since 1.3 */
- public final static String EXPANDS_SELECTED_PATHS_PROPERTY = "expandsSelectedPaths";
+ public static final String EXPANDS_SELECTED_PATHS_PROPERTY = "expandsSelectedPaths";
/**
@@ -3322,7 +3322,7 @@
*
* @return single instance of {@code EmptySelectionModel}
*/
- static public EmptySelectionModel sharedInstance() {
+ public static EmptySelectionModel sharedInstance() {
return sharedInstance;
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/JViewport.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JViewport.java Mon Oct 05 13:45:50 2015 -0700
@@ -139,7 +139,7 @@
protected boolean backingStore = false;
/** The view image used for a backing store. */
- transient protected Image backingStoreImage = null;
+ protected transient Image backingStoreImage = null;
/**
* The <code>scrollUnderway</code> flag is used for components like
--- a/jdk/src/java.desktop/share/classes/javax/swing/KeyStroke.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/KeyStroke.java Mon Oct 05 13:45:50 2015 -0700
@@ -26,6 +26,7 @@
import java.awt.AWTKeyStroke;
import java.awt.event.KeyEvent;
+import sun.swing.SwingAccessor;
/**
* A KeyStroke represents a key action on the keyboard, or equivalent input
@@ -70,6 +71,16 @@
*/
private static final long serialVersionUID = -9060180771037902530L;
+ static {
+ SwingAccessor.setKeyStrokeAccessor(new SwingAccessor.KeyStrokeAccessor() {
+
+ @Override
+ public KeyStroke create() {
+ return new KeyStroke();
+ }
+ });
+ }
+
private KeyStroke() {
}
private KeyStroke(char keyChar, int keyCode, int modifiers,
@@ -87,7 +98,6 @@
*/
public static KeyStroke getKeyStroke(char keyChar) {
synchronized (AWTKeyStroke.class) {
- registerSubclass(KeyStroke.class);
return (KeyStroke)getAWTKeyStroke(keyChar);
}
}
@@ -148,7 +158,6 @@
*/
public static KeyStroke getKeyStroke(Character keyChar, int modifiers) {
synchronized (AWTKeyStroke.class) {
- registerSubclass(KeyStroke.class);
return (KeyStroke)getAWTKeyStroke(keyChar, modifiers);
}
}
@@ -199,7 +208,6 @@
public static KeyStroke getKeyStroke(int keyCode, int modifiers,
boolean onKeyRelease) {
synchronized (AWTKeyStroke.class) {
- registerSubclass(KeyStroke.class);
return (KeyStroke)getAWTKeyStroke(keyCode, modifiers,
onKeyRelease);
}
@@ -247,7 +255,6 @@
*/
public static KeyStroke getKeyStroke(int keyCode, int modifiers) {
synchronized (AWTKeyStroke.class) {
- registerSubclass(KeyStroke.class);
return (KeyStroke)getAWTKeyStroke(keyCode, modifiers);
}
}
@@ -266,7 +273,6 @@
*/
public static KeyStroke getKeyStrokeForEvent(KeyEvent anEvent) {
synchronized (AWTKeyStroke.class) {
- registerSubclass(KeyStroke.class);
return (KeyStroke)getAWTKeyStrokeForEvent(anEvent);
}
}
@@ -307,7 +313,6 @@
return null;
}
synchronized (AWTKeyStroke.class) {
- registerSubclass(KeyStroke.class);
try {
return (KeyStroke)getAWTKeyStroke(s);
} catch (IllegalArgumentException e) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/RowFilter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/RowFilter.java Mon Oct 05 13:45:50 2015 -0700
@@ -340,7 +340,7 @@
* @see javax.swing.DefaultRowSorter#setRowFilter(javax.swing.RowFilter)
* @since 1.6
*/
- public static abstract class Entry<M, I> {
+ public abstract static class Entry<M, I> {
/**
* Creates an <code>Entry</code>.
*/
@@ -409,7 +409,7 @@
}
- private static abstract class GeneralFilter<M, I> extends RowFilter<M, I> {
+ private abstract static class GeneralFilter<M, I> extends RowFilter<M, I> {
private int[] columns;
GeneralFilter(int[] columns) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/SortingFocusTraversalPolicy.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/SortingFocusTraversalPolicy.java Mon Oct 05 13:45:50 2015 -0700
@@ -83,16 +83,16 @@
* that they need to invoke getFirstComponent or getLastComponent, the
* sorted list should be reused if possible.
*/
- transient private Container cachedRoot;
- transient private List<Component> cachedCycle;
+ private transient Container cachedRoot;
+ private transient List<Component> cachedCycle;
// Delegate our fitness test to ContainerOrder so that we only have to
// code the algorithm once.
private static final SwingContainerOrderFocusTraversalPolicy
fitnessTestPolicy = new SwingContainerOrderFocusTraversalPolicy();
- final private int FORWARD_TRAVERSAL = 0;
- final private int BACKWARD_TRAVERSAL = 1;
+ private final int FORWARD_TRAVERSAL = 0;
+ private final int BACKWARD_TRAVERSAL = 1;
/*
* When true (by default), the legacy merge-sort algo is used to sort an FTP cycle.
--- a/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/SwingWorker.java Mon Oct 05 13:45:50 2015 -0700
@@ -827,7 +827,7 @@
}
private static class DoSubmitAccumulativeRunnable
extends AccumulativeRunnable<Runnable> implements ActionListener {
- private final static int DELAY = 1000 / 30;
+ private static final int DELAY = 1000 / 30;
@Override
protected void run(List<Runnable> args) {
for (Runnable runnable : args) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/Timer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/Timer.java Mon Oct 05 13:45:50 2015 -0700
@@ -172,16 +172,16 @@
// notify is set to true when the Timer fires and the Runnable is queued.
// It will be set to false after notifying the listeners (if coalesce is
// true) or if the developer invokes stop.
- private transient final AtomicBoolean notify = new AtomicBoolean(false);
+ private final transient AtomicBoolean notify = new AtomicBoolean(false);
private volatile int initialDelay, delay;
private volatile boolean repeats = true, coalesce = true;
- private transient final Runnable doPostEvent;
+ private final transient Runnable doPostEvent;
private static volatile boolean logTimers;
- private transient final Lock lock = new ReentrantLock();
+ private final transient Lock lock = new ReentrantLock();
// This field is maintained by TimerQueue.
// eventQueued can also be reset by the TimerQueue, but will only ever
--- a/jdk/src/java.desktop/share/classes/javax/swing/TimerQueue.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/TimerQueue.java Mon Oct 05 13:45:50 2015 -0700
@@ -267,7 +267,7 @@
}
- final public long getDelay(TimeUnit unit) {
+ public final long getDelay(TimeUnit unit) {
return unit.convert(time - now(), TimeUnit.NANOSECONDS);
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/TransferHandler.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/TransferHandler.java Mon Oct 05 13:45:50 2015 -0700
@@ -210,7 +210,7 @@
* @see #importData(TransferHandler.TransferSupport)
* @since 1.6
*/
- public final static class TransferSupport {
+ public static final class TransferSupport {
private boolean isDrop;
private Component component;
--- a/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java Mon Oct 05 13:45:50 2015 -0700
@@ -1074,7 +1074,7 @@
* @see #getAuxiliaryLookAndFeels
* @see #getInstalledLookAndFeels
*/
- static public void addAuxiliaryLookAndFeel(LookAndFeel laf) {
+ public static void addAuxiliaryLookAndFeel(LookAndFeel laf) {
maybeInitialize();
if (!laf.isSupportedLookAndFeel()) {
@@ -1115,7 +1115,7 @@
* @see #setLookAndFeel
* @see #getInstalledLookAndFeels
*/
- static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
+ public static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
maybeInitialize();
boolean result;
@@ -1153,7 +1153,7 @@
* @see #setLookAndFeel
* @see #getInstalledLookAndFeels
*/
- static public LookAndFeel[] getAuxiliaryLookAndFeels() {
+ public static LookAndFeel[] getAuxiliaryLookAndFeels() {
maybeInitialize();
Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
--- a/jdk/src/java.desktop/share/classes/javax/swing/border/TitledBorder.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/border/TitledBorder.java Mon Oct 05 13:45:50 2015 -0700
@@ -100,55 +100,55 @@
/**
* Use the default vertical orientation for the title text.
*/
- static public final int DEFAULT_POSITION = 0;
+ public static final int DEFAULT_POSITION = 0;
/** Position the title above the border's top line. */
- static public final int ABOVE_TOP = 1;
+ public static final int ABOVE_TOP = 1;
/** Position the title in the middle of the border's top line. */
- static public final int TOP = 2;
+ public static final int TOP = 2;
/** Position the title below the border's top line. */
- static public final int BELOW_TOP = 3;
+ public static final int BELOW_TOP = 3;
/** Position the title above the border's bottom line. */
- static public final int ABOVE_BOTTOM = 4;
+ public static final int ABOVE_BOTTOM = 4;
/** Position the title in the middle of the border's bottom line. */
- static public final int BOTTOM = 5;
+ public static final int BOTTOM = 5;
/** Position the title below the border's bottom line. */
- static public final int BELOW_BOTTOM = 6;
+ public static final int BELOW_BOTTOM = 6;
/**
* Use the default justification for the title text.
*/
- static public final int DEFAULT_JUSTIFICATION = 0;
+ public static final int DEFAULT_JUSTIFICATION = 0;
/** Position title text at the left side of the border line. */
- static public final int LEFT = 1;
+ public static final int LEFT = 1;
/** Position title text in the center of the border line. */
- static public final int CENTER = 2;
+ public static final int CENTER = 2;
/** Position title text at the right side of the border line. */
- static public final int RIGHT = 3;
+ public static final int RIGHT = 3;
/** Position title text at the left side of the border line
* for left to right orientation, at the right side of the
* border line for right to left orientation.
*/
- static public final int LEADING = 4;
+ public static final int LEADING = 4;
/** Position title text at the right side of the border line
* for left to right orientation, at the left side of the
* border line for right to left orientation.
*/
- static public final int TRAILING = 5;
+ public static final int TRAILING = 5;
/**
* Space between the border and the component's edge
*/
- static protected final int EDGE_SPACING = 2;
+ protected static final int EDGE_SPACING = 2;
/**
* Space between the border and text
*/
- static protected final int TEXT_SPACING = 2;
+ protected static final int TEXT_SPACING = 2;
/**
* Horizontal inset of text that is left or right justified
*/
- static protected final int TEXT_INSET_H = 5;
+ protected static final int TEXT_INSET_H = 5;
/**
* Creates a TitledBorder instance.
--- a/jdk/src/java.desktop/share/classes/javax/swing/event/EventListenerList.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/event/EventListenerList.java Mon Oct 05 13:45:50 2015 -0700
@@ -100,7 +100,7 @@
@SuppressWarnings("serial")
public class EventListenerList implements Serializable {
/* A null array to be shared by all empty listener lists*/
- private final static Object[] NULL_ARRAY = new Object[0];
+ private static final Object[] NULL_ARRAY = new Object[0];
/** The list of ListenerType - Listener pairs */
protected transient Object[] listenerList = NULL_ARRAY;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicButtonUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -64,7 +64,7 @@
*/
protected int defaultTextShiftOffset;
- private final static String propertyPrefix = "Button" + ".";
+ private static final String propertyPrefix = "Button" + ".";
private static final Object BASIC_BUTTON_UI_KEY = new Object();
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicCheckBoxUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -54,7 +54,7 @@
private static final Object BASIC_CHECK_BOX_UI_KEY = new Object();
- private final static String propertyPrefix = "CheckBox" + ".";
+ private static final String propertyPrefix = "CheckBox" + ".";
// ********************************
// Create PLAF
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxRenderer.java Mon Oct 05 13:45:50 2015 -0700
@@ -57,7 +57,7 @@
* the <code>setBorder</code> method.
*/
protected static Border noFocusBorder = new EmptyBorder(1, 1, 1, 1);
- private final static Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1);
+ private static final Border SAFE_NO_FOCUS_BORDER = new EmptyBorder(1, 1, 1, 1);
/**
* Constructs a new instance of {@code BasicComboBoxRenderer}.
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicIconFactory.java Mon Oct 05 13:45:50 2015 -0700
@@ -167,7 +167,7 @@
private static class CheckBoxIcon implements Icon, Serializable
{
- final static int csize = 13;
+ static final int csize = 13;
public void paintIcon(Component c, Graphics g, int x, int y) {
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -167,35 +167,35 @@
/**
* The bit relates to model changed property.
*/
- protected final static int modelChanged = 1 << 0;
+ protected static final int modelChanged = 1 << 0;
/**
* The bit relates to selection model changed property.
*/
- protected final static int selectionModelChanged = 1 << 1;
+ protected static final int selectionModelChanged = 1 << 1;
/**
* The bit relates to font changed property.
*/
- protected final static int fontChanged = 1 << 2;
+ protected static final int fontChanged = 1 << 2;
/**
* The bit relates to fixed cell width changed property.
*/
- protected final static int fixedCellWidthChanged = 1 << 3;
+ protected static final int fixedCellWidthChanged = 1 << 3;
/**
* The bit relates to fixed cell height changed property.
*/
- protected final static int fixedCellHeightChanged = 1 << 4;
+ protected static final int fixedCellHeightChanged = 1 << 4;
/**
* The bit relates to prototype cell value changed property.
*/
- protected final static int prototypeCellValueChanged = 1 << 5;
+ protected static final int prototypeCellValueChanged = 1 << 5;
/**
* The bit relates to cell renderer changed property.
*/
- protected final static int cellRendererChanged = 1 << 6;
- private final static int layoutOrientationChanged = 1 << 7;
- private final static int heightChanged = 1 << 8;
- private final static int widthChanged = 1 << 9;
- private final static int componentOrientationChanged = 1 << 10;
+ protected static final int cellRendererChanged = 1 << 6;
+ private static final int layoutOrientationChanged = 1 << 7;
+ private static final int heightChanged = 1 << 8;
+ private static final int widthChanged = 1 << 9;
+ private static final int componentOrientationChanged = 1 << 10;
private static final int DROP_LINE_THICKNESS = 2;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -53,7 +53,7 @@
private boolean defaults_initialized = false;
- private final static String propertyPrefix = "RadioButton" + ".";
+ private static final String propertyPrefix = "RadioButton" + ".";
private KeyListener keyListener = null;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -115,7 +115,7 @@
/** Scroll timer */
protected Timer scrollTimer;
- private final static int scrollSpeedThrottle = 60; // delay in milli seconds
+ private static final int scrollSpeedThrottle = 60; // delay in milli seconds
/**
* True indicates a middle click will absolutely position the
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -2542,21 +2542,21 @@
}
private static class Actions extends UIAction {
- final static String NEXT = "navigateNext";
- final static String PREVIOUS = "navigatePrevious";
- final static String RIGHT = "navigateRight";
- final static String LEFT = "navigateLeft";
- final static String UP = "navigateUp";
- final static String DOWN = "navigateDown";
- final static String PAGE_UP = "navigatePageUp";
- final static String PAGE_DOWN = "navigatePageDown";
- final static String REQUEST_FOCUS = "requestFocus";
- final static String REQUEST_FOCUS_FOR_VISIBLE =
+ static final String NEXT = "navigateNext";
+ static final String PREVIOUS = "navigatePrevious";
+ static final String RIGHT = "navigateRight";
+ static final String LEFT = "navigateLeft";
+ static final String UP = "navigateUp";
+ static final String DOWN = "navigateDown";
+ static final String PAGE_UP = "navigatePageUp";
+ static final String PAGE_DOWN = "navigatePageDown";
+ static final String REQUEST_FOCUS = "requestFocus";
+ static final String REQUEST_FOCUS_FOR_VISIBLE =
"requestFocusForVisibleComponent";
- final static String SET_SELECTED = "setSelectedIndex";
- final static String SELECT_FOCUSED = "selectTabWithFocus";
- final static String SCROLL_FORWARD = "scrollTabsForwardAction";
- final static String SCROLL_BACKWARD = "scrollTabsBackwardAction";
+ static final String SET_SELECTED = "setSelectedIndex";
+ static final String SELECT_FOCUSED = "selectTabWithFocus";
+ static final String SCROLL_FORWARD = "scrollTabsForwardAction";
+ static final String SCROLL_BACKWARD = "scrollTabsBackwardAction";
Actions(String key) {
super(key);
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -97,7 +97,13 @@
String kind = elem.getName();
if (kind != null) {
if (kind.equals(AbstractDocument.ContentElementName)) {
- return new GlyphView(elem);
+ return new GlyphView(elem){
+ @Override
+ public float getMinimumSpan(int axis) {
+ // no wrap
+ return getPreferredSpan(axis);
+ }
+ };
} else if (kind.equals(AbstractDocument.ParagraphElementName)) {
return new I18nFieldView(elem);
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicToggleButtonUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -46,7 +46,7 @@
private static final Object BASIC_TOGGLE_BUTTON_UI_KEY = new Object();
- private final static String propertyPrefix = "ToggleButton" + ".";
+ private static final String propertyPrefix = "ToggleButton" + ".";
// ********************************
// Create PLAF
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -61,16 +61,16 @@
new StringBuilder("Tree.baselineComponent");
// Old actions forward to an instance of this.
- static private final Actions SHARED_ACTION = new Actions();
+ private static final Actions SHARED_ACTION = new Actions();
/**
* The collapsed icon.
*/
- transient protected Icon collapsedIcon;
+ protected transient Icon collapsedIcon;
/**
* The expanded icon.
*/
- transient protected Icon expandedIcon;
+ protected transient Icon expandedIcon;
/**
* Color used to draw hash marks. If <code>null</code> no hash marks
@@ -98,14 +98,14 @@
protected JTree tree;
/** Renderer that is being used to do the actual cell drawing. */
- transient protected TreeCellRenderer currentCellRenderer;
+ protected transient TreeCellRenderer currentCellRenderer;
/** Set to true if the renderer that is currently in the tree was
* created by this instance. */
protected boolean createdRenderer;
/** Editor for the tree. */
- transient protected TreeCellEditor cellEditor;
+ protected transient TreeCellEditor cellEditor;
/** Set to true if editor that is currently in the tree was
* created by this instance. */
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalCheckBoxUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -60,7 +60,7 @@
private static final Object METAL_CHECK_BOX_UI_KEY = new Object();
- private final static String propertyPrefix = "CheckBox" + ".";
+ private static final String propertyPrefix = "CheckBox" + ".";
private boolean defaults_initialized = false;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -954,7 +954,7 @@
}
}
- final static int space = 10;
+ static final int space = 10;
class IndentIcon implements Icon {
Icon icon = null;
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalIconFactory.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalIconFactory.java Mon Oct 05 13:45:50 2015 -0700
@@ -1617,7 +1617,7 @@
} // End class TreeFloppyDriveIcon
- static private final Dimension folderIcon16Size = new Dimension( 16, 16 );
+ private static final Dimension folderIcon16Size = new Dimension( 16, 16 );
/**
* Utility class for caching icon images. This is necessary because
@@ -1787,7 +1787,7 @@
}
- static private final Dimension fileIcon16Size = new Dimension( 16, 16 );
+ private static final Dimension fileIcon16Size = new Dimension( 16, 16 );
/**
* <p>
@@ -1887,7 +1887,7 @@
}
- static private final Dimension treeControlSize = new Dimension( 18, 18 );
+ private static final Dimension treeControlSize = new Dimension( 18, 18 );
/**
* <p>
@@ -2052,9 +2052,9 @@
// Menu Icons
//
- static private final Dimension menuArrowIconSize = new Dimension( 4, 8 );
- static private final Dimension menuCheckIconSize = new Dimension( 10, 10 );
- static private final int xOff = 4;
+ private static final Dimension menuArrowIconSize = new Dimension( 4, 8 );
+ private static final Dimension menuCheckIconSize = new Dimension( 10, 10 );
+ private static final int xOff = 4;
private static class MenuArrowIcon implements Icon, UIResource, Serializable
{
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -88,7 +88,7 @@
/**
* Registers the specified component.
*/
- synchronized static void register(JComponent c) {
+ static synchronized void register(JComponent c) {
if (c == null) {
// Exception is thrown as convenience for callers that are
// typed to throw an NPE.
@@ -100,7 +100,7 @@
/**
* Unregisters the specified component.
*/
- synchronized static void unregister(JComponent c) {
+ static synchronized void unregister(JComponent c) {
for (int counter = components.size() - 1; counter >= 0; counter--) {
// Search for the component, removing any flushed references
// along the way.
@@ -116,7 +116,7 @@
* Finds a previously registered component of class <code>target</code>
* that shares the JRootPane ancestor of <code>from</code>.
*/
- synchronized static Object findRegisteredComponentOfType(JComponent from,
+ static synchronized Object findRegisteredComponentOfType(JComponent from,
Class<?> target) {
JRootPane rp = SwingUtilities.getRootPane(from);
if (rp != null) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -949,8 +949,7 @@
* @comp the component to check
*/
private void repaintIfBackgroundsDiffer(JComponent comp) {
- ComponentUI ui = (ComponentUI)comp.getClientProperty(
- SwingUtilities2.COMPONENT_UI_PROPERTY_KEY);
+ ComponentUI ui = comp.getUI();
if (ui instanceof SynthUI) {
SynthUI synthUI = (SynthUI)ui;
SynthContext context = synthUI.getContext(comp);
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html Mon Oct 05 13:45:50 2015 -0700
@@ -105,7 +105,7 @@
<dd>Unique identifier for the style.</dd>
<dt><a name="style.clone"><samp>clone</samp></a></dt>
<dd>Identifier of a previously defined style that is copied
- and used for the new style. This provides a conveniant
+ and used for the new style. This provides a convenient
mechanism for overriding only a portion of an existing
style.</dd>
</dl>
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/DefaultTableColumnModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -73,7 +73,7 @@
protected EventListenerList listenerList = new EventListenerList();
/** Change event (only one needed) */
- transient protected ChangeEvent changeEvent = null;
+ protected transient ChangeEvent changeEvent = null;
/** Column selection allowed in this column model */
protected boolean columnSelectionAllowed;
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java Mon Oct 05 13:45:50 2015 -0700
@@ -106,13 +106,13 @@
protected boolean updateTableInRealTime;
/** The index of the column being resized. <code>null</code> if not resizing. */
- transient protected TableColumn resizingColumn;
+ protected transient TableColumn resizingColumn;
/** The index of the column being dragged. <code>null</code> if not dragging. */
- transient protected TableColumn draggedColumn;
+ protected transient TableColumn draggedColumn;
/** The distance from its original position the column has been dragged. */
- transient protected int draggedDistance;
+ protected transient int draggedDistance;
/**
* The default renderer to be used when a <code>TableColumn</code>
--- a/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/table/TableColumn.java Mon Oct 05 13:45:50 2015 -0700
@@ -92,25 +92,25 @@
* Warning: The value of this constant, "columWidth" is wrong as the
* name of the property is "columnWidth".
*/
- public final static String COLUMN_WIDTH_PROPERTY = "columWidth";
+ public static final String COLUMN_WIDTH_PROPERTY = "columWidth";
/**
* Obsolete as of Java 2 platform v1.3. Please use string literals to identify
* properties.
*/
- public final static String HEADER_VALUE_PROPERTY = "headerValue";
+ public static final String HEADER_VALUE_PROPERTY = "headerValue";
/**
* Obsolete as of Java 2 platform v1.3. Please use string literals to identify
* properties.
*/
- public final static String HEADER_RENDERER_PROPERTY = "headerRenderer";
+ public static final String HEADER_RENDERER_PROPERTY = "headerRenderer";
/**
* Obsolete as of Java 2 platform v1.3. Please use string literals to identify
* properties.
*/
- public final static String CELL_RENDERER_PROPERTY = "cellRenderer";
+ public static final String CELL_RENDERER_PROPERTY = "cellRenderer";
//
// Instance Variables
@@ -173,7 +173,7 @@
* end of the resize.
*/
@Deprecated
- transient protected int resizedPostingDisableCount;
+ protected transient int resizedPostingDisableCount;
/**
* If any <code>PropertyChangeListeners</code> have been registered, the
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java Mon Oct 05 13:45:50 2015 -0700
@@ -1300,7 +1300,7 @@
* @return the thread actively modifying the document
* or <code>null</code> if there are no modifications in progress
*/
- protected synchronized final Thread getCurrentWriter() {
+ protected final synchronized Thread getCurrentWriter() {
return currWriter;
}
@@ -1329,7 +1329,7 @@
* where order of delivery is not guaranteed and all listeners
* should be notified before further mutations are allowed.
*/
- protected synchronized final void writeLock() {
+ protected final synchronized void writeLock() {
try {
while ((numReaders > 0) || (currWriter != null)) {
if (Thread.currentThread() == currWriter) {
@@ -1359,7 +1359,7 @@
*
* @see #writeLock
*/
- protected synchronized final void writeUnlock() {
+ protected final synchronized void writeUnlock() {
if (--numWriters <= 0) {
numWriters = 0;
currWriter = null;
@@ -1378,7 +1378,7 @@
*
* @see #readUnlock
*/
- public synchronized final void readLock() {
+ public final synchronized void readLock() {
try {
while (currWriter != null) {
if (currWriter == Thread.currentThread()) {
@@ -1412,7 +1412,7 @@
*
* @see #readLock
*/
- public synchronized final void readUnlock() {
+ public final synchronized void readUnlock() {
if (currWriter == Thread.currentThread()) {
// writer has full read access.... may try to acquire
// lock in notification
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/AbstractWriter.java Mon Oct 05 13:45:50 2015 -0700
@@ -261,7 +261,7 @@
* @throws BadLocationException for an invalid location within
* the document
*/
- abstract protected void write() throws IOException, BadLocationException;
+ protected abstract void write() throws IOException, BadLocationException;
/**
* Returns the text associated with the element.
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java Mon Oct 05 13:45:50 2015 -0700
@@ -1598,11 +1598,11 @@
boolean dotLTR;
boolean markLTR;
transient Handler handler = new Handler();
- transient private int[] flagXPoints = new int[3];
- transient private int[] flagYPoints = new int[3];
+ private transient int[] flagXPoints = new int[3];
+ private transient int[] flagYPoints = new int[3];
private transient NavigationFilter.FilterBypass filterBypass;
- static private transient Action selectWord = null;
- static private transient Action selectLine = null;
+ private static transient Action selectWord = null;
+ private static transient Action selectLine = null;
/**
* This is used to indicate if the caret currently owns the selection.
* This is always false if the system does not support the system
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultHighlighter.java Mon Oct 05 13:45:50 2015 -0700
@@ -352,7 +352,7 @@
// ---- member variables --------------------------------------------
- private final static Highlighter.Highlight[] noHighlights =
+ private static final Highlighter.Highlight[] noHighlights =
new Highlighter.Highlight[0];
private Vector<HighlightInfo> highlights = new Vector<HighlightInfo>();
private JTextComponent component;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java Mon Oct 05 13:45:50 2015 -0700
@@ -2650,7 +2650,7 @@
}
/** Class-specific reference queues. */
- private final static Map<Class<?>, ReferenceQueue<DefaultStyledDocument>> queueMap
+ private static final Map<Class<?>, ReferenceQueue<DefaultStyledDocument>> queueMap
= new HashMap<Class<?>, ReferenceQueue<DefaultStyledDocument>>();
/** A weak reference to the document object. */
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/DocumentFilter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/DocumentFilter.java Mon Oct 05 13:45:50 2015 -0700
@@ -129,7 +129,7 @@
* are invoked from the DocumentFilter.
* @since 1.4
*/
- public static abstract class FilterBypass {
+ public abstract static class FilterBypass {
/**
* Returns the Document the mutation is occurring on.
*
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java Mon Oct 05 13:45:50 2015 -0700
@@ -332,7 +332,7 @@
private transient ReferenceQueue<StickyPosition> queue;
- final static int GROWTH_SIZE = 1024 * 512;
+ static final int GROWTH_SIZE = 1024 * 512;
// --- gap management -------------------------------
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java Mon Oct 05 13:45:50 2015 -0700
@@ -550,11 +550,6 @@
*/
@Override
public float getMinimumSpan(int axis) {
- int w = getResizeWeight(axis);
- if (w == 0) {
- // can't resize
- return getPreferredSpan(axis);
- }
switch (axis) {
case View.X_AXIS:
if (minimumSpan < 0) {
@@ -1158,7 +1153,7 @@
*
* @since 1.3
*/
- public static abstract class GlyphPainter {
+ public abstract static class GlyphPainter {
/**
* Determine the span the glyphs given a start location
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/LayeredHighlighter.java Mon Oct 05 13:45:50 2015 -0700
@@ -55,7 +55,7 @@
/**
* Layered highlight renderer.
*/
- static public abstract class LayerPainter implements Highlighter.HighlightPainter {
+ public abstract static class LayerPainter implements Highlighter.HighlightPainter {
/**
* @return a shape
* @param g Graphics used to draw
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/NavigationFilter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/NavigationFilter.java Mon Oct 05 13:45:50 2015 -0700
@@ -120,7 +120,7 @@
* not callback into the NavigationFilter.
* @since 1.4
*/
- public static abstract class FilterBypass {
+ public abstract static class FilterBypass {
/**
* Returns the Caret that is changing.
*
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java Mon Oct 05 13:45:50 2015 -0700
@@ -1184,11 +1184,11 @@
lineSpacing);
}
- final static int SPACE_ADDON = 0;
- final static int SPACE_ADDON_LEFTOVER_END = 1;
- final static int START_JUSTIFIABLE = 2;
+ static final int SPACE_ADDON = 0;
+ static final int SPACE_ADDON_LEFTOVER_END = 1;
+ static final int START_JUSTIFIABLE = 2;
//this should be the last index in justificationData
- final static int END_JUSTIFIABLE = 3;
+ static final int END_JUSTIFIABLE = 3;
int justificationData[] = null;
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/TableView.java Mon Oct 05 13:45:50 2015 -0700
@@ -579,7 +579,7 @@
SizeRequirements[] columnRequirements;
Vector<TableRow> rows;
boolean gridValid;
- static final private BitSet EMPTY = new BitSet();
+ private static final BitSet EMPTY = new BitSet();
/**
* View of a row in a row-centric table.
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSS.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSS.java Mon Oct 05 13:45:50 2015 -0700
@@ -2433,7 +2433,7 @@
}
// CSS.Values are static, don't archive it.
- transient private CSS.Value style;
+ private transient CSS.Value style;
}
@SuppressWarnings("serial") // Same-version serialization only
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSSBorder.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/CSSBorder.java Mon Oct 05 13:45:50 2015 -0700
@@ -54,13 +54,13 @@
class CSSBorder extends AbstractBorder {
/** Indices for the attribute groups. */
- final static int COLOR = 0, STYLE = 1, WIDTH = 2;
+ static final int COLOR = 0, STYLE = 1, WIDTH = 2;
/** Indices for the box sides within the attribute group. */
- final static int TOP = 0, RIGHT = 1, BOTTOM = 2, LEFT = 3;
+ static final int TOP = 0, RIGHT = 1, BOTTOM = 2, LEFT = 3;
/** The attribute groups. */
- final static Attribute[][] ATTRIBUTES = {
+ static final Attribute[][] ATTRIBUTES = {
{ Attribute.BORDER_TOP_COLOR, Attribute.BORDER_RIGHT_COLOR,
Attribute.BORDER_BOTTOM_COLOR, Attribute.BORDER_LEFT_COLOR, },
{ Attribute.BORDER_TOP_STYLE, Attribute.BORDER_RIGHT_STYLE,
@@ -70,12 +70,12 @@
};
/** Parsers for the border properties. */
- final static CssValue PARSERS[] = {
+ static final CssValue PARSERS[] = {
new ColorValue(), new BorderStyle(), new BorderWidthValue(null, 0),
};
/** Default values for the border properties. */
- final static Object[] DEFAULTS = {
+ static final Object[] DEFAULTS = {
Attribute.BORDER_COLOR, // marker: value will be computed on request
PARSERS[1].parseCssValue(Attribute.BORDER_STYLE.getDefaultValue()),
PARSERS[2].parseCssValue(Attribute.BORDER_WIDTH.getDefaultValue()),
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/FormView.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/FormView.java Mon Oct 05 13:45:50 2015 -0700
@@ -129,7 +129,7 @@
* Document attribute name for storing POST data. JEditorPane.getPostData()
* uses the same name, should be kept in sync.
*/
- final static String PostDataProperty = "javax.swing.JEditorPane.postdata";
+ static final String PostDataProperty = "javax.swing.JEditorPane.postdata";
/**
* Used to indicate if the maximum span should be the same as the
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java Mon Oct 05 13:45:50 2015 -0700
@@ -1885,7 +1885,7 @@
* its use should be performed under the protection of
* Document.render.
*/
- public static abstract class Iterator {
+ public abstract static class Iterator {
/**
* Return the attributes for this tag.
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java Mon Oct 05 13:45:50 2015 -0700
@@ -987,7 +987,7 @@
* providing a different parser while reusing some of the
* implementation provided by this editor kit.
*/
- public static abstract class Parser {
+ public abstract static class Parser {
/**
* Parse the given stream and drive the given callback
* with the results of the parse. This method should
@@ -1564,7 +1564,7 @@
* methods may have inconsistent behavior, or return the wrong thing.
*/
@SuppressWarnings("serial") // Superclass is not serializable across versions
- public static abstract class HTMLTextAction extends StyledTextAction {
+ public abstract static class HTMLTextAction extends StyledTextAction {
/**
* Creates a new HTMLTextAction from a string action name.
@@ -2009,7 +2009,7 @@
/*
* Returns the object in an AttributeSet matching a key
*/
- static private Object getAttrValue(AttributeSet attr, HTML.Attribute key) {
+ private static Object getAttrValue(AttributeSet attr, HTML.Attribute key) {
Enumeration<?> names = attr.getAttributeNames();
while (names.hasMoreElements()) {
Object nextKey = names.nextElement();
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/Map.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/Map.java Mon Oct 05 13:45:50 2015 -0700
@@ -180,7 +180,7 @@
* % the returned value with be negative. If a parse error results
* from trying to parse one of the numbers null is returned.
*/
- static protected int[] extractCoords(Object stringCoords) {
+ protected static int[] extractCoords(Object stringCoords) {
if (stringCoords == null || !(stringCoords instanceof String)) {
return null;
}
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java Mon Oct 05 13:45:50 2015 -0700
@@ -3196,7 +3196,7 @@
// ---- Variables ---------------------------------------------
- final static int DEFAULT_FONT_SIZE = 3;
+ static final int DEFAULT_FONT_SIZE = 3;
private CSS css;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/TableView.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/TableView.java Mon Oct 05 13:45:50 2015 -0700
@@ -996,7 +996,7 @@
boolean skipComments = false;
boolean gridValid;
- static final private BitSet EMPTY = new BitSet();
+ private static final BitSet EMPTY = new BitSet();
class ColumnIterator implements CSS.LayoutIterator {
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFAttributes.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFAttributes.java Mon Oct 05 13:45:50 2015 -0700
@@ -145,7 +145,7 @@
/************************************************************************/
/************************************************************************/
- static abstract class GenericAttribute
+ abstract static class GenericAttribute
{
int domain;
Object swingName;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFGenerator.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFGenerator.java Mon Oct 05 13:45:50 2015 -0700
@@ -76,14 +76,14 @@
/** The default color, used for text without an explicit color
* attribute. */
- static public final Color defaultRTFColor = Color.black;
+ public static final Color defaultRTFColor = Color.black;
- static public final float defaultFontSize = 12f;
+ public static final float defaultFontSize = 12f;
- static public final String defaultFontFamily = "Helvetica";
+ public static final String defaultFontFamily = "Helvetica";
/* constants so we can avoid allocating objects in inner loops */
- final static private Object MagicToken;
+ private static final Object MagicToken;
/* An array of character-keyword pairs. This could be done
as a dictionary (and lookup would be quicker), but that
@@ -91,7 +91,7 @@
written (slow!). */
static class CharacterKeywordPair
{ public char character; public String keyword; }
- static protected CharacterKeywordPair[] textKeywords;
+ protected static CharacterKeywordPair[] textKeywords;
static {
MagicToken = new Object();
@@ -112,7 +112,7 @@
static final char[] hexdigits = { '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
-static public void writeDocument(Document d, OutputStream to)
+public static void writeDocument(Document d, OutputStream to)
throws IOException
{
RTFGenerator gen = new RTFGenerator(to);
@@ -238,7 +238,7 @@
return null;
}
-static private Object attrDiff(MutableAttributeSet oldAttrs,
+private static Object attrDiff(MutableAttributeSet oldAttrs,
AttributeSet newAttrs,
Object key,
Object dfl)
@@ -265,7 +265,7 @@
return null;
}
-static private boolean equalArraysOK(Object a, Object b)
+private static boolean equalArraysOK(Object a, Object b)
{
Object[] aa, bb;
if (a == b)
@@ -987,7 +987,7 @@
* corresponding byte value (as an int, since bytes are signed).
*/
/* Not very efficient. TODO. */
-static protected int convertCharacter(int[] conversion, char ch)
+protected static int convertCharacter(int[] conversion, char ch)
{
int index;
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFReader.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/rtf/RTFReader.java Mon Oct 05 13:45:50 2015 -0700
@@ -86,7 +86,7 @@
* Unicode character. */
int skippingCharacters;
- static private Dictionary<String, RTFAttribute> straightforwardAttributes;
+ private static Dictionary<String, RTFAttribute> straightforwardAttributes;
static {
straightforwardAttributes = RTFAttributes.attributesByKeyword();
}
@@ -1066,7 +1066,7 @@
parserState.put("sec", sectionAttributes);
}
- abstract public void handleText(String text);
+ public abstract void handleText(String text);
public void handleBinaryBlob(byte[] data)
{
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/AbstractLayoutCache.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/AbstractLayoutCache.java Mon Oct 05 13:45:50 2015 -0700
@@ -513,7 +513,7 @@
* Used by <code>AbstractLayoutCache</code> to determine the size
* and x origin of a particular node.
*/
- static public abstract class NodeDimensions {
+ public abstract static class NodeDimensions {
/**
* Returns, by reference in bounds, the size and x origin to
* place value at. The calling method is responsible for determining
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java Mon Oct 05 13:45:50 2015 -0700
@@ -95,7 +95,7 @@
* An enumeration that is always empty. This is used when an enumeration
* of a leaf node's children is requested.
*/
- static public final Enumeration<TreeNode> EMPTY_ENUMERATION
+ public static final Enumeration<TreeNode> EMPTY_ENUMERATION
= Collections.emptyEnumeration();
/** this node's parent, or null if this node has no parent */
@@ -105,7 +105,7 @@
protected Vector<TreeNode> children;
/** optional user object */
- transient protected Object userObject;
+ protected transient Object userObject;
/** true if the node is able to have children */
protected boolean allowsChildren;
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java Mon Oct 05 13:45:50 2015 -0700
@@ -72,7 +72,7 @@
* Component used in editing, obtained from the
* <code>editingContainer</code>.
*/
- transient protected Component editingComponent;
+ protected transient Component editingComponent;
/**
* As of Java 2 platform v1.4 this field should no longer be used. If
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java Mon Oct 05 13:45:50 2015 -0700
@@ -131,13 +131,13 @@
// Icons
/** Icon used to show non-leaf nodes that aren't expanded. */
- transient protected Icon closedIcon;
+ protected transient Icon closedIcon;
/** Icon used to show leaf nodes. */
- transient protected Icon leafIcon;
+ protected transient Icon leafIcon;
/** Icon used to show non-leaf nodes that are expanded. */
- transient protected Icon openIcon;
+ protected transient Icon openIcon;
// Colors
/** Color to use for the foreground for selected nodes. */
--- a/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java Mon Oct 05 13:45:50 2015 -0700
@@ -78,7 +78,7 @@
protected EventListenerList listenerList = new EventListenerList();
/** Provides a row for a given path. */
- transient protected RowMapper rowMapper;
+ protected transient RowMapper rowMapper;
/** Handles maintaining the list selection model. The RowMapper is used
* to map from a TreePath to a row, and the value is then placed here. */
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java Mon Oct 05 13:45:50 2015 -0700
@@ -65,13 +65,6 @@
*/
Applet applet;
- /**
- * Applet will allow initialization. Should be
- * set to false if loading a serialized applet
- * that was pickled in the init=true state.
- */
- protected boolean doInit = true;
-
/**
* The classloader for the applet.
@@ -79,23 +72,23 @@
protected AppletClassLoader loader;
/* applet event ids */
- public final static int APPLET_DISPOSE = 0;
- public final static int APPLET_LOAD = 1;
- public final static int APPLET_INIT = 2;
- public final static int APPLET_START = 3;
- public final static int APPLET_STOP = 4;
- public final static int APPLET_DESTROY = 5;
- public final static int APPLET_QUIT = 6;
- public final static int APPLET_ERROR = 7;
+ public static final int APPLET_DISPOSE = 0;
+ public static final int APPLET_LOAD = 1;
+ public static final int APPLET_INIT = 2;
+ public static final int APPLET_START = 3;
+ public static final int APPLET_STOP = 4;
+ public static final int APPLET_DESTROY = 5;
+ public static final int APPLET_QUIT = 6;
+ public static final int APPLET_ERROR = 7;
/* send to the parent to force relayout */
- public final static int APPLET_RESIZE = 51234;
+ public static final int APPLET_RESIZE = 51234;
/* sent to a (distant) parent to indicate that the applet is being
* loaded or as completed loading
*/
- public final static int APPLET_LOADING = 51235;
- public final static int APPLET_LOADING_COMPLETED = 51236;
+ public static final int APPLET_LOADING = 51235;
+ public static final int APPLET_LOADING_COMPLETED = 51236;
/**
* The current status. One of:
@@ -139,15 +132,14 @@
boolean loadAbortRequest = false;
/* abstract classes */
- abstract protected String getCode();
- abstract protected String getJarFiles();
- abstract protected String getSerializedObject();
+ protected abstract String getCode();
+ protected abstract String getJarFiles();
@Override
- abstract public int getWidth();
+ public abstract int getWidth();
@Override
- abstract public int getHeight();
- abstract public boolean hasInitialFocus();
+ public abstract int getHeight();
+ public abstract boolean hasInitialFocus();
private static int threadGroupNumber = 0;
@@ -258,11 +250,11 @@
private Queue<Integer> queue = null;
- synchronized public void addAppletListener(AppletListener l) {
+ public synchronized void addAppletListener(AppletListener l) {
listeners = AppletEventMulticaster.add(listeners, l);
}
- synchronized public void removeAppletListener(AppletListener l) {
+ public synchronized void removeAppletListener(AppletListener l) {
listeners = AppletEventMulticaster.remove(listeners, l);
}
@@ -430,13 +422,12 @@
break;
}
applet.resize(defaultAppletSize);
- if (doInit) {
- if (PerformanceLogger.loggingEnabled()) {
- PerformanceLogger.setTime("Applet Init");
- PerformanceLogger.outputLog();
- }
- applet.init();
+
+ if (PerformanceLogger.loggingEnabled()) {
+ PerformanceLogger.setTime("Applet Init");
+ PerformanceLogger.outputLog();
}
+ applet.init();
//Need the default(fallback) font to be created in this AppContext
Font f = getFont();
@@ -446,8 +437,6 @@
setFont(new Font(Font.DIALOG, Font.PLAIN, 12));
}
- doInit = true; // allow restarts
-
// Validate the applet in event dispatch thread
// to avoid deadlock.
try {
@@ -786,34 +775,17 @@
protected Applet createApplet(final AppletClassLoader loader) throws ClassNotFoundException,
IllegalAccessException, IOException, InstantiationException, InterruptedException {
- final String serName = getSerializedObject();
String code = getCode();
- if (code != null && serName != null) {
- System.err.println(amh.getMessage("runloader.err"));
-// return null;
- throw new InstantiationException("Either \"code\" or \"object\" should be specified, but not both.");
- }
- if (code == null && serName == null) {
+ if (code != null) {
+ applet = (Applet)loader.loadCode(code).newInstance();
+ } else {
String msg = "nocode";
status = APPLET_ERROR;
showAppletStatus(msg);
showAppletLog(msg);
repaint();
}
- if (code != null) {
- applet = (Applet)loader.loadCode(code).newInstance();
- doInit = true;
- } else {
- // serName is not null;
- try (InputStream is = AccessController.doPrivileged(
- (PrivilegedAction<InputStream>)() -> loader.getResourceAsStream(serName));
- ObjectInputStream ois = new AppletObjectInputStream(is, loader)) {
-
- applet = (Applet) ois.readObject();
- doInit = false; // skip over the first init
- }
- }
// Determine the JDK level that the applet targets.
// This is critical for enabling certain backward
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletViewer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletViewer.java Mon Oct 05 13:45:50 2015 -0700
@@ -1081,7 +1081,7 @@
static String encoding = null;
- static private Reader makeReader(InputStream is) {
+ private static Reader makeReader(InputStream is) {
if (encoding != null) {
try {
return new BufferedReader(new InputStreamReader(is, encoding));
--- a/jdk/src/java.desktop/share/classes/sun/awt/AppContext.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/AppContext.java Mon Oct 05 13:45:50 2015 -0700
@@ -150,8 +150,8 @@
/*
* The keys to store EventQueue push/pop lock and condition.
*/
- public final static Object EVENT_QUEUE_LOCK_KEY = new StringBuilder("EventQueue.Lock");
- public final static Object EVENT_QUEUE_COND_KEY = new StringBuilder("EventQueue.Condition");
+ public static final Object EVENT_QUEUE_LOCK_KEY = new StringBuilder("EventQueue.Lock");
+ public static final Object EVENT_QUEUE_COND_KEY = new StringBuilder("EventQueue.Condition");
/* A map of AppContexts, referenced by ThreadGroup.
*/
@@ -174,7 +174,7 @@
private static volatile AppContext mainAppContext = null;
private static class GetAppContextLock {};
- private final static Object getAppContextLock = new GetAppContextLock();
+ private static final Object getAppContextLock = new GetAppContextLock();
/*
* The hash map associated with this AppContext. A private delegate
--- a/jdk/src/java.desktop/share/classes/sun/awt/DebugSettings.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/DebugSettings.java Mon Oct 05 13:45:50 2015 -0700
@@ -252,9 +252,9 @@
private static final String PROP_CTRACE = "ctrace";
private static final int PROP_CTRACE_LEN = PROP_CTRACE.length();
- private native synchronized void setCTracingOn(boolean enabled);
- private native synchronized void setCTracingOn(boolean enabled, String file);
- private native synchronized void setCTracingOn(boolean enabled, String file, int line);
+ private synchronized native void setCTracingOn(boolean enabled);
+ private synchronized native void setCTracingOn(boolean enabled, String file);
+ private synchronized native void setCTracingOn(boolean enabled, String file, int line);
private void loadNativeSettings() {
boolean ctracingOn;
--- a/jdk/src/java.desktop/share/classes/sun/awt/ExtendedKeyCodes.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/ExtendedKeyCodes.java Mon Oct 05 13:45:50 2015 -0700
@@ -12,16 +12,16 @@
* or higher.
*/
// Keycodes declared in KeyEvent.java with corresponding Unicode values.
- private final static HashMap<Integer, Integer> regularKeyCodesMap =
+ private static final HashMap<Integer, Integer> regularKeyCodesMap =
new HashMap<Integer,Integer>(98, 1.0f);
// Keycodes derived from Unicode values. Here should be collected codes
// for characters appearing on the primary layer of at least one
// known keyboard layout. For instance, sterling sign is on the primary layer
// of the Mac Italian layout.
- private final static HashSet<Integer> extendedKeyCodesSet =
+ private static final HashSet<Integer> extendedKeyCodesSet =
new HashSet<Integer>(501, 1.0f);
- final public static int getExtendedKeyCodeForChar( int c ) {
+ public static final int getExtendedKeyCodeForChar( int c ) {
int uc = Character.toUpperCase( c );
int lc = Character.toLowerCase( c );
if (regularKeyCodesMap.containsKey( c )) {
--- a/jdk/src/java.desktop/share/classes/sun/awt/OSInfo.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/OSInfo.java Mon Oct 05 13:45:50 2015 -0700
@@ -60,7 +60,7 @@
private static final String OS_NAME = "os.name";
private static final String OS_VERSION = "os.version";
- private final static Map<String, WindowsVersion> windowsVersionMap = new HashMap<String, OSInfo.WindowsVersion>();
+ private static final Map<String, WindowsVersion> windowsVersionMap = new HashMap<String, OSInfo.WindowsVersion>();
static {
windowsVersionMap.put(WINDOWS_95.toString(), WINDOWS_95);
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunHints.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunHints.java Mon Oct 05 13:45:50 2015 -0700
@@ -102,7 +102,7 @@
private static Value[][] ValueObjects =
new Value[NUM_KEYS][VALS_PER_KEY];
- private synchronized static void register(SunHints.Key key,
+ private static synchronized void register(SunHints.Key key,
Value value) {
int kindex = key.getIndex();
int vindex = value.getIndex();
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java Mon Oct 05 13:45:50 2015 -0700
@@ -113,7 +113,7 @@
* the 4-bytes limit for the int type. (CR 6799099)
* One more bit is reserved for FIRST_HIGH_BIT.
*/
- public final static int MAX_BUTTONS_SUPPORTED = 20;
+ public static final int MAX_BUTTONS_SUPPORTED = 20;
/**
* Creates and initializes EventQueue instance for the specified
@@ -1820,7 +1820,7 @@
* Returns the value of "sun.awt.disableMixing" property. Default
* value is {@code false}.
*/
- public synchronized static boolean getSunAwtDisableMixing() {
+ public static synchronized boolean getSunAwtDisableMixing() {
if (sunAwtDisableMixing == null) {
sunAwtDisableMixing = AccessController.doPrivileged(
new GetBooleanAction("sun.awt.disableMixing"));
--- a/jdk/src/java.desktop/share/classes/sun/awt/UngrabEvent.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/UngrabEvent.java Mon Oct 05 13:45:50 2015 -0700
@@ -42,7 +42,7 @@
@SuppressWarnings("serial")
public class UngrabEvent extends AWTEvent {
- private final static int UNGRAB_EVENT_ID = 1998;
+ private static final int UNGRAB_EVENT_ID = 1998;
public UngrabEvent(Component source) {
super(source, UNGRAB_EVENT_ID);
--- a/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java Mon Oct 05 13:45:50 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -938,15 +938,9 @@
try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
try (InputStream is = (InputStream)obj) {
- boolean eof = false;
- int avail = is.available();
- byte[] tmp = new byte[avail > 8192 ? avail : 8192];
- do {
- int aValue;
- if (!(eof = (aValue = is.read(tmp, 0, tmp.length)) == -1)) {
- bos.write(tmp, 0, aValue);
- }
- } while (!eof);
+ is.mark(Integer.MAX_VALUE);
+ is.transferTo(bos);
+ is.reset();
}
if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
@@ -1086,14 +1080,14 @@
return new File(filePath);
}
- private final static String[] DEPLOYMENT_CACHE_PROPERTIES = {
+ private static final String[] DEPLOYMENT_CACHE_PROPERTIES = {
"deployment.system.cachedir",
"deployment.user.cachedir",
"deployment.javaws.cachedir",
"deployment.javapi.cachedir"
};
- private final static ArrayList <File> deploymentCacheDirectoryList = new ArrayList<>();
+ private static final ArrayList <File> deploymentCacheDirectoryList = new ArrayList<>();
private static boolean isFileInWebstartedCache(File f) {
--- a/jdk/src/java.desktop/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/dnd/SunDragSourceContextPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -81,12 +81,12 @@
* dispatch constants
*/
- protected final static int DISPATCH_ENTER = 1;
- protected final static int DISPATCH_MOTION = 2;
- protected final static int DISPATCH_CHANGED = 3;
- protected final static int DISPATCH_EXIT = 4;
- protected final static int DISPATCH_FINISH = 5;
- protected final static int DISPATCH_MOUSE_MOVED = 6;
+ protected static final int DISPATCH_ENTER = 1;
+ protected static final int DISPATCH_MOTION = 2;
+ protected static final int DISPATCH_CHANGED = 3;
+ protected static final int DISPATCH_EXIT = 4;
+ protected static final int DISPATCH_FINISH = 5;
+ protected static final int DISPATCH_MOUSE_MOVED = 6;
/**
* construct a new SunDragSourceContextPeer
--- a/jdk/src/java.desktop/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/dnd/SunDropTargetContextPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -137,10 +137,10 @@
* constants used by dropAccept() or dropReject()
*/
- protected final static int STATUS_NONE = 0; // none pending
- protected final static int STATUS_WAIT = 1; // drop pending
- protected final static int STATUS_ACCEPT = 2;
- protected final static int STATUS_REJECT = -1;
+ protected static final int STATUS_NONE = 0; // none pending
+ protected static final int STATUS_WAIT = 1; // drop pending
+ protected static final int STATUS_ACCEPT = 2;
+ protected static final int STATUS_REJECT = -1;
/**
* create the peer
--- a/jdk/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/geom/AreaOp.java Mon Oct 05 13:45:50 2015 -0700
@@ -31,7 +31,7 @@
import java.util.Arrays;
public abstract class AreaOp {
- public static abstract class CAGOp extends AreaOp {
+ public abstract static class CAGOp extends AreaOp {
boolean inLeft;
boolean inRight;
boolean inResult;
--- a/jdk/src/java.desktop/share/classes/sun/awt/geom/Crossings.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/geom/Crossings.java Mon Oct 05 13:45:50 2015 -0700
@@ -307,7 +307,7 @@
return false;
}
- public final static class EvenOdd extends Crossings {
+ public static final class EvenOdd extends Crossings {
public EvenOdd(double xlo, double ylo, double xhi, double yhi) {
super(xlo, ylo, xhi, yhi);
}
@@ -390,7 +390,7 @@
}
}
- public final static class NonZero extends Crossings {
+ public static final class NonZero extends Crossings {
private int crosscounts[];
public NonZero(double xlo, double ylo, double xhi, double yhi) {
--- a/jdk/src/java.desktop/share/classes/sun/awt/im/CompositionArea.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/im/CompositionArea.java Mon Oct 05 13:45:50 2015 -0700
@@ -64,11 +64,11 @@
private TextLayout composedTextLayout;
private TextHitInfo caret = null;
private JFrame compositionWindow;
- private final static int TEXT_ORIGIN_X = 5;
- private final static int TEXT_ORIGIN_Y = 15;
- private final static int PASSIVE_WIDTH = 480;
- private final static int WIDTH_MARGIN=10;
- private final static int HEIGHT_MARGIN=3;
+ private static final int TEXT_ORIGIN_X = 5;
+ private static final int TEXT_ORIGIN_Y = 15;
+ private static final int PASSIVE_WIDTH = 480;
+ private static final int WIDTH_MARGIN=10;
+ private static final int HEIGHT_MARGIN=3;
CompositionArea() {
// create composition window with localized title
--- a/jdk/src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/im/InputMethodContext.java Mon Oct 05 13:45:50 2015 -0700
@@ -66,7 +66,7 @@
private CompositionAreaHandler compositionAreaHandler;
private Object compositionAreaHandlerLock = new Object();
- static private boolean belowTheSpotInputRequested;
+ private static boolean belowTheSpotInputRequested;
private boolean inputMethodSupportsBelowTheSpot;
static {
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java Mon Oct 05 13:45:50 2015 -0700
@@ -76,7 +76,7 @@
/** A cached copy of minY + height for use in bounds checks. */
private int maxY;
- static private native void initIDs();
+ private static native void initIDs();
static {
/* ensure that the necessary native libraries are loaded */
NativeLibLoader.loadLibraries();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java Mon Oct 05 13:45:50 2015 -0700
@@ -73,7 +73,7 @@
/** A cached copy of minY + height for use in bounds checks. */
private int maxY;
- static private native void initIDs();
+ private static native void initIDs();
static {
/* ensure that the necessary native libraries are loaded */
NativeLibLoader.loadLibraries();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ImageCache.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ImageCache.java Mon Oct 05 13:45:50 2015 -0700
@@ -40,7 +40,7 @@
* The ImageCache must be used from the thread with an AppContext only.
*
*/
-final public class ImageCache {
+public final class ImageCache {
// Ordered Map keyed by args hash, ordered by most recent accessed entry.
private final LinkedHashMap<PixelsKey, ImageSoftReference> map
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ImageRepresentation.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ImageRepresentation.java Mon Oct 05 13:45:50 2015 -0700
@@ -75,7 +75,7 @@
boolean isDefaultBI = false;
boolean isSameCM = false;
- private native static void initIDs();
+ private static native void initIDs();
static {
/* ensure that the necessary native libraries are loaded */
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ImagingLib.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ImagingLib.java Mon Oct 05 13:45:50 2015 -0700
@@ -73,18 +73,18 @@
*/
private static native boolean init();
- static public native int transformBI(BufferedImage src, BufferedImage dst,
+ public static native int transformBI(BufferedImage src, BufferedImage dst,
double[] matrix, int interpType);
- static public native int transformRaster(Raster src, Raster dst,
+ public static native int transformRaster(Raster src, Raster dst,
double[] matrix,
int interpType);
- static public native int convolveBI(BufferedImage src, BufferedImage dst,
+ public static native int convolveBI(BufferedImage src, BufferedImage dst,
Kernel kernel, int edgeHint);
- static public native int convolveRaster(Raster src, Raster dst,
+ public static native int convolveRaster(Raster src, Raster dst,
Kernel kernel, int edgeHint);
- static public native int lookupByteBI(BufferedImage src, BufferedImage dst,
+ public static native int lookupByteBI(BufferedImage src, BufferedImage dst,
byte[][] table);
- static public native int lookupByteRaster(Raster src, Raster dst,
+ public static native int lookupByteRaster(Raster src, Raster dst,
byte[][] table);
static {
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java Mon Oct 05 13:45:50 2015 -0700
@@ -91,7 +91,7 @@
/** A cached copy of minY + height for use in bounds checks. */
private int maxY;
- static private native void initIDs();
+ private static native void initIDs();
static {
/* ensure that the necessary native libraries are loaded */
NativeLibLoader.loadLibraries();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/PNGImageDecoder.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/PNGImageDecoder.java Mon Oct 05 13:45:50 2015 -0700
@@ -650,13 +650,13 @@
}
/* code changed to make it work with ImageDecoder architecture
static int ThreadLimit = 10;
- private synchronized static void waitTurn() {
+ private static synchronized void waitTurn() {
try {
while(ThreadLimit<=0) PNGImageDecoder.class.wait(1000);
} catch(InterruptedException e){}
ThreadLimit--;
}
- private synchronized static void endTurn() {
+ private static synchronized void endTurn() {
if(ThreadLimit<=0) PNGImageDecoder.class.notify();
ThreadLimit++;
}
@@ -771,7 +771,7 @@
is the 1's complement of the final running CRC (see the
crc() routine below)). */
- static private int update_crc(int crc, byte[] buf, int offset, int len) {
+ private static int update_crc(int crc, byte[] buf, int offset, int len) {
int c = crc;
while (--len>=0)
c = crc_table[(c ^ buf[offset++]) & 0xff] ^ (c >>> 8);
@@ -779,7 +779,7 @@
}
/* Return the CRC of the bytes buf[0..len-1]. */
- static private int crc(byte[] buf, int offset, int len) {
+ private static int crc(byte[] buf, int offset, int len) {
return update_crc(0xffffffff, buf, offset, len) ^ 0xffffffff;
}
public static class Chromaticities {
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java Mon Oct 05 13:45:50 2015 -0700
@@ -76,7 +76,7 @@
/** A cached copy of minY + height for use in bounds checks. */
private int maxY;
- static private native void initIDs();
+ private static native void initIDs();
static {
/* ensure that the necessary native libraries are loaded */
NativeLibLoader.loadLibraries();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/SurfaceManager.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/SurfaceManager.java Mon Oct 05 13:45:50 2015 -0700
@@ -51,7 +51,7 @@
*/
public abstract class SurfaceManager {
- public static abstract class ImageAccessor {
+ public abstract static class ImageAccessor {
public abstract SurfaceManager getSurfaceManager(Image img);
public abstract void setSurfaceManager(Image img, SurfaceManager mgr);
}
--- a/jdk/src/java.desktop/share/classes/sun/dc/DuctusRenderingEngine.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/dc/DuctusRenderingEngine.java Mon Oct 05 13:45:50 2015 -0700
@@ -359,7 +359,7 @@
private static Rasterizer theRasterizer;
- public synchronized static Rasterizer getRasterizer() {
+ public static synchronized Rasterizer getRasterizer() {
Rasterizer r = theRasterizer;
if (r == null) {
r = new Rasterizer();
@@ -369,7 +369,7 @@
return r;
}
- public synchronized static void dropRasterizer(Rasterizer r) {
+ public static synchronized void dropRasterizer(Rasterizer r) {
r.reset();
theRasterizer = r;
}
--- a/jdk/src/java.desktop/share/classes/sun/font/Type1Font.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/font/Type1Font.java Mon Oct 05 13:45:50 2015 -0700
@@ -102,8 +102,8 @@
private String psName = null;
- static private HashMap<String, String> styleAbbreviationsMapping;
- static private HashSet<String> styleNameTokes;
+ private static HashMap<String, String> styleAbbreviationsMapping;
+ private static HashSet<String> styleNameTokes;
static {
styleAbbreviationsMapping = new HashMap<>();
--- a/jdk/src/java.desktop/share/classes/sun/java2d/NullSurfaceData.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/NullSurfaceData.java Mon Oct 05 13:45:50 2015 -0700
@@ -63,7 +63,7 @@
return this;
}
- private final static NullPipe nullpipe = new NullPipe();
+ private static final NullPipe nullpipe = new NullPipe();
public void validatePipe(SunGraphics2D sg2d) {
sg2d.drawpipe = nullpipe;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/StateTrackableDelegate.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/StateTrackableDelegate.java Mon Oct 05 13:45:50 2015 -0700
@@ -44,7 +44,7 @@
* of the StateTrackable interface that is permanently in the
* {@link State#UNTRACKABLE UNTRACKABLE} state.
*/
- public final static StateTrackableDelegate UNTRACKABLE_DELEGATE =
+ public static final StateTrackableDelegate UNTRACKABLE_DELEGATE =
new StateTrackableDelegate(UNTRACKABLE);
/**
@@ -52,7 +52,7 @@
* of the StateTrackable interface that is permanently in the
* {@link State#IMMUTABLE IMMUTABLE} state.
*/
- public final static StateTrackableDelegate IMMUTABLE_DELEGATE =
+ public static final StateTrackableDelegate IMMUTABLE_DELEGATE =
new StateTrackableDelegate(IMMUTABLE);
/**
--- a/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java Mon Oct 05 13:45:50 2015 -0700
@@ -252,7 +252,7 @@
private FontInfo glyphVectorFontInfo;
private FontRenderContext glyphVectorFRC;
- private final static int slowTextTransformMask =
+ private static final int slowTextTransformMask =
AffineTransform.TYPE_GENERAL_TRANSFORM
| AffineTransform.TYPE_MASK_ROTATION
| AffineTransform.TYPE_FLIP;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/SurfaceManagerFactory.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/SurfaceManagerFactory.java Mon Oct 05 13:45:50 2015 -0700
@@ -50,7 +50,7 @@
*
* @return the surface manager factory
*/
- public synchronized static SurfaceManagerFactory getInstance() {
+ public static synchronized SurfaceManagerFactory getInstance() {
if (instance == null) {
throw new IllegalStateException("No SurfaceManagerFactory set.");
@@ -65,7 +65,7 @@
*
* @param factory the factory to set
*/
- public synchronized static void setInstance(SurfaceManagerFactory factory) {
+ public static synchronized void setInstance(SurfaceManagerFactory factory) {
if (factory == null) {
// We don't want to allow setting this to null at any time.
--- a/jdk/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMS.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMS.java Mon Oct 05 13:45:50 2015 -0700
@@ -136,7 +136,7 @@
private native void setTagDataNative(long ptr, int tagSignature,
byte[] data);
- public synchronized static native LCMSProfile getProfileID(ICC_Profile profile);
+ public static synchronized native LCMSProfile getProfileID(ICC_Profile profile);
/* Helper method used from LCMSColorTransfrom */
static long createTransform(
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/CompositeType.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/CompositeType.java Mon Oct 05 13:45:50 2015 -0700
@@ -242,7 +242,7 @@
this.uniqueID = makeUniqueID(desc);
}
- public synchronized static int makeUniqueID(String desc) {
+ public static synchronized int makeUniqueID(String desc) {
Integer i = compositeUIDMap.get(desc);
if (i == null) {
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphList.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphList.java Mon Oct 05 13:45:50 2015 -0700
@@ -39,9 +39,9 @@
*/
public class DrawGlyphList extends GraphicsPrimitive {
- public final static String methodSignature = "DrawGlyphList(...)".toString();
+ public static final String methodSignature = "DrawGlyphList(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static DrawGlyphList locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListAA.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListAA.java Mon Oct 05 13:45:50 2015 -0700
@@ -39,9 +39,9 @@
*/
public class DrawGlyphListAA extends GraphicsPrimitive {
- public final static String methodSignature = "DrawGlyphListAA(...)".toString();
+ public static final String methodSignature = "DrawGlyphListAA(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static DrawGlyphListAA locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListLCD.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListLCD.java Mon Oct 05 13:45:50 2015 -0700
@@ -39,10 +39,10 @@
*/
public class DrawGlyphListLCD extends GraphicsPrimitive {
- public final static String
+ public static final String
methodSignature = "DrawGlyphListLCD(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static DrawGlyphListLCD locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawLine.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawLine.java Mon Oct 05 13:45:50 2015 -0700
@@ -44,9 +44,9 @@
*/
public class DrawLine extends GraphicsPrimitive
{
- public final static String methodSignature = "DrawLine(...)".toString();
+ public static final String methodSignature = "DrawLine(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static DrawLine locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawParallelogram.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawParallelogram.java Mon Oct 05 13:45:50 2015 -0700
@@ -42,10 +42,10 @@
*/
public class DrawParallelogram extends GraphicsPrimitive
{
- public final static String methodSignature =
+ public static final String methodSignature =
"DrawParallelogram(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static DrawParallelogram locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawPath.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawPath.java Mon Oct 05 13:45:50 2015 -0700
@@ -38,10 +38,10 @@
*/
public class DrawPath extends GraphicsPrimitive {
- public final static String methodSignature =
+ public static final String methodSignature =
"DrawPath(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static DrawPath locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawPolygons.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawPolygons.java Mon Oct 05 13:45:50 2015 -0700
@@ -41,9 +41,9 @@
*/
public class DrawPolygons extends GraphicsPrimitive
{
- public final static String methodSignature = "DrawPolygons(...)".toString();
+ public static final String methodSignature = "DrawPolygons(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static DrawPolygons locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawRect.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/DrawRect.java Mon Oct 05 13:45:50 2015 -0700
@@ -44,9 +44,9 @@
*/
public class DrawRect extends GraphicsPrimitive
{
- public final static String methodSignature = "DrawRect(...)".toString();
+ public static final String methodSignature = "DrawRect(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static DrawRect locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillParallelogram.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillParallelogram.java Mon Oct 05 13:45:50 2015 -0700
@@ -40,10 +40,10 @@
*/
public class FillParallelogram extends GraphicsPrimitive
{
- public final static String methodSignature =
+ public static final String methodSignature =
"FillParallelogram(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static FillParallelogram locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillPath.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillPath.java Mon Oct 05 13:45:50 2015 -0700
@@ -38,10 +38,10 @@
*/
public class FillPath extends GraphicsPrimitive {
- public final static String methodSignature =
+ public static final String methodSignature =
"FillPath(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static FillPath locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillRect.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillRect.java Mon Oct 05 13:45:50 2015 -0700
@@ -44,9 +44,9 @@
*/
public class FillRect extends GraphicsPrimitive
{
- public final static String methodSignature = "FillRect(...)".toString();
+ public static final String methodSignature = "FillRect(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static FillRect locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillSpans.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/FillSpans.java Mon Oct 05 13:45:50 2015 -0700
@@ -45,9 +45,9 @@
*/
public class FillSpans extends GraphicsPrimitive
{
- public final static String methodSignature = "FillSpans(...)".toString();
+ public static final String methodSignature = "FillSpans(...)".toString();
- public final static int primTypeID = makePrimTypeID();
+ public static final int primTypeID = makePrimTypeID();
public static FillSpans locate(SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitive.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitive.java Mon Oct 05 13:45:50 2015 -0700
@@ -119,14 +119,14 @@
private long pNativePrim; // Native blit loop info
- public synchronized static final int makePrimTypeID() {
+ public static final synchronized int makePrimTypeID() {
if (unusedPrimID > 255) {
throw new InternalError("primitive id overflow");
}
return unusedPrimID++;
}
- public synchronized static final int makeUniqueID(int primTypeID,
+ public static final synchronized int makeUniqueID(int primTypeID,
SurfaceType src,
CompositeType cmp,
SurfaceType dst)
@@ -456,7 +456,7 @@
}
}
- public synchronized static void tracePrimitive(Object prim) {
+ public static synchronized void tracePrimitive(Object prim) {
if ((traceflags & TRACECOUNTS) != 0) {
if (traceMap == null) {
traceMap = new HashMap<>();
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitiveMgr.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitiveMgr.java Mon Oct 05 13:45:50 2015 -0700
@@ -98,7 +98,7 @@
private GraphicsPrimitiveMgr() {
}
- public synchronized static void register(GraphicsPrimitive[] newPrimitives)
+ public static synchronized void register(GraphicsPrimitive[] newPrimitives)
{
GraphicsPrimitive[] devCollection = primitives;
int oldSize = 0;
@@ -121,7 +121,7 @@
primitives = temp;
}
- public synchronized static void registerGeneral(GraphicsPrimitive gen) {
+ public static synchronized void registerGeneral(GraphicsPrimitive gen) {
if (generalPrimitives == null) {
generalPrimitives = new GraphicsPrimitive[] {gen};
return;
@@ -133,7 +133,7 @@
generalPrimitives = newGen;
}
- public synchronized static GraphicsPrimitive locate(int primTypeID,
+ public static synchronized GraphicsPrimitive locate(int primTypeID,
SurfaceType dsttype)
{
return locate(primTypeID,
@@ -142,7 +142,7 @@
dsttype);
}
- public synchronized static GraphicsPrimitive locate(int primTypeID,
+ public static synchronized GraphicsPrimitive locate(int primTypeID,
SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
@@ -170,7 +170,7 @@
return prim;
}
- public synchronized static GraphicsPrimitive
+ public static synchronized GraphicsPrimitive
locatePrim(int primTypeID,
SurfaceType srctype,
CompositeType comptype,
--- a/jdk/src/java.desktop/share/classes/sun/java2d/loops/ProcessPath.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/loops/ProcessPath.java Mon Oct 05 13:45:50 2015 -0700
@@ -45,7 +45,7 @@
/* Public interfaces and methods for drawing and filling general paths */
- public static abstract class DrawHandler {
+ public abstract static class DrawHandler {
public int xMin;
public int yMin;
public int xMax;
@@ -121,7 +121,7 @@
public static final int PH_MODE_DRAW_CLIP = 0;
public static final int PH_MODE_FILL_CLIP = 1;
- public static abstract class ProcessHandler implements EndSubPathHandler {
+ public abstract static class ProcessHandler implements EndSubPathHandler {
DrawHandler dhnd;
int clipMode;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/opengl/OGLPaints.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/opengl/OGLPaints.java Mon Oct 05 13:45:50 2015 -0700
@@ -151,7 +151,7 @@
/****************** Shared MultipleGradientPaint support ********************/
- private static abstract class MultiGradient extends OGLPaints {
+ private abstract static class MultiGradient extends OGLPaints {
protected MultiGradient() {}
/**
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/AAShapePipe.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/AAShapePipe.java Mon Oct 05 13:45:50 2015 -0700
@@ -127,7 +127,7 @@
private static byte[] theTile;
- private synchronized static byte[] getAlphaTile(int len) {
+ private static synchronized byte[] getAlphaTile(int len) {
byte[] t = theTile;
if (t == null || t.length < len) {
t = new byte[len];
@@ -137,7 +137,7 @@
return t;
}
- private synchronized static void dropAlphaTile(byte[] t) {
+ private static synchronized void dropAlphaTile(byte[] t) {
theTile = t;
}
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/LoopPipe.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/LoopPipe.java Mon Oct 05 13:45:50 2015 -0700
@@ -52,7 +52,7 @@
ShapeDrawPipe,
LoopBasedPipe
{
- final static RenderingEngine RenderEngine = RenderingEngine.getInstance();
+ static final RenderingEngine RenderEngine = RenderingEngine.getInstance();
public void drawLine(SunGraphics2D sg2d,
int x1, int y1, int x2, int y2)
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/SpanShapeRenderer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/SpanShapeRenderer.java Mon Oct 05 13:45:50 2015 -0700
@@ -42,7 +42,7 @@
* perform the actual rendering.
*/
public abstract class SpanShapeRenderer implements ShapeDrawPipe {
- final static RenderingEngine RenderEngine = RenderingEngine.getInstance();
+ static final RenderingEngine RenderEngine = RenderingEngine.getInstance();
public static class Composite extends SpanShapeRenderer {
CompositePipe comppipe;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pisces/Renderer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pisces/Renderer.java Mon Oct 05 13:45:50 2015 -0700
@@ -311,12 +311,12 @@
public static final int WIND_NON_ZERO = 1;
// Antialiasing
- final private int SUBPIXEL_LG_POSITIONS_X;
- final private int SUBPIXEL_LG_POSITIONS_Y;
- final private int SUBPIXEL_POSITIONS_X;
- final private int SUBPIXEL_POSITIONS_Y;
- final private int SUBPIXEL_MASK_X;
- final private int SUBPIXEL_MASK_Y;
+ private final int SUBPIXEL_LG_POSITIONS_X;
+ private final int SUBPIXEL_LG_POSITIONS_Y;
+ private final int SUBPIXEL_POSITIONS_X;
+ private final int SUBPIXEL_POSITIONS_Y;
+ private final int SUBPIXEL_MASK_X;
+ private final int SUBPIXEL_MASK_Y;
final int MAX_AA_ALPHA;
// Cache to store RLE-encoded coverage mask of the current primitive
--- a/jdk/src/java.desktop/share/classes/sun/print/CustomMediaSizeName.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/print/CustomMediaSizeName.java Mon Oct 05 13:45:50 2015 -0700
@@ -43,7 +43,7 @@
}
- private synchronized static int nextValue(String name) {
+ private static synchronized int nextValue(String name) {
customStringTable.add(name);
return (customStringTable.size()-1);
--- a/jdk/src/java.desktop/share/classes/sun/print/CustomMediaTray.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/print/CustomMediaTray.java Mon Oct 05 13:45:50 2015 -0700
@@ -40,7 +40,7 @@
}
- private synchronized static int nextValue(String name) {
+ private static synchronized int nextValue(String name) {
customStringTable.add(name);
return (customStringTable.size()-1);
}
--- a/jdk/src/java.desktop/share/classes/sun/print/PSStreamPrintJob.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/print/PSStreamPrintJob.java Mon Oct 05 13:45:50 2015 -0700
@@ -66,9 +66,9 @@
public class PSStreamPrintJob implements CancelablePrintJob {
- transient private Vector<PrintJobListener> jobListeners;
- transient private Vector<PrintJobAttributeListener> attrListeners;
- transient private Vector<PrintJobAttributeSet> listenedAttributeSets;
+ private transient Vector<PrintJobListener> jobListeners;
+ private transient Vector<PrintJobAttributeListener> attrListeners;
+ private transient Vector<PrintJobAttributeSet> listenedAttributeSets;
private PSStreamPrintService service;
private boolean fidelity;
--- a/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java Mon Oct 05 13:45:50 2015 -0700
@@ -1885,7 +1885,7 @@
return mHeight;
}
- synchronized private void waitForDimensions(Image img) {
+ private synchronized void waitForDimensions(Image img) {
mHeight = img.getHeight(this);
mWidth = img.getWidth(this);
while (!badImage && (mWidth < 0 || mHeight < 0)) {
@@ -1903,7 +1903,7 @@
}
}
- synchronized public boolean imageUpdate(Image image, int flags,
+ public synchronized boolean imageUpdate(Image image, int flags,
int x, int y, int w, int h) {
boolean dontCallMeAgain = (flags & (HEIGHT | ABORT | ERROR)) != 0;
--- a/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java Mon Oct 05 13:45:50 2015 -0700
@@ -263,27 +263,27 @@
// The following Strings are maintained for backward-compatibility with
// Properties based print control.
- private final static String DEST_PROP = "awt.print.destination";
- private final static String PRINTER = "printer";
- private final static String FILE = "file";
+ private static final String DEST_PROP = "awt.print.destination";
+ private static final String PRINTER = "printer";
+ private static final String FILE = "file";
- private final static String PRINTER_PROP = "awt.print.printer";
+ private static final String PRINTER_PROP = "awt.print.printer";
- private final static String FILENAME_PROP = "awt.print.fileName";
+ private static final String FILENAME_PROP = "awt.print.fileName";
- private final static String NUMCOPIES_PROP = "awt.print.numCopies";
+ private static final String NUMCOPIES_PROP = "awt.print.numCopies";
- private final static String OPTIONS_PROP = "awt.print.options";
+ private static final String OPTIONS_PROP = "awt.print.options";
- private final static String ORIENT_PROP = "awt.print.orientation";
- private final static String PORTRAIT = "portrait";
- private final static String LANDSCAPE = "landscape";
+ private static final String ORIENT_PROP = "awt.print.orientation";
+ private static final String PORTRAIT = "portrait";
+ private static final String LANDSCAPE = "landscape";
- private final static String PAPERSIZE_PROP = "awt.print.paperSize";
- private final static String LETTER = "letter";
- private final static String LEGAL = "legal";
- private final static String EXECUTIVE = "executive";
- private final static String A4 = "a4";
+ private static final String PAPERSIZE_PROP = "awt.print.paperSize";
+ private static final String LETTER = "letter";
+ private static final String LEGAL = "legal";
+ private static final String EXECUTIVE = "executive";
+ private static final String A4 = "a4";
private Properties props;
--- a/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java Mon Oct 05 13:45:50 2015 -0700
@@ -335,67 +335,67 @@
* Returns the resolution in dots per inch across the width
* of the page.
*/
- abstract protected double getXRes();
+ protected abstract double getXRes();
/**
* Returns the resolution in dots per inch down the height
* of the page.
*/
- abstract protected double getYRes();
+ protected abstract double getYRes();
/**
* Must be obtained from the current printer.
* Value is in device pixels.
* Not adjusted for orientation of the paper.
*/
- abstract protected double getPhysicalPrintableX(Paper p);
+ protected abstract double getPhysicalPrintableX(Paper p);
/**
* Must be obtained from the current printer.
* Value is in device pixels.
* Not adjusted for orientation of the paper.
*/
- abstract protected double getPhysicalPrintableY(Paper p);
+ protected abstract double getPhysicalPrintableY(Paper p);
/**
* Must be obtained from the current printer.
* Value is in device pixels.
* Not adjusted for orientation of the paper.
*/
- abstract protected double getPhysicalPrintableWidth(Paper p);
+ protected abstract double getPhysicalPrintableWidth(Paper p);
/**
* Must be obtained from the current printer.
* Value is in device pixels.
* Not adjusted for orientation of the paper.
*/
- abstract protected double getPhysicalPrintableHeight(Paper p);
+ protected abstract double getPhysicalPrintableHeight(Paper p);
/**
* Must be obtained from the current printer.
* Value is in device pixels.
* Not adjusted for orientation of the paper.
*/
- abstract protected double getPhysicalPageWidth(Paper p);
+ protected abstract double getPhysicalPageWidth(Paper p);
/**
* Must be obtained from the current printer.
* Value is in device pixels.
* Not adjusted for orientation of the paper.
*/
- abstract protected double getPhysicalPageHeight(Paper p);
+ protected abstract double getPhysicalPageHeight(Paper p);
/**
* Begin a new page.
*/
- abstract protected void startPage(PageFormat format, Printable painter,
+ protected abstract void startPage(PageFormat format, Printable painter,
int index, boolean paperChanged)
throws PrinterException;
/**
* End a page.
*/
- abstract protected void endPage(PageFormat format, Printable painter,
+ protected abstract void endPage(PageFormat format, Printable painter,
int index)
throws PrinterException;
@@ -406,7 +406,7 @@
* page. The width and height of the band is
* specified by the caller.
*/
- abstract protected void printBand(byte[] data, int x, int y,
+ protected abstract void printBand(byte[] data, int x, int y,
int width, int height)
throws PrinterException;
--- a/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java Mon Oct 05 13:45:50 2015 -0700
@@ -87,17 +87,17 @@
/**
* Waiting print status (user response pending).
*/
- public final static int WAITING = 0;
+ public static final int WAITING = 0;
/**
* Approve print status (user activated "Print" or "OK").
*/
- public final static int APPROVE = 1;
+ public static final int APPROVE = 1;
/**
* Cancel print status (user activated "Cancel");
*/
- public final static int CANCEL = 2;
+ public static final int CANCEL = 2;
private static final String strBundle = "sun.print.resources.serviceui";
private static final Insets panelInsets = new Insets(6, 6, 6, 6);
--- a/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/swing/FilePane.java Mon Oct 05 13:45:50 2015 -0700
@@ -63,14 +63,14 @@
// Constants for actions. These are used for the actions' ACTION_COMMAND_KEY
// and as keys in the action maps for FilePane and the corresponding UI classes
- public final static String ACTION_APPROVE_SELECTION = "approveSelection";
- public final static String ACTION_CANCEL = "cancelSelection";
- public final static String ACTION_EDIT_FILE_NAME = "editFileName";
- public final static String ACTION_REFRESH = "refresh";
- public final static String ACTION_CHANGE_TO_PARENT_DIRECTORY = "Go Up";
- public final static String ACTION_NEW_FOLDER = "New Folder";
- public final static String ACTION_VIEW_LIST = "viewTypeList";
- public final static String ACTION_VIEW_DETAILS = "viewTypeDetails";
+ public static final String ACTION_APPROVE_SELECTION = "approveSelection";
+ public static final String ACTION_CANCEL = "cancelSelection";
+ public static final String ACTION_EDIT_FILE_NAME = "editFileName";
+ public static final String ACTION_REFRESH = "refresh";
+ public static final String ACTION_CHANGE_TO_PARENT_DIRECTORY = "Go Up";
+ public static final String ACTION_NEW_FOLDER = "New Folder";
+ public static final String ACTION_VIEW_LIST = "viewTypeList";
+ public static final String ACTION_VIEW_DETAILS = "viewTypeDetails";
private Action[] actions;
--- a/jdk/src/java.desktop/share/classes/sun/swing/ImageCache.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/swing/ImageCache.java Mon Oct 05 13:45:50 2015 -0700
@@ -37,7 +37,7 @@
// Maximum number of entries to cache
private int maxCount;
// The entries.
- final private LinkedList<SoftReference<Entry>> entries;
+ private final LinkedList<SoftReference<Entry>> entries;
public ImageCache(int maxCount) {
this.maxCount = maxCount;
@@ -102,10 +102,10 @@
* Caches set of arguments and Image.
*/
private static class Entry {
- final private GraphicsConfiguration config;
- final private int w;
- final private int h;
- final private Object[] args;
+ private final GraphicsConfiguration config;
+ private final int w;
+ private final int h;
+ private final Object[] args;
private Image image;
Entry(GraphicsConfiguration config, int w, int h, Object[] args) {
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java Mon Oct 05 13:45:50 2015 -0700
@@ -97,6 +97,14 @@
int ownerX, int ownerY);
}
+ /*
+ * An accessor for the KeyStroke class
+ */
+ public interface KeyStrokeAccessor {
+
+ KeyStroke create();
+ }
+
/**
* The javax.swing.text.JTextComponent class accessor object.
*/
@@ -185,4 +193,26 @@
public static void setPopupFactoryAccessor(PopupFactoryAccessor popupFactoryAccessor) {
SwingAccessor.popupFactoryAccessor = popupFactoryAccessor;
}
+
+ /**
+ * The KeyStroke class accessor object.
+ */
+ private static KeyStrokeAccessor keyStrokeAccessor;
+
+ /**
+ * Retrieve the accessor object for the KeyStroke class.
+ */
+ public static KeyStrokeAccessor getKeyStrokeAccessor() {
+ if (keyStrokeAccessor == null) {
+ unsafe.ensureClassInitialized(KeyStroke.class);
+ }
+ return keyStrokeAccessor;
+ }
+
+ /*
+ * Set the accessor object for the KeyStroke class.
+ */
+ public static void setKeyStrokeAccessor(KeyStrokeAccessor accessor) {
+ SwingAccessor.keyStrokeAccessor = accessor;
+ }
}
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java Mon Oct 05 13:45:50 2015 -0700
@@ -135,13 +135,6 @@
}
}
- /**
- * Key used in client properties used to indicate that the
- * {@code ComponentUI} of the JComponent instance should be returned.
- */
- public static final Object COMPONENT_UI_PROPERTY_KEY =
- new StringBuffer("ComponentUIPropertyKey");
-
/** Client Property key for the text maximal offsets for BasicMenuItemUI */
public static final StringUIClientPropertyKey BASICMENUITEMUI_MAX_TEXT_OFFSET =
new StringUIClientPropertyKey ("maxTextOffset");
--- a/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/SynthFileChooserUI.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/SynthFileChooserUI.java Mon Oct 05 13:45:50 2015 -0700
@@ -228,8 +228,8 @@
protected void paint(SynthContext context, Graphics g) {
}
- abstract public void setFileName(String fileName);
- abstract public String getFileName();
+ public abstract void setFileName(String fileName);
+ public abstract String getFileName();
protected void doSelectedFileChanged(PropertyChangeEvent e) {
}
--- a/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java Mon Oct 05 13:45:50 2015 -0700
@@ -699,7 +699,7 @@
}
}
- final static int space = 10;
+ static final int space = 10;
class IndentIcon implements Icon {
Icon icon = null;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/InfoWindow.java Mon Oct 05 13:45:50 2015 -0700
@@ -169,12 +169,12 @@
display();
}};
- private final static int TOOLTIP_SHOW_TIME = 10000;
- private final static int TOOLTIP_START_DELAY_TIME = 1000;
- private final static int TOOLTIP_MAX_LENGTH = 64;
- private final static int TOOLTIP_MOUSE_CURSOR_INDENT = 5;
- private final static Color TOOLTIP_BACKGROUND_COLOR = new Color(255, 255, 220);
- private final static Font TOOLTIP_TEXT_FONT = XWindow.getDefaultFont();
+ private static final int TOOLTIP_SHOW_TIME = 10000;
+ private static final int TOOLTIP_START_DELAY_TIME = 1000;
+ private static final int TOOLTIP_MAX_LENGTH = 64;
+ private static final int TOOLTIP_MOUSE_CURSOR_INDENT = 5;
+ private static final Color TOOLTIP_BACKGROUND_COLOR = new Color(255, 255, 220);
+ private static final Font TOOLTIP_TEXT_FONT = XWindow.getDefaultFont();
public Tooltip(Frame parent, Object target,
LiveArguments liveArguments)
@@ -258,15 +258,15 @@
private final LiveArguments liveArguments;
private final Object target;
- private final static int BALLOON_SHOW_TIME = 10000;
- private final static int BALLOON_TEXT_MAX_LENGTH = 256;
- private final static int BALLOON_WORD_LINE_MAX_LENGTH = 16;
- private final static int BALLOON_WORD_LINE_MAX_COUNT = 4;
- private final static int BALLOON_ICON_WIDTH = 32;
- private final static int BALLOON_ICON_HEIGHT = 32;
- private final static int BALLOON_TRAY_ICON_INDENT = 0;
- private final static Color BALLOON_CAPTION_BACKGROUND_COLOR = new Color(200, 200 ,255);
- private final static Font BALLOON_CAPTION_FONT = new Font(Font.DIALOG, Font.BOLD, 12);
+ private static final int BALLOON_SHOW_TIME = 10000;
+ private static final int BALLOON_TEXT_MAX_LENGTH = 256;
+ private static final int BALLOON_WORD_LINE_MAX_LENGTH = 16;
+ private static final int BALLOON_WORD_LINE_MAX_COUNT = 4;
+ private static final int BALLOON_ICON_WIDTH = 32;
+ private static final int BALLOON_ICON_HEIGHT = 32;
+ private static final int BALLOON_TRAY_ICON_INDENT = 0;
+ private static final Color BALLOON_CAPTION_BACKGROUND_COLOR = new Color(200, 200 ,255);
+ private static final Font BALLOON_CAPTION_FONT = new Font(Font.DIALOG, Font.BOLD, 12);
private Panel mainPanel = new Panel();
private Panel captionPanel = new Panel();
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/MWMConstants.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/MWMConstants.java Mon Oct 05 13:45:50 2015 -0700
@@ -26,7 +26,7 @@
package sun.awt.X11;
-final public class MWMConstants {
+public final class MWMConstants {
private MWMConstants(){}
@@ -62,8 +62,8 @@
/* number of elements of size 32 in _MWM_HINTS */
static final int PROP_MWM_HINTS_ELEMENTS = 5;
/* number of elements of size 32 in _MWM_INFO */
- final static int PROP_MOTIF_WM_INFO_ELEMENTS= 2;
- final static int PROP_MWM_INFO_ELEMENTS= PROP_MOTIF_WM_INFO_ELEMENTS;
+ static final int PROP_MOTIF_WM_INFO_ELEMENTS= 2;
+ static final int PROP_MWM_INFO_ELEMENTS= PROP_MOTIF_WM_INFO_ELEMENTS;
static final String MWM_HINTS_ATOM_NAME = "_MOTIF_WM_HINTS";
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAwtState.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAwtState.java Mon Oct 05 13:45:50 2015 -0700
@@ -27,7 +27,7 @@
* This class is a placeholder for all internal static objects that represent
* system state. We keep our representation up-to-date with actual system
* state by tracking events, such as X Focus, Component under cursor etc.
- * All attributes should be static private with accessors to simpify change
+ * All attributes should be private static with accessors to simpify change
* tracking.
*/
package sun.awt.X11;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java Mon Oct 05 13:45:50 2015 -0700
@@ -41,7 +41,7 @@
* The abstract class XBaseMenuWindow is the superclass
* of all menu windows.
*/
-abstract public class XBaseMenuWindow extends XWindow {
+public abstract class XBaseMenuWindow extends XWindow {
/************************************************
*
@@ -89,7 +89,7 @@
* no other locks should be taken when
* thread own this lock.
*/
- static private Object menuTreeLock = new Object();
+ private static Object menuTreeLock = new Object();
/************************************************
*
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XBaseWindow.java Mon Oct 05 13:45:50 2015 -0700
@@ -72,8 +72,8 @@
private XSizeHints hints;
private XWMHints wmHints;
- final static int MIN_SIZE = 1;
- final static int DEF_LOCATION = 1;
+ static final int MIN_SIZE = 1;
+ static final int DEF_LOCATION = 1;
private static XAtom wm_client_leader;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XButtonPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -40,7 +40,7 @@
private Insets borderInsets;
private Insets contentAreaInsets;
- private final static String propertyPrefix = "Button" + ".";
+ private static final String propertyPrefix = "Button" + ".";
protected Color focusColor = SystemColor.windowText;
private boolean disposed = false;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XChoicePeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -50,10 +50,10 @@
// at a time in an
// unfurled Choice
// Description of these constants in ListHelper
- public final static int TEXT_SPACE = 1;
- public final static int BORDER_WIDTH = 1;
- public final static int ITEM_MARGIN = 1;
- public final static int SCROLLBAR_WIDTH = 15;
+ public static final int TEXT_SPACE = 1;
+ public static final int BORDER_WIDTH = 1;
+ public static final int ITEM_MARGIN = 1;
+ public static final int SCROLLBAR_WIDTH = 15;
// SHARE THESE!
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -210,7 +210,7 @@
* Descendants should use this method to determine whether or not native window
* has focus.
*/
- final public boolean hasFocus() {
+ public final boolean hasFocus() {
return bHasFocus;
}
@@ -242,7 +242,7 @@
private static Class<?> seClass;
private static Constructor<?> seCtor;
- final static AWTEvent wrapInSequenced(AWTEvent event) {
+ static final AWTEvent wrapInSequenced(AWTEvent event) {
try {
if (seClass == null) {
seClass = Class.forName("java.awt.SequencedEvent");
@@ -283,7 +283,7 @@
// TODO: consider moving it to KeyboardFocusManagerPeerImpl
@SuppressWarnings("deprecation")
- final public boolean requestFocus(Component lightweightChild, boolean temporary,
+ public final boolean requestFocus(Component lightweightChild, boolean temporary,
boolean focusedWindowChangeAllowed, long time,
CausedFocusEvent.Cause cause)
{
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XConstants.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XConstants.java Mon Oct 05 13:45:50 2015 -0700
@@ -25,7 +25,7 @@
package sun.awt.X11;
-final public class XConstants {
+public final class XConstants {
private XConstants(){}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XCursorFontConstants.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XCursorFontConstants.java Mon Oct 05 13:45:50 2015 -0700
@@ -25,7 +25,7 @@
package sun.awt.X11;
-final public class XCursorFontConstants {
+public final class XCursorFontConstants {
private XCursorFontConstants(){}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDecoratedPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -904,7 +904,7 @@
return getSize().height;
}
- final public WindowDimensions getDimensions() {
+ public final WindowDimensions getDimensions() {
return dimensions;
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDragAndDropProtocols.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDragAndDropProtocols.java Mon Oct 05 13:45:50 2015 -0700
@@ -36,8 +36,8 @@
* @since 1.5
*/
final class XDragAndDropProtocols {
- private final static List<XDragSourceProtocol> dragProtocols;
- private final static List<XDropTargetProtocol> dropProtocols;
+ private static final List<XDragSourceProtocol> dragProtocols;
+ private static final List<XDropTargetProtocol> dropProtocols;
public static final String XDnD = "XDnD";
public static final String MotifDnD = "MotifDnD";
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetContextPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -238,7 +238,7 @@
static final class XDropTargetProtocolListenerImpl
implements XDropTargetProtocolListener {
- private final static XDropTargetProtocolListener theInstance =
+ private static final XDropTargetProtocolListener theInstance =
new XDropTargetProtocolListenerImpl();
private XDropTargetProtocolListenerImpl() {}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedHelper.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XEmbedHelper.java Mon Oct 05 13:45:50 2015 -0700
@@ -38,43 +38,43 @@
*/
public class XEmbedHelper {
private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed");
- final static Unsafe unsafe = Unsafe.getUnsafe();
+ static final Unsafe unsafe = Unsafe.getUnsafe();
- final static int XEMBED_VERSION = 0,
+ static final int XEMBED_VERSION = 0,
XEMBED_MAPPED = (1 << 0);
/* XEMBED messages */
- final static int XEMBED_EMBEDDED_NOTIFY = 0;
- final static int XEMBED_WINDOW_ACTIVATE = 1;
- final static int XEMBED_WINDOW_DEACTIVATE = 2;
- final static int XEMBED_REQUEST_FOCUS =3;
- final static int XEMBED_FOCUS_IN = 4;
- final static int XEMBED_FOCUS_OUT = 5;
- final static int XEMBED_FOCUS_NEXT = 6;
- final static int XEMBED_FOCUS_PREV = 7;
+ static final int XEMBED_EMBEDDED_NOTIFY = 0;
+ static final int XEMBED_WINDOW_ACTIVATE = 1;
+ static final int XEMBED_WINDOW_DEACTIVATE = 2;
+ static final int XEMBED_REQUEST_FOCUS =3;
+ static final int XEMBED_FOCUS_IN = 4;
+ static final int XEMBED_FOCUS_OUT = 5;
+ static final int XEMBED_FOCUS_NEXT = 6;
+ static final int XEMBED_FOCUS_PREV = 7;
/* 8-9 were used for XEMBED_GRAB_KEY/XEMBED_UNGRAB_KEY */
- final static int XEMBED_GRAB_KEY = 8;
- final static int XEMBED_UNGRAB_KEY = 9;
- final static int XEMBED_MODALITY_ON = 10;
- final static int XEMBED_MODALITY_OFF = 11;
- final static int XEMBED_REGISTER_ACCELERATOR = 12;
- final static int XEMBED_UNREGISTER_ACCELERATOR= 13;
- final static int XEMBED_ACTIVATE_ACCELERATOR = 14;
+ static final int XEMBED_GRAB_KEY = 8;
+ static final int XEMBED_UNGRAB_KEY = 9;
+ static final int XEMBED_MODALITY_ON = 10;
+ static final int XEMBED_MODALITY_OFF = 11;
+ static final int XEMBED_REGISTER_ACCELERATOR = 12;
+ static final int XEMBED_UNREGISTER_ACCELERATOR= 13;
+ static final int XEMBED_ACTIVATE_ACCELERATOR = 14;
- final static int NON_STANDARD_XEMBED_GTK_GRAB_KEY = 108;
- final static int NON_STANDARD_XEMBED_GTK_UNGRAB_KEY = 109;
+ static final int NON_STANDARD_XEMBED_GTK_GRAB_KEY = 108;
+ static final int NON_STANDARD_XEMBED_GTK_UNGRAB_KEY = 109;
// A detail code is required for XEMBED_FOCUS_IN. The following values are valid:
/* Details for XEMBED_FOCUS_IN: */
- final static int XEMBED_FOCUS_CURRENT = 0;
- final static int XEMBED_FOCUS_FIRST = 1;
- final static int XEMBED_FOCUS_LAST = 2;
+ static final int XEMBED_FOCUS_CURRENT = 0;
+ static final int XEMBED_FOCUS_FIRST = 1;
+ static final int XEMBED_FOCUS_LAST = 2;
// Modifiers bits
- final static int XEMBED_MODIFIER_SHIFT = (1 << 0);
- final static int XEMBED_MODIFIER_CONTROL = (1 << 1);
- final static int XEMBED_MODIFIER_ALT = (1 << 2);
- final static int XEMBED_MODIFIER_SUPER = (1 << 3);
- final static int XEMBED_MODIFIER_HYPER = (1 << 4);
+ static final int XEMBED_MODIFIER_SHIFT = (1 << 0);
+ static final int XEMBED_MODIFIER_CONTROL = (1 << 1);
+ static final int XEMBED_MODIFIER_ALT = (1 << 2);
+ static final int XEMBED_MODIFIER_SUPER = (1 << 3);
+ static final int XEMBED_MODIFIER_HYPER = (1 << 4);
static XAtom XEmbedInfo;
static XAtom XEmbed;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFileDialogPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFileDialogPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -862,8 +862,8 @@
@SuppressWarnings("serial") // JDK-implementation class
class Separator extends Canvas {
- public final static int HORIZONTAL = 0;
- public final static int VERTICAL = 1;
+ public static final int HORIZONTAL = 0;
+ public static final int VERTICAL = 1;
int orientation;
@SuppressWarnings("deprecation")
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XIconWindow.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XIconWindow.java Mon Oct 05 13:45:50 2015 -0700
@@ -34,7 +34,7 @@
import sun.util.logging.PlatformLogger;
public class XIconWindow extends XBaseWindow {
- private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XIconWindow");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XIconWindow");
XDecoratedPeer parent;
Dimension size;
long iconPixmap = 0;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XLayerProtocol.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XLayerProtocol.java Mon Oct 05 13:45:50 2015 -0700
@@ -28,7 +28,7 @@
public interface XLayerProtocol {
- final static int LAYER_NORMAL = 0,
+ static final int LAYER_NORMAL = 0,
LAYER_ALWAYS_ON_TOP = 1;
boolean supportsLayer(int layer);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -42,28 +42,28 @@
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XListPeer");
- public final static int MARGIN = 2;
- public final static int SPACE = 1;
- public final static int SCROLLBAR_AREA = 17; // Area reserved for the
+ public static final int MARGIN = 2;
+ public static final int SPACE = 1;
+ public static final int SCROLLBAR_AREA = 17; // Area reserved for the
// scrollbar
- public final static int SCROLLBAR_WIDTH = 13; // Actual width of the
+ public static final int SCROLLBAR_WIDTH = 13; // Actual width of the
// scrollbar
- public final static int NONE = -1;
- public final static int WINDOW = 0;
- public final static int VERSCROLLBAR = 1;
- public final static int HORSCROLLBAR = 2;
- public final static int DEFAULT_VISIBLE_ROWS = 4; // From java.awt.List,
- public final static int HORIZ_SCROLL_AMT = 10;
+ public static final int NONE = -1;
+ public static final int WINDOW = 0;
+ public static final int VERSCROLLBAR = 1;
+ public static final int HORSCROLLBAR = 2;
+ public static final int DEFAULT_VISIBLE_ROWS = 4; // From java.awt.List,
+ public static final int HORIZ_SCROLL_AMT = 10;
- private final static int PAINT_VSCROLL = 2;
- private final static int PAINT_HSCROLL = 4;
- private final static int PAINT_ITEMS = 8;
- private final static int PAINT_FOCUS = 16;
- private final static int PAINT_BACKGROUND = 32;
- private final static int PAINT_HIDEFOCUS = 64;
- private final static int PAINT_ALL =
+ private static final int PAINT_VSCROLL = 2;
+ private static final int PAINT_HSCROLL = 4;
+ private static final int PAINT_ITEMS = 8;
+ private static final int PAINT_FOCUS = 16;
+ private static final int PAINT_BACKGROUND = 32;
+ private static final int PAINT_HIDEFOCUS = 64;
+ private static final int PAINT_ALL =
PAINT_VSCROLL | PAINT_HSCROLL | PAINT_ITEMS | PAINT_FOCUS | PAINT_BACKGROUND;
- private final static int COPY_AREA = 128;
+ private static final int COPY_AREA = 128;
XVerticalScrollbar vsb;
XHorizontalScrollbar hsb;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -56,15 +56,15 @@
/*
* dimension constants
*/
- private final static int BAR_SPACING_TOP = 3;
- private final static int BAR_SPACING_BOTTOM = 3;
- private final static int BAR_SPACING_LEFT = 3;
- private final static int BAR_SPACING_RIGHT = 3;
- private final static int BAR_ITEM_SPACING = 2;
- private final static int BAR_ITEM_MARGIN_LEFT = 10;
- private final static int BAR_ITEM_MARGIN_RIGHT = 10;
- private final static int BAR_ITEM_MARGIN_TOP = 2;
- private final static int BAR_ITEM_MARGIN_BOTTOM = 2;
+ private static final int BAR_SPACING_TOP = 3;
+ private static final int BAR_SPACING_BOTTOM = 3;
+ private static final int BAR_SPACING_LEFT = 3;
+ private static final int BAR_SPACING_RIGHT = 3;
+ private static final int BAR_ITEM_SPACING = 2;
+ private static final int BAR_ITEM_MARGIN_LEFT = 10;
+ private static final int BAR_ITEM_MARGIN_RIGHT = 10;
+ private static final int BAR_ITEM_MARGIN_TOP = 2;
+ private static final int BAR_ITEM_MARGIN_BOTTOM = 2;
/************************************************
*
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuItemPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuItemPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -75,8 +75,8 @@
/*
* Size constants
*/
- private final static int SEPARATOR_WIDTH = 20;
- private final static int SEPARATOR_HEIGHT = 5;
+ private static final int SEPARATOR_WIDTH = 20;
+ private static final int SEPARATOR_HEIGHT = 5;
/************************************************
*
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java Mon Oct 05 13:45:50 2015 -0700
@@ -52,16 +52,16 @@
/*
* dimension constants
*/
- private final static int WINDOW_SPACING_LEFT = 2;
- private final static int WINDOW_SPACING_RIGHT = 2;
- private final static int WINDOW_SPACING_TOP = 2;
- private final static int WINDOW_SPACING_BOTTOM = 2;
- private final static int WINDOW_ITEM_INDENT = 15;
- private final static int WINDOW_ITEM_MARGIN_LEFT = 2;
- private final static int WINDOW_ITEM_MARGIN_RIGHT = 2;
- private final static int WINDOW_ITEM_MARGIN_TOP = 2;
- private final static int WINDOW_ITEM_MARGIN_BOTTOM = 2;
- private final static int WINDOW_SHORTCUT_SPACING = 10;
+ private static final int WINDOW_SPACING_LEFT = 2;
+ private static final int WINDOW_SPACING_RIGHT = 2;
+ private static final int WINDOW_SPACING_TOP = 2;
+ private static final int WINDOW_SPACING_BOTTOM = 2;
+ private static final int WINDOW_ITEM_INDENT = 15;
+ private static final int WINDOW_ITEM_MARGIN_LEFT = 2;
+ private static final int WINDOW_ITEM_MARGIN_RIGHT = 2;
+ private static final int WINDOW_ITEM_MARGIN_TOP = 2;
+ private static final int WINDOW_ITEM_MARGIN_BOTTOM = 2;
+ private static final int WINDOW_SHORTCUT_SPACING = 10;
/*
* Checkmark
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XNETProtocol.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XNETProtocol.java Mon Oct 05 13:45:50 2015 -0700
@@ -33,8 +33,8 @@
final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProtocol
{
- private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XNETProtocol");
- private final static PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XNETProtocol");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XNETProtocol");
+ private static final PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XNETProtocol");
private static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XNETProtocol");
/**
@@ -280,9 +280,9 @@
XAtom XA_NET_WM_WINDOW_OPACITY = XAtom.get("_NET_WM_WINDOW_OPACITY");
/* For _NET_WM_STATE ClientMessage requests */
- final static int _NET_WM_STATE_REMOVE =0; /* remove/unset property */
- final static int _NET_WM_STATE_ADD =1; /* add/set property */
- final static int _NET_WM_STATE_TOGGLE =2; /* toggle property */
+ static final int _NET_WM_STATE_REMOVE =0; /* remove/unset property */
+ static final int _NET_WM_STATE_ADD =1; /* add/set property */
+ static final int _NET_WM_STATE_TOGGLE =2; /* toggle property */
boolean supportChecked = false;
long NetWindow = 0;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XPopupMenuPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -58,8 +58,8 @@
/*
* Painting constants
*/
- private final static int CAPTION_MARGIN_TOP = 4;
- private final static int CAPTION_SEPARATOR_HEIGHT = 6;
+ private static final int CAPTION_MARGIN_TOP = 4;
+ private static final int CAPTION_SEPARATOR_HEIGHT = 6;
/************************************************
*
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XProtocol.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XProtocol.java Mon Oct 05 13:45:50 2015 -0700
@@ -30,7 +30,7 @@
import java.util.*;
class XProtocol {
- private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XProtocol");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XProtocol");
private Map<XAtom, XAtomList> atomToList = new HashMap<XAtom, XAtomList>();
private Map<XAtom, Long> atomToAnchor = new HashMap<XAtom, Long>();
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XProtocolConstants.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XProtocolConstants.java Mon Oct 05 13:45:50 2015 -0700
@@ -25,7 +25,7 @@
package sun.awt.X11;
-final public class XProtocolConstants {
+public final class XProtocolConstants {
private XProtocolConstants(){}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XRobotPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -107,16 +107,16 @@
return pixelArray;
}
- private static native synchronized void setup(int numberOfButtons, int[] buttonDownMasks);
+ private static synchronized native void setup(int numberOfButtons, int[] buttonDownMasks);
- private static native synchronized void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y);
- private static native synchronized void mousePressImpl(int buttons);
- private static native synchronized void mouseReleaseImpl(int buttons);
- private static native synchronized void mouseWheelImpl(int wheelAmt);
+ private static synchronized native void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y);
+ private static synchronized native void mousePressImpl(int buttons);
+ private static synchronized native void mouseReleaseImpl(int buttons);
+ private static synchronized native void mouseWheelImpl(int wheelAmt);
- private static native synchronized void keyPressImpl(int keycode);
- private static native synchronized void keyReleaseImpl(int keycode);
+ private static synchronized native void keyPressImpl(int keycode);
+ private static synchronized native void keyReleaseImpl(int keycode);
- private static native synchronized void getRGBPixelsImpl(X11GraphicsConfig xgc,
+ private static synchronized native void getRGBPixelsImpl(X11GraphicsConfig xgc,
int x, int y, int width, int height, int pixelArray[], boolean isGtkSupported);
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -34,13 +34,13 @@
class XScrollPanePeer extends XComponentPeer implements ScrollPanePeer, XScrollbarClient {
- public final static int MARGIN = 1;
- public final static int SCROLLBAR;
- public final static int SPACE = 2;
- public final static int SCROLLBAR_INSET = 2;
+ public static final int MARGIN = 1;
+ public static final int SCROLLBAR;
+ public static final int SPACE = 2;
+ public static final int SCROLLBAR_INSET = 2;
- public final static int VERTICAL = 1 << 0;
- public final static int HORIZONTAL = 1 << 1;
+ public static final int VERTICAL = 1 << 0;
+ public static final int HORIZONTAL = 1 << 1;
static {
SCROLLBAR = XToolkit.getUIDefaults().getInt("ScrollBar.defaultWidth");
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java Mon Oct 05 13:45:50 2015 -0700
@@ -51,7 +51,7 @@
private XScrollRepeater i_scroller = new XScrollRepeater(null);
// Thumb length is always >= MIN_THUMB_H
- private final static int MIN_THUMB_H = 5;
+ private static final int MIN_THUMB_H = 5;
private static final int ARROW_IND = 1;
@@ -115,7 +115,7 @@
}
}
- abstract protected void rebuildArrows();
+ protected abstract void rebuildArrows();
public void setSize(int width, int height) {
if (log.isLoggable(PlatformLogger.Level.FINER)) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbarPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -31,7 +31,7 @@
import sun.util.logging.PlatformLogger;
class XScrollbarPeer extends XComponentPeer implements ScrollbarPeer, XScrollbarClient {
- private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XScrollbarPeer");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XScrollbarPeer");
private static final int DEFAULT_LENGTH = 50;
private static final int DEFAULT_WIDTH_SOLARIS = 19;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java Mon Oct 05 13:45:50 2015 -0700
@@ -67,7 +67,7 @@
//There is 400 ms is set by default on Windows and 500 by default on KDE and GNOME.
//We use the same hardcoded constant.
- private final static int AWT_MULTICLICK_DEFAULT_TIME = 500;
+ private static final int AWT_MULTICLICK_DEFAULT_TIME = 500;
static final boolean PRIMARY_LOOP = false;
static final boolean SECONDARY_LOOP = true;
@@ -140,8 +140,8 @@
*/
static native long getTrayIconDisplayTimeout();
- private native static void initIDs();
- native static void waitForEvents(long nextTaskTime);
+ private static native void initIDs();
+ static native void waitForEvents(long nextTaskTime);
static Thread toolkitThread;
static boolean isToolkitThread() {
return Thread.currentThread() == toolkitThread;
@@ -1102,7 +1102,7 @@
* Returns the value of "sun.awt.disableGtkFileDialogs" property. Default
* value is {@code false}.
*/
- public synchronized static boolean getSunAwtDisableGtkFileDialogs() {
+ public static synchronized boolean getSunAwtDisableGtkFileDialogs() {
if (sunAwtDisableGtkFileDialogs == null) {
sunAwtDisableGtkFileDialogs = AccessController.doPrivileged(
new GetBooleanAction("sun.awt.disableGtkFileDialogs"));
@@ -1579,8 +1579,8 @@
return Math.min(XConstants.MAX_BUTTONS, ((SunToolkit) (Toolkit.getDefaultToolkit())).getNumberOfButtons());
}
- private final static String prefix = "DnD.Cursor.";
- private final static String postfix = ".32x32";
+ private static final String prefix = "DnD.Cursor.";
+ private static final String postfix = ".32x32";
private static final String dndPrefix = "DnD.";
@Override
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XTrayIconPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -63,8 +63,8 @@
int old_x, old_y;
int ex_width, ex_height;
- final static int TRAY_ICON_WIDTH = 24;
- final static int TRAY_ICON_HEIGHT = 24;
+ static final int TRAY_ICON_WIDTH = 24;
+ static final int TRAY_ICON_HEIGHT = 24;
XTrayIconPeer(TrayIcon target)
throws AWTException
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XUtilConstants.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XUtilConstants.java Mon Oct 05 13:45:50 2015 -0700
@@ -25,7 +25,7 @@
package sun.awt.X11;
-final public class XUtilConstants {
+public final class XUtilConstants {
private XUtilConstants(){}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWINProtocol.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWINProtocol.java Mon Oct 05 13:45:50 2015 -0700
@@ -30,7 +30,7 @@
import sun.util.logging.PlatformLogger;
class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
- final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWINProtocol");
+ static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWINProtocol");
/* Gnome WM spec */
XAtom XA_WIN_SUPPORTING_WM_CHECK = XAtom.get("_WIN_SUPPORTING_WM_CHECK");
@@ -187,15 +187,15 @@
XAtom XA_WIN_LAYER = XAtom.get("_WIN_LAYER");
/* _WIN_STATE bits */
- final static int WIN_STATE_STICKY =(1<<0); /* everyone knows sticky */
- final static int WIN_STATE_MINIMIZED =(1<<1); /* Reserved - definition is unclear */
- final static int WIN_STATE_MAXIMIZED_VERT =(1<<2); /* window in maximized V state */
- final static int WIN_STATE_MAXIMIZED_HORIZ =(1<<3); /* window in maximized H state */
- final static int WIN_STATE_HIDDEN =(1<<4); /* not on taskbar but window visible*/
- final static int WIN_STATE_SHADED =(1<<5); /* shaded (MacOS / Afterstep style) */
+ static final int WIN_STATE_STICKY =(1<<0); /* everyone knows sticky */
+ static final int WIN_STATE_MINIMIZED =(1<<1); /* Reserved - definition is unclear */
+ static final int WIN_STATE_MAXIMIZED_VERT =(1<<2); /* window in maximized V state */
+ static final int WIN_STATE_MAXIMIZED_HORIZ =(1<<3); /* window in maximized H state */
+ static final int WIN_STATE_HIDDEN =(1<<4); /* not on taskbar but window visible*/
+ static final int WIN_STATE_SHADED =(1<<5); /* shaded (MacOS / Afterstep style) */
/* _WIN_LAYER values */
- final static int WIN_LAYER_ONTOP = 6;
- final static int WIN_LAYER_NORMAL = 4;
+ static final int WIN_LAYER_ONTOP = 6;
+ static final int WIN_LAYER_NORMAL = 4;
long WinWindow = 0;
boolean supportChecked = false;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWM.java Mon Oct 05 13:45:50 2015 -0700
@@ -50,9 +50,9 @@
final class XWM
{
- private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWM");
- private final static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWM");
- private final static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XWM");
+ private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWM");
+ private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWM");
+ private static final PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XWM");
static final XAtom XA_MWM_HINTS = new XAtom();
@@ -66,30 +66,30 @@
XAtom XA_UTF8_STRING = XAtom.get("UTF8_STRING"); /* like STRING but encoding is UTF-8 */
/* Currently we only care about max_v and max_h in _NET_WM_STATE */
- final static int AWT_NET_N_KNOWN_STATES=2;
+ static final int AWT_NET_N_KNOWN_STATES=2;
/* Enlightenment */
- final static XAtom XA_E_FRAME_SIZE = new XAtom();
+ static final XAtom XA_E_FRAME_SIZE = new XAtom();
/* KWin (KDE2) */
- final static XAtom XA_KDE_NET_WM_FRAME_STRUT = new XAtom();
+ static final XAtom XA_KDE_NET_WM_FRAME_STRUT = new XAtom();
/* KWM (KDE 1.x) OBSOLETE??? */
- final static XAtom XA_KWM_WIN_ICONIFIED = new XAtom();
- final static XAtom XA_KWM_WIN_MAXIMIZED = new XAtom();
+ static final XAtom XA_KWM_WIN_ICONIFIED = new XAtom();
+ static final XAtom XA_KWM_WIN_MAXIMIZED = new XAtom();
/* OpenLook */
- final static XAtom XA_OL_DECOR_DEL = new XAtom();
- final static XAtom XA_OL_DECOR_HEADER = new XAtom();
- final static XAtom XA_OL_DECOR_RESIZE = new XAtom();
- final static XAtom XA_OL_DECOR_PIN = new XAtom();
- final static XAtom XA_OL_DECOR_CLOSE = new XAtom();
+ static final XAtom XA_OL_DECOR_DEL = new XAtom();
+ static final XAtom XA_OL_DECOR_HEADER = new XAtom();
+ static final XAtom XA_OL_DECOR_RESIZE = new XAtom();
+ static final XAtom XA_OL_DECOR_PIN = new XAtom();
+ static final XAtom XA_OL_DECOR_CLOSE = new XAtom();
/* EWMH */
- final static XAtom XA_NET_FRAME_EXTENTS = new XAtom();
- final static XAtom XA_NET_REQUEST_FRAME_EXTENTS = new XAtom();
+ static final XAtom XA_NET_FRAME_EXTENTS = new XAtom();
+ static final XAtom XA_NET_REQUEST_FRAME_EXTENTS = new XAtom();
- final static int
+ static final int
UNDETERMINED_WM = 1,
NO_WM = 2,
OTHER_WM = 3,
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWarningWindow.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWarningWindow.java Mon Oct 05 13:45:50 2015 -0700
@@ -33,14 +33,14 @@
import sun.awt.SunToolkit;
class XWarningWindow extends XWindow {
- private final static int SHOWING_DELAY = 330;
- private final static int HIDING_DELAY = 2000;
+ private static final int SHOWING_DELAY = 330;
+ private static final int HIDING_DELAY = 2000;
private final Window ownerWindow;
private WeakReference<XWindowPeer> ownerPeer;
private long parentWindow;
- private final static String OWNER = "OWNER";
+ private static final String OWNER = "OWNER";
private InfoWindow.Tooltip tooltip;
/**
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java Mon Oct 05 13:45:50 2015 -0700
@@ -54,7 +54,7 @@
* allow a smudge factor so that moving the mouse by a small
* amount does not wipe out the multi-click state variables.
*/
- private final static int AWT_MULTICLICK_SMUDGE = 4;
+ private static final int AWT_MULTICLICK_SMUDGE = 4;
// ButtonXXX events stuff
static int lastX = 0, lastY = 0;
static long lastTime = 0;
@@ -123,7 +123,7 @@
native void getWMInsets(long window, long left, long top, long right, long bottom, long border);
native long getTopWindow(long window, long rootWin);
native void getWindowBounds(long window, long x, long y, long width, long height);
- private native static void initIDs();
+ private static native void initIDs();
static {
initIDs();
@@ -441,7 +441,7 @@
// and one that does not get overridden. The problem is that in postInit
// we call setBackground and we don't have all the stuff initialized to
// do a full paint for most peers. So we cannot call setBackground in postInit.
- final public void xSetBackground(Color c) {
+ public final void xSetBackground(Color c) {
XToolkit.awtLock();
try {
winBackground(c);
@@ -572,6 +572,14 @@
}
static int getModifiers(int state, int button, int keyCode) {
+ return getModifiers(state, button, keyCode, false);
+ }
+
+ static int getWheelModifiers(int state, int button) {
+ return getModifiers(state, button, 0, true);
+ }
+
+ private static int getModifiers(int state, int button, int keyCode, boolean isWheelMouse) {
int modifiers = 0;
if (((state & XConstants.ShiftMask) != 0) ^ (keyCode == KeyEvent.VK_SHIFT)) {
@@ -602,7 +610,7 @@
// ONLY one of these conditions should be TRUE to add that modifier.
if (((state & XlibUtil.getButtonMask(i + 1)) != 0) != (button == XConstants.buttons[i])){
//exclude wheel buttons from adding their numbers as modifiers
- if (!isWheel(XConstants.buttons[i])) {
+ if (!isWheelMouse || !isWheel(XConstants.buttons[i])) {
modifiers |= InputEvent.getMaskForButton(i+1);
}
}
@@ -715,9 +723,9 @@
if (button > XConstants.buttons[4]){
button -= 2;
}
- modifiers = getModifiers(xbe.get_state(),button,0);
if (!isWheel(lbutton)) {
+ modifiers = getModifiers(xbe.get_state(), button, 0);
MouseEvent me = new MouseEvent(getEventSource(),
type == XConstants.ButtonPress ? MouseEvent.MOUSE_PRESSED : MouseEvent.MOUSE_RELEASED,
jWhen,modifiers, x, y,
@@ -743,6 +751,7 @@
}
else {
+ modifiers = getWheelModifiers(xbe.get_state(), button);
if (xev.get_type() == XConstants.ButtonPress) {
MouseWheelEvent mwe = new MouseWheelEvent(getEventSource(),MouseEvent.MOUSE_WHEEL, jWhen,
modifiers,
@@ -1037,13 +1046,13 @@
return xEventType == XConstants.KeyPress ? java.awt.event.KeyEvent.KEY_PRESSED :
xEventType == XConstants.KeyRelease ? java.awt.event.KeyEvent.KEY_RELEASED : 0;
}
- static private long xkeycodeToKeysym(XKeyEvent ev) {
+ private static long xkeycodeToKeysym(XKeyEvent ev) {
return XKeysym.getKeysym( ev );
}
private long xkeycodeToPrimaryKeysym(XKeyEvent ev) {
return XKeysym.xkeycode2primary_keysym( ev );
}
- static private int primaryUnicode2JavaKeycode(int uni) {
+ private static int primaryUnicode2JavaKeycode(int uni) {
return (uni > 0? sun.awt.ExtendedKeyCodes.getExtendedKeyCodeForChar(uni) : 0);
//return (uni > 0? uni + 0x01000000 : 0);
}
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -429,7 +429,7 @@
}
private static ArrayList<IconInfo> defaultIconInfo;
- protected synchronized static java.util.List<IconInfo> getDefaultIconInfo() {
+ protected static synchronized java.util.List<IconInfo> getDefaultIconInfo() {
if (defaultIconInfo == null) {
defaultIconInfo = new ArrayList<IconInfo>();
if (XlibWrapper.dataModel == 32) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java Mon Oct 05 13:45:50 2015 -0700
@@ -313,7 +313,7 @@
long delete, long req_type, long actualy_type,
long actualy_format, long nitems_ptr,
long bytes_after, long data_ptr);
- native static void XChangePropertyImpl(long display, long window, long atom,
+ static native void XChangePropertyImpl(long display, long window, long atom,
long type, int format, int mode, long data,
int nelements);
static void XChangeProperty(long display, long window, long atom,
@@ -566,8 +566,8 @@
/* Global memory area used for X lib parameter passing */
- final static long lbuffer = unsafe.allocateMemory(64); // array to hold 8 longs
- final static long ibuffer = unsafe.allocateMemory(32); // array to hold 8 ints
+ static final long lbuffer = unsafe.allocateMemory(64); // array to hold 8 longs
+ static final long ibuffer = unsafe.allocateMemory(32); // array to hold 8 ints
static final long larg1 = lbuffer;
static final long larg2 = larg1+8;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java Mon Oct 05 13:45:50 2015 -0700
@@ -125,7 +125,7 @@
// private data (X11InputMethodData structure defined in
// awt_InputMethod.c) for native methods
// this structure needs to be accessed within AWT_LOCK/UNLOCK
- transient private long pData = 0; // accessed by native
+ private transient long pData = 0; // accessed by native
// Initialize highlight mapping table
static {
--- a/jdk/src/java.desktop/unix/classes/sun/font/X11GB18030_0.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/font/X11GB18030_0.java Mon Oct 05 13:45:50 2015 -0700
@@ -56,7 +56,7 @@
protected int encodeSingle(char inputChar) {
return -1;
}
- private final static String innerIndex0=
+ private static final String innerIndex0=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -570,7 +570,7 @@
"\uA5F0\uA5F1\uA5F2\uA5F3\uA5F4\uA5F5\uA5F6\u0000"+
"\u0000\u0000\u0000\u0000\uA960\uA963\uA964\u0000";
- private final static String innerIndex1=
+ private static final String innerIndex1=
"\u0000\u0000\u0000\u0000\u0000\uA8C5\uA8C6\uA8C7"+
"\uA8C8\uA8C9\uA8CA\uA8CB\uA8CC\uA8CD\uA8CE\uA8CF"+
"\uA8D0\uA8D1\uA8D2\uA8D3\uA8D4\uA8D5\uA8D6\uA8D7"+
@@ -1084,7 +1084,7 @@
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
- private final static String innerIndex2=
+ private static final String innerIndex2=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -1598,7 +1598,7 @@
"\u8BAF\uE6CD\u8BB0\u8BB1\u8BB2\u8BB3\u8BB4\u8BB5"+
"\u8BB6\u8BB7\u8BB8\u8BB9\u8BBA\u8BBB\u8BBC\u8BBD";
- private final static String innerIndex3=
+ private static final String innerIndex3=
"\u8BBE\u8BBF\u8BC0\u8BC1\u8BC2\u8BC3\u8BC4\u8BC5"+
"\u8BC6\uE6D2\u8BC7\u8BC8\u8BC9\u8BCA\u8BCB\u8BCC"+
"\u8BCD\u8BCE\u8BCF\u8BD0\u8BD1\u8BD2\uE6D4\uE6D3"+
@@ -2112,7 +2112,7 @@
"\u99C6\u99C7\u99C8\u99C9\u99CA\u99CB\u99CC\u99CD"+
"\u99CE\u99CF\u99D0\u99D1\u99D2\u99D3\u99D4\u99D5";
- private final static String innerIndex4=
+ private static final String innerIndex4=
"\u99D6\u99D7\u99D8\u99D9\u99DA\u99DB\u99DC\u99DD"+
"\u99DE\u99DF\u99E0\u99E1\u99E2\u99E3\u99E4\u99E5"+
"\u99E6\u99E7\u99E8\u99E9\u99EA\u99EB\u99EC\u99ED"+
@@ -2626,7 +2626,7 @@
"\uB87B\uB87C\uB87D\uB87E\uB880\uB881\uB882\uB883"+
"\uB884\uD6F1\uF3C3\uB885\uB886\uF3C4\uB887\uB8CD";
- private final static String innerIndex5=
+ private static final String innerIndex5=
"\uB888\uB889\uB88A\uF3C6\uF3C7\uB88B\uB0CA\uB88C"+
"\uF3C5\uB88D\uF3C9\uCBF1\uB88E\uB88F\uB890\uF3CB"+
"\uB891\uD0A6\uB892\uB893\uB1CA\uF3C8\uB894\uB895"+
@@ -3140,7 +3140,7 @@
"\uD64C\uD64D\uD64E\uD64F\uD650\uD651\uD652\uD653"+
"\uD654\uD655\uD656\uD657\uD658\uD659\uD65A\uD65B";
- private final static String innerIndex6=
+ private static final String innerIndex6=
"\uD65C\uD65D\uD65E\uD65F\uD660\uD661\uD662\uE5C0"+
"\uD663\uD664\uD665\uD666\uD667\uD668\uD669\uD66A"+
"\uD66B\uD66C\uD66D\uD66E\uD66F\uD670\uD671\uD672"+
@@ -3654,7 +3654,7 @@
"\uF38D\uF38E\uF38F\uF390\uF391\uF392\uF393\uF394"+
"\uF395\uF7DB\uF396\uF7D9\uF397\uF398\uF399\uF39A";
- private final static String innerIndex7=
+ private static final String innerIndex7=
"\uF39B\uF39C\uF39D\uD7D7\uF39E\uF39F\uF3A0\uF440"+
"\uF7DC\uF441\uF442\uF443\uF444\uF445\uF446\uF7DD"+
"\uF447\uF448\uF449\uF7DE\uF44A\uF44B\uF44C\uF44D"+
@@ -4168,7 +4168,7 @@
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
- private final static String innerIndex8=
+ private static final String innerIndex8=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -4234,7 +4234,7 @@
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
- private final static short index1[] = {
+ private static final short index1[] = {
1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 13, 14,
@@ -4253,7 +4253,7 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 127, 0, 0, 0, 128, 129
};
- private final static String index2[] = {
+ private static final String index2[] = {
innerIndex0,
innerIndex1,
innerIndex2,
--- a/jdk/src/java.desktop/unix/classes/sun/font/X11GB18030_1.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/font/X11GB18030_1.java Mon Oct 05 13:45:50 2015 -0700
@@ -55,7 +55,7 @@
protected int encodeSingle(char inputChar) {
return -1;
}
- private final static String innerIndex0=
+ private static final String innerIndex0=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -569,7 +569,7 @@
"\u0DD2\u0DD3\u0DD4\u0DD5\u0DD6\u0DD7\u0DD8\u0DD9"+
"\u0DDA\u0DDB\u0DDC\u0DDD\u0DDE\u0DDF\u0DE0\u0DE1";
- private final static String innerIndex1=
+ private static final String innerIndex1=
"\u0DE2\u0DE3\u0DE4\u0DE5\u0DE6\u0DE7\u0DE8\u0DE9"+
"\u0DEA\u0DEB\u0DEC\u0DED\u0DEE\u0DEF\u0DF0\u0DF1"+
"\u0DF2\u0DF3\u0DF4\u0DF5\u0DF6\u0DF7\u0DF8\u0DF9"+
@@ -1083,7 +1083,7 @@
"\u1DD2\u1DD3\u1DD4\u1DD5\u1DD6\u1DD7\u1DD8\u1DD9"+
"\u1DDA\u1DDB\u1DDC\u1DDD\u1DDE\u1DDF\u1DE0\u1DE1";
- private final static String innerIndex2=
+ private static final String innerIndex2=
"\u1DE2\u1DE3\u1DE4\u1DE5\u1DE6\u1DE7\u1DE8\u1DE9"+
"\u1DEA\u1DEB\u1DEC\u1DED\u1DEE\u1DEF\u1DF0\u1DF1"+
"\u1DF2\u1DF3\u1DF4\u1DF5\u1DF6\u1DF7\u1DF8\u1DF9"+
@@ -1597,7 +1597,7 @@
"\u2CA2\u2CA3\u2CA4\u2CA5\u2CA6\u2CA7\u2CA8\u2CA9"+
"\u2CAA\u2CAB\u2CAC\u2CAD\u2CAE\u2CAF\u2CB0\u2CB1";
- private final static String innerIndex3=
+ private static final String innerIndex3=
"\u2CB2\u2CB3\u2CB4\u2CB5\u2CB6\u2CB7\u2CB8\u2CB9"+
"\u2CBA\u2CBB\u2CBC\u2CBD\u2CBE\u2CBF\u2CC0\u2CC1"+
"\u2CC2\u2CC3\u2CC4\u2CC5\u2CC6\u2CC7\u2CC8\u2CC9"+
@@ -2111,7 +2111,7 @@
"\u3B79\u3B7A\u3B7B\u3B7C\u3B7D\u3B7E\u3B7F\u3B80"+
"\u3B81\u3B82\u3B83\u3B84\u3B85\u3B86\u3B87\u3B88";
- private final static String innerIndex4=
+ private static final String innerIndex4=
"\u3B89\u3B8A\u3B8B\u3B8C\u3B8D\u3B8E\u3B8F\u3B90"+
"\u3B91\u3B92\u3B93\u3B94\u3B95\u3B96\u3B97\u3B98"+
"\u3B99\u3B9A\u3B9B\u3B9C\u3B9D\u3B9E\u3B9F\u3BA0"+
@@ -2625,7 +2625,7 @@
"\u4AAD\u4AAE\u4AAF\u4AB0\u4AB1\u4AB2\u4AB3\u4AB4"+
"\u4AB5\u4AB6\u4AB7\u4AB8\u4AB9\u4ABA\u4ABB\u4ABC";
- private final static String innerIndex5=
+ private static final String innerIndex5=
"\u4ABD\u4ABE\u4ABF\u4AC0\u4AC1\u4AC2\u4AC3\u4AC4"+
"\u4AC5\u4AC6\u4AC7\u4AC8\u4AC9\u4ACA\u4ACB\u4ACC"+
"\u4ACD\u4ACE\u4ACF\u4AD0\u4AD1\u4AD2\u4AD3\u4AD4"+
@@ -3139,7 +3139,7 @@
"\u5AAD\u5AAE\u5AAF\u5AB0\u5AB1\u5AB2\u5AB3\u5AB4"+
"\u5AB5\u5AB6\u5AB7\u5AB8\u5AB9\u5ABA\u5ABB\u5ABC";
- private final static String innerIndex6=
+ private static final String innerIndex6=
"\u5ABD\u5ABE\u5ABF\u5AC0\u5AC1\u5AC2\u5AC3\u5AC4"+
"\u5AC5\u5AC6\u5AC7\u5AC8\u5AC9\u5ACA\u5ACB\u5ACC"+
"\u5ACD\u5ACE\u5ACF\u5AD0\u5AD1\u5AD2\u5AD3\u5AD4"+
@@ -3653,7 +3653,7 @@
"\u6AAD\u6AAE\u6AAF\u6AB0\u6AB1\u6AB2\u6AB3\u6AB4"+
"\u6AB5\u6AB6\u6AB7\u6AB8\u6AB9\u6ABA\u6ABB\u6ABC";
- private final static String innerIndex7=
+ private static final String innerIndex7=
"\u6ABD\u6ABE\u6ABF\u6AC0\u6AC1\u6AC2\u6AC3\u6AC4"+
"\u6AC5\u6AC6\u6AC7\u6AC8\u6AC9\u6ACA\u6ACB\u6ACC"+
"\u6ACD\u6ACE\u6ACF\u6AD0\u6AD1\u6AD2\u6AD3\u6AD4"+
@@ -4167,7 +4167,7 @@
"\u7AAD\u7AAE\u7AAF\u7AB0\u7AB1\u7AB2\u7AB3\u7AB4"+
"\u7AB5\u7AB6\u7AB7\u7AB8\u7AB9\u7ABA\u7ABB\u7ABC";
- private final static String innerIndex8=
+ private static final String innerIndex8=
"\u7ABD\u7ABE\u7ABF\u7AC0\u7AC1\u7AC2\u7AC3\u7AC4"+
"\u7AC5\u7AC6\u7AC7\u7AC8\u7AC9\u7ACA\u7ACB\u7ACC"+
"\u7ACD\u7ACE\u7ACF\u7AD0\u7AD1\u7AD2\u7AD3\u7AD4"+
@@ -4681,7 +4681,7 @@
"\u8999\u899A\u899B\u899C\u899D\u899E\u899F\u89A0"+
"\u89A1\u89A2\u89A3\u89A4\u89A5\u89A6\u89A7\u89A8";
- private final static String innerIndex9=
+ private static final String innerIndex9=
"\u89A9\u89AA\u89AB\u89AC\u89AD\u89AE\u89AF\u89B0"+
"\u89B1\u89B2\u89B3\u89B4\u89B5\u89B6\u89B7\u89B8"+
"\u89B9\u89BA\u89BB\u89BC\u89BD\u89BE\u89BF\u89C0"+
@@ -5195,7 +5195,7 @@
"\u9950\u9951\u9952\u9953\u9954\u9955\u9956\u9957"+
"\u9958\u9959\u995A\u995B\u995C\u995D\u995E\u995F";
- private final static String innerIndex10=
+ private static final String innerIndex10=
"\u9960\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -5229,7 +5229,7 @@
"\u99EC\u99ED\u99EE\u99EF\u99F0\u99F1\u99F2\u99F3"+
"\u99F4\u99F5\u99F6\u99F7\u99F8\u0000\u99FA\u99FB";
- private final static short index1[] = {
+ private static final short index1[] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
@@ -5248,7 +5248,7 @@
145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160
};
- private final static String index2[] = {
+ private static final String index2[] = {
innerIndex0,
innerIndex1,
innerIndex2,
--- a/jdk/src/java.desktop/unix/classes/sun/font/X11Johab.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/font/X11Johab.java Mon Oct 05 13:45:50 2015 -0700
@@ -55,7 +55,7 @@
return true;
}
- private final static String innerIndex0=
+ private static final String innerIndex0=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -569,7 +569,7 @@
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
- private final static String innerIndex1=
+ private static final String innerIndex1=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -1083,7 +1083,7 @@
"\uE978\u0000\u0000\u0000\uF866\u0000\uE4F6\u0000"+
"\u0000\u0000\u0000\uF3DA\u0000\uF894\u0000\u0000";
- private final static String innerIndex2=
+ private static final String innerIndex2=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\uEC9F"+
"\u0000\u0000\u0000\u0000\u0000\uE5CF\uE39A\u0000"+
"\u0000\uE1DF\u0000\u0000\uF5CB\u0000\uED92\uE0AB"+
@@ -1597,7 +1597,7 @@
"\uF6C1\u0000\u0000\uEEB6\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
- private final static String innerIndex3=
+ private static final String innerIndex3=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\uEDC7\uE63C\u0000\u0000\u0000"+
"\u0000\uE957\u0000\u0000\u0000\u0000\u0000\uEBA9"+
@@ -2111,7 +2111,7 @@
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\uE1A7\u0000\u0000\uE33C\u0000";
- private final static String innerIndex4=
+ private static final String innerIndex4=
"\uE3BA\u0000\uF3C4\u0000\uEDB3\uF8F5\uEFE1\uF9E0"+
"\uF94C\u0000\uE832\uE833\u0000\uE431\u0000\u0000"+
"\uE491\u0000\u0000\u0000\uEC7D\u0000\u0000\uEA79"+
@@ -2625,7 +2625,7 @@
"\u0000\u0000\u0000\u0000\uE695\u0000\u0000\u0000"+
"\u0000\u0000\u0000\uE9B8\uE2C5\uEADF\u0000\u0000";
- private final static String innerIndex5=
+ private static final String innerIndex5=
"\u0000\u0000\u0000\u0000\uF44E\uF631\u0000\uF0CB"+
"\uF3FC\u0000\uF4C7\u0000\u0000\uEB7B\u0000\u0000"+
"\u0000\u0000\u0000\uF1FC\u0000\u0000\uEBDB\u0000"+
@@ -3139,7 +3139,7 @@
"\u0000\u0000\u0000\uE995\uE7B0\u0000\uEE79\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
- private final static String innerIndex6=
+ private static final String innerIndex6=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\uED4C\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -3653,7 +3653,7 @@
"\u9E89\u9E8A\u9E8B\u9E8C\u9E8D\u9E8E\u9E8F\u9E90"+
"\u9E91\u9E93\u9E94\u9E95\u9E96\u9E97\u9E98\u9E99";
- private final static String innerIndex7=
+ private static final String innerIndex7=
"\u9E9A\u9E9B\u9E9C\u9E9D\u9EA1\u9EA2\u9EA3\u9EA4"+
"\u9EA5\u9EA6\u9EA7\u9EA8\u9EA9\u9EAA\u9EAB\u9EAC"+
"\u9EAD\u9EAE\u9EAF\u9EB0\u9EB1\u9EB3\u9EB4\u9EB5"+
@@ -4167,7 +4167,7 @@
"\uBA71\uBA73\uBA74\uBA75\uBA76\uBA77\uBA78\uBA79"+
"\uBA7A\uBA7B\uBA7C\uBA7D\uBA81\uBA82\uBA83\uBA84";
- private final static String innerIndex8=
+ private static final String innerIndex8=
"\uBA85\uBA86\uBA87\uBA88\uBA89\uBA8A\uBA8B\uBA8C"+
"\uBA8D\uBA8E\uBA8F\uBA90\uBA91\uBA93\uBA94\uBA95"+
"\uBA96\uBA97\uBA98\uBA99\uBA9A\uBA9B\uBA9C\uBA9D"+
@@ -4681,7 +4681,7 @@
"\uF171\uF174\uF177\uF178\uF199\uF19A\uF19C\uF1A1"+
"\uF1A2\uF1A3\uF1EE\uF26B\uF44D\uF49C\uF4B1\uF537";
- private final static String innerIndex9=
+ private static final String innerIndex9=
"\uF57E\uF696\uF698\uF6B8\uF6C8\uF6D3\uF76B\uF792"+
"\uF831\uF832\uF876\uF939\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -4747,7 +4747,7 @@
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
- private final static short index1[] = {
+ private static final short index1[] = {
1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0,
--- a/jdk/src/java.desktop/unix/classes/sun/font/X11SunUnicode_0.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/font/X11SunUnicode_0.java Mon Oct 05 13:45:50 2015 -0700
@@ -55,7 +55,7 @@
super(cs, index1, index2);
}
- private final static String innerIndex0=
+ private static final String innerIndex0=
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
@@ -121,7 +121,7 @@
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000";
- private final static short index1[] = {
+ private static final short index1[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -140,7 +140,7 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
- private final static String index2[] = {
+ private static final String index2[] = {
innerIndex0
};
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/jules/IdleTileCache.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/jules/IdleTileCache.java Mon Oct 05 13:45:50 2015 -0700
@@ -28,8 +28,8 @@
import java.util.*;
public class IdleTileCache {
- final static int IDLE_TILE_SYNC_GRANULARITY = 16;
- final static ArrayList<JulesTile> idleBuffers = new ArrayList<JulesTile>();
+ static final int IDLE_TILE_SYNC_GRANULARITY = 16;
+ static final ArrayList<JulesTile> idleBuffers = new ArrayList<JulesTile>();
ArrayList<JulesTile> idleTileWorkerCacheList = new ArrayList<JulesTile>();
ArrayList<JulesTile> idleTileConsumerCacheList =
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/jules/JulesAATileGenerator.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/jules/JulesAATileGenerator.java Mon Oct 05 13:45:50 2015 -0700
@@ -33,13 +33,13 @@
public class JulesAATileGenerator implements AATileGenerator {
/* Threading stuff */
- final static ExecutorService rasterThreadPool =
+ static final ExecutorService rasterThreadPool =
Executors.newCachedThreadPool();
- final static int CPU_CNT = Runtime.getRuntime().availableProcessors();
+ static final int CPU_CNT = Runtime.getRuntime().availableProcessors();
- final static boolean ENABLE_THREADING = false;
- final static int THREAD_MIN = 16;
- final static int THREAD_BEGIN = 16;
+ static final boolean ENABLE_THREADING = false;
+ static final int THREAD_MIN = 16;
+ static final int THREAD_BEGIN = 16;
IdleTileCache tileCache;
TileWorker worker;
@@ -47,8 +47,8 @@
int rasterTileCnt;
/* Tiling */
- final static int TILE_SIZE = 32;
- final static int TILE_SIZE_FP = 32 << 16;
+ static final int TILE_SIZE = 32;
+ static final int TILE_SIZE_FP = 32 << 16;
int left, right, top, bottom, width, height;
int leftFP, topFP;
int tileCnt, tilesX, tilesY;
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/jules/TileWorker.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/jules/TileWorker.java Mon Oct 05 13:45:50 2015 -0700
@@ -28,7 +28,7 @@
import java.util.*;
public class TileWorker implements Runnable {
- final static int RASTERIZED_TILE_SYNC_GRANULARITY = 8;
+ static final int RASTERIZED_TILE_SYNC_GRANULARITY = 8;
final ArrayList<JulesTile> rasterizedTileConsumerCache =
new ArrayList<JulesTile>();
final LinkedList<JulesTile> rasterizedBuffers = new LinkedList<JulesTile>();
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XIDGenerator.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XIDGenerator.java Mon Oct 05 13:45:50 2015 -0700
@@ -34,7 +34,7 @@
*/
public class XIDGenerator {
- private final static int XID_BUFFER_SIZE = 512;
+ private static final int XID_BUFFER_SIZE = 512;
int[] xidBuffer = new int[XID_BUFFER_SIZE];
int currentIndex = XID_BUFFER_SIZE;
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRBackendNative.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRBackendNative.java Mon Oct 05 13:45:50 2015 -0700
@@ -107,7 +107,7 @@
int x1, int y1, int x2, int y2,
int numStops, int repeat);
- private native static int
+ private static native int
XRCreateRadialGradientPaintNative(float[] fractionsArray,
short[] pixelsArray, int numStops,
int centerX, int centerY,
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRCompositeManager.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRCompositeManager.java Mon Oct 05 13:45:50 2015 -0700
@@ -48,9 +48,9 @@
private static boolean enableGradCache = true;
private static XRCompositeManager instance;
- private final static int SOLID = 0;
- private final static int TEXTURE = 1;
- private final static int GRADIENT = 2;
+ private static final int SOLID = 0;
+ private static final int TEXTURE = 1;
+ private static final int GRADIENT = 2;
int srcType;
XRSolidSrcPict solidSrc32;
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XcbRequestCounter.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XcbRequestCounter.java Mon Oct 05 13:45:50 2015 -0700
@@ -32,7 +32,7 @@
*/
public class XcbRequestCounter {
- private final static long MAX_UINT = 4294967295L;
+ private static final long MAX_UINT = 4294967295L;
long value;
--- a/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/print/IPPPrintService.java Mon Oct 05 13:45:50 2015 -0700
@@ -83,7 +83,7 @@
private String printer;
private URI myURI;
private URL myURL;
- transient private ServiceNotifier notifier = null;
+ private transient ServiceNotifier notifier = null;
private static int MAXCOPIES = 1000;
private static short MAX_ATTRIBUTE_LENGTH = 255;
--- a/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java Mon Oct 05 13:45:50 2015 -0700
@@ -90,9 +90,9 @@
public class UnixPrintJob implements CancelablePrintJob {
private static String debugPrefix = "UnixPrintJob>> ";
- transient private Vector<PrintJobListener> jobListeners;
- transient private Vector<PrintJobAttributeListener> attrListeners;
- transient private Vector<PrintJobAttributeSet> listenedAttributeSets;
+ private transient Vector<PrintJobListener> jobListeners;
+ private transient Vector<PrintJobAttributeListener> attrListeners;
+ private transient Vector<PrintJobAttributeSet> listenedAttributeSets;
private PrintService service;
private boolean fidelity;
--- a/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintService.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintService.java Mon Oct 05 13:45:50 2015 -0700
@@ -192,8 +192,8 @@
private PrinterName name;
private boolean isInvalid;
- transient private PrintServiceAttributeSet lastSet;
- transient private ServiceNotifier notifier = null;
+ private transient PrintServiceAttributeSet lastSet;
+ private transient ServiceNotifier notifier = null;
UnixPrintService(String name) {
if (name == null) {
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -233,7 +233,7 @@
paintArea.paint(target, shouldClearRectBeforePaint());
}
- native synchronized void updateWindow();
+ synchronized native void updateWindow();
@Override
public void paint(Graphics g) {
@@ -566,7 +566,7 @@
}
// fallback default font object
- final static Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
+ static final Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
@Override
public Graphics getGraphics() {
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WDialogPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WDialogPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -35,7 +35,7 @@
// Platform default background for dialogs. Gets set on target if
// target has none explicitly specified.
- final static Color defaultBackground = SystemColor.control;
+ static final Color defaultBackground = SystemColor.control;
// If target doesn't have its background color set, we set its
// background to platform default.
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFramePeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WFramePeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -195,7 +195,7 @@
setState(target.getExtendedState());
}
- private native static int getSysMenuHeight();
+ private static native int getSysMenuHeight();
native void pSetIMMOption(String option);
void notifyIMMOptionChange(){
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java Mon Oct 05 13:45:50 2015 -0700
@@ -67,23 +67,23 @@
private boolean statusWindowHidden = false;
// attribute definition in Win32 (in IMM.H)
- public final static byte ATTR_INPUT = 0x00;
- public final static byte ATTR_TARGET_CONVERTED = 0x01;
- public final static byte ATTR_CONVERTED = 0x02;
- public final static byte ATTR_TARGET_NOTCONVERTED = 0x03;
- public final static byte ATTR_INPUT_ERROR = 0x04;
+ public static final byte ATTR_INPUT = 0x00;
+ public static final byte ATTR_TARGET_CONVERTED = 0x01;
+ public static final byte ATTR_CONVERTED = 0x02;
+ public static final byte ATTR_TARGET_NOTCONVERTED = 0x03;
+ public static final byte ATTR_INPUT_ERROR = 0x04;
// cmode definition in Win32 (in IMM.H)
- public final static int IME_CMODE_ALPHANUMERIC = 0x0000;
- public final static int IME_CMODE_NATIVE = 0x0001;
- public final static int IME_CMODE_KATAKANA = 0x0002;
- public final static int IME_CMODE_LANGUAGE = 0x0003;
- public final static int IME_CMODE_FULLSHAPE = 0x0008;
- public final static int IME_CMODE_HANJACONVERT = 0x0040;
- public final static int IME_CMODE_ROMAN = 0x0010;
+ public static final int IME_CMODE_ALPHANUMERIC = 0x0000;
+ public static final int IME_CMODE_NATIVE = 0x0001;
+ public static final int IME_CMODE_KATAKANA = 0x0002;
+ public static final int IME_CMODE_LANGUAGE = 0x0003;
+ public static final int IME_CMODE_FULLSHAPE = 0x0008;
+ public static final int IME_CMODE_HANJACONVERT = 0x0040;
+ public static final int IME_CMODE_ROMAN = 0x0010;
// flag values for endCompositionNative() behavior
- private final static boolean COMMIT_INPUT = true;
- private final static boolean DISCARD_INPUT = false;
+ private static final boolean COMMIT_INPUT = true;
+ private static final boolean DISCARD_INPUT = false;
private static Map<TextAttribute,Object> [] highlightStyles;
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -66,7 +66,7 @@
* Subclasses should override disposeImpl() instead of dispose(). Client
* code should always invoke dispose(), never disposeImpl().
*/
- abstract protected void disposeImpl();
+ protected abstract void disposeImpl();
public final void dispose() {
boolean call_disposeImpl = false;
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WScrollPanePeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -78,7 +78,7 @@
private native void setInsets();
@Override
- public native synchronized void setScrollPosition(int x, int y);
+ public synchronized native void setScrollPosition(int x, int y);
@Override
public int getHScrollbarHeight() {
@@ -112,7 +112,7 @@
setInsets();
}
- native synchronized void setSpans(int viewWidth, int viewHeight,
+ synchronized native void setSpans(int viewWidth, int viewHeight,
int childWidth, int childHeight);
/**
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java Mon Oct 05 13:45:50 2015 -0700
@@ -832,7 +832,7 @@
* Have Win32GraphicsEnvironment execute the display change code on the
* Event thread.
*/
- static public void displayChanged() {
+ public static void displayChanged() {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
@@ -1127,7 +1127,7 @@
return areExtraMouseButtonsEnabled;
}
- private native synchronized int getNumberOfButtonsImpl();
+ private synchronized native int getNumberOfButtonsImpl();
@Override
public int getNumberOfButtons(){
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -40,9 +40,9 @@
import sun.awt.image.IntegerComponentRaster;
final class WTrayIconPeer extends WObjectPeer implements TrayIconPeer {
- final static int TRAY_ICON_WIDTH = 16;
- final static int TRAY_ICON_HEIGHT = 16;
- final static int TRAY_ICON_MASK_SIZE = (TRAY_ICON_WIDTH * TRAY_ICON_HEIGHT) / 8;
+ static final int TRAY_ICON_WIDTH = 16;
+ static final int TRAY_ICON_HEIGHT = 16;
+ static final int TRAY_ICON_MASK_SIZE = (TRAY_ICON_WIDTH * TRAY_ICON_HEIGHT) / 8;
IconObserver observer = new IconObserver();
boolean firstUpdate = true;
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java Mon Oct 05 13:45:50 2015 -0700
@@ -59,7 +59,7 @@
* is a list of windows, sorted by the time of activation: later a window is
* activated, greater its index is in the list.
*/
- private final static StringBuffer ACTIVE_WINDOWS_KEY =
+ private static final StringBuffer ACTIVE_WINDOWS_KEY =
new StringBuffer("active_windows_list");
/*
@@ -72,7 +72,7 @@
/*
* The object is a listener for the AppContext.GUI_DISPOSED property.
*/
- private final static PropertyChangeListener guiDisposedListener =
+ private static final PropertyChangeListener guiDisposedListener =
new GuiDisposedListener();
/*
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DPaints.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DPaints.java Mon Oct 05 13:45:50 2015 -0700
@@ -158,7 +158,7 @@
/****************** Shared MultipleGradientPaint support ********************/
- private static abstract class MultiGradient extends D3DPaints {
+ private abstract static class MultiGradient extends D3DPaints {
/**
* Note that this number is lower than the MULTI_MAX_FRACTIONS
--- a/jdk/src/java.desktop/windows/classes/sun/print/Win32MediaTray.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/print/Win32MediaTray.java Mon Oct 05 13:45:50 2015 -0700
@@ -59,7 +59,7 @@
winID = id;
}
- private synchronized static int nextValue(String name) {
+ private static synchronized int nextValue(String name) {
winStringTable.add(name);
return (getTraySize()-1);
}
--- a/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintJob.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintJob.java Mon Oct 05 13:45:50 2015 -0700
@@ -79,9 +79,9 @@
public class Win32PrintJob implements CancelablePrintJob {
- transient private Vector<PrintJobListener> jobListeners;
- transient private Vector<PrintJobAttributeListener> attrListeners;
- transient private Vector<PrintJobAttributeSet> listenedAttributeSets;
+ private transient Vector<PrintJobListener> jobListeners;
+ private transient Vector<PrintJobAttributeListener> attrListeners;
+ private transient Vector<PrintJobAttributeSet> listenedAttributeSets;
private Win32PrintService service;
private boolean fidelity;
--- a/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintService.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintService.java Mon Oct 05 13:45:50 2015 -0700
@@ -195,8 +195,8 @@
private PrinterName name;
private String port;
- transient private PrintServiceAttributeSet lastSet;
- transient private ServiceNotifier notifier = null;
+ private transient PrintServiceAttributeSet lastSet;
+ private transient ServiceNotifier notifier = null;
private MediaSizeName[] mediaSizeNames;
private MediaPrintableArea[] mediaPrintables;
@@ -1734,7 +1734,7 @@
}
- private synchronized static int nextValue(String name) {
+ private static synchronized int nextValue(String name) {
winStringTable.add(name);
return (winStringTable.size()-1);
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html Mon Oct 05 13:45:50 2015 -0700
@@ -0,0 +1,44 @@
+<!--
+ Copyright (c) 2015 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.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ or visit www.oracle.com if you need additional information or have any
+ questions.
+-->
+
+
+<html>
+<!--
+ @test
+ @bug 6392086 8014725
+ @summary Tests basic DnD functionality in an applet
+ @author Alexey Utkin, Semyon Sadetsky area=dnd
+ @run applet HTMLTransferTest.html
+-->
+<head>
+<title> </title>
+</head>
+<body>
+
+<h1>HTMLTransferTest<br>Bug ID: 6392086</h1>
+
+<p> This is an AUTOMATIC test, simply wait for completion </p>
+
+<APPLET CODE="HTMLTransferTest.class" WIDTH=200 HEIGHT=200></APPLET>
+</body>
+</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java Mon Oct 05 13:45:50 2015 -0700
@@ -0,0 +1,767 @@
+/*
+ * Copyright (c) 2015 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ @bug 6392086 8014725
+ @summary Tests basic DnD functionality in an applet
+ @author Alexey Utkin, Semyon Sadetsky
+ @run applet HTMLTransferTest.html
+*/
+
+/**
+ * HTMLTransferTest.java
+ *
+ * summary: tests that HTMLs of all supported native HTML formats
+ * are transfered properly
+ */
+
+import java.applet.Applet;
+import java.awt.*;
+import java.awt.datatransfer.*;
+import java.io.*;
+
+
+public class HTMLTransferTest extends Applet {
+ public static final int CODE_NOT_RETURNED = 100;
+ public static final int CODE_CONSUMER_TEST_FAILED = 101;
+ public static final int CODE_FAILURE = 102;
+ public static DataFlavor[] HTMLFlavors = null;
+ public static DataFlavor SyncFlavor = null;
+ static {
+ try{
+ HTMLFlavors = new DataFlavor[] {
+ new DataFlavor("text/html; document=selection; Class=" + InputStream.class.getName() + "; charset=UTF-8"),
+ new DataFlavor("text/html; document=selection; Class=" + String.class.getName() + "; charset=UTF-8")
+ };
+ SyncFlavor = new DataFlavor(
+ "application/x-java-serialized-object; class="
+ + SyncMessage.class.getName()
+ + "; charset=UTF-8"
+ );
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+ }
+
+ private THTMLProducer imPr;
+ private int returnCode = CODE_NOT_RETURNED;
+
+ public void init() {
+ initImpl();
+
+ String[] instructions =
+ {
+ "This is an AUTOMATIC test",
+ "simply wait until it is done"
+ };
+ Sysout.createDialog( );
+ Sysout.printInstructions( instructions );
+
+ } // init()
+
+ private void initImpl() {
+ imPr = new THTMLProducer();
+ imPr.begin();
+ }
+
+
+ public void start() {
+ try {
+ String stFormats = "";
+
+ String iniMsg = "Testing formats from the list:\n";
+ for (int i = 0; i < HTMLTransferTest.HTMLFlavors.length; i++) {
+ stFormats += "\"" + HTMLTransferTest.HTMLFlavors[i].getMimeType() + "\"\n";
+ }
+ Sysout.println(iniMsg + stFormats);
+ System.err.println("===>" + iniMsg + stFormats);
+
+ String javaPath = System.getProperty("java.home", "");
+ String cmd = javaPath + File.separator + "bin" + File.separator
+ + "java -cp " + System.getProperty("test.classes", ".") +
+ //+ "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 "
+ " THTMLConsumer"
+ //+ stFormats
+ ;
+
+ Process process = Runtime.getRuntime().exec(cmd);
+ ProcessResults pres = ProcessResults.doWaitFor(process);
+ returnCode = pres.exitValue;
+
+ if (pres.stderr != null && pres.stderr.length() > 0) {
+ System.err.println("========= Child VM System.err ========");
+ System.err.print(pres.stderr);
+ System.err.println("======================================");
+ }
+
+ if (pres.stdout != null && pres.stdout.length() > 0) {
+ System.err.println("========= Child VM System.out ========");
+ System.err.print(pres.stdout);
+ System.err.println("======================================");
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ //returnCode equals CODE_NOT_RETURNED
+ }
+
+ switch (returnCode) {
+ case CODE_NOT_RETURNED:
+ System.err.println("Child VM: failed to start");
+ break;
+ case CODE_FAILURE:
+ System.err.println("Child VM: abnormal termination");
+ break;
+ case CODE_CONSUMER_TEST_FAILED:
+ throw new RuntimeException("test failed: HTMLs in some " +
+ "native formats are not transferred properly: " +
+ "see output of child VM");
+ default:
+ boolean failed = false;
+ String passedFormats = "";
+ String failedFormats = "";
+
+ for (int i = 0; i < imPr.passedArray.length; i++) {
+ if (imPr.passedArray[i]) {
+ passedFormats += HTMLTransferTest.HTMLFlavors[i].getMimeType() + " ";
+ } else {
+ failed = true;
+ failedFormats += HTMLTransferTest.HTMLFlavors[i].getMimeType() + " ";
+ }
+ }
+ if (failed) {
+ throw new RuntimeException(
+ "test failed: HTMLs in following "
+ + "native formats are not transferred properly: "
+ + failedFormats
+ );
+ } else {
+ System.err.println(
+ "HTMLs in following native formats are "
+ + "transferred properly: "
+ + passedFormats
+ );
+ }
+ }
+
+ } // start()
+
+} // class HTMLTransferTest
+
+class SyncMessage implements Serializable {
+ String msg;
+
+ public SyncMessage(String sync) {
+ this.msg = sync;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return this.msg.equals(((SyncMessage)obj).msg);
+ }
+
+ @Override
+ public String toString() {
+ return msg;
+ }
+}
+
+class ProcessResults {
+ public int exitValue;
+ public String stdout;
+ public String stderr;
+
+ public ProcessResults() {
+ exitValue = -1;
+ stdout = "";
+ stderr = "";
+ }
+
+ /**
+ * Method to perform a "wait" for a process and return its exit value.
+ * This is a workaround for <code>Process.waitFor()</code> never returning.
+ */
+ public static ProcessResults doWaitFor(Process p) {
+ ProcessResults pres = new ProcessResults();
+
+ InputStream in = null;
+ InputStream err = null;
+
+ try {
+ in = p.getInputStream();
+ err = p.getErrorStream();
+
+ boolean finished = false;
+
+ while (!finished) {
+ try {
+ while (in.available() > 0) {
+ pres.stdout += (char)in.read();
+ }
+ while (err.available() > 0) {
+ pres.stderr += (char)err.read();
+ }
+ // Ask the process for its exitValue. If the process
+ // is not finished, an IllegalThreadStateException
+ // is thrown. If it is finished, we fall through and
+ // the variable finished is set to true.
+ pres.exitValue = p.exitValue();
+ finished = true;
+ }
+ catch (IllegalThreadStateException e) {
+ // Process is not finished yet;
+ // Sleep a little to save on CPU cycles
+ Thread.currentThread().sleep(500);
+ }
+ }
+ if (in != null) in.close();
+ if (err != null) err.close();
+ }
+ catch (Throwable e) {
+ System.err.println("doWaitFor(): unexpected exception");
+ e.printStackTrace();
+ }
+ return pres;
+ }
+}
+
+
+abstract class HTMLTransferer implements ClipboardOwner {
+
+ static final SyncMessage S_PASSED = new SyncMessage("Y");
+ static final SyncMessage S_FAILED = new SyncMessage("N");
+ static final SyncMessage S_BEGIN = new SyncMessage("B");
+ static final SyncMessage S_BEGIN_ANSWER = new SyncMessage("BA");
+ static final SyncMessage S_END = new SyncMessage("E");
+
+
+
+ Clipboard m_clipboard;
+
+ HTMLTransferer() {
+ m_clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+ }
+
+
+ abstract void notifyTransferSuccess(boolean status);
+
+
+ static Object createTRInstance(int i) {
+ try{
+ String _htmlText =
+ "The quick <font color='#78650d'>brown</font> <b>mouse</b> jumped over the lazy <b>cat</b>.";
+ switch(i){
+ case 0:
+ return new ByteArrayInputStream(_htmlText.getBytes("utf-8"));
+ case 1:
+ return _htmlText;
+ }
+ }catch(UnsupportedEncodingException e){ e.printStackTrace(); }
+ return null;
+ }
+
+ static byte[] getContent(InputStream is)
+ {
+ ByteArrayOutputStream tmp = new ByteArrayOutputStream();
+ try{
+ int read;
+ while( -1 != (read = is.read()) ){
+ tmp.write(read);
+ };
+ } catch( IOException e ) {
+ e.printStackTrace();
+ }
+ return tmp.toByteArray();
+ }
+
+ static void Dump(byte[] b){
+ System.err.println( new String(b) );
+ };
+
+ void setClipboardContents(
+ Transferable contents,
+ ClipboardOwner owner
+ ) {
+ synchronized (m_clipboard) {
+ boolean set = false;
+ while (!set) {
+ try {
+ m_clipboard.setContents(contents, owner);
+ set = true;
+ } catch (IllegalStateException ise) {
+ try {
+ Thread.sleep(100);
+ } catch(InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
+
+ Transferable getClipboardContents(Object requestor)
+ {
+ synchronized (m_clipboard) {
+ while (true) {
+ try {
+ Transferable t = m_clipboard.getContents(requestor);
+ return t;
+ } catch (IllegalStateException ise) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
+
+}
+
+
+class THTMLProducer extends HTMLTransferer {
+
+ boolean[] passedArray;
+ int fi = 0; // next format index
+ private boolean isFirstCallOfLostOwnership = true;
+
+ THTMLProducer() {
+ passedArray = new boolean[HTMLTransferTest.HTMLFlavors.length];
+ }
+
+ void begin() {
+ setClipboardContents(
+ new HTMLSelection(
+ HTMLTransferTest.SyncFlavor,
+ S_BEGIN
+ ),
+ this
+ );
+ }
+
+ public void lostOwnership(Clipboard cb, Transferable contents) {
+ System.err.println("{PRODUCER: lost clipboard ownership");
+ Transferable t = getClipboardContents(null);
+ if (t.isDataFlavorSupported(HTMLTransferTest.SyncFlavor)) {
+ SyncMessage msg = null;
+ // for test going on if t.getTransferData() will throw an exception
+ if (isFirstCallOfLostOwnership) {
+ isFirstCallOfLostOwnership = false;
+ msg = S_BEGIN_ANSWER;
+ } else {
+ msg = S_PASSED;
+ }
+ try {
+ msg = (SyncMessage)t.getTransferData(HTMLTransferTest.SyncFlavor);
+ System.err.println("++received message: " + msg);
+ } catch (Exception e) {
+ System.err.println("Can't getTransferData-message: " + e);
+ }
+ if( msg.equals(S_PASSED) ){
+ notifyTransferSuccess(true);
+ } else if( msg.equals(S_FAILED) ){
+ notifyTransferSuccess(false);
+ } else if (!msg.equals(S_BEGIN_ANSWER)) {
+ throw new RuntimeException("wrong message in " +
+ "THTMLProducer.lostOwnership(): " + msg +
+ " (possibly due to bug 4683804)");
+ }
+ } else {
+ throw new RuntimeException(
+ "DataFlavor.stringFlavor is not "
+ + "suppurted by transferable in "
+ + "THTMLProducer.lostOwnership()"
+ );
+ }
+
+ if (fi < HTMLTransferTest.HTMLFlavors.length) {
+ System.err.println(
+ "testing native HTML format \""
+ + HTMLTransferTest.HTMLFlavors[fi].getMimeType()
+ + "\"..."
+ );
+ //leaveFormat( HTMLTransferTest.HTMLFlavors[fi].getMimeType() );
+ setClipboardContents(
+ new HTMLSelection(
+ HTMLTransferTest.HTMLFlavors[fi],
+ HTMLTransferer.createTRInstance(fi)
+ ),
+ this
+ );
+ } else {
+ setClipboardContents(
+ new HTMLSelection(
+ HTMLTransferTest.SyncFlavor,
+ S_END
+ ),
+ null
+ );
+ }
+ System.err.println("}PRODUCER: lost clipboard ownership");
+ }
+
+
+ void notifyTransferSuccess(boolean status) {
+ passedArray[fi] = status;
+ fi++;
+ }
+
+}
+
+
+class THTMLConsumer extends HTMLTransferer
+{
+ private static final Object LOCK = new Object();
+ private static boolean failed;
+ int fi = 0; // next format index
+
+ public void lostOwnership(Clipboard cb, Transferable contents) {
+ System.err.println("{CONSUMER: lost clipboard ownership");
+ Transferable t = getClipboardContents(null);
+ boolean bContinue = true;
+ if(t.isDataFlavorSupported(HTMLTransferTest.SyncFlavor)) {
+ try {
+ SyncMessage msg = (SyncMessage)t.getTransferData(HTMLTransferTest.SyncFlavor);
+ System.err.println("received message: " + msg);
+ if(msg.equals(S_END)){
+ synchronized (LOCK) {
+ LOCK.notifyAll();
+ }
+ bContinue = false;
+ }
+ } catch (Exception e) {
+ System.err.println("Can't getTransferData-message: " + e);
+ }
+ }
+ if(bContinue){
+ // all HTML formats have been processed
+ System.err.println( "============================================================");
+ System.err.println( "Put as " + HTMLTransferTest.HTMLFlavors[fi].getMimeType() );
+ boolean bSuccess = false;
+ for(int i = 0; i < HTMLTransferTest.HTMLFlavors.length; ++i) {
+ System.err.println( "----------------------------------------------------------");
+ if( t.isDataFlavorSupported(HTMLTransferTest.HTMLFlavors[i]) ){
+ Object im = null; //? HTML;
+ try {
+ im = t.getTransferData(HTMLTransferTest.HTMLFlavors[i]);
+ if (im == null) {
+ System.err.println("getTransferData returned null");
+ } else {
+ System.err.println( "Extract as " + HTMLTransferTest.HTMLFlavors[i].getMimeType() );
+ String stIn = "(unknown)", stOut = "(unknown)";
+ switch( i ){
+ case 0:
+ stIn = new String( getContent( (InputStream)HTMLTransferer.createTRInstance(i) ) );
+ stOut = new String( getContent((InputStream)im) );
+ bSuccess = stIn.equals(stOut);
+ break;
+ case 1:
+ stIn = (String)HTMLTransferer.createTRInstance(i);
+ stOut = (String)im;
+ int head = stOut.indexOf("<HTML><BODY>");
+ if (head >= 0) {
+ stOut = stOut.substring(head + 12, stOut.length() - 14);
+ }
+ bSuccess = stIn.equals(stOut);
+ break;
+ default:
+ bSuccess = HTMLTransferer.createTRInstance(i).equals(im);
+ break;
+ };
+ System.err.println("in :" + stIn);
+ System.err.println("out:" + stOut);
+ };
+ } catch (Exception e) {
+ System.err.println("Can't getTransferData: " + e);
+ }
+ if(!bSuccess)
+ System.err.println("transferred DATA is different from initial DATA\n");
+ } else {
+ System.err.println("Flavor is not supported by transferable:\n");
+ DataFlavor[] dfs = t.getTransferDataFlavors();
+ int ii;
+ for(ii = 0; ii < dfs.length; ++ii)
+ System.err.println("Supported:" + dfs[ii] + "\n");
+ dfs = HTMLTransferTest.HTMLFlavors;
+ for(ii = 0; ii < dfs.length; ++ii)
+ System.err.println("Accepted:" + dfs[ii] + "\n" );
+ }
+ }
+ System.err.println( "----------------------------------------------------------");
+ notifyTransferSuccess(bSuccess);
+ System.err.println( "============================================================");
+ ++fi;
+ }
+ System.err.println("}CONSUMER: lost clipboard ownership");
+ }
+
+
+ void notifyTransferSuccess(boolean status) {
+ System.err.println(
+ "format "
+ + (status
+ ? "passed"
+ : "failed"
+ )
+ + "!!!"
+ );
+ setClipboardContents(
+ new HTMLSelection(
+ HTMLTransferTest.SyncFlavor,
+ status
+ ? S_PASSED
+ : S_FAILED
+ ),
+ this
+ );
+ }
+
+
+ public static void main(String[] args) {
+ try {
+ System.err.println("{CONSUMER: start");
+ THTMLConsumer ic = new THTMLConsumer();
+ ic.setClipboardContents(
+ new HTMLSelection(
+ HTMLTransferTest.SyncFlavor,
+ S_BEGIN_ANSWER
+ ),
+ ic
+ );
+ synchronized (LOCK) {
+ LOCK.wait();
+ }
+ System.err.println("}CONSUMER: start");
+ } catch (Throwable e) {
+ e.printStackTrace();
+ System.exit(HTMLTransferTest.CODE_FAILURE);
+ }
+ }
+
+}
+
+
+/**
+ * A <code>Transferable</code> which implements the capability required
+ * to transfer an <code>HTML</code>.
+ *
+ * This <code>Transferable</code> properly supports
+ * <code>HTMLTransferTest.HTMLFlavors</code>.
+ * and all equivalent flavors.
+ * No other <code>DataFlavor</code>s are supported.
+ *
+ * @see java.awt.datatransfer.HTMLTransferTest.HTMLFlavors
+ */
+class HTMLSelection implements Transferable {
+ private DataFlavor m_flavor;
+ private Object m_data;
+
+ /**
+ * Creates a <code>Transferable</code> capable of transferring
+ * the specified <code>String</code>.
+ */
+ public HTMLSelection(
+ DataFlavor flavor,
+ Object data
+ ){
+ m_flavor = flavor;
+ m_data = data;
+ }
+
+ /**
+ * Returns an array of flavors in which this <code>Transferable</code>
+ * can provide the data. <code>DataFlavor.stringFlavor</code>
+ * is properly supported.
+ * Support for <code>DataFlavor.plainTextFlavor</code> is
+ * <b>deprecated</b>.
+ *
+ * @return an array of length one, whose element is <code>DataFlavor.
+ * HTMLTransferTest.HTMLFlavors</code>
+ */
+ public DataFlavor[] getTransferDataFlavors() {
+ // returning flavors itself would allow client code to modify
+ // our internal behavior
+ return new DataFlavor[]{ m_flavor } ;
+ }
+
+ /**
+ * Returns whether the requested flavor is supported by this
+ * <code>Transferable</code>.
+ *
+ * @param flavor the requested flavor for the data
+ * @return true if <code>flavor</code> is equal to
+ * <code>HTMLTransferTest.HTMLFlavors</code>;
+ * false if <code>flavor</code>
+ * is not one of the above flavors
+ * @throws NullPointerException if flavor is <code>null</code>
+ */
+ public boolean isDataFlavorSupported(DataFlavor flavor) {
+ System.err.println("Have:" + flavor + " Can:" + m_flavor);
+ if(flavor.equals(m_flavor))
+ return true;
+ return false;
+ }
+
+ /**
+ * Returns the <code>Transferable</code>'s data in the requested
+ * <code>DataFlavor</code> if possible. If the desired flavor is
+ * <code>HTMLTransferTest.HTMLFlavors</code>, or an equivalent flavor,
+ * the <code>HTML</code> representing the selection is
+ * returned.
+ *
+ * @param flavor the requested flavor for the data
+ * @return the data in the requested flavor, as outlined above
+ * @throws UnsupportedFlavorException if the requested data flavor is
+ * not equivalent to <code>HTMLTransferTest.HTMLFlavors</code>
+ * @throws IOException if an IOException occurs while retrieving the data.
+ * By default, <code>HTMLSelection</code> never throws
+ * this exception, but a subclass may.
+ * @throws NullPointerException if flavor is <code>null</code>
+ */
+ public Object getTransferData(DataFlavor flavor)
+ throws UnsupportedFlavorException, IOException
+ {
+ if (flavor.equals(m_flavor)) {
+ return (Object)m_data;
+ } else {
+ throw new UnsupportedFlavorException(flavor);
+ }
+ }
+
+} // class HTMLSelection
+
+
+/****************************************************
+ Standard Test Machinery
+ DO NOT modify anything below -- it's a standard
+ chunk of code whose purpose is to make user
+ interaction uniform, and thereby make it simpler
+ to read and understand someone else's test.
+ ****************************************************/
+class Sysout
+ {
+ private static TestDialog dialog;
+
+ public static void createDialogWithInstructions( String[] instructions )
+ {
+ dialog = new TestDialog( new Frame(), "Instructions" );
+ dialog.printInstructions( instructions );
+ dialog.show();
+ println( "Any messages for the tester will display here." );
+ }
+
+ public static void createDialog( )
+ {
+ dialog = new TestDialog( new Frame(), "Instructions" );
+ String[] defInstr = { "Instructions will appear here. ", "" } ;
+ dialog.printInstructions( defInstr );
+ dialog.show();
+ println( "Any messages for the tester will display here." );
+ }
+
+
+ public static void printInstructions( String[] instructions )
+ {
+ dialog.printInstructions( instructions );
+ }
+
+
+ public static void println( String messageIn )
+ {
+ dialog.displayMessage( messageIn );
+ }
+
+ }// Sysout class
+
+class TestDialog extends Dialog
+ {
+
+ TextArea instructionsText;
+ TextArea messageText;
+ int maxStringLength = 80;
+
+ //DO NOT call this directly, go through Sysout
+ public TestDialog( Frame frame, String name )
+ {
+ super( frame, name );
+ int scrollBoth = TextArea.SCROLLBARS_BOTH;
+ instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
+ add( "North", instructionsText );
+
+ messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
+ add("South", messageText);
+
+ pack();
+
+ show();
+ }// TestDialog()
+
+ //DO NOT call this directly, go through Sysout
+ public void printInstructions( String[] instructions )
+ {
+ //Clear out any current instructions
+ instructionsText.setText( "" );
+
+ //Go down array of instruction strings
+
+ String printStr, remainingStr;
+ for( int i=0; i < instructions.length; i++ )
+ {
+ //chop up each into pieces maxSringLength long
+ remainingStr = instructions[ i ];
+ while( remainingStr.length() > 0 )
+ {
+ //if longer than max then chop off first max chars to print
+ if( remainingStr.length() >= maxStringLength )
+ {
+ //Try to chop on a word boundary
+ int posOfSpace = remainingStr.
+ lastIndexOf(' ', maxStringLength - 1);
+
+ if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1;
+
+ printStr = remainingStr.substring( 0, posOfSpace + 1 );
+ remainingStr = remainingStr.substring( posOfSpace + 1 );
+ }
+ //else just print
+ else
+ {
+ printStr = remainingStr;
+ remainingStr = "";
+ }
+
+ instructionsText.append( printStr + "\n" );
+
+ }// while
+
+ }// for
+
+ }//printInstructions()
+
+ //DO NOT call this directly, go through Sysout
+ public void displayMessage( String messageIn )
+ {
+ messageText.append( messageIn + "\n" );
+ }
+
+ }// TestDialog class
--- a/jdk/test/java/awt/EventQueue/6980209/bug6980209.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/test/java/awt/EventQueue/6980209/bug6980209.java Mon Oct 05 13:45:50 2015 -0700
@@ -29,6 +29,7 @@
import javax.swing.*;
import java.awt.*;
+import java.awt.event.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
@@ -47,6 +48,8 @@
private static Boolean enterReturn;
private static Boolean exitReturn;
private static int dispatchedEvents;
+ private static JButton button;
+ private static Point point;
public static void main(String[] args) throws Exception {
System.out.println(
@@ -62,6 +65,23 @@
setup(frame);
}
});
+ final Robot robot = new Robot();
+ robot.delay(100);
+ robot.waitForIdle();
+ robot.setAutoDelay(10);
+ robot.setAutoWaitForIdle(true);
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ point = button.getLocationOnScreen();
+ }
+ });
+ robot.mouseMove( point.x + 5, point.y + 5 );
+ robot.mousePress(InputEvent.BUTTON1_MASK);
+ robot.mouseRelease(InputEvent.BUTTON1_MASK);
+ robot.delay(100);
+ robot.waitForIdle();
+
testExitBeforeEnter();
System.out.println("Run random test in EDT");
runInEDT = true;
@@ -102,6 +122,7 @@
private static void testRandomly() throws AWTException {
disorderCounter = 0;
final Robot robot = new Robot();
+ robot.setAutoDelay(1);
for (int i = 0; i < ATTEMPTS; i++) {
enterReturn = null;
exitReturn = null;
@@ -156,14 +177,14 @@
}
private static void setup(final JFrame frame) {
- JButton jButton = new JButton("Button");
- frame.getContentPane().add(jButton);
- jButton.addActionListener(new bug6980209());
+ button = new JButton("Button");
+ frame.getContentPane().add(button);
+ button.addActionListener(new bug6980209());
frame.pack();
frame.setVisible(true);
- jButton.setFocusable(true);
- jButton.requestFocus();
- jButton.addKeyListener(new KeyListener() {
+ button.setFocusable(true);
+ button.requestFocus();
+ button.addKeyListener(new KeyListener() {
@Override
public void keyTyped(KeyEvent e) {
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java Mon Oct 05 13:45:50 2015 -0700
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Window;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.dnd.DnDConstants;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.DragGestureListener;
+import java.awt.dnd.DragSource;
+import java.awt.dnd.DropTarget;
+import java.awt.dnd.DropTargetDragEvent;
+import java.awt.dnd.DropTargetDropEvent;
+import java.awt.dnd.DropTargetEvent;
+import java.awt.dnd.DropTargetListener;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+/*
+ * @test
+ * @bug 8134917
+ * @summary [macosx] JOptionPane doesn't receive mouse events when opened from a drop event
+ * @author Alexandr Scherbatiy
+ */
+public class MissingEventsOnModalDialogTest {
+
+ private static volatile boolean passed = false;
+
+ public static void main(String[] args) throws Exception {
+ Frame sourceFrame = createFrame("Source Frame", 0, 0);
+ Frame targetFrame = createFrame("Target Frame", 250, 250);
+
+ DragSource defaultDragSource
+ = DragSource.getDefaultDragSource();
+ defaultDragSource.createDefaultDragGestureRecognizer(sourceFrame,
+ DnDConstants.ACTION_COPY_OR_MOVE,
+ new TestDragGestureListener());
+ new DropTarget(targetFrame, DnDConstants.ACTION_COPY_OR_MOVE,
+ new TestDropTargetListener(targetFrame));
+
+ Robot robot = new Robot();
+ robot.setAutoDelay(50);
+
+ sourceFrame.toFront();
+ robot.waitForIdle();
+
+ Point point = getCenterPoint(sourceFrame);
+ robot.mouseMove(point.x, point.y);
+ robot.waitForIdle();
+
+ mouseDragAndDrop(robot, point, getCenterPoint(targetFrame));
+
+ long time = System.currentTimeMillis() + 200;
+
+ while (!passed) {
+ if (time < System.currentTimeMillis()) {
+ sourceFrame.dispose();
+ targetFrame.dispose();
+ throw new RuntimeException("Mouse clicked event is lost!");
+ }
+ Thread.sleep(10);
+ }
+ sourceFrame.dispose();
+ targetFrame.dispose();
+ }
+
+ private static Frame createFrame(String title, int x, int y) {
+ Frame frame = new Frame();
+ frame.setSize(200, 200);
+ frame.setLocation(x, y);
+ frame.setTitle(title);
+ frame.setVisible(true);
+ return frame;
+ }
+
+ private static Point getCenterPoint(Window window) {
+ Point centerPoint = window.getLocationOnScreen();
+ centerPoint.translate(window.getWidth() / 2, window.getHeight() / 2);
+ return centerPoint;
+ }
+
+ public static void mouseDragAndDrop(Robot robot, Point from, Point to) {
+ mouseDND(robot, from.x, from.y, to.x, to.y);
+ }
+
+ public static void mouseDND(Robot robot, int x1, int y1, int x2, int y2) {
+
+ int N = 20;
+ int x = x1;
+ int y = y1;
+ int dx = (x2 - x1) / N;
+ int dy = (y2 - y1) / N;
+
+ robot.mousePress(InputEvent.BUTTON1_MASK);
+
+ for (int i = 0; i < N; i++) {
+ robot.mouseMove(x += dx, y += dy);
+ }
+
+ robot.mouseRelease(InputEvent.BUTTON1_MASK);
+ }
+
+ private static class TestDragGestureListener implements DragGestureListener {
+
+ public void dragGestureRecognized(DragGestureEvent dge) {
+ dge.startDrag(null, new StringTransferable());
+ }
+ }
+
+ static class StringTransferable implements Transferable {
+
+ @Override
+ public DataFlavor[] getTransferDataFlavors() {
+ return new DataFlavor[]{DataFlavor.stringFlavor};
+ }
+
+ @Override
+ public boolean isDataFlavorSupported(DataFlavor flavor) {
+ return flavor.equals(DataFlavor.stringFlavor);
+ }
+
+ @Override
+ public Object getTransferData(DataFlavor flavor) {
+ return "Hello World!";
+ }
+ }
+
+ private static class TestDropTargetListener implements DropTargetListener {
+
+ private final Frame targetFrame;
+
+ public TestDropTargetListener(Frame targetFrame) {
+ this.targetFrame = targetFrame;
+ }
+
+ @Override
+ public void dragEnter(DropTargetDragEvent dtde) {
+ dtde.acceptDrag(dtde.getDropAction());
+ }
+
+ @Override
+ public void dragOver(DropTargetDragEvent dtde) {
+ dtde.acceptDrag(dtde.getDropAction());
+ }
+
+ @Override
+ public void dropActionChanged(DropTargetDragEvent dtde) {
+ dtde.acceptDrag(dtde.getDropAction());
+ }
+
+ @Override
+ public void dragExit(DropTargetEvent dte) {
+ }
+
+ @Override
+ public void drop(DropTargetDropEvent dtde) {
+ dtde.acceptDrop(dtde.getDropAction());
+ showModalDialog(targetFrame);
+ dtde.dropComplete(true);
+ }
+ }
+
+ private static void showModalDialog(Frame targetFrame) {
+
+ Dialog dialog = new Dialog(targetFrame, true);
+
+ dialog.addMouseListener(new MouseAdapter() {
+
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ passed = true;
+ dialog.dispose();
+ }
+ });
+
+ dialog.setSize(400, 300);
+ dialog.setTitle("Modal Dialog!");
+
+ clickOnModalDialog(dialog);
+ dialog.setVisible(true);
+ }
+
+ private static void clickOnModalDialog(Dialog dialog) {
+ new Thread(() -> {
+ clickOnDialog(dialog);
+ }).start();
+ }
+
+ private static void clickOnDialog(Dialog dialog) {
+ try {
+ long time = System.currentTimeMillis() + 200;
+
+ while (!dialog.isVisible()) {
+ if (time < System.currentTimeMillis()) {
+ throw new RuntimeException("Dialog is not visible!");
+ }
+ Thread.sleep(10);
+ }
+
+ Point point = getCenterPoint(dialog);
+ Robot robot = new Robot();
+ robot.setAutoDelay(50);
+
+ robot.mouseMove(point.x, point.y);
+ robot.mousePress(InputEvent.BUTTON1_MASK);
+ robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/RegisterKeyStroke/TestAWTKeyStroke.java Mon Oct 05 13:45:50 2015 -0700
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.AWTKeyStroke;
+import java.awt.event.InputEvent;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInput;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import javax.swing.KeyStroke;
+
+/*
+ * @test
+ * @bug 8133453
+ * @summary Remove AWTKeyStroke.registerSubclass(Class) method
+ * @author Alexander Scherbatiy
+ * @run main/othervm TestAWTKeyStroke
+ * @run main/othervm/policy=policy -Djava.security.manager TestAWTKeyStroke
+ */
+public class TestAWTKeyStroke {
+
+ public static void main(String[] args) throws Exception {
+
+ int modifiers = InputEvent.CTRL_MASK | InputEvent.CTRL_DOWN_MASK;
+ checkAWTKeyStroke('A', modifiers, true);
+ checkKeyStroke('B', modifiers, false);
+ checkAWTKeyStroke('C', modifiers, false);
+ checkKeyStroke('D', modifiers, true);
+ checkSerializedKeyStrokes('E', modifiers, true);
+ }
+
+ private static void checkAWTKeyStroke(int keyCode, int modifiers,
+ boolean onKeyRelease) throws Exception {
+
+ AWTKeyStroke awtKeyStroke1 = AWTKeyStroke.getAWTKeyStroke(
+ keyCode, modifiers, onKeyRelease);
+
+ checkAWTKeyStroke(awtKeyStroke1, keyCode, modifiers, onKeyRelease);
+
+ AWTKeyStroke awtKeyStroke2 = AWTKeyStroke.getAWTKeyStroke(
+ keyCode, modifiers, onKeyRelease);
+
+ if (awtKeyStroke1 != awtKeyStroke2) {
+ throw new RuntimeException("AWTKeyStroke is not cached!");
+ }
+
+ checkSerializedKeyStroke(awtKeyStroke1);
+ }
+
+ private static void checkKeyStroke(int keyCode, int modifiers,
+ boolean onKeyRelease) throws Exception {
+
+ KeyStroke keyStroke1 = KeyStroke.getKeyStroke(
+ keyCode, modifiers, onKeyRelease);
+ checkAWTKeyStroke(keyStroke1, keyCode, modifiers, onKeyRelease);
+
+ KeyStroke keyStroke2 = KeyStroke.getKeyStroke(
+ keyCode, modifiers, onKeyRelease);
+
+ if (keyStroke1 != keyStroke2) {
+ throw new RuntimeException("KeyStroke is not cached!");
+ }
+
+ checkSerializedKeyStroke(keyStroke1);
+ }
+
+ private static void checkSerializedKeyStrokes(int keyCode, int modifiers,
+ boolean onKeyRelease) throws Exception {
+
+ AWTKeyStroke awtKeyStroke = AWTKeyStroke.getAWTKeyStroke(
+ keyCode, modifiers, onKeyRelease);
+
+ KeyStroke keyStroke = KeyStroke.getKeyStroke(
+ keyCode, modifiers, onKeyRelease);
+
+ if (awtKeyStroke != getSerializedAWTKeyStroke(awtKeyStroke)) {
+ throw new RuntimeException("Serialized AWTKeyStroke is not cached!");
+ }
+
+ awtKeyStroke = AWTKeyStroke.getAWTKeyStroke(
+ keyCode, modifiers, !onKeyRelease);
+
+ if (!keyStroke.equals(getSerializedAWTKeyStroke(keyStroke))) {
+ throw new RuntimeException("Serialized KeyStroke is not cached!");
+ }
+ }
+
+ private static void checkAWTKeyStroke(AWTKeyStroke awtKeyStroke,
+ int keyCode, int modifiers, boolean onKeyRelease) {
+
+ if (awtKeyStroke.getKeyCode() != keyCode) {
+ throw new RuntimeException("Wrong key code!");
+ }
+
+ if (awtKeyStroke.getModifiers() != modifiers) {
+ throw new RuntimeException("Wrong modifiers!");
+ }
+
+ if (awtKeyStroke.isOnKeyRelease() != onKeyRelease) {
+ throw new RuntimeException("Wrong on key release!");
+ }
+ }
+
+ private static void checkSerializedKeyStroke(AWTKeyStroke keyStroke)
+ throws Exception {
+ if (keyStroke != getSerializedAWTKeyStroke(keyStroke)) {
+ throw new RuntimeException("New instance is returned during"
+ + " serialization!");
+ }
+ }
+
+ private static AWTKeyStroke getSerializedAWTKeyStroke(AWTKeyStroke keyStroke)
+ throws Exception {
+
+ try (ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ObjectOutput out = new ObjectOutputStream(bos)) {
+ out.writeObject(keyStroke);
+ byte[] bytes = bos.toByteArray();
+
+ try (ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
+ ObjectInput in = new ObjectInputStream(bis)) {
+ return (AWTKeyStroke) in.readObject();
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/RegisterKeyStroke/policy Mon Oct 05 13:45:50 2015 -0700
@@ -0,0 +1,2 @@
+grant {
+};
--- a/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java Mon Oct 05 13:45:50 2015 -0700
@@ -29,9 +29,8 @@
import java.io.File;
import java.io.FileInputStream;
-import javax.sound.sampled.*;
-
-import com.sun.media.sound.*;
+import com.sun.media.sound.RIFFReader;
+import com.sun.media.sound.RIFFWriter;
public class Skip {
@@ -42,6 +41,11 @@
}
public static void main(String[] args) throws Exception {
+ test(false);
+ test(true);
+ }
+
+ private static void test(boolean customStream) throws Exception {
RIFFWriter writer = null;
RIFFReader reader = null;
File tempfile = File.createTempFile("test",".riff");
@@ -53,7 +57,17 @@
chunk.write((byte)44);
writer.close();
writer = null;
- FileInputStream fis = new FileInputStream(tempfile);
+ final FileInputStream fis;
+ if (customStream) {
+ fis = new FileInputStream(tempfile);
+ } else {
+ fis = new FileInputStream(tempfile) {
+ @Override
+ public long skip(long n) {
+ return 0;
+ }
+ };
+ }
reader = new RIFFReader(fis);
RIFFReader readchunk = reader.nextChunk();
reader.skip(1);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/sound/sampled/spi/AudioFileReader/EndlessLoopHugeLengthWave.java Mon Oct 05 13:45:50 2015 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.ByteArrayInputStream;
+
+import javax.sound.sampled.AudioSystem;
+import javax.sound.sampled.UnsupportedAudioFileException;
+
+/**
+ * @test
+ * @bug 8135160
+ */
+public final class EndlessLoopHugeLengthWave {
+
+ // some data wich can cause an endless loop in RiffReader.java
+ private static byte[] headerWAV = {0x52, 0x49, 0x46, 0x46, // RIFF_MAGIC
+ 0x7, 0xF, 0xF, 0xF, // fileLength
+ 0x57, 0x41, 0x56, 0x45, // waveMagic
+ 0x66, 0x6d, 0x74, 0x20, // FMT_MAGIC
+ 1, 2, 3, 4, // format
+ 3, 0,// wav_type WAVE_FORMAT_IEEE_FLOAT
+ 1, 0, // channels
+ 1, 1, // sampleRate
+ 1, 0, 0, 0, // avgBytesPerSec
+ 0, 1, // blockAlign
+ 1, 0, // sampleSizeInBits
+ 0x64, 0x61, 0x74, 0x61, // DATA_MAGIC
+ };
+
+ public static void main(final String[] args) throws Exception {
+ try {
+ AudioSystem.getAudioFileFormat(new ByteArrayInputStream(headerWAV));
+ } catch (final UnsupportedAudioFileException ignored) {
+ // Expected
+ }
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JTextPane/JTextPaneDocumentWrapping.java Mon Oct 05 13:45:50 2015 -0700
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ @bug 8133108
+ @summary [PIT] Container size is wrong in JEditorPane
+ @author Semyon Sadetsky
+ */
+
+import javax.swing.*;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.html.CSS;
+import java.awt.*;
+
+public class JTextPaneDocumentWrapping {
+
+ private static JFrame frame;
+ private static JTextPane jTextPane;
+ private static int position;
+
+ public static void main(String[] args) throws Exception{
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ frame = new JFrame();
+ frame.setUndecorated(true);
+ frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+ frame.setSize(200, 200);
+ jTextPane = new JTextPane();
+ jTextPane.setContentType("text/html");
+ jTextPane.setText(
+ "<html><body><b id='test'>Test Test Test Test Test Test " +
+ "Test Test Test Test Test Test Test Test Test Test " +
+ "Test Test Test Test Test Test Test Test Test Test" +
+ "</b></body></html>");
+ frame.getContentPane().add(jTextPane);
+ frame.setVisible(true);
+ }
+ });
+ Robot robot = new Robot();
+ robot.waitForIdle();
+ robot.delay(200);
+
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ position = jTextPane.modelToView(100).y;
+ SimpleAttributeSet wrap = new SimpleAttributeSet();
+ wrap.addAttribute(CSS.Attribute.WHITE_SPACE, "nowrap");
+ jTextPane.getStyledDocument()
+ .setParagraphAttributes(0, 10, wrap, true);
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ }
+ });
+ if(position < 40) {
+ throw new RuntimeException("Text is not wrapped " + position);
+ }
+ robot.waitForIdle();
+ robot.delay(200);
+ SwingUtilities.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ position = jTextPane.modelToView(100).y;
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ }
+ frame.dispose();
+ }
+ });
+ if(position > 20) {
+ throw new RuntimeException("Text is wrapped " + position);
+ }
+ System.out.println("ok");
+
+ }
+}
--- a/jdk/test/javax/swing/plaf/windows/6921687/bug6921687.java Mon Oct 05 08:16:11 2015 -0700
+++ b/jdk/test/javax/swing/plaf/windows/6921687/bug6921687.java Mon Oct 05 13:45:50 2015 -0700
@@ -21,22 +21,27 @@
* questions.
*/
-/* @test
- @bug 6921687 8079428
- @summary Mnemonic disappears after repeated attempts to open menu items using
- mnemonics
- @author Semyon Sadetsky
- @library /lib/testlibrary
- @build jdk.testlibrary.OSInfo
- @run main bug6921687
- */
-
-
-import jdk.testlibrary.OSInfo;
-import javax.swing.*;
-import java.awt.*;
+/*
+ * @test
+ * @bug 6921687 8079428
+ * @summary Mnemonic disappears after repeated attempts to open menu items using
+ * mnemonics
+ * @author Semyon Sadetsky
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.Platform
+ * @requires (os.family == "windows")
+ * @modules java.desktop/com.sun.java.swing.plaf.windows
+ * @run main bug6921687
+ */
+import java.awt.Robot;
import java.awt.event.KeyEvent;
-
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import jdk.testlibrary.Platform;
public class bug6921687 {
@@ -44,24 +49,24 @@
private static JFrame frame;
public static void main(String[] args) throws Exception {
- if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
+ if (!Platform.isWindows()) {
System.out.println("Only Windows platform test. Test is skipped.");
System.out.println("ok");
return;
}
- lafClass = Class.forName(UIManager.getSystemLookAndFeelClassName());
- UIManager.setLookAndFeel((LookAndFeel) lafClass.newInstance());
+ final String lafClassName = UIManager.getSystemLookAndFeelClassName();
+ lafClass = Class.forName(lafClassName);
+ UIManager.setLookAndFeel(lafClassName);
try {
- SwingUtilities.invokeAndWait(new Runnable() {
- public void run() {
- frame = new JFrame();
- frame.setUndecorated(true);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- setup(frame);
- }
+ SwingUtilities.invokeAndWait(() -> {
+ frame = new JFrame();
+ frame.setUndecorated(true);
+ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+ setup(frame);
});
final Robot robot = new Robot();
+ robot.waitForIdle();
robot.setAutoDelay(20);
robot.keyPress(KeyEvent.VK_ALT);
robot.keyPress(KeyEvent.VK_F);
@@ -108,6 +113,5 @@
frame.setSize(350, 250);
frame.setVisible(true);
-
}
}