提交 4183f565 编写于 作者: S serb

8036103: Cleanup of java.awt and java.awt.peer packages

Reviewed-by: bagiras, pchelko
上级 bbc8de0f
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -23,62 +23,59 @@ ...@@ -23,62 +23,59 @@
* questions. * questions.
*/ */
package java.awt; package java.awt;
/** /**
* A class that describes the pointer position. * A class that describes the pointer position.
* It provides the <code>GraphicsDevice</code> where the * It provides the {@code GraphicsDevice} where the pointer is and
* pointer is and the <code>Point</code> that represents * the {@code Point} that represents the coordinates of the pointer.
* the coordinates of the pointer.
* <p> * <p>
* Instances of this class should be obtained via * Instances of this class should be obtained via
* {@link MouseInfo#getPointerInfo}. * {@link MouseInfo#getPointerInfo}.
* The <code>PointerInfo</code> instance is not updated dynamically * The {@code PointerInfo} instance is not updated dynamically as the mouse
* as the mouse moves. To get the updated location, you must call * moves. To get the updated location, you must call
* {@link MouseInfo#getPointerInfo} again. * {@link MouseInfo#getPointerInfo} again.
* *
* @see MouseInfo#getPointerInfo * @see MouseInfo#getPointerInfo
* @author Roman Poborchiy * @author Roman Poborchiy
* @since 1.5 * @since 1.5
*/ */
public class PointerInfo { public class PointerInfo {
private GraphicsDevice device; private final GraphicsDevice device;
private Point location; private final Point location;
/** /**
* Package-private constructor to prevent instantiation. * Package-private constructor to prevent instantiation.
*/ */
PointerInfo(GraphicsDevice device, Point location) { PointerInfo(final GraphicsDevice device, final Point location) {
this.device = device; this.device = device;
this.location = location; this.location = location;
} }
/** /**
* Returns the <code>GraphicsDevice</code> where the mouse pointer * Returns the {@code GraphicsDevice} where the mouse pointer was at the
* was at the moment this <code>PointerInfo</code> was created. * moment this {@code PointerInfo} was created.
* *
* @return <code>GraphicsDevice</code> corresponding to the pointer * @return {@code GraphicsDevice} corresponding to the pointer
* @since 1.5 * @since 1.5
*/ */
public GraphicsDevice getDevice() { public GraphicsDevice getDevice() {
return device; return device;
} }
/** /**
* Returns the <code>Point</code> that represents the coordinates * Returns the {@code Point} that represents the coordinates of the pointer
* of the pointer on the screen. See {@link MouseInfo#getPointerInfo} * on the screen. See {@link MouseInfo#getPointerInfo} for more information
* for more information about coordinate calculation for multiscreen * about coordinate calculation for multiscreen systems.
* systems.
* *
* @return coordinates of mouse pointer
* @see MouseInfo * @see MouseInfo
* @see MouseInfo#getPointerInfo * @see MouseInfo#getPointerInfo
* @return coordinates of mouse pointer * @since 1.5
* @since 1.5
*/ */
public Point getLocation() { public Point getLocation() {
return location; return location;
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -38,12 +38,12 @@ import java.awt.CheckboxMenuItem; ...@@ -38,12 +38,12 @@ import java.awt.CheckboxMenuItem;
public interface CheckboxMenuItemPeer extends MenuItemPeer { public interface CheckboxMenuItemPeer extends MenuItemPeer {
/** /**
* Sets the state of the checkbox to be checked ({@code true}) or * Sets the state of the checkbox to be checked {@code true} or
* unchecked ({@code false}). * 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);
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
*/ */
package java.awt.peer; package java.awt.peer;
import java.awt.*; import java.awt.Checkbox;
import java.awt.CheckboxGroup;
/** /**
* The peer interface for {@link Checkbox}. * The peer interface for {@link Checkbox}.
...@@ -38,8 +39,8 @@ import java.awt.*; ...@@ -38,8 +39,8 @@ import java.awt.*;
public interface CheckboxPeer extends ComponentPeer { public interface CheckboxPeer extends ComponentPeer {
/** /**
* Sets the state of the checkbox to be checked ({@code true}) or * Sets the state of the checkbox to be checked {@code true} or
* unchecked ({@code false}). * unchecked {@code false}.
* *
* @param state the state to set on the checkbox * @param state the state to set on the checkbox
* *
...@@ -60,7 +61,7 @@ public interface CheckboxPeer extends ComponentPeer { ...@@ -60,7 +61,7 @@ public interface CheckboxPeer extends ComponentPeer {
void setCheckboxGroup(CheckboxGroup g); 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. * {@code null} means that no label should be displayed.
* *
* @param label the label to be displayed on the checkbox, or * @param label the label to be displayed on the checkbox, or
......
...@@ -27,11 +27,11 @@ package java.awt.peer; ...@@ -27,11 +27,11 @@ package java.awt.peer;
import java.awt.*; import java.awt.*;
import java.awt.event.PaintEvent; import java.awt.event.PaintEvent;
import java.awt.image.ImageProducer;
import java.awt.image.ImageObserver;
import java.awt.image.ColorModel; import java.awt.image.ColorModel;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.awt.image.VolatileImage; import java.awt.image.VolatileImage;
import java.awt.GraphicsConfiguration;
import sun.awt.CausedFocusEvent; import sun.awt.CausedFocusEvent;
import sun.java2d.pipe.Region; import sun.java2d.pipe.Region;
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -49,7 +49,7 @@ public interface TextAreaPeer extends TextComponentPeer { ...@@ -49,7 +49,7 @@ public interface TextAreaPeer extends TextComponentPeer {
void insert(String text, int pos); 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 text the replacement string
* @param start the begin of the range to replace * @param start the begin of the range to replace
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册