changeset 9555:817804cddbd9

8036103: Cleanup of java.awt and java.awt.peer packages Reviewed-by: bagiras, pchelko
author serb
date Fri, 14 Mar 2014 18:14:41 +0400
parents 357080a6898d
children a7c1309c108b
files src/share/classes/java/awt/PointerInfo.java src/share/classes/java/awt/peer/CheckboxMenuItemPeer.java src/share/classes/java/awt/peer/CheckboxPeer.java src/share/classes/java/awt/peer/ComponentPeer.java src/share/classes/java/awt/peer/TextAreaPeer.java
diffstat 5 files changed, 37 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/PointerInfo.java	Thu Feb 27 19:01:32 2014 +0400
+++ b/src/share/classes/java/awt/PointerInfo.java	Fri Mar 14 18:14:41 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,62 +23,59 @@
  * questions.
  */
 
+
 package java.awt;
 
 /**
  * A class that describes the pointer position.
- * It provides the <code>GraphicsDevice</code> where the
- * pointer is and the <code>Point</code> that represents
- * the coordinates of the pointer.
+ * It provides the {@code GraphicsDevice} where the pointer is and
+ * the {@code Point} that represents the coordinates of the pointer.
  * <p>
  * Instances of this class should be obtained via
  * {@link MouseInfo#getPointerInfo}.
- * The <code>PointerInfo</code> instance is not updated dynamically
- * as the mouse moves. To get the updated location, you must call
+ * The {@code PointerInfo} instance is not updated dynamically as the mouse
+ * moves. To get the updated location, you must call
  * {@link MouseInfo#getPointerInfo} again.
  *
  * @see MouseInfo#getPointerInfo
- * @author      Roman Poborchiy
- * @since       1.5
+ * @author Roman Poborchiy
+ * @since 1.5
  */
-
 public class PointerInfo {
 
-    private GraphicsDevice device;
-    private Point location;
+    private final GraphicsDevice device;
+    private final Point location;
 
     /**
      * Package-private constructor to prevent instantiation.
      */
-    PointerInfo(GraphicsDevice device, Point location) {
+    PointerInfo(final GraphicsDevice device, final Point location) {
         this.device = device;
         this.location = location;
     }
 
     /**
-     * Returns the <code>GraphicsDevice</code> where the mouse pointer
-     * was at the moment this <code>PointerInfo</code> was created.
+     * Returns the {@code GraphicsDevice} where the mouse pointer was at the
+     * moment this {@code PointerInfo} was created.
      *
-     * @return   <code>GraphicsDevice</code> corresponding to the pointer
-     * @since    1.5
+     * @return {@code GraphicsDevice} corresponding to the pointer
+     * @since 1.5
      */
     public GraphicsDevice getDevice() {
         return device;
     }
 
     /**
-     * Returns the <code>Point</code> that represents the coordinates
-     * of the pointer on the screen. See {@link MouseInfo#getPointerInfo}
-     * for more information about coordinate calculation for multiscreen
-     * systems.
+     * Returns the {@code Point} that represents the coordinates of the pointer
+     * on the screen. See {@link MouseInfo#getPointerInfo} for more information
+     * about coordinate calculation for multiscreen systems.
      *
+     * @return coordinates of mouse pointer
      * @see MouseInfo
      * @see MouseInfo#getPointerInfo
-     * @return   coordinates of mouse pointer
-     * @since    1.5
+     * @since 1.5
      */
     public Point getLocation() {
         return location;
     }
-
 }
--- a/src/share/classes/java/awt/peer/CheckboxMenuItemPeer.java	Thu Feb 27 19:01:32 2014 +0400
+++ b/src/share/classes/java/awt/peer/CheckboxMenuItemPeer.java	Fri Mar 14 18:14:41 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,12 +38,12 @@
 public interface CheckboxMenuItemPeer extends MenuItemPeer {
 
     /**
-     * Sets the state of the checkbox to be checked ({@code true}) or
-     * unchecked ({@code false}).
+     * Sets the state of the checkbox to be checked {@code true} or
+     * unchecked {@code false}.
      *
-     * @param t the state to set on the checkbox
+     * @param state the state to set on the checkbox
      *
-     * @see CheckboxMenuItemPeer#setState(boolean)
+     * @see CheckboxMenuItem#setState(boolean)
      */
-    void setState(boolean t);
+    void setState(boolean state);
 }
--- a/src/share/classes/java/awt/peer/CheckboxPeer.java	Thu Feb 27 19:01:32 2014 +0400
+++ b/src/share/classes/java/awt/peer/CheckboxPeer.java	Fri Mar 14 18:14:41 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,8 @@
  */
 package java.awt.peer;
 
-import java.awt.*;
+import java.awt.Checkbox;
+import java.awt.CheckboxGroup;
 
 /**
  * The peer interface for {@link Checkbox}.
@@ -38,8 +39,8 @@
 public interface CheckboxPeer extends ComponentPeer {
 
     /**
-     * Sets the state of the checkbox to be checked ({@code true}) or
-     * unchecked ({@code false}).
+     * Sets the state of the checkbox to be checked {@code true} or
+     * unchecked {@code false}.
      *
      * @param state the state to set on the checkbox
      *
@@ -60,7 +61,7 @@
     void setCheckboxGroup(CheckboxGroup g);
 
     /**
-     * Sets the label that should be displayed on the ckeckbox. A value of
+     * Sets the label that should be displayed on the checkbox. A value of
      * {@code null} means that no label should be displayed.
      *
      * @param label the label to be displayed on the checkbox, or
--- a/src/share/classes/java/awt/peer/ComponentPeer.java	Thu Feb 27 19:01:32 2014 +0400
+++ b/src/share/classes/java/awt/peer/ComponentPeer.java	Fri Mar 14 18:14:41 2014 +0400
@@ -27,11 +27,11 @@
 
 import java.awt.*;
 import java.awt.event.PaintEvent;
+import java.awt.image.ColorModel;
+import java.awt.image.ImageObserver;
 import java.awt.image.ImageProducer;
-import java.awt.image.ImageObserver;
-import java.awt.image.ColorModel;
 import java.awt.image.VolatileImage;
-import java.awt.GraphicsConfiguration;
+
 import sun.awt.CausedFocusEvent;
 import sun.java2d.pipe.Region;
 
--- a/src/share/classes/java/awt/peer/TextAreaPeer.java	Thu Feb 27 19:01:32 2014 +0400
+++ b/src/share/classes/java/awt/peer/TextAreaPeer.java	Fri Mar 14 18:14:41 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@
     void insert(String text, int pos);
 
     /**
-     * Replaces a range of text by the specified string
+     * Replaces a range of text by the specified string.
      *
      * @param text the replacement string
      * @param start the begin of the range to replace