mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-14 12:25:21 +00:00
8036103: Cleanup of java.awt and java.awt.peer packages
Reviewed-by: bagiras, pchelko
This commit is contained in:
parent
a3cc5f5cf3
commit
03e958a5a9
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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 @@ import java.awt.CheckboxMenuItem;
|
||||
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);
|
||||
}
|
||||
|
||||
@ -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 @@ import java.awt.*;
|
||||
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 @@ public interface CheckboxPeer extends ComponentPeer {
|
||||
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
|
||||
|
||||
@ -27,11 +27,11 @@ package java.awt.peer;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.PaintEvent;
|
||||
import java.awt.image.ImageProducer;
|
||||
import java.awt.image.ImageObserver;
|
||||
import java.awt.image.ColorModel;
|
||||
import java.awt.image.ImageObserver;
|
||||
import java.awt.image.ImageProducer;
|
||||
import java.awt.image.VolatileImage;
|
||||
import java.awt.GraphicsConfiguration;
|
||||
|
||||
import sun.awt.CausedFocusEvent;
|
||||
import sun.java2d.pipe.Region;
|
||||
|
||||
|
||||
@ -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
|
||||
@ -49,7 +49,7 @@ public interface TextAreaPeer extends TextComponentPeer {
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user