2003-01-14 Michael Koch <konqueror@gmx.de>
* java/awt/Label.java (Label): Implements javax.accessibility.Accessible; * java/awt/List.java (List): Implements javax.accessibility.Accessible; * java/awt/ScrollPane.java (ScrollPane): Implements javax.accessibility.Accessible; * java/awt/Scrollbar.java (Scrollbar): Implements javax.accessibility.Accessible; * java/awt/TextComponent.java (setCaretPosition): Throw exception, documentation added. * java/awt/Toolkit.java: Added some newlines in method documentations. (createButton): Exception documentation added. (createTextField): Exception documentation added. (createLabel): Exception documentation added. (createList): Exception documentation added. (createCheckbox): Exception documentation added. (createScrollbar): Exception documentation added. (createScrollPane): Exception documentation added. (createTextArea): Exception documentation added. (createChoice): Exception documentation added. (createFrame): Exception documentation added. (createWindow): Exception documentation added. (createDialog): Exception documentation added. (createMenuBar): Exception documentation added. (createMenu): Exception documentation added. (createMenuItem): Exception documentation added. (createFileDialog): Exception documentation added. (createCheckboxMenuItem): Exception documentation added. (loadSystemColors): Exception documentation added. (setDynamicLayout): Exception documentation added. (isDynamicLayoutSet): Exception documentation added. (isDynamicLayoutActive): Exception documentation added. (getScreenSize): Exception documentation added. (getScreenResolution): Exception documentation added. (getScreenInsets): Exception documentation added. (getColorModel): Exception documentation added. (getSystemClipboard): Exception documentation added. (getSystemSelection): Exception documentation added. (getMenuShortcutKeyMask): Exception documentation added. (getSystemEventQueue): Exception documentation added. * java/awt/Window.java: Reindented some code. (Window): Centralized implementation, documentation added. (finalize): Documentation added. (hide): Fixed typo in comment. (getWindowListeners): Documentation added. * java/awt/color/ColorSpace.java (toRGB): Documentation added. * java/awt/color/ICC_ColorSpace.java (ICC_ColorSpace): Documentation added. (toRGB): Throw exception, documentation added. (fromRGB): Throw exception, documentation added. (toCIEXYZ): Documentation added. (fromCIEXYZ): Documentation added. (getMinValue): Documentation added. (getMaxValue): Documentation added. * java/awt/geom/Dimension2D.java (clone): Documentation added. * java/awt/geom/GeneralPath.java (clone): Documentation added. * java/awt/geom/Line2D.java (clone): Documentation added. * java/awt/geom/QuadCurve2D.java (clone): Documentation added. * java/awt/image/ColorModel.java (ColorModel): Throw exception, documentation added. * java/awt/image/ImageFilter.java (clone): Doesnt throw CloneNotSupportedException. From-SVN: r61303
This commit is contained in:
parent
b41621ee14
commit
7365ecf789
@ -1,3 +1,75 @@
|
||||
2003-01-14 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/awt/Label.java
|
||||
(Label): Implements javax.accessibility.Accessible;
|
||||
* java/awt/List.java
|
||||
(List): Implements javax.accessibility.Accessible;
|
||||
* java/awt/ScrollPane.java
|
||||
(ScrollPane): Implements javax.accessibility.Accessible;
|
||||
* java/awt/Scrollbar.java
|
||||
(Scrollbar): Implements javax.accessibility.Accessible;
|
||||
* java/awt/TextComponent.java
|
||||
(setCaretPosition): Throw exception, documentation added.
|
||||
* java/awt/Toolkit.java:
|
||||
Added some newlines in method documentations.
|
||||
(createButton): Exception documentation added.
|
||||
(createTextField): Exception documentation added.
|
||||
(createLabel): Exception documentation added.
|
||||
(createList): Exception documentation added.
|
||||
(createCheckbox): Exception documentation added.
|
||||
(createScrollbar): Exception documentation added.
|
||||
(createScrollPane): Exception documentation added.
|
||||
(createTextArea): Exception documentation added.
|
||||
(createChoice): Exception documentation added.
|
||||
(createFrame): Exception documentation added.
|
||||
(createWindow): Exception documentation added.
|
||||
(createDialog): Exception documentation added.
|
||||
(createMenuBar): Exception documentation added.
|
||||
(createMenu): Exception documentation added.
|
||||
(createMenuItem): Exception documentation added.
|
||||
(createFileDialog): Exception documentation added.
|
||||
(createCheckboxMenuItem): Exception documentation added.
|
||||
(loadSystemColors): Exception documentation added.
|
||||
(setDynamicLayout): Exception documentation added.
|
||||
(isDynamicLayoutSet): Exception documentation added.
|
||||
(isDynamicLayoutActive): Exception documentation added.
|
||||
(getScreenSize): Exception documentation added.
|
||||
(getScreenResolution): Exception documentation added.
|
||||
(getScreenInsets): Exception documentation added.
|
||||
(getColorModel): Exception documentation added.
|
||||
(getSystemClipboard): Exception documentation added.
|
||||
(getSystemSelection): Exception documentation added.
|
||||
(getMenuShortcutKeyMask): Exception documentation added.
|
||||
(getSystemEventQueue): Exception documentation added.
|
||||
* java/awt/Window.java:
|
||||
Reindented some code.
|
||||
(Window): Centralized implementation, documentation added.
|
||||
(finalize): Documentation added.
|
||||
(hide): Fixed typo in comment.
|
||||
(getWindowListeners): Documentation added.
|
||||
* java/awt/color/ColorSpace.java
|
||||
(toRGB): Documentation added.
|
||||
* java/awt/color/ICC_ColorSpace.java
|
||||
(ICC_ColorSpace): Documentation added.
|
||||
(toRGB): Throw exception, documentation added.
|
||||
(fromRGB): Throw exception, documentation added.
|
||||
(toCIEXYZ): Documentation added.
|
||||
(fromCIEXYZ): Documentation added.
|
||||
(getMinValue): Documentation added.
|
||||
(getMaxValue): Documentation added.
|
||||
* java/awt/geom/Dimension2D.java
|
||||
(clone): Documentation added.
|
||||
* java/awt/geom/GeneralPath.java
|
||||
(clone): Documentation added.
|
||||
* java/awt/geom/Line2D.java
|
||||
(clone): Documentation added.
|
||||
* java/awt/geom/QuadCurve2D.java
|
||||
(clone): Documentation added.
|
||||
* java/awt/image/ColorModel.java
|
||||
(ColorModel): Throw exception, documentation added.
|
||||
* java/awt/image/ImageFilter.java
|
||||
(clone): Doesnt throw CloneNotSupportedException.
|
||||
|
||||
2003-01-14 Andrew Haley <aph@redhat.com>
|
||||
|
||||
* java/lang/natRuntime.cc (_load): StackTrace access needs to be
|
||||
|
@ -40,6 +40,8 @@ package java.awt;
|
||||
|
||||
import java.awt.peer.LabelPeer;
|
||||
import java.awt.peer.ComponentPeer;
|
||||
import java.io.Serializable;
|
||||
import javax.accessibility.Accessible;
|
||||
|
||||
/**
|
||||
* This component is used for displaying simple text strings that cannot
|
||||
@ -48,7 +50,7 @@ import java.awt.peer.ComponentPeer;
|
||||
* @author Aaron M. Renn (arenn@urbanophile.com)
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
*/
|
||||
public class Label extends Component implements java.io.Serializable
|
||||
public class Label extends Component implements Serializable, Accessible
|
||||
{
|
||||
|
||||
/*
|
||||
|
@ -46,13 +46,15 @@ import java.awt.event.ItemListener;
|
||||
import java.awt.peer.ListPeer;
|
||||
import java.awt.peer.ComponentPeer;
|
||||
import java.util.Vector;
|
||||
import javax.accessibility.Accessible;
|
||||
|
||||
/**
|
||||
* Class that implements a listbox widget
|
||||
*
|
||||
* @author Aaron M. Renn (arenn@urbanophile.com)
|
||||
*/
|
||||
public class List extends Component implements ItemSelectable, Serializable
|
||||
public class List extends Component
|
||||
implements ItemSelectable, Serializable, Accessible
|
||||
{
|
||||
|
||||
/*
|
||||
|
@ -41,6 +41,8 @@ package java.awt;
|
||||
import java.awt.peer.ScrollPanePeer;
|
||||
import java.awt.peer.ContainerPeer;
|
||||
import java.awt.peer.ComponentPeer;
|
||||
import java.io.Serializable;
|
||||
import javax.accessibility.Accessible;
|
||||
|
||||
/**
|
||||
* This widget provides a scrollable region that allows a single
|
||||
@ -48,7 +50,7 @@ import java.awt.peer.ComponentPeer;
|
||||
*
|
||||
* @author Aaron M. Renn (arenn@urbanophile.com)
|
||||
*/
|
||||
public class ScrollPane extends Container implements java.io.Serializable
|
||||
public class ScrollPane extends Container implements Accessible, Serializable
|
||||
{
|
||||
|
||||
/*
|
||||
|
@ -42,6 +42,8 @@ import java.awt.peer.ScrollbarPeer;
|
||||
import java.awt.peer.ComponentPeer;
|
||||
import java.awt.event.AdjustmentListener;
|
||||
import java.awt.event.AdjustmentEvent;
|
||||
import java.io.Serializable;
|
||||
import javax.accessibility.Accessible;
|
||||
|
||||
/**
|
||||
* This class implements a scrollbar widget.
|
||||
@ -49,8 +51,9 @@ import java.awt.event.AdjustmentEvent;
|
||||
* @author Aaron M. Renn (arenn@urbanophile.com)
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
*/
|
||||
public class Scrollbar extends Component implements Adjustable,
|
||||
java.io.Serializable
|
||||
public class Scrollbar extends Component implements Accessible,
|
||||
Adjustable,
|
||||
Serializable
|
||||
{
|
||||
|
||||
// FIXME: Serialization readObject/writeObject
|
||||
|
@ -291,10 +291,18 @@ getCaretPosition()
|
||||
* Sets the caret position to the specified value.
|
||||
*
|
||||
* @param caretPosition The new caret position.
|
||||
*
|
||||
* @exception IllegalArgumentException If the value supplied for position
|
||||
* is less than zero.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
public synchronized void
|
||||
setCaretPosition(int caretPosition)
|
||||
{
|
||||
if (caretPosition < 0)
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
TextComponentPeer tcp = (TextComponentPeer)getPeer();
|
||||
if (tcp != null)
|
||||
tcp.setCaretPosition(caretPosition);
|
||||
|
@ -123,7 +123,10 @@ public abstract class Toolkit
|
||||
* Creates a peer object for the specified <code>Button</code>.
|
||||
*
|
||||
* @param target The <code>Button</code> to create the peer for.
|
||||
*
|
||||
* @return The peer for the specified <code>Button</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract ButtonPeer createButton(Button target);
|
||||
|
||||
@ -132,6 +135,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>TextField</code> to create the peer for.
|
||||
* @return The peer for the specified <code>TextField</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract TextFieldPeer createTextField(TextField target);
|
||||
|
||||
@ -140,6 +145,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>Label</code> to create the peer for.
|
||||
* @return The peer for the specified <code>Label</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract LabelPeer createLabel(Label target);
|
||||
|
||||
@ -148,6 +155,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>List</code> to create the peer for.
|
||||
* @return The peer for the specified <code>List</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract ListPeer createList(List target);
|
||||
|
||||
@ -156,6 +165,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>Checkbox</code> to create the peer for.
|
||||
* @return The peer for the specified <code>Checkbox</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract CheckboxPeer createCheckbox(Checkbox target);
|
||||
|
||||
@ -164,6 +175,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>Scrollbar</code> to create the peer for.
|
||||
* @return The peer for the specified <code>Scrollbar</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract ScrollbarPeer createScrollbar(Scrollbar target);
|
||||
|
||||
@ -172,6 +185,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>ScrollPane</code> to create the peer for.
|
||||
* @return The peer for the specified <code>ScrollPane</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract ScrollPanePeer createScrollPane(ScrollPane target);
|
||||
|
||||
@ -180,6 +195,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>TextArea</code> to create the peer for.
|
||||
* @return The peer for the specified <code>TextArea</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract TextAreaPeer createTextArea(TextArea target);
|
||||
|
||||
@ -188,6 +205,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>Choice</code> to create the peer for.
|
||||
* @return The peer for the specified <code>Choice</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract ChoicePeer createChoice(Choice target);
|
||||
|
||||
@ -196,6 +215,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>Frame</code> to create the peer for.
|
||||
* @return The peer for the specified <code>Frame</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract FramePeer createFrame(Frame target);
|
||||
|
||||
@ -220,6 +241,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>Window</code> to create the peer for.
|
||||
* @return The peer for the specified <code>Window</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract WindowPeer createWindow(Window target);
|
||||
|
||||
@ -228,6 +251,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The dialog to create the peer for
|
||||
* @return The peer for the specified font name.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract DialogPeer createDialog(Dialog target);
|
||||
|
||||
@ -236,6 +261,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>MenuBar</code> to create the peer for.
|
||||
* @return The peer for the specified <code>MenuBar</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract MenuBarPeer createMenuBar(MenuBar target);
|
||||
|
||||
@ -244,6 +271,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>Menu</code> to create the peer for.
|
||||
* @return The peer for the specified <code>Menu</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract MenuPeer createMenu(Menu target);
|
||||
|
||||
@ -252,6 +281,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>PopupMenu</code> to create the peer for.
|
||||
* @return The peer for the specified <code>PopupMenu</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract PopupMenuPeer createPopupMenu(PopupMenu target);
|
||||
|
||||
@ -260,6 +291,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>MenuItem</code> to create the peer for.
|
||||
* @return The peer for the specified <code>MenuItem</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract MenuItemPeer createMenuItem(MenuItem target);
|
||||
|
||||
@ -268,6 +301,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>FileDialog</code> to create the peer for.
|
||||
* @return The peer for the specified <code>FileDialog</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract FileDialogPeer createFileDialog(FileDialog target);
|
||||
|
||||
@ -276,6 +311,8 @@ public abstract class Toolkit
|
||||
*
|
||||
* @param target The <code>CheckboxMenuItem</code> to create the peer for.
|
||||
* @return The peer for the specified <code>CheckboxMenuItem</code> object.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected abstract CheckboxMenuItemPeer
|
||||
createCheckboxMenuItem(CheckboxMenuItem target);
|
||||
@ -310,6 +347,8 @@ public abstract class Toolkit
|
||||
* the interface used by the <code>SystemColors</code> class.
|
||||
*
|
||||
* @param colors The array to copy the system colors into.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected void loadSystemColors(int systemColors[])
|
||||
{
|
||||
@ -318,6 +357,8 @@ public abstract class Toolkit
|
||||
|
||||
/**
|
||||
* @since 1.4
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
public void setDynamicLayout(boolean dynamic)
|
||||
{
|
||||
@ -325,6 +366,8 @@ public abstract class Toolkit
|
||||
|
||||
/**
|
||||
* @since 1.4
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
protected boolean isDynamicLayoutSet()
|
||||
{
|
||||
@ -333,6 +376,8 @@ public abstract class Toolkit
|
||||
|
||||
/**
|
||||
* @since 1.4
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
public boolean isDynamicLayoutActive()
|
||||
{
|
||||
@ -343,6 +388,8 @@ public abstract class Toolkit
|
||||
* Returns the dimensions of the screen in pixels.
|
||||
*
|
||||
* @return The dimensions of the screen in pixels.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
public abstract Dimension getScreenSize();
|
||||
|
||||
@ -350,10 +397,14 @@ public abstract class Toolkit
|
||||
* Returns the screen resolution in dots per square inch.
|
||||
*
|
||||
* @return The screen resolution in dots per square inch.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
public abstract int getScreenResolution();
|
||||
|
||||
/**
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
public Insets getScreenInsets(GraphicsConfiguration gc)
|
||||
@ -396,6 +447,7 @@ public abstract class Toolkit
|
||||
* if the property is not set.
|
||||
*
|
||||
* @return An instance of the system default toolkit.
|
||||
*
|
||||
* @throws AWTError If the toolkit cannot be loaded.
|
||||
*/
|
||||
public static Toolkit getDefaultToolkit()
|
||||
@ -450,6 +502,7 @@ public abstract class Toolkit
|
||||
* @param height The height of the image.
|
||||
* @param observer The observer to receive events about the preparation
|
||||
* process.
|
||||
*
|
||||
* @return <code>true</code> if the image is already prepared for rendering,
|
||||
* <code>false</code> otherwise.
|
||||
*/
|
||||
@ -465,6 +518,7 @@ public abstract class Toolkit
|
||||
* @param height The height of the image.
|
||||
* @param observer The observer to receive events about the preparation
|
||||
* process.
|
||||
*
|
||||
* @return A union of the bitmasks from
|
||||
* <code>java.awt.image.ImageObserver</code> that indicates the current
|
||||
* state of the imaging readying process.
|
||||
@ -476,6 +530,7 @@ public abstract class Toolkit
|
||||
* Creates an image using the specified <code>ImageProducer</code>
|
||||
*
|
||||
* @param producer The <code>ImageProducer</code> to create the image from.
|
||||
*
|
||||
* @return The created image.
|
||||
*/
|
||||
public abstract Image createImage(ImageProducer producer);
|
||||
@ -485,6 +540,7 @@ public abstract class Toolkit
|
||||
* a recognized format. Supported formats vary from toolkit to toolkit.
|
||||
*
|
||||
* @param data The raw image data.
|
||||
*
|
||||
* @return The created image.
|
||||
*/
|
||||
public Image createImage(byte[] data)
|
||||
@ -500,6 +556,7 @@ public abstract class Toolkit
|
||||
* @param data The raw image data.
|
||||
* @param offset The offset into the data where the image data starts.
|
||||
* @param len The length of the image data.
|
||||
*
|
||||
* @return The created image.
|
||||
*/
|
||||
public abstract Image createImage(byte[] data, int offset, int len);
|
||||
@ -511,6 +568,7 @@ public abstract class Toolkit
|
||||
* @param frame The window initiating the print job.
|
||||
* @param title The print job title.
|
||||
* @param props The print job properties.
|
||||
*
|
||||
* @return The requested print job, or <code>null</code> if the job
|
||||
* was cancelled.
|
||||
*/
|
||||
@ -536,10 +594,14 @@ public abstract class Toolkit
|
||||
* Returns the system clipboard.
|
||||
*
|
||||
* @return THe system clipboard.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
public abstract Clipboard getSystemClipboard();
|
||||
|
||||
/**
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
public Clipboard getSystemSelection()
|
||||
@ -553,6 +615,8 @@ public abstract class Toolkit
|
||||
* to change the default.
|
||||
*
|
||||
* @return The key mask for the menu accelerator key.
|
||||
*
|
||||
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
|
||||
*/
|
||||
public int getMenuShortcutKeyMask()
|
||||
{
|
||||
|
@ -86,32 +86,56 @@ public class Window extends Container
|
||||
* parent. The window will initially be invisible.
|
||||
*
|
||||
* @param parent The owning <code>Frame</code> of this window.
|
||||
*
|
||||
* @exception IllegalArgumentException If the owner's GraphicsConfiguration
|
||||
* is not from a screen device, or if owner is null; this exception is always
|
||||
* thrown when GraphicsEnvironment.isHeadless returns true.
|
||||
*/
|
||||
public Window(Frame owner)
|
||||
{
|
||||
this((Window) owner);
|
||||
this (owner, owner.getGraphicsConfiguration ());
|
||||
}
|
||||
|
||||
/** @since 1.2 */
|
||||
/**
|
||||
* Initializes a new instance of <code>Window</code> with the specified
|
||||
* parent. The window will initially be invisible.
|
||||
*
|
||||
* @exception IllegalArgumentException If the owner's GraphicsConfiguration
|
||||
* is not from a screen device, or if owner is null; this exception is always
|
||||
* thrown when GraphicsEnvironment.isHeadless returns true.
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public Window(Window owner)
|
||||
{
|
||||
this();
|
||||
if (owner == null)
|
||||
throw new IllegalArgumentException("owner must not be null");
|
||||
|
||||
this.parent = owner;
|
||||
|
||||
// FIXME: add to owner's "owned window" list
|
||||
//owner.owned.add(this); // this should be a weak reference
|
||||
this (owner, owner.getGraphicsConfiguration ());
|
||||
}
|
||||
|
||||
/** @since 1.3 */
|
||||
/**
|
||||
* Initializes a new instance of <code>Window</code> with the specified
|
||||
* parent. The window will initially be invisible.
|
||||
*
|
||||
* @exception IllegalArgumentException If owner is null or if gc is not from a
|
||||
* screen device; this exception is always thrown when
|
||||
* GraphicsEnvironment.isHeadless returns true.
|
||||
*
|
||||
* @since 1.3
|
||||
*/
|
||||
public Window(Window owner, GraphicsConfiguration gc)
|
||||
{
|
||||
this(owner);
|
||||
this ();
|
||||
|
||||
if (owner == null)
|
||||
throw new IllegalArgumentException ("owner must not be null");
|
||||
|
||||
this.parent = owner;
|
||||
|
||||
// FIXME: add to owner's "owned window" list
|
||||
//owner.owned.add(this); // this should be a weak reference
|
||||
|
||||
/* FIXME: Security check
|
||||
SecurityManager.checkTopLevelWindow(...)
|
||||
*/
|
||||
|
||||
if (gc != null
|
||||
&& gc.getDevice().getType() != GraphicsDevice.TYPE_RASTER_SCREEN)
|
||||
@ -119,11 +143,10 @@ public class Window extends Container
|
||||
|
||||
if (gc == null)
|
||||
graphicsConfiguration = GraphicsEnvironment.getLocalGraphicsEnvironment()
|
||||
.getDefaultScreenDevice()
|
||||
.getDefaultConfiguration();
|
||||
.getDefaultScreenDevice()
|
||||
.getDefaultConfiguration();
|
||||
else
|
||||
*/
|
||||
graphicsConfiguration = gc;
|
||||
graphicsConfiguration = gc;
|
||||
}
|
||||
|
||||
GraphicsConfiguration getGraphicsConfigurationImpl()
|
||||
@ -134,6 +157,12 @@ public class Window extends Container
|
||||
return super.getGraphicsConfigurationImpl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Disposes of the input methods and context, and removes the WeakReference
|
||||
* which formerly pointed to this Window from the parent's owned Window list.
|
||||
*
|
||||
* @exception Throwable The Exception raised by this method.
|
||||
*/
|
||||
protected void finalize() throws Throwable
|
||||
{
|
||||
// FIXME: remove from owner's "owned window" list (Weak References)
|
||||
@ -185,7 +214,7 @@ public class Window extends Container
|
||||
|
||||
public void hide()
|
||||
{
|
||||
// FIXME: call hide() on amy "owned" children here.
|
||||
// FIXME: call hide() on any "owned" children here.
|
||||
super.hide();
|
||||
}
|
||||
|
||||
@ -233,8 +262,8 @@ public class Window extends Container
|
||||
{
|
||||
if (peer != null)
|
||||
{
|
||||
WindowPeer wp = (WindowPeer) peer;
|
||||
wp.toFront();
|
||||
WindowPeer wp = (WindowPeer) peer;
|
||||
wp.toFront();
|
||||
}
|
||||
}
|
||||
|
||||
@ -265,12 +294,12 @@ public class Window extends Container
|
||||
if (!secure)
|
||||
{
|
||||
if (warningString != null)
|
||||
return warningString;
|
||||
else
|
||||
{
|
||||
String warning = System.getProperty("awt.appletWarning");
|
||||
return warning;
|
||||
}
|
||||
return warningString;
|
||||
else
|
||||
{
|
||||
String warning = System.getProperty("awt.appletWarning");
|
||||
return warning;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -338,6 +367,11 @@ public class Window extends Container
|
||||
windowListener = AWTEventMulticaster.remove(windowListener, listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all the window listeners registered on this window.
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
public synchronized WindowListener[] getWindowListeners()
|
||||
{
|
||||
return (WindowListener[])
|
||||
@ -345,7 +379,16 @@ public class Window extends Container
|
||||
WindowListener.class);
|
||||
}
|
||||
|
||||
/** @since 1.3 */
|
||||
/**
|
||||
* Returns an array of all the objects currently registered as FooListeners
|
||||
* upon this Window. FooListeners are registered using the addFooListener
|
||||
* method.
|
||||
*
|
||||
* @exception ClassCastException If listenerType doesn't specify a class or
|
||||
* interface that implements java.util.EventListener.
|
||||
*
|
||||
* @since 1.3
|
||||
*/
|
||||
public EventListener[] getListeners(Class listenerType)
|
||||
{
|
||||
if (listenerType == WindowListener.class)
|
||||
|
@ -131,6 +131,13 @@ public abstract class ColorSpace implements Serializable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a color value assumed to be in this ColorSpace into a value in
|
||||
* the default CS_sRGB color space.
|
||||
*
|
||||
* @exception ArrayIndexOutOfBoundsException If array length is not at least
|
||||
* the number of components in this ColorSpace.
|
||||
*/
|
||||
public abstract float[] toRGB(float[] colorvalue);
|
||||
|
||||
public abstract float[] fromRGB(float[] rgbvalue);
|
||||
|
@ -81,6 +81,12 @@ public class ICC_ColorSpace extends ColorSpace
|
||||
*/
|
||||
private boolean needScaleInit;
|
||||
|
||||
/**
|
||||
* Constructs a new ICC_ColorSpace from an ICC_Profile object.
|
||||
*
|
||||
* @exception IllegalArgumentException If profile is inappropriate for
|
||||
* representing a ColorSpace.
|
||||
*/
|
||||
public ICC_ColorSpace(ICC_Profile profile)
|
||||
{
|
||||
super(CS_sRGB, profile.getNumComponents());
|
||||
@ -92,18 +98,45 @@ public class ICC_ColorSpace extends ColorSpace
|
||||
return thisProfile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a color value assumed to be in this ColorSpace into a value in
|
||||
* the default CS_sRGB color space.
|
||||
*
|
||||
* @exception ArrayIndexOutOfBoundsException If array length is not at least
|
||||
* the number of components in this ColorSpace.
|
||||
*/
|
||||
public float[] toRGB(float[] colorvalue)
|
||||
{
|
||||
if (colorvalue.length < numComponents)
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
// FIXME: Always assumes sRGB:
|
||||
return colorvalue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a color value assumed to be in the default CS_sRGB color space
|
||||
* into this ColorSpace.
|
||||
*
|
||||
* @exception ArrayIndexOutOfBoundsException If array length is not at
|
||||
* least 3.
|
||||
*/
|
||||
public float[] fromRGB(float[] rgbvalue)
|
||||
{
|
||||
if (rgbvalue.length < 3)
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
// FIXME: Always assumes sRGB:
|
||||
return rgbvalue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transforms a color value assumed to be in this ColorSpace into the
|
||||
* CS_CIEXYZ conversion color space.
|
||||
*
|
||||
* @exception ArrayIndexOutOfBoundsException If array length is not at
|
||||
* least the number of components in this ColorSpace.
|
||||
*/
|
||||
public float[] toCIEXYZ(float[] colorvalue)
|
||||
{
|
||||
// FIXME: Not implemented
|
||||
|
@ -86,6 +86,7 @@ public abstract class Dimension2D implements Cloneable
|
||||
* may occur.
|
||||
*
|
||||
* @param d the dimension containing the new values
|
||||
*
|
||||
* @throws NullPointerException if d is null
|
||||
*/
|
||||
public void setSize(Dimension2D d)
|
||||
@ -98,6 +99,10 @@ public abstract class Dimension2D implements Cloneable
|
||||
* as this one.
|
||||
*
|
||||
* @return the clone
|
||||
*
|
||||
* @exception OutOfMemoryError If there is not enough memory available.
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public Object clone()
|
||||
{
|
||||
|
@ -338,6 +338,10 @@ public final class GeneralPath implements Shape, Cloneable
|
||||
* this one.
|
||||
*
|
||||
* @return the clone
|
||||
*
|
||||
* @exception OutOfMemoryError If there is not enough memory available.
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public Object clone()
|
||||
{
|
||||
|
@ -752,6 +752,10 @@ public abstract class Line2D implements Shape, Cloneable
|
||||
* this one.
|
||||
*
|
||||
* @return the clone
|
||||
*
|
||||
* @exception OutOfMemoryError If there is not enough memory available.
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public Object clone()
|
||||
{
|
||||
|
@ -289,6 +289,10 @@ public abstract class QuadCurve2D implements Shape, Cloneable
|
||||
* this one.
|
||||
*
|
||||
* @return the clone
|
||||
*
|
||||
* @exception OutOfMemoryError If there is not enough memory available.
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public Object clone()
|
||||
{
|
||||
|
@ -120,10 +120,32 @@ public abstract class ColorModel implements Transparency
|
||||
Buffers.smallestAppropriateTransferType(bits * 4));
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a ColorModel that translates pixel values to
|
||||
* color/alpha components.
|
||||
*
|
||||
* @exception IllegalArgumentException If the length of the bit array is less
|
||||
* than the number of color or alpha components in this ColorModel, or if the
|
||||
* transparency is not a valid value, or if the sum of the number of bits in
|
||||
* bits is less than 1 or if any of the elements in bits is less than 0.
|
||||
*/
|
||||
protected ColorModel(int pixel_bits, int[] bits, ColorSpace cspace,
|
||||
boolean hasAlpha, boolean isAlphaPremultiplied,
|
||||
int transparency, int transferType)
|
||||
{
|
||||
int bits_sum = 0;
|
||||
for (int i = 0; i < bits.length; i++)
|
||||
{
|
||||
if (bits [i] < 0)
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
bits_sum |= bits [i];
|
||||
}
|
||||
|
||||
if ((bits.length < cspace.numComponents)
|
||||
|| (bits_sum < 1))
|
||||
throw new IllegalArgumentException ();
|
||||
|
||||
this.pixel_bits = pixel_bits;
|
||||
this.bits = bits;
|
||||
this.cspace = cspace;
|
||||
|
@ -81,9 +81,18 @@ public class ImageFilter implements ImageConsumer, Cloneable
|
||||
*
|
||||
* @see java.lang.Object#clone ()
|
||||
*/
|
||||
public Object clone() throws CloneNotSupportedException
|
||||
public Object clone()
|
||||
{
|
||||
return (super.clone());
|
||||
try
|
||||
{
|
||||
return super.clone();
|
||||
}
|
||||
catch (CloneNotSupportedException e)
|
||||
{
|
||||
// This should never happen as this class implements the
|
||||
// Cloneable interface.
|
||||
throw new InternalError ();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user