Commit 2759b260 by Tom Tromey Committed by Tom Tromey

XPanelPeer.java (beginLayout, [...]): New methods.

	* gnu/awt/xlib/XPanelPeer.java (beginLayout, endLayout,
	isPaintPending): New methods.
	* gnu/awt/xlib/XFramePeer.java (getState, setState,
	setMaximizedBounds): New methods.
	(beginLayout, endLayout, isPaintPending): Likewise.
	* gnu/awt/xlib/XCanvasPeer.java (isFocusable): New method.
	(requestFocus): Likewise.
	(isObscured): Likewise.
	(canDetermineObscurity): Likewise.
	(coalescePaintEvent): Likewise.
	(updateCursorImmediately): Likewise.
	(createVolatileImage): Likewise.
	(handlesWheelScrolling): Likewise.
	(createBuffers): Likewise.
	(getBackBuffer): Likewise.
	(flip): Likewise.
	(destroyBuffers): Likewise.

	* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added DropTargetPeer.java,
	RobotPeer.java.
	* gnu/java/awt/GLightweightPeer.java,
	gnu/java/awt/peer/gtk/GtkChoicePeer.java,
	gnu/java/awt/peer/gtk/GtkComponentPeer.java,
	gnu/java/awt/peer/gtk/GtkContainerPeer.java,
	gnu/java/awt/peer/gtk/GtkFramePeer.java,
	gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java,
	gnu/java/awt/peer/gtk/GtkTextComponentPeer.java,
	java/awt/dnd/peer/DragSourceContextPeer.java,
	java/awt/dnd/peer/DropTargetContextPeer.java,
	java/awt/peer/ButtonPeer.java,
	java/awt/peer/CheckboxMenuItemPeer.java,
	java/awt/peer/CheckboxPeer.java, java/awt/peer/ChoicePeer.java,
	java/awt/peer/ComponentPeer.java,
	java/awt/peer/ContainerPeer.java, java/awt/peer/DialogPeer.java,
	java/awt/peer/FileDialogPeer.java, java/awt/peer/FramePeer.java,
	java/awt/peer/LabelPeer.java, java/awt/peer/ListPeer.java,
	java/awt/peer/MenuBarPeer.java,
	java/awt/peer/MenuComponentPeer.java,
	java/awt/peer/MenuItemPeer.java, java/awt/peer/MenuPeer.java,
	java/awt/peer/PopupMenuPeer.java,
	java/awt/peer/ScrollPanePeer.java,
	java/awt/peer/ScrollbarPeer.java, java/awt/peer/TextAreaPeer.java,
	java/awt/peer/TextComponentPeer.java,
	java/awt/peer/TextFieldPeer.java, java/awt/peer/WindowPeer.java:
	New versions from Classpath.
	* java/awt/dnd/peer/DropTargetPeer.java: New file from Classpath.
	* java/awt/peer/RobotPeer.java: Likewise.

From-SVN: r63627
parent 11522327
2003-03-01 Tom Tromey <tromey@redhat.com>
* gnu/awt/xlib/XPanelPeer.java (beginLayout, endLayout,
isPaintPending): New methods.
* gnu/awt/xlib/XFramePeer.java (getState, setState,
setMaximizedBounds): New methods.
(beginLayout, endLayout, isPaintPending): Likewise.
* gnu/awt/xlib/XCanvasPeer.java (isFocusable): New method.
(requestFocus): Likewise.
(isObscured): Likewise.
(canDetermineObscurity): Likewise.
(coalescePaintEvent): Likewise.
(updateCursorImmediately): Likewise.
(createVolatileImage): Likewise.
(handlesWheelScrolling): Likewise.
(createBuffers): Likewise.
(getBackBuffer): Likewise.
(flip): Likewise.
(destroyBuffers): Likewise.
* Makefile.in: Rebuilt.
* Makefile.am (awt_java_source_files): Added DropTargetPeer.java,
RobotPeer.java.
* gnu/java/awt/GLightweightPeer.java,
gnu/java/awt/peer/gtk/GtkChoicePeer.java,
gnu/java/awt/peer/gtk/GtkComponentPeer.java,
gnu/java/awt/peer/gtk/GtkContainerPeer.java,
gnu/java/awt/peer/gtk/GtkFramePeer.java,
gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java,
gnu/java/awt/peer/gtk/GtkTextComponentPeer.java,
java/awt/dnd/peer/DragSourceContextPeer.java,
java/awt/dnd/peer/DropTargetContextPeer.java,
java/awt/peer/ButtonPeer.java,
java/awt/peer/CheckboxMenuItemPeer.java,
java/awt/peer/CheckboxPeer.java, java/awt/peer/ChoicePeer.java,
java/awt/peer/ComponentPeer.java,
java/awt/peer/ContainerPeer.java, java/awt/peer/DialogPeer.java,
java/awt/peer/FileDialogPeer.java, java/awt/peer/FramePeer.java,
java/awt/peer/LabelPeer.java, java/awt/peer/ListPeer.java,
java/awt/peer/MenuBarPeer.java,
java/awt/peer/MenuComponentPeer.java,
java/awt/peer/MenuItemPeer.java, java/awt/peer/MenuPeer.java,
java/awt/peer/PopupMenuPeer.java,
java/awt/peer/ScrollPanePeer.java,
java/awt/peer/ScrollbarPeer.java, java/awt/peer/TextAreaPeer.java,
java/awt/peer/TextComponentPeer.java,
java/awt/peer/TextFieldPeer.java, java/awt/peer/WindowPeer.java:
New versions from Classpath.
* java/awt/dnd/peer/DropTargetPeer.java: New file from Classpath.
* java/awt/peer/RobotPeer.java: Likewise.
2003-03-01 Mark Wielaard <mark@klomp.org> 2003-03-01 Mark Wielaard <mark@klomp.org>
* java/io/ObjectInputStream.java: Reindent. * java/io/ObjectInputStream.java: Reindent.
......
...@@ -992,6 +992,7 @@ java/awt/peer/MenuItemPeer.java \ ...@@ -992,6 +992,7 @@ java/awt/peer/MenuItemPeer.java \
java/awt/peer/MenuPeer.java \ java/awt/peer/MenuPeer.java \
java/awt/peer/PanelPeer.java \ java/awt/peer/PanelPeer.java \
java/awt/peer/PopupMenuPeer.java \ java/awt/peer/PopupMenuPeer.java \
java/awt/peer/RobotPeer.java \
java/awt/peer/ScrollPanePeer.java \ java/awt/peer/ScrollPanePeer.java \
java/awt/peer/ScrollbarPeer.java \ java/awt/peer/ScrollbarPeer.java \
java/awt/peer/TextAreaPeer.java \ java/awt/peer/TextAreaPeer.java \
...@@ -1034,6 +1035,7 @@ java/awt/Stroke.java \ ...@@ -1034,6 +1035,7 @@ java/awt/Stroke.java \
java/awt/TexturePaint.java \ java/awt/TexturePaint.java \
java/awt/dnd/peer/DragSourceContextPeer.java \ java/awt/dnd/peer/DragSourceContextPeer.java \
java/awt/dnd/peer/DropTargetContextPeer.java \ java/awt/dnd/peer/DropTargetContextPeer.java \
java/awt/dnd/peer/DropTargetPeer.java \
java/awt/dnd/DnDConstants.java \ java/awt/dnd/DnDConstants.java \
java/awt/dnd/DragGestureEvent.java \ java/awt/dnd/DragGestureEvent.java \
java/awt/dnd/DragGestureListener.java \ java/awt/dnd/DragGestureListener.java \
......
...@@ -803,6 +803,7 @@ java/awt/Stroke.java \ ...@@ -803,6 +803,7 @@ java/awt/Stroke.java \
java/awt/TexturePaint.java \ java/awt/TexturePaint.java \
java/awt/dnd/peer/DragSourceContextPeer.java \ java/awt/dnd/peer/DragSourceContextPeer.java \
java/awt/dnd/peer/DropTargetContextPeer.java \ java/awt/dnd/peer/DropTargetContextPeer.java \
java/awt/dnd/peer/DropTargetPeer.java \
java/awt/dnd/DnDConstants.java \ java/awt/dnd/DnDConstants.java \
java/awt/dnd/DragGestureEvent.java \ java/awt/dnd/DragGestureEvent.java \
java/awt/dnd/DragGestureListener.java \ java/awt/dnd/DragGestureListener.java \
...@@ -2598,7 +2599,7 @@ libgcj-test.spec.in libgcj.spec.in ...@@ -2598,7 +2599,7 @@ libgcj-test.spec.in libgcj.spec.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar TAR = gtar
GZIP_ENV = --best GZIP_ENV = --best
DIST_SUBDIRS = @DIRLTDL@ testsuite gcj include @DIRLTDL@ gcj include DIST_SUBDIRS = @DIRLTDL@ testsuite gcj include @DIRLTDL@ gcj include
DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
...@@ -3061,6 +3062,7 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ ...@@ -3061,6 +3062,7 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/awt/dnd/MouseDragGestureRecognizer.P \ .deps/java/awt/dnd/MouseDragGestureRecognizer.P \
.deps/java/awt/dnd/peer/DragSourceContextPeer.P \ .deps/java/awt/dnd/peer/DragSourceContextPeer.P \
.deps/java/awt/dnd/peer/DropTargetContextPeer.P \ .deps/java/awt/dnd/peer/DropTargetContextPeer.P \
.deps/java/awt/dnd/peer/DropTargetPeer.P \
.deps/java/awt/event/AWTEventListener.P \ .deps/java/awt/event/AWTEventListener.P \
.deps/java/awt/event/AWTEventListenerProxy.P \ .deps/java/awt/event/AWTEventListenerProxy.P \
.deps/java/awt/event/ActionEvent.P \ .deps/java/awt/event/ActionEvent.P \
......
/* Copyright (C) 2000, 2002 Free Software Foundation /* Copyright (C) 2000, 2002, 2003 Free Software Foundation
This file is part of libgcj. This file is part of libgcj.
...@@ -9,6 +9,7 @@ details. */ ...@@ -9,6 +9,7 @@ details. */
package gnu.awt.xlib; package gnu.awt.xlib;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.BufferCapabilities;
import java.awt.Component; import java.awt.Component;
import java.awt.EventQueue; import java.awt.EventQueue;
import java.awt.Rectangle; import java.awt.Rectangle;
...@@ -411,6 +412,64 @@ public class XCanvasPeer implements CanvasPeer ...@@ -411,6 +412,64 @@ public class XCanvasPeer implements CanvasPeer
setVisible (false); setVisible (false);
} }
public boolean isFocusable ()
{
return false;
}
public boolean requestFocus (Component source, boolean b1,
boolean b2, long x)
{
return false;
}
public boolean isObscured ()
{
return false;
}
public boolean canDetermineObscurity ()
{
return false;
}
public void coalescePaintEvent (PaintEvent e)
{
}
public void updateCursorImmediately ()
{
}
public VolatileImage createVolatileImage (int width, int height)
{
return null;
}
public boolean handlesWheelScrolling ()
{
return false;
}
public void createBuffers (int x, BufferCapabilities capabilities)
throws java.awt.AWTException
{
}
public Image getBackBuffer ()
{
return null;
}
public void flip (BufferCapabilities.FlipContents contents)
{
}
public void destroyBuffers ()
{
}
static class DoMap implements Runnable static class DoMap implements Runnable
{ {
Window window; Window window;
......
/* Copyright (C) 2000, 2002 Free Software Foundation /* Copyright (C) 2000, 2002, 2003 Free Software Foundation
This file is part of libgcj. This file is part of libgcj.
...@@ -176,4 +176,21 @@ public class XFramePeer extends XCanvasPeer implements FramePeer ...@@ -176,4 +176,21 @@ public class XFramePeer extends XCanvasPeer implements FramePeer
} }
sizeHints.applyNormalHints(window); sizeHints.applyNormalHints(window);
} }
public int getState ()
{
return 0;
}
public void setState (int state)
{
}
public void setMaximizedBounds (Rectangle r)
{
}
public void beginLayout () { }
public void endLayout () { }
public boolean isPaintPending () { return false; }
} }
/* Copyright (C) 2000, 2002 Free Software Foundation /* Copyright (C) 2000, 2002, 2003 Free Software Foundation
This file is part of libgcj. This file is part of libgcj.
...@@ -54,4 +54,8 @@ public class XPanelPeer extends XCanvasPeer implements PanelPeer ...@@ -54,4 +54,8 @@ public class XPanelPeer extends XCanvasPeer implements PanelPeer
{ {
// NOP // NOP
} }
public void beginLayout () { }
public void endLayout () { }
public boolean isPaintPending () { return false; }
} }
...@@ -37,6 +37,7 @@ exception statement from your version. */ ...@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.java.awt; package gnu.java.awt;
import java.awt.*; import java.awt.*;
import java.awt.event.PaintEvent;
import java.awt.peer.*; import java.awt.peer.*;
import java.awt.image.*; import java.awt.image.*;
...@@ -111,6 +112,11 @@ public class GLightweightPeer implements LightweightPeer ...@@ -111,6 +112,11 @@ public class GLightweightPeer implements LightweightPeer
public void hide() {} public void hide() {}
public boolean isFocusable()
{
return false;
}
public boolean isFocusTraversable() public boolean isFocusTraversable()
{ {
return false; return false;
...@@ -140,6 +146,8 @@ public class GLightweightPeer implements LightweightPeer ...@@ -140,6 +146,8 @@ public class GLightweightPeer implements LightweightPeer
public void requestFocus() {} public void requestFocus() {}
public boolean requestFocus(java.awt.Component source, boolean bool1, boolean bool2, long x) { return false; }
public void reshape(int x, int y, int width, int height) {} public void reshape(int x, int y, int width, int height) {}
public void setBackground(Color color) {} public void setBackground(Color color) {}
...@@ -164,4 +172,28 @@ public class GLightweightPeer implements LightweightPeer ...@@ -164,4 +172,28 @@ public class GLightweightPeer implements LightweightPeer
{ {
return null; return null;
} }
public boolean isObscured() { return false; }
public boolean canDetermineObscurity() { return false; }
public void coalescePaintEvent(PaintEvent e) { }
public void updateCursorImmediately() { }
public VolatileImage createVolatileImage(int width, int height)
{
return null;
}
public boolean handlesWheelScrolling() { return false; }
public void createBuffers(int x, java.awt.BufferCapabilities capabilities)
throws java.awt.AWTException { }
public java.awt.Image getBackBuffer() { return null; }
public void flip(java.awt.BufferCapabilities.FlipContents contents) { }
public void destroyBuffers() { }
} }
...@@ -66,6 +66,8 @@ public class GtkChoicePeer extends GtkComponentPeer ...@@ -66,6 +66,8 @@ public class GtkChoicePeer extends GtkComponentPeer
native public void add (String item, int index); native public void add (String item, int index);
native public void remove (int index); native public void remove (int index);
native public void select (int position); native public void select (int position);
public void removeAll () { }
public void addItem (String item, int position) public void addItem (String item, int position)
{ {
......
...@@ -394,4 +394,67 @@ public class GtkComponentPeer extends GtkGenericPeer ...@@ -394,4 +394,67 @@ public class GtkComponentPeer extends GtkGenericPeer
{ {
// FIXME: just a stub for now. // FIXME: just a stub for now.
} }
public boolean isFocusable ()
{
return false;
}
public boolean requestFocus (Component source, boolean b1,
boolean b2, long x)
{
return false;
}
public boolean isObscured ()
{
return false;
}
public boolean canDetermineObscurity ()
{
return false;
}
public void coalescePaintEvent (PaintEvent e)
{
}
public void updateCursorImmediately ()
{
}
public VolatileImage createVolatileImage (int width, int height)
{
return null;
}
public boolean handlesWheelScrolling ()
{
return false;
}
public void createBuffers (int x, BufferCapabilities capabilities)
throws java.awt.AWTException
{
}
public Image getBackBuffer ()
{
return null;
}
public void flip (BufferCapabilities.FlipContents contents)
{
}
public void destroyBuffers ()
{
}
} }
...@@ -122,4 +122,8 @@ public class GtkContainerPeer extends GtkComponentPeer ...@@ -122,4 +122,8 @@ public class GtkContainerPeer extends GtkComponentPeer
break; break;
} }
} }
public void beginLayout () { }
public void endLayout () { }
public boolean isPaintPending () { return false; }
} }
...@@ -127,6 +127,21 @@ public class GtkFramePeer extends GtkWindowPeer ...@@ -127,6 +127,21 @@ public class GtkFramePeer extends GtkWindowPeer
y + insets.top, y + insets.top,
width, height))); width, height)));
} }
public int getState ()
{
return 0;
}
public void setState (int state)
{
}
public void setMaximizedBounds (Rectangle r)
{
}
} }
...@@ -62,4 +62,9 @@ public class GtkPopupMenuPeer extends GtkMenuPeer ...@@ -62,4 +62,9 @@ public class GtkPopupMenuPeer extends GtkMenuPeer
Point abs = origin.getLocationOnScreen (); Point abs = origin.getLocationOnScreen ();
show (abs.x + x, abs.y + y, 0); show (abs.x + x, abs.y + y, 0);
} }
public void show (Event e)
{
}
} }
...@@ -76,4 +76,19 @@ public class GtkTextComponentPeer extends GtkComponentPeer ...@@ -76,4 +76,19 @@ public class GtkTextComponentPeer extends GtkComponentPeer
args.add ("text_position", tc.getCaretPosition ()); args.add ("text_position", tc.getCaretPosition ());
args.add ("editable", tc.isEditable ()); args.add ("editable", tc.isEditable ());
} }
public int getIndexAtPoint(int x, int y)
{
return 0; // FIXME
}
public Rectangle getCharacterBounds (int pos)
{
return null;
}
public long filterEvents (long filter)
{
return filter; // FIXME
}
} }
...@@ -42,14 +42,16 @@ import java.awt.Cursor; ...@@ -42,14 +42,16 @@ import java.awt.Cursor;
import java.awt.Image; import java.awt.Image;
import java.awt.Point; import java.awt.Point;
import java.awt.dnd.DragSourceContext; import java.awt.dnd.DragSourceContext;
import java.awt.dnd.InvalidDnDOperationException;
/** /**
* STUBBED * STUBBED
*/ */
public interface DragSourceContextPeer public interface DragSourceContextPeer
{ {
void startDrag(DragSourceContext context, Cursor c, Image i, Point p); public void startDrag(DragSourceContext context, Cursor c, Image i, Point p)
Cursor getCursor(); throws InvalidDnDOperationException;
void setCursor(Cursor c); public Cursor getCursor();
void transferablesFlavorsChanged(); public void setCursor(Cursor c) throws InvalidDnDOperationException;
public void transferablesFlavorsChanged();
} // interface DragSourceContextPeer } // interface DragSourceContextPeer
...@@ -37,9 +37,31 @@ exception statement from your version. */ ...@@ -37,9 +37,31 @@ exception statement from your version. */
package java.awt.dnd.peer; package java.awt.dnd.peer;
import java.awt.dnd.DropTarget;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.InvalidDnDOperationException;
/** /**
* Used to control state of recipient protocol from the
* <code>DropTargetListener</code>. Occurs when a <code>Component</code>
* with an associated <code>DropTarget</code> and visible geometry is first
* intersected by a logical cursor.
*
* @author Michael Koch <konqueror@gmx.de> * @author Michael Koch <konqueror@gmx.de>
*/ */
public interface DropTargetContextPeer public interface DropTargetContextPeer
{ {
} // interface DropTargetContextPeer public void setTargetActions(int actions);
public int getTargetActions();
public DropTarget getDropTarget();
public DataFlavor[] getTransferDataFlavors();
public Transferable getTransferable() throws InvalidDnDOperationException;
public boolean isTransferableJVMLocal();
public void acceptDrag(int dragAction);
public void rejectDrag();
public void acceptDrop(int dropAction);
public void rejectDrop();
public void dropComplete(boolean success);
}
/* DropTargetPeer.java -- interface for drag-and-drop peers
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.awt.dnd.peer;
import java.awt.dnd.DropTarget;
/**
*/
public interface DropTargetPeer
{
public void addDropTarget (DropTarget target);
public void removeDropTarget (DropTarget target);
} // interface DropTargetContextPeer
...@@ -40,8 +40,6 @@ package java.awt.peer; ...@@ -40,8 +40,6 @@ package java.awt.peer;
public interface ButtonPeer extends ComponentPeer public interface ButtonPeer extends ComponentPeer
{ {
public void setLabel(String label);
public abstract void setLabel(String label);
} // interface ButtonPeer } // interface ButtonPeer
...@@ -40,8 +40,6 @@ package java.awt.peer; ...@@ -40,8 +40,6 @@ package java.awt.peer;
public interface CheckboxMenuItemPeer extends MenuItemPeer public interface CheckboxMenuItemPeer extends MenuItemPeer
{ {
public void setState(boolean state);
public abstract void setState(boolean state);
} // interface CheckboxMenuItemPeer } // interface CheckboxMenuItemPeer
...@@ -40,10 +40,8 @@ package java.awt.peer; ...@@ -40,10 +40,8 @@ package java.awt.peer;
public interface CheckboxPeer extends ComponentPeer public interface CheckboxPeer extends ComponentPeer
{ {
public void setCheckboxGroup(java.awt.CheckboxGroup group);
public abstract void setCheckboxGroup(java.awt.CheckboxGroup group); public void setLabel(String label);
public abstract void setLabel(String label); public void setState(boolean state);
public abstract void setState(boolean state);
} // interface CheckboxPeer } // interface CheckboxPeer
...@@ -40,11 +40,10 @@ package java.awt.peer; ...@@ -40,11 +40,10 @@ package java.awt.peer;
public interface ChoicePeer extends ComponentPeer public interface ChoicePeer extends ComponentPeer
{ {
public void add(String item, int index);
public abstract void add(String item, int index); public void addItem(String item, int index);
public abstract void addItem(String item, int index); public void remove(int index);
public abstract void remove(int index); public void removeAll();
public abstract void select(int index); public void select(int index);
} // interface ChoicePeer } // interface ChoicePeer
...@@ -39,6 +39,7 @@ exception statement from your version. */ ...@@ -39,6 +39,7 @@ exception statement from your version. */
package java.awt.peer; package java.awt.peer;
import java.awt.*; import java.awt.*;
import java.awt.event.PaintEvent;
import java.awt.image.*; import java.awt.image.*;
public interface ComponentPeer public interface ComponentPeer
...@@ -57,23 +58,38 @@ public interface ComponentPeer ...@@ -57,23 +58,38 @@ public interface ComponentPeer
public Dimension getMinimumSize(); public Dimension getMinimumSize();
public Dimension getPreferredSize(); public Dimension getPreferredSize();
public Toolkit getToolkit(); public Toolkit getToolkit();
// The JCL says that handleEvent returns boolean. However, we've
// experimentally determined that it in fact actually returns void.
public void handleEvent(AWTEvent e); public void handleEvent(AWTEvent e);
public void hide(); public void hide();
/**
* Part of the earlier 1.1 API, replaced by isFocusable().
*/
public boolean isFocusTraversable(); public boolean isFocusTraversable();
public boolean isFocusable();
public Dimension minimumSize(); public Dimension minimumSize();
public Dimension preferredSize(); public Dimension preferredSize();
public void paint(Graphics graphics); public void paint(Graphics graphics);
public boolean prepareImage(Image img, int width, int height, public boolean prepareImage(Image img, int width, int height,
ImageObserver ob); ImageObserver ob);
public void print(Graphics graphics); public void print(Graphics graphics);
public void repaint(long tm, int x, int y, int width, int height); public void repaint(long tm, int x, int y, int width, int height);
/**
* Part of the earlier 1.1 API, apparently replaced by argument
* form of the same method.
*/
public void requestFocus(); public void requestFocus();
public boolean requestFocus(java.awt.Component source, boolean bool1, boolean bool2, long x);
public void reshape(int x, int y, int width, int height); public void reshape(int x, int y, int width, int height);
public void setBackground(Color color); public void setBackground(Color color);
public void setBounds(int x, int y, int width, int height); public void setBounds(int x, int y, int width, int height);
/**
* Part of the earlier 1.1 API, apparently no longer needed.
*/
public void setCursor(Cursor cursor); public void setCursor(Cursor cursor);
public void setEnabled(boolean enabled); public void setEnabled(boolean enabled);
public void setFont(Font font); public void setFont(Font font);
public void setForeground(Color color); public void setForeground(Color color);
...@@ -84,7 +100,23 @@ public interface ComponentPeer ...@@ -84,7 +100,23 @@ public interface ComponentPeer
* Get the graphics configuration of the component. The color model * Get the graphics configuration of the component. The color model
* of the component can be derived from the configuration. * of the component can be derived from the configuration.
*/ */
GraphicsConfiguration getGraphicsConfiguration(); public GraphicsConfiguration getGraphicsConfiguration();
/**
* Part of an older API, no longer needed.
*/
public void setEventMask (long mask); public void setEventMask (long mask);
// Methods below are introduced since 1.1
public boolean isObscured();
public boolean canDetermineObscurity();
public void coalescePaintEvent(PaintEvent e);
public void updateCursorImmediately();
public VolatileImage createVolatileImage(int width, int height);
public boolean handlesWheelScrolling();
public void createBuffers(int x, java.awt.BufferCapabilities capabilities) throws java.awt.AWTException;
public java.awt.Image getBackBuffer();
public void flip(java.awt.BufferCapabilities.FlipContents contents);
public void destroyBuffers();
} }
...@@ -41,9 +41,12 @@ import java.awt.Insets; ...@@ -41,9 +41,12 @@ import java.awt.Insets;
public interface ContainerPeer extends ComponentPeer public interface ContainerPeer extends ComponentPeer
{ {
public abstract Insets insets(); public Insets insets();
public abstract Insets getInsets(); public Insets getInsets();
public abstract void beginValidate(); public void beginValidate();
public abstract void endValidate(); public void endValidate();
public void beginLayout();
public void endLayout();
public boolean isPaintPending();
} // interface ContainerPeer } // interface ContainerPeer
...@@ -40,9 +40,7 @@ package java.awt.peer; ...@@ -40,9 +40,7 @@ package java.awt.peer;
public interface DialogPeer extends WindowPeer public interface DialogPeer extends WindowPeer
{ {
public void setResizable(boolean resizeable);
public abstract void setResizable(boolean resizeable); public void setTitle(String title);
public abstract void setTitle(String title);
} // interface DialogPeer } // interface DialogPeer
...@@ -42,10 +42,8 @@ import java.io.FilenameFilter; ...@@ -42,10 +42,8 @@ import java.io.FilenameFilter;
public interface FileDialogPeer extends DialogPeer public interface FileDialogPeer extends DialogPeer
{ {
public void setFile(String file);
public abstract void setFile(String file); public void setDirectory(String dir);
public abstract void setDirectory(String dir); public void setFilenameFilter(FilenameFilter ff);
public abstract void setFilenameFilter(FilenameFilter ff);
} // interface FileDialogPeer } // interface FileDialogPeer
...@@ -40,14 +40,16 @@ package java.awt.peer; ...@@ -40,14 +40,16 @@ package java.awt.peer;
import java.awt.Image; import java.awt.Image;
import java.awt.MenuBar; import java.awt.MenuBar;
import java.awt.Rectangle;
public interface FramePeer extends WindowPeer public interface FramePeer extends WindowPeer
{ {
public void setIconImage(Image image);
public abstract void setIconImage(Image image); public void setMenuBar(MenuBar mb);
public abstract void setMenuBar(MenuBar mb); public void setResizable(boolean resizable);
public abstract void setResizable(boolean resizable); public void setTitle(String title);
public abstract void setTitle(String title); public int getState();
public void setState(int state);
public void setMaximizedBounds(Rectangle r);
} // interface FramePeer } // interface FramePeer
...@@ -40,9 +40,7 @@ package java.awt.peer; ...@@ -40,9 +40,7 @@ package java.awt.peer;
public interface LabelPeer extends ComponentPeer public interface LabelPeer extends ComponentPeer
{ {
public void setAlignment(int alignment);
public abstract void setAlignment(int alignment); public void setText(String text);
public abstract void setText(String text);
} // interface LabelPeer } // interface LabelPeer
...@@ -42,20 +42,21 @@ import java.awt.Dimension; ...@@ -42,20 +42,21 @@ import java.awt.Dimension;
public interface ListPeer extends ComponentPeer public interface ListPeer extends ComponentPeer
{ {
public abstract void add(String item, int index); public void add(String item, int index);
public abstract void addItem(String item, int index); public void addItem(String item, int index);
public abstract void clear(); public void clear();
public abstract void delItems(int start_index, int end_index); public void delItems(int start_index, int end_index);
public abstract void deselect(int index); public void deselect(int index);
public abstract int[] getSelectedIndexes(); public int[] getSelectedIndexes();
public abstract void makeVisible(int index); public void makeVisible(int index);
public abstract Dimension minimumSize(int s); public Dimension minimumSize(int s);
public abstract Dimension preferredSize(int s); public Dimension preferredSize(int s);
public abstract void removeAll(); public void removeAll();
public abstract void select(int index); public void select(int index);
public abstract void setMultipleMode(boolean multi); public void setMultipleMode(boolean multi);
public abstract void setMultipleSelections(boolean multi); public void setMultipleSelections(boolean multi);
public Dimension getPreferredSize(int s);
public Dimension getMinimumSize(int s);
} // interface ListPeer } // interface ListPeer
...@@ -42,10 +42,8 @@ import java.awt.Menu; ...@@ -42,10 +42,8 @@ import java.awt.Menu;
public interface MenuBarPeer extends MenuComponentPeer public interface MenuBarPeer extends MenuComponentPeer
{ {
public void addHelpMenu(Menu menu);
public abstract void addHelpMenu(Menu menu); public void addMenu(Menu menu);
public abstract void addMenu(Menu menu); public void delMenu(int index);
public abstract void delMenu(int index);
} // interface MenuBarPeer } // interface MenuBarPeer
...@@ -40,8 +40,6 @@ package java.awt.peer; ...@@ -40,8 +40,6 @@ package java.awt.peer;
public interface MenuComponentPeer public interface MenuComponentPeer
{ {
public void dispose();
public abstract void dispose();
} // interface MenuComponentPeer } // interface MenuComponentPeer
...@@ -40,11 +40,9 @@ package java.awt.peer; ...@@ -40,11 +40,9 @@ package java.awt.peer;
public interface MenuItemPeer extends MenuComponentPeer public interface MenuItemPeer extends MenuComponentPeer
{ {
public void disable();
public abstract void disable(); public void enable();
public abstract void enable(); public void setEnabled(boolean enabled);
public abstract void setEnabled(boolean enabled); public void setLabel(String text);
public abstract void setLabel(String text);
} // interface MenuItemPeer } // interface MenuItemPeer
...@@ -42,8 +42,8 @@ import java.awt.MenuItem; ...@@ -42,8 +42,8 @@ import java.awt.MenuItem;
public interface MenuPeer extends MenuItemPeer public interface MenuPeer extends MenuItemPeer
{ {
public abstract void addItem (MenuItem item); public void addItem (MenuItem item);
public abstract void addSeparator (); public void addSeparator ();
public abstract void delItem (int index); public void delItem (int index);
} }
...@@ -39,10 +39,15 @@ exception statement from your version. */ ...@@ -39,10 +39,15 @@ exception statement from your version. */
package java.awt.peer; package java.awt.peer;
import java.awt.Component; import java.awt.Component;
import java.awt.Event;
public interface PopupMenuPeer extends MenuPeer public interface PopupMenuPeer extends MenuPeer
{ {
public abstract void show (Component origin, int x, int y); /**
* Part of the older API, replaced by event version instead.
*/
public void show (Component origin, int x, int y);
public void show (Event e);
} // interface PopupMenuPeer } // interface PopupMenuPeer
/* RobotPeer.java -- Interface for programatically driving GUI
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.awt.peer;
import java.awt.Rectangle;
public interface RobotPeer
{
public void mouseMove (int x, int y);
public void mousePress (int x);
public void mouseRelease (int x);
public void mouseWheel (int x);
public void keyPress (int x);
public void keyRelease (int x);
public int getRGBPixel (int x, int y);
public int[] getRGBPixels (Rectangle r);
} // interface RobotPeer
...@@ -42,13 +42,11 @@ import java.awt.Adjustable; ...@@ -42,13 +42,11 @@ import java.awt.Adjustable;
public interface ScrollPanePeer extends ContainerPeer public interface ScrollPanePeer extends ContainerPeer
{ {
public int getHScrollbarHeight();
public abstract int getHScrollbarHeight(); public int getVScrollbarWidth();
public abstract int getVScrollbarWidth(); public void setScrollPosition(int h, int v);
public abstract void setScrollPosition(int h, int v); public void childResized(int width, int height);
public abstract void childResized(int width, int height); public void setUnitIncrement(Adjustable item, int inc);
public abstract void setUnitIncrement(Adjustable item, int inc); public void setValue(Adjustable item, int value);
public abstract void setValue(Adjustable item, int value);
} // interface ScollPanePeer } // interface ScollPanePeer
...@@ -40,10 +40,8 @@ package java.awt.peer; ...@@ -40,10 +40,8 @@ package java.awt.peer;
public interface ScrollbarPeer extends ComponentPeer public interface ScrollbarPeer extends ComponentPeer
{ {
public void setLineIncrement(int inc);
public abstract void setLineIncrement(int inc); public void setPageIncrement(int inc);
public abstract void setPageIncrement(int inc); public void setValues(int value, int visible, int min, int max);
public abstract void setValues(int value, int visible, int min, int max);
} // interface ScrollbarPeer } // interface ScrollbarPeer
...@@ -42,14 +42,12 @@ import java.awt.Dimension; ...@@ -42,14 +42,12 @@ import java.awt.Dimension;
public interface TextAreaPeer extends TextComponentPeer public interface TextAreaPeer extends TextComponentPeer
{ {
public void insert(String text, int pos);
public abstract void insert(String text, int pos); public void insertText(String text, int pos);
public abstract void insertText(String text, int pos); public Dimension minimumSize(int rows, int cols);
public abstract Dimension minimumSize(int rows, int cols); public Dimension getMinimumSize(int rows, int cols);
public abstract Dimension getMinimumSize(int rows, int cols); public Dimension preferredSize(int rows, int cols);
public abstract Dimension preferredSize(int rows, int cols); public Dimension getPreferredSize(int rows, int cols);
public abstract Dimension getPreferredSize(int rows, int cols); public void replaceRange(String text, int start_pos, int end_pos);
public abstract void replaceRange(String text, int start_pos, int end_pos); public void replaceText(String text, int start_pos, int end_pos);
public abstract void replaceText(String text, int start_pos, int end_pos);
} // interface TextAreaPeer } // interface TextAreaPeer
...@@ -38,17 +38,20 @@ exception statement from your version. */ ...@@ -38,17 +38,20 @@ exception statement from your version. */
package java.awt.peer; package java.awt.peer;
import java.awt.Rectangle;
public interface TextComponentPeer extends ComponentPeer public interface TextComponentPeer extends ComponentPeer
{ {
public int getSelectionEnd();
public abstract int getSelectionEnd(); public int getSelectionStart();
public abstract int getSelectionStart(); public String getText();
public abstract String getText(); public void setText(String text);
public abstract void setText(String text); public void select(int start_pos, int end_pos);
public abstract void select(int start_pos, int end_pos); public void setEditable(boolean editable);
public abstract void setEditable(boolean editable); public int getCaretPosition();
public abstract int getCaretPosition(); public void setCaretPosition(int pos);
public abstract void setCaretPosition(int pos); public int getIndexAtPoint(int x, int y);
public Rectangle getCharacterBounds(int pos);
public long filterEvents(long filter);
} // interface TextComponentPeer } // interface TextComponentPeer
...@@ -42,13 +42,11 @@ import java.awt.Dimension; ...@@ -42,13 +42,11 @@ import java.awt.Dimension;
public interface TextFieldPeer extends TextComponentPeer public interface TextFieldPeer extends TextComponentPeer
{ {
public Dimension minimumSize(int len);
public abstract Dimension minimumSize(int len); public Dimension preferredSize(int len);
public abstract Dimension preferredSize(int len); public Dimension getMinimumSize(int len);
public abstract Dimension getMinimumSize(int len); public Dimension getPreferredSize(int len);
public abstract Dimension getPreferredSize(int len); public void setEchoChar(char echo_char);
public abstract void setEchoChar(char echo_char); public void setEchoCharacter(char echo_char);
public abstract void setEchoCharacter(char echo_char);
} // interface TextFieldPeer } // interface TextFieldPeer
...@@ -40,9 +40,7 @@ package java.awt.peer; ...@@ -40,9 +40,7 @@ package java.awt.peer;
public interface WindowPeer extends ContainerPeer public interface WindowPeer extends ContainerPeer
{ {
public void toBack();
public abstract void toBack(); public void toFront();
public abstract void toFront();
} // interface WindowPeer } // interface WindowPeer
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment