Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Automatic merge of client:master into master
  • Loading branch information
duke committed Aug 11, 2020
2 parents 3c23d2d + c1749c1 commit 9cb870f068f659564f3947f96213d8136d244bcb
Showing with 424 additions and 23 deletions.
  1. +6 −1 src/java.desktop/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java
  2. +6 −1 src/java.desktop/share/classes/java/awt/DefaultFocusTraversalPolicy.java
  3. +6 −1 src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java
  4. +6 −1 src/java.desktop/share/classes/java/awt/FocusTraversalPolicy.java
  5. +6 −1 src/java.desktop/share/classes/java/awt/Toolkit.java
  6. +6 −1 src/java.desktop/share/classes/java/awt/dnd/DragSourceAdapter.java
  7. +6 −1 src/java.desktop/share/classes/java/awt/dnd/DropTargetAdapter.java
  8. +7 −1 src/java.desktop/share/classes/java/awt/event/ComponentAdapter.java
  9. +7 −1 src/java.desktop/share/classes/java/awt/event/ContainerAdapter.java
  10. +7 −1 src/java.desktop/share/classes/java/awt/event/FocusAdapter.java
  11. +6 −1 src/java.desktop/share/classes/java/awt/event/HierarchyBoundsAdapter.java
  12. +7 −1 src/java.desktop/share/classes/java/awt/event/KeyAdapter.java
  13. +7 −1 src/java.desktop/share/classes/java/awt/event/MouseAdapter.java
  14. +7 −1 src/java.desktop/share/classes/java/awt/event/MouseMotionAdapter.java
  15. +6 −1 src/java.desktop/share/classes/java/awt/event/WindowAdapter.java
  16. +3 −3 src/java.desktop/share/classes/java/awt/image/BufferedImage.java
  17. +6 −1 src/java.desktop/share/classes/java/beans/Beans.java
  18. +6 −1 src/java.desktop/share/classes/java/beans/Encoder.java
  19. +6 −1 src/java.desktop/share/classes/java/beans/PersistenceDelegate.java
  20. +6 −1 src/java.desktop/share/classes/java/beans/PropertyEditorManager.java
  21. +6 −1 src/java.desktop/share/classes/java/beans/SimpleBeanInfo.java
  22. +192 −0 test/jdk/java/awt/Desktop/SecurityTest/DesktopSecurityTest.java
  23. +7 −0 test/jdk/java/awt/Desktop/SecurityTest/desktop.policy
  24. +96 −0 test/jdk/java/awt/image/BufferedImage/GetTileGridOffset.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@@ -87,6 +87,11 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
private transient Container cachedRoot;
private transient List<Component> cachedCycle;

/**
* Constructs a {@code ContainerOrderFocusTraversalPolicy}.
*/
public ContainerOrderFocusTraversalPolicy() {}

/*
* We suppose to use getFocusTraversalCycle & getComponentIndex methods in order
* to divide the policy into two parts:
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@@ -75,6 +75,11 @@
*/
private static final long serialVersionUID = 8876966522510157497L;

/**
* Constructs a {@code DefaultFocusTraversalPolicy}.
*/
public DefaultFocusTraversalPolicy() {}

/**
* Determines whether a Component is an acceptable choice as the new
* focus owner. The Component must be visible, displayable, and enabled
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@@ -96,6 +96,11 @@ public Object run() {
});
}

/**
* Constructs a {@code DefaultKeyboardFocusManager}.
*/
public DefaultKeyboardFocusManager() {}

private static class TypeAheadMarker {
long after;
Component untilFocused;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@@ -69,6 +69,11 @@
*/
public abstract class FocusTraversalPolicy {

/**
* Constructs a {@code FocusTraversalPolicy}.
*/
protected FocusTraversalPolicy() {}

/**
* Returns the Component that should receive the focus after aComponent.
* aContainer must be a focus cycle root of aComponent or a focus traversal
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2020, 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
@@ -136,6 +136,11 @@
*/
public abstract class Toolkit {

/**
* Constructs a {@code Toolkit}.
*/
protected Toolkit() {}

// The following method is called by the private method
// <code>updateSystemColors</code> in <code>SystemColor</code>.

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2020, 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
@@ -57,6 +57,11 @@
public abstract class DragSourceAdapter
implements DragSourceListener, DragSourceMotionListener {

/**
* Constructs a {@code DragSourceAdapter}.
*/
protected DragSourceAdapter() {}

/**
* Called as the cursor's hotspot enters a platform-dependent drop site.
* This method is invoked when all the following conditions are true:
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2020, 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
@@ -72,6 +72,11 @@
*/
public abstract class DropTargetAdapter implements DropTargetListener {

/**
* Constructs a {@code DropTargetAdapter}.
*/
protected DropTargetAdapter() {}

/**
* Called while a drag operation is ongoing, when the mouse pointer enters
* the operable part of the drop site for the {@code DropTarget}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -50,6 +50,12 @@
* @since 1.1
*/
public abstract class ComponentAdapter implements ComponentListener {

/**
* Constructs a {@code ComponentAdapter}.
*/
protected ComponentAdapter() {}

/**
* Invoked when the component's size changes.
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -50,6 +50,12 @@
* @since 1.1
*/
public abstract class ContainerAdapter implements ContainerListener {

/**
* Constructs a {@code ContainerAdapter}.
*/
protected ContainerAdapter() {}

/**
* Invoked when a component has been added to the container.
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -50,6 +50,12 @@
* @since 1.1
*/
public abstract class FocusAdapter implements FocusListener {

/**
* Constructs a {@code FocusAdapter}.
*/
protected FocusAdapter() {}

/**
* Invoked when a component gains the keyboard focus.
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@@ -49,6 +49,11 @@
*/
public abstract class HierarchyBoundsAdapter implements HierarchyBoundsListener
{
/**
* Constructs a {@code HierarchyBoundsAdapter}.
*/
protected HierarchyBoundsAdapter() {}

/**
* Called when an ancestor of the source is moved.
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -51,6 +51,12 @@
* @since 1.1
*/
public abstract class KeyAdapter implements KeyListener {

/**
* Constructs a {@code KeyAdapter}.
*/
protected KeyAdapter() {}

/**
* Invoked when a key has been typed.
* This event occurs when a key press is followed by a key release.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -68,6 +68,12 @@
* @since 1.1
*/
public abstract class MouseAdapter implements MouseListener, MouseWheelListener, MouseMotionListener {

/**
* Constructs a {@code MouseAdapter}.
*/
protected MouseAdapter() {}

/**
* {@inheritDoc}
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -54,6 +54,12 @@
* @since 1.1
*/
public abstract class MouseMotionAdapter implements MouseMotionListener {

/**
* Constructs a {@code MouseMotionAdapter}.
*/
protected MouseMotionAdapter() {}

/**
* Invoked when a mouse button is pressed on a component and then
* dragged. Mouse drag events will continue to be delivered to
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -55,6 +55,11 @@
public abstract class WindowAdapter
implements WindowListener, WindowStateListener, WindowFocusListener
{
/**
* Constructs a {@code WindowAdapter}.
*/
protected WindowAdapter() {}

/**
* Invoked when a window has been opened.
*/
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
@@ -1367,7 +1367,7 @@ public int getTileHeight() {
* @return the x offset of the tile grid.
*/
public int getTileGridXOffset() {
return raster.getSampleModelTranslateX();
return raster.getMinX();
}

/**
@@ -1377,7 +1377,7 @@ public int getTileGridXOffset() {
* @return the y offset of the tile grid.
*/
public int getTileGridYOffset() {
return raster.getSampleModelTranslateY();
return raster.getMinY();
}

/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -59,6 +59,11 @@

public class Beans {

/**
* Constructs a {@code Beans}.
*/
public Beans() {}

/**
* <p>
* Instantiate a JavaBean.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@@ -52,6 +52,11 @@ public class Encoder {
boolean executeStatements = true;
private Map<Object, Object> attributes;

/**
* Constructs an {@code Encoder}.
*/
public Encoder() {}

/**
* Write the specified object to the output stream.
* The serialized form will denote a series of
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@@ -87,6 +87,11 @@

public abstract class PersistenceDelegate {

/**
* Constructs a {@code PersistenceDelegate}.
*/
protected PersistenceDelegate() {}

/**
* The {@code writeObject} is a single entry point to the persistence
* and is used by an {@code Encoder} in the traditional
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -54,6 +54,11 @@

public class PropertyEditorManager {

/**
* Constructs a {@code PropertyEditorManager}.
*/
public PropertyEditorManager() {}

/**
* Registers an editor class to edit values of the given target class.
* If the editor class is {@code null},

0 comments on commit 9cb870f

Please sign in to comment.