Commit bda14505 by Tom Tromey Committed by Tom Tromey

ButtonPeer.java: Replace with Classpath version.

	* java/awt/peer/ButtonPeer.java: Replace with Classpath version.
	* java/awt/peer/CanvasPeer.java: Replace with Classpath version.
	* java/awt/peer/CheckboxMenuItemPeer.java: Replace with Classpath
	version.
	* java/awt/peer/CheckboxPeer.java: Replace with Classpath version.
	* java/awt/peer/ChoicePeer.java: Replace with Classpath version.
	* java/awt/peer/ComponentPeer.java: Replace with Classpath version.
	* java/awt/peer/ContainerPeer.java: Replace with Classpath version.
	* java/awt/peer/DialogPeer.java: Replace with Classpath version.
	* java/awt/peer/FileDialogPeer.java: Replace with Classpath version.
	* java/awt/peer/FontPeer.java: Replace with Classpath version.
	* java/awt/peer/FramePeer.java: Replace with Classpath version.
	* java/awt/peer/LabelPeer.java: Replace with Classpath version.
	* java/awt/peer/LightweightPeer.java: Replace with Classpath version.
	* java/awt/peer/ListPeer.java: Replace with Classpath version.
	* java/awt/peer/MenuBarPeer.java: Replace with Classpath version.
	* java/awt/peer/MenuComponentPeer.java: Replace with Classpath version.
	* java/awt/peer/MenuItemPeer.java: Replace with Classpath version.
	* java/awt/peer/MenuPeer.java: Replace with Classpath version.
	* java/awt/peer/PanelPeer.java: Replace with Classpath version.
	* java/awt/peer/PopupMenuPeer.java: Replace with Classpath version.
	* java/awt/peer/ScrollPanePeer.java: Replace with Classpath version.
	* java/awt/peer/ScrollbarPeer.java: Replace with Classpath version.
	* java/awt/peer/TextAreaPeer.java: Replace with Classpath version.
	* java/awt/peer/TextComponentPeer.java: Replace with Classpath version.
	* java/awt/peer/TextFieldPeer.java: Replace with Classpath version.
	* java/awt/peer/WindowPeer.java: Replace with Classpath version.
	* gnu/awt/xlib/XPanelPeer.java (insets): New method.
	* gnu/awt/xlib/XCanvasPeer.java (show, hide): New methods.
	(minimumSize, preferredSize, reshape): Likewise.
	* gnu/awt/xlib/XFramePeer.java (insets, enable, disable,
	getColorModel): New methods.
	* java/awt/PopupMenu.java: Merged with Classpath.
	* java/awt/MenuBar.java: Merged with Classpath.
	* java/awt/SystemColor.java: Replace with Classpath version.
	* java/awt/Panel.java: Merged with Classpath.
	* java/awt/PaintContext.java: Updated copyright.
	* java/awt/MenuShortcut.java: Merged with Classpath.
	* java/awt/MenuContainer.java: Merged with Classpath.
	* java/awt/Menu.java: Merged with Classpath.
	* java/awt/MediaEntry.java: New file from Classpath.
	* java/awt/MediaTracker.java: New file from Classpath.
	* java/awt/List.java: Merged with Classpath version.
	* java/awt/Insets.java: Merged with Classpath version.
	* java/awt/ImageMediaEntry.java: New file from Classpath.
	* java/awt/Image.java: Replaced with Classpath version.
	* java/awt/FontMetrics.java: Merged with Classpath version.
	* java/awt/Cursor.java (getDefaultCursor): Use DEFAULT_CURSOR
	constant.
	* java/awt/Font.java: Merged with Classpath version.
	* java/awt/Dialog.java: Merged with Classpath version.
	* java/awt/Color.java: Merged with Classpath version.
	* java/awt/Choice.java: Merged with Classpath version.
	* java/awt/CheckboxMenuItem.java: Merged with Classpath version.
	* java/awt/Adjustable.java: Replace with Classpath version.
	* java/awt/MenuItem.java (paramString): Don't include class name
	or brackets.  Call superclass paramString.
	* java/awt/MenuComponent.java (toString): Call paramString.
	(paramString): Compute string; don't call toString.
	* java/awt/Label.java (paramString): Don't include class name
	or brackets.  Call superclass paramString.
	* java/awt/Checkbox.java (paramString): Don't include class name
	or brackets.  Call superclass paramString.
	* java/awt/Button.java (paramString): Don't include class name or
	brackets.  Call superclass paramString.
	* java/awt/MenuComponent.java (getTreeLock): Now protected.

From-SVN: r49099
parent e3b0efd1
2002-01-22 Tom Tromey <tromey@redhat.com>
* java/awt/peer/ButtonPeer.java: Replace with Classpath version.
* java/awt/peer/CanvasPeer.java: Replace with Classpath version.
* java/awt/peer/CheckboxMenuItemPeer.java: Replace with Classpath
version.
* java/awt/peer/CheckboxPeer.java: Replace with Classpath version.
* java/awt/peer/ChoicePeer.java: Replace with Classpath version.
* java/awt/peer/ComponentPeer.java: Replace with Classpath version.
* java/awt/peer/ContainerPeer.java: Replace with Classpath version.
* java/awt/peer/DialogPeer.java: Replace with Classpath version.
* java/awt/peer/FileDialogPeer.java: Replace with Classpath version.
* java/awt/peer/FontPeer.java: Replace with Classpath version.
* java/awt/peer/FramePeer.java: Replace with Classpath version.
* java/awt/peer/LabelPeer.java: Replace with Classpath version.
* java/awt/peer/LightweightPeer.java: Replace with Classpath version.
* java/awt/peer/ListPeer.java: Replace with Classpath version.
* java/awt/peer/MenuBarPeer.java: Replace with Classpath version.
* java/awt/peer/MenuComponentPeer.java: Replace with Classpath version.
* java/awt/peer/MenuItemPeer.java: Replace with Classpath version.
* java/awt/peer/MenuPeer.java: Replace with Classpath version.
* java/awt/peer/PanelPeer.java: Replace with Classpath version.
* java/awt/peer/PopupMenuPeer.java: Replace with Classpath version.
* java/awt/peer/ScrollPanePeer.java: Replace with Classpath version.
* java/awt/peer/ScrollbarPeer.java: Replace with Classpath version.
* java/awt/peer/TextAreaPeer.java: Replace with Classpath version.
* java/awt/peer/TextComponentPeer.java: Replace with Classpath version.
* java/awt/peer/TextFieldPeer.java: Replace with Classpath version.
* java/awt/peer/WindowPeer.java: Replace with Classpath version.
* gnu/awt/xlib/XPanelPeer.java (insets): New method.
* gnu/awt/xlib/XCanvasPeer.java (show, hide): New methods.
(minimumSize, preferredSize, reshape): Likewise.
* gnu/awt/xlib/XFramePeer.java (insets, enable, disable,
getColorModel): New methods.
* java/awt/PopupMenu.java: Merged with Classpath.
* java/awt/MenuBar.java: Merged with Classpath.
* java/awt/SystemColor.java: Replace with Classpath version.
* java/awt/Panel.java: Merged with Classpath.
* java/awt/PaintContext.java: Updated copyright.
* java/awt/MenuShortcut.java: Merged with Classpath.
* java/awt/MenuContainer.java: Merged with Classpath.
* java/awt/Menu.java: Merged with Classpath.
* java/awt/MediaEntry.java: New file from Classpath.
* java/awt/MediaTracker.java: New file from Classpath.
* java/awt/List.java: Merged with Classpath version.
* java/awt/Insets.java: Merged with Classpath version.
* java/awt/ImageMediaEntry.java: New file from Classpath.
* java/awt/Image.java: Replaced with Classpath version.
* java/awt/FontMetrics.java: Merged with Classpath version.
* java/awt/Cursor.java (getDefaultCursor): Use DEFAULT_CURSOR
constant.
* java/awt/Font.java: Merged with Classpath version.
* java/awt/Dialog.java: Merged with Classpath version.
* java/awt/Color.java: Merged with Classpath version.
* java/awt/Choice.java: Merged with Classpath version.
* java/awt/CheckboxMenuItem.java: Merged with Classpath version.
* java/awt/Adjustable.java: Replace with Classpath version.
* java/awt/MenuItem.java (paramString): Don't include class name
or brackets. Call superclass paramString.
* java/awt/MenuComponent.java (toString): Call paramString.
(paramString): Compute string; don't call toString.
* java/awt/Label.java (paramString): Don't include class name
or brackets. Call superclass paramString.
* java/awt/Checkbox.java (paramString): Don't include class name
or brackets. Call superclass paramString.
* java/awt/Button.java (paramString): Don't include class name or
brackets. Call superclass paramString.
* java/awt/MenuComponent.java (getTreeLock): Now protected.
2002-01-20 Andreas Schwab <schwab@suse.de>
* java/net/natPlainSocketImpl.cc (_Jv_recv): Change return type of
......
/* Copyright (C) 2000 Free Software Foundation
/* Copyright (C) 2000, 2002 Free Software Foundation
This file is part of libgcj.
......@@ -230,6 +230,11 @@ public class XCanvasPeer implements CanvasPeer
throw new UnsupportedOperationException("FIXME, not implemented");
}
public ColorModel getColorModel ()
{
return null;
}
public Graphics getGraphics()
{
DirectRasterGraphics gfxDevice = new XGraphics(window, config);
......@@ -251,11 +256,21 @@ public class XCanvasPeer implements CanvasPeer
return MIN_SIZE;
}
public Dimension minimumSize ()
{
return getMinimumSize ();
}
public Dimension getPreferredSize ()
{
return component.getSize();
}
public Dimension preferredSize ()
{
return getPreferredSize();
}
public Toolkit getToolkit()
{
return getXToolkit();
......@@ -318,6 +333,11 @@ public class XCanvasPeer implements CanvasPeer
ensureFlush();
}
public void reshape (int x, int y, int width, int height)
{
setBounds (x, y, width, height);
}
public void setCursor(Cursor cursor)
{
throw new UnsupportedOperationException("FIXME, not implemented");
......@@ -328,6 +348,16 @@ public class XCanvasPeer implements CanvasPeer
throw new UnsupportedOperationException("FIXME, not implemented");
}
public void enable ()
{
setEnabled (true);
}
public void disable ()
{
setEnabled (false);
}
public void setEventMask(long eventMask)
{
WindowAttributes attributes = new WindowAttributes();
......@@ -371,6 +401,16 @@ public class XCanvasPeer implements CanvasPeer
}
}
public void show ()
{
setVisible (true);
}
public void hide ()
{
setVisible (false);
}
static class DoMap implements Runnable
{
Window window;
......
/* Copyright (C) 2000 Free Software Foundation
/* Copyright (C) 2000, 2002 Free Software Foundation
This file is part of libgcj.
......@@ -93,6 +93,11 @@ public class XFramePeer extends XCanvasPeer implements FramePeer
return (Insets) INSETS_0_PROTOTYPE.clone();
}
public Insets insets ()
{
return getInsets ();
}
public void beginValidate()
{
}
......
/* Copyright (C) 2000 Free Software Foundation
/* Copyright (C) 2000, 2002 Free Software Foundation
This file is part of libgcj.
......@@ -40,6 +40,11 @@ public class XPanelPeer extends XCanvasPeer implements PanelPeer
return (Insets) INSETS_0_PROTOTYPE.clone();
}
public Insets insets()
{
return getInsets();
}
public void beginValidate()
{
// NOP
......
/* Copyright (C) 1999, 2000 Free Software Foundation
/* Adjustable.java -- Objects with a numeric adjustment scale.
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libjava.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libjava License. Please consult the file "LIBJAVA_LICENSE" for
details. */
package java.awt;
import java.awt.event.*;
import java.awt.event.AdjustmentListener;
/**
* @author Tom Tromey <tromey@cygnus.com>
* @date April 8, 2000
* This interface is for objects that take a numeric value that
* can be adjusted within a bounded range. For example, a scroll bar.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Adjustable
{
/*
* Static Variables
*/
/* Status: Believed complete and correct to JDK 1.2. */
/**
* Constant for a horizontal orientation
*/
public static final int HORIZONTAL = 0;
/**
* Constant for a vertical orientation
*/
public static final int VERTICAL = 1;
/*************************************************************************/
/*
* Instance Methods
*/
/**
* Returns the current value of the object.
*
* @return The current value of the object.
*/
public abstract int
getValue();
/*************************************************************************/
/**
* Sets the current value of the object.
*
* @param value The current value of the object.
*/
public abstract void
setValue(int value);
/*************************************************************************/
/**
* Returns the orientation of the object, either <code>HORIZONTAL</code>
* or <code>VERTICAL</code>.
*
* @return The orientation of this object.
*/
public abstract int
getOrientation();
/*************************************************************************/
/**
* Returns the minimum value this object can take.
*
* @return The minimum value this object can take.
*/
public abstract int
getMinimum();
/*************************************************************************/
/**
* Sets the minimum value this object can take to the specified value.
*
* @param minimum The new minimum value for this object.
*/
public abstract void
setMinimum(int minimum);
/*************************************************************************/
/**
* Returns the maximum value this object can take.
*
* @return The maximum value this object can take.
*/
public abstract int
getMaximum();
/*************************************************************************/
/**
* Sets the maximum value this object can take to the specified value.
*
* @param maximum The new maximum value for this object.
*/
public abstract void
setMaximum(int maximum);
/*************************************************************************/
/**
* Returns the increment value for incrementing by units.
*
* @return The unit increment value.
*/
public abstract int
getUnitIncrement();
/*************************************************************************/
/**
* Sets the increment value for incrementing by units to the specified value.
*
* @param increment The unit increment value.
*/
public abstract void
setUnitIncrement(int increment);
/*************************************************************************/
/**
* Returns the increment value for incrementing by blocks.
*
* @return The block increment value.
*/
public abstract int
getBlockIncrement();
/*************************************************************************/
/**
* Sets the increment value for incrementing by blocks to the specified value.
*
* @param increment The block increment value.
*/
public abstract void
setBlockIncrement(int increment);
/*************************************************************************/
/**
* Returns the length of the indicator for this object.
*
* @return The indicator length.
*/
public abstract int
getVisibleAmount();
/*************************************************************************/
/**
* Sets the length of the indicator for this object to the specified value.
*
* @param length The indicator length
*/
public abstract void
setVisibleAmount(int length);
/*************************************************************************/
/**
* Adds a listener that will receive adjustment events for this object.
*
* @param listener The adjustment listener to add.
*/
public abstract void
addAdjustmentListener(AdjustmentListener listener);
/*************************************************************************/
/**
* Removes an adjustment listener from this object. It will no longer
* receive adjustment events.
*
* @param listener The adjustment listener to remove.
*/
public abstract void
removeAdjustmentListener(AdjustmentListener listener);
} // interface Adjustable
public interface Adjustable
{
public static final int HORIZONTAL = 0;
public static final int VERTICAL = 1;
public void addAdjustmentListener (AdjustmentListener l);
public int getBlockIncrement ();
public int getMaximum ();
public int getMinimum ();
public int getOrientation ();
public int getUnitIncrement ();
public int getValue ();
public int getVisibleAmount ();
public void removeAdjustmentListener (AdjustmentListener l);
public void setBlockIncrement (int b);
public void setMaximum (int max);
public void setMinimum (int min);
public void setUnitIncrement (int u);
public void setValue (int v);
public void setVisibleAmount (int v);
}
......@@ -269,8 +269,8 @@ dispatchEventImpl(AWTEvent e)
protected String
paramString()
{
return(getClass().getName() + "(label=" + getLabel() + ",actionCommand=" +
getActionCommand() + ")");
return ("label=" + getLabel() + ",actionCommand=" + getActionCommand()
+ "," + super.paramString());
}
} // class Button
......
......@@ -362,8 +362,8 @@ processItemEvent(ItemEvent event)
protected String
paramString()
{
return(getClass().getName() + "[label=" + label + ",state=" + state
+ ",group=" + group + "]");
return ("label=" + label + ",state=" + state + ",group=" + group
+ "," + super.paramString());
}
} // class Checkbox
/* Copyright (C) 2000 Free Software Foundation
/* Copyright (C) 1999, 2000, 2002 Free Software Foundation
This file is part of libgcj.
This file is part of GNU Classpath.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
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.
package java.awt;
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
/* A somewhat incomplete placeholder. */
package java.awt;
/**
* This class represents various predefined cursor types.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class Cursor implements java.io.Serializable
{
public static final int DEFAULT_CURSOR = 0,
CROSSHAIR_CURSOR = 1,
TEXT_CURSOR = 2,
WAIT_CURSOR = 3,
SW_RESIZE_CURSOR = 4,
SE_RESIZE_CURSOR = 5,
NW_RESIZE_CURSOR = 6,
NE_RESIZE_CURSOR = 7,
N_RESIZE_CURSOR = 8,
S_RESIZE_CURSOR = 9,
W_RESIZE_CURSOR = 10,
E_RESIZE_CURSOR = 11,
HAND_CURSOR = 12,
MOVE_CURSOR = 13,
CUSTOM_CURSOR = 0xFFFFFFFF;
/**
* Constant for the system default cursor type
*/
public static final int DEFAULT_CURSOR = 0;
/**
* Constant for a cross-hair cursor.
*/
public static final int CROSSHAIR_CURSOR = 1;
/**
* Constant for a cursor over a text field.
*/
public static final int TEXT_CURSOR = 2;
/**
* Constant for a cursor to display while waiting for an action to complete.
*/
public static final int WAIT_CURSOR = 3;
/**
* Cursor used over SW corner of window decorations.
*/
public static final int SW_RESIZE_CURSOR = 4;
/**
* Cursor used over SE corner of window decorations.
*/
public static final int SE_RESIZE_CURSOR = 5;
/**
* Cursor used over NW corner of window decorations.
*/
public static final int NW_RESIZE_CURSOR = 6;
/**
* Cursor used over NE corner of window decorations.
*/
public static final int NE_RESIZE_CURSOR = 7;
/**
* Cursor used over N edge of window decorations.
*/
public static final int N_RESIZE_CURSOR = 8;
/**
* Cursor used over S edge of window decorations.
*/
public static final int S_RESIZE_CURSOR = 9;
/**
* Cursor used over W edge of window decorations.
*/
public static final int W_RESIZE_CURSOR = 10;
/**
* Cursor used over E edge of window decorations.
*/
public static final int E_RESIZE_CURSOR = 11;
/**
* Constant for a hand cursor.
*/
public static final int HAND_CURSOR = 12;
/**
* Constant for a cursor used during window move operations.
*/
public static final int MOVE_CURSOR = 13;
public static final int CUSTOM_CURSOR = 0xFFFFFFFF;
private static final int PREDEFINED_COUNT = 14;
protected static Cursor[] predefined = new Cursor[PREDEFINED_COUNT];
protected String name;
/**
* @serial The numeric id of this cursor.
*/
int type;
/**
* Initializes a new instance of <code>Cursor</code> with the specified
* type.
*
* @param type The cursor type.
*/
public Cursor(int type)
{
if (type < 0 || type >= PREDEFINED_COUNT)
......@@ -43,14 +130,25 @@ public class Cursor implements java.io.Serializable
}
/** This constructor is used internally only.
* Application code should call Toolkit.createCustomCursor().
*/
* Application code should call Toolkit.createCustomCursor().
*/
protected Cursor(String name)
{
this.name = name;
this.type = CUSTOM_CURSOR;
}
/**
* Returns an instance of <code>Cursor</code> for one of the specified
* predetermined types.
*
* @param type The type contant from this class.
*
* @return The requested predefined cursor.
*
* @exception IllegalArgumentException If the constant is not one of the
* predefined cursor type constants from this class.
*/
public static Cursor getPredefinedCursor(int type)
{
if (type < 0 || type >= PREDEFINED_COUNT)
......@@ -67,11 +165,21 @@ public class Cursor implements java.io.Serializable
return null;
}
/**
* Returns an instance of the system default cursor type.
*
* @return The system default cursor.
*/
public static Cursor getDefaultCursor()
{
return getPredefinedCursor(0);
return getPredefinedCursor(DEFAULT_CURSOR);
}
/**
* Returns the numeric type identifier for this cursor.
*
* @return The cursor id.
*/
public int getType()
{
return type;
......
/* Copyright (C) 2000, 2001 Free Software Foundation
/* FileDialog.java -- A filename selection dialog box
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt;
import java.awt.peer.FileDialogPeer;
import java.awt.peer.DialogPeer;
import java.awt.peer.WindowPeer;
import java.awt.peer.ContainerPeer;
import java.awt.peer.ComponentPeer;
import java.io.FilenameFilter;
/**
* @author Tom Tromey <tromey@redhat.com>
* @date April 20, 2001
* This class implements a file selection dialog box widget.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
* @author Tom Tromey <tromey@redhat.com>
*/
public class FileDialog extends Dialog implements java.io.Serializable
{
/*
* Static Variables
*/
/**
* Indicates that the purpose of the dialog is for opening a file.
*/
public static final int LOAD = 0;
/**
* Indicates that the purpose of the dialog is for saving a file.
*/
public static final int SAVE = 1;
// Serialization constant
private static final long serialVersionUID = 5035145889651310422L;
/*************************************************************************/
/*
* Instance Variables
*/
public class FileDialog extends Dialog
/**
* @serial The directory for this file dialog.
*/
private String dir;
/**
* @serial The filename for this file dialog
*/
private String file;
/**
* @serial The filter for selecting filenames to display
*/
private FilenameFilter filter;
/**
* @serial The mode of this dialog, either <code>LOAD</code> or
* <code>SAVE</code>.
*/
private int mode;
/*************************************************************************/
/*
* Constructors
*/
/**
* Initializes a new instance of <code>FileDialog</code> with the
* specified parent. This dialog will have no title and will be for
* loading a file.
*
* @param parent The parent frame for this dialog.
*/
public
FileDialog(Frame parent)
{
this(parent, "", LOAD);
}
/*************************************************************************/
/**
* Initialized a new instance of <code>FileDialog</code> with the
* specified parent and title. This dialog will be for opening a file.
*
* @param parent The parent frame for this dialog.
* @param title The title for this dialog.
*/
public
FileDialog(Frame parent, String title)
{
public static int LOAD = 0;
public static int SAVE = 1;
public FileDialog (Frame parent)
{
this (parent, "", LOAD);
}
public FileDialog (Frame parent, String title)
{
this (parent, title, LOAD);
}
public FileDialog (Frame parent, String title, int mode)
{
super (parent, title, true);
if (mode != LOAD && mode != SAVE)
throw new IllegalArgumentException ("unknown mode: " + mode);
this.mode = mode;
}
public void addNotify ()
{
if (peer == null)
peer = getToolkit ().createFileDialog (this);
super.addNotify ();
}
public String getDirectory ()
{
return dir;
}
public String getFile ()
{
return file;
}
public FilenameFilter getFilenameFilter ()
{
return filter;
}
public int getMode ()
{
return mode;
}
protected String paramString ()
{
return ("FileDialog[mode=" + mode
+ ",dir=" + dir
+ ",file=" + file + "]");
}
public void setDirectory (String dir)
{
this.dir = dir;
if (peer != null)
{
FileDialogPeer f = (FileDialogPeer) peer;
f.setDirectory (dir);
}
}
public void setFile (String file)
{
this.file = file;
if (peer != null)
{
FileDialogPeer f = (FileDialogPeer) peer;
f.setFile (file);
}
}
public void setFilenameFilter (FilenameFilter filter)
{
this.filter = filter;
if (peer != null)
{
FileDialogPeer f = (FileDialogPeer) peer;
f.setFilenameFilter (filter);
}
}
public void setMode (int mode)
{
if (mode != LOAD && mode != SAVE)
throw new IllegalArgumentException ("unknown mode: " + mode);
this.mode = mode;
// FIXME: update peer?
}
// Names here from serialization spec.
private int mode;
private String dir;
private String file;
private FilenameFilter filter;
this(parent, title, LOAD);
}
/*************************************************************************/
/**
* Initialized a new instance of <code>FileDialog</code> with the
* specified parent, title, and mode.
*
* @param parent The parent frame for this dialog.
* @param title The title for this dialog.
* @param mode The mode of the dialog, either <code>LOAD</code> or
* <code>SAVE</code>.
*/
public
FileDialog(Frame parent, String title, int mode)
{
super(parent, title, true);
if ((mode != LOAD) && (mode != SAVE))
throw new IllegalArgumentException("Bad mode: " + mode);
this.mode = mode;
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* Returns the mode of this dialog, either <code>LOAD</code> or
* <code>SAVE</code>.
*
* @return The mode of this dialog.
*/
public int
getMode()
{
return(mode);
}
/*************************************************************************/
/**
* Sets the mode of this dialog to either <code>LOAD</code> or
* <code>SAVE</code>. This method is only effective before the native
* peer is created.
*
* @param mode The new mode of this file dialog.
*/
public void
setMode(int mode)
{
if ((mode != LOAD) && (mode != SAVE))
throw new IllegalArgumentException("Bad mode: " + mode);
this.mode = mode;
}
/*************************************************************************/
/**
* Returns the directory for this file dialog.
*
* @return The directory for this file dialog.
*/
public String
getDirectory()
{
return(dir);
}
/*************************************************************************/
/**
* Sets the directory for this file dialog.
*
* @param dir The new directory for this file dialog.
*/
public synchronized void
setDirectory(String dir)
{
this.dir = dir;
if (peer != null)
{
FileDialogPeer f = (FileDialogPeer) peer;
f.setDirectory (dir);
}
}
/*************************************************************************/
/**
* Returns the file that is selected in this dialog.
*
* @return The file that is selected in this dialog.
*/
public String
getFile()
{
return(file);
}
/*************************************************************************/
/**
* Sets the selected file for this dialog.
*
* @param file The selected file for this dialog.
*/
public synchronized void
setFile(String file)
{
this.file = file;
if (peer != null)
{
FileDialogPeer f = (FileDialogPeer) peer;
f.setFile (file);
}
}
/*************************************************************************/
/**
* Returns the filename filter being used by this dialog.
*
* @param The filename filter being used by this dialog.
*/
public FilenameFilter
getFilenameFilter()
{
return(filter);
}
/*************************************************************************/
/**
* Sets the filename filter used by this dialog.
*
* @param filter The new filename filter for this file dialog box.
*/
public synchronized void
setFilenameFilter(FilenameFilter filter)
{
this.filter = filter;
if (peer != null)
{
FileDialogPeer f = (FileDialogPeer) peer;
f.setFilenameFilter (filter);
}
}
/*************************************************************************/
/**
* Creates the native peer for this file dialog box.
*/
public void
addNotify()
{
if (peer == null)
peer = getToolkit ().createFileDialog (this);
super.addNotify ();
}
/*************************************************************************/
/**
* Returns a debugging string for this object.
*
* @return A debugging string for this object.
*/
protected String
paramString()
{
return ("dir=" + dir + ",file=" + file +
",mode=" + mode + "," + super.paramString());
}
} // class FileDialog
/* Copyright (C) 2000 Free Software Foundation
/* Image.java -- Java class for images
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.awt.image.*;
/**
* @author Warren Levy <warrenl@cygnus.com>
* @date March 15, 2000.
* This is the abstract superclass of all image objects in Java.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public abstract class Image
{
/*
* Static Variables
*/
/**
* Written using on-line Java Platform 1.2 API Specification, as well
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
* Status: Mostly complete, but look for FIXMEs.
* Constant indicating that the default scaling algorithm should be used.
*/
public static final int SCALE_DEFAULT = 1;
/**
* Constant indicating that a fast scaling algorithm should be used.
*/
public static final int SCALE_FAST = 2;
/**
* Constant indicating that a smooth scaling algorithm should be used.
*/
public static final int SCALE_SMOOTH = 4;
/**
* Constant indicating that the <code>ReplicateScaleFilter</code> class
* algorithm should be used for scaling.
*/
public static final int SCALE_REPLICATE = 8;
/**
* Constant indicating that the area averaging scaling algorithm should be
* used.
*/
public static final int SCALE_AREA_AVERAGING = 16;
/**
* This variable is returned whenever a property that is not defined
* is requested.
*/
public static final Object UndefinedProperty = Image.class;
/*************************************************************************/
/*
* Constructors
*/
public abstract class Image extends Object
/**
* A default constructor for subclasses.
*/
public
Image()
{
public static final Object UndefinedProperty = new Object();
}
public static final int SCALE_DEFAULT = 1<<0,
SCALE_FAST = 1<<1,
SCALE_SMOOTH = 1<<2,
SCALE_REPLICATE = 1<<3,
SCALE_AREA_AVERAGING = 1<<4;
/*************************************************************************/
public abstract int getWidth(ImageObserver observer);
/*
* Instance Methods
*/
/**
* Returns the width of the image, or -1 if it is unknown. If the
* image width is unknown, the observer object will be notified when
* the value is known.
*
* @param observer The image observer for this object.
*/
public abstract int
getWidth(ImageObserver observer);
/*************************************************************************/
/**
* Returns the height of the image, or -1 if it is unknown. If the
* image height is unknown, the observer object will be notified when
* the value is known.
*
* @param observer The image observer for this object.
*/
public abstract int
getHeight(ImageObserver observer);
/*************************************************************************/
public abstract int getHeight(ImageObserver observer);
/**
* Returns the image producer object for this object.
*
* @return The image producer for this object.
*/
public abstract ImageProducer
getSource();
public abstract ImageProducer getSource();
public abstract Graphics getGraphics();
/*************************************************************************/
/**
* Returns a graphics context object for drawing an off-screen object.
* This method is only valid for off-screen objects.
*
* @return A graphics context object for an off-screen object.
*/
public abstract Graphics
getGraphics();
public abstract Object getProperty(String name, ImageObserver observer);
/*************************************************************************/
public Image getScaledInstance(int width, int height, int hints)
/**
* This method requests a named property for an object. The value of the
* property is returned. The value <code>UndefinedProperty</code> is
* returned if there is no property with the specified name. The value
* <code>null</code> is returned if the properties for the object are
* not yet known. In this case, the specified image observer is notified
* when the properties are known.
*
* @param name The requested property name.
* @param observer The image observer for this object.
*/
public abstract Object
getProperty(String name, ImageObserver observer);
/*************************************************************************/
/**
* Scales the image to the requested dimension.
*
* XXX: FIXME
*
* @param width The width of the scaled image.
* @param height The height of the scaled image.
* @param flags A value indicating the algorithm to use, which will be
* set from contants defined in this class.
*
* @return The scaled <code>Image</code> object.
*/
public Image
getScaledInstance(int width, int height, int flags)
{
throw new UnsupportedOperationException("FIXME: not implemented yet");
return null;
}
public abstract void flush();
}
/*************************************************************************/
/**
* Flushes (that is, destroys) any resources used for this image. This
* includes the actual image data.
*/
public abstract void
flush();
} // class Image
/* ImageMediaEntry.java -- A media entry type for images.
Copyright (C) 1999 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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
package java.awt;
import java.awt.image.ImageObserver;
import java.io.Serializable;
/**
* A concrete MediaEntry subtype for images.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
class ImageMediaEntry extends MediaEntry implements ImageObserver,
Serializable
{
private Image image;
private int width;
private int height;
ImageMediaEntry(MediaTracker tracker, Image image, int ID, int width, int height)
{
super(tracker, ID);
this.image = image;
this.width = width;
this.height = height;
}
public Object
getMedia()
{
return(image.getSource()); // FIXME: Is this really right?
}
public void
startLoad()
{
int status = getStatus();
// status |= MediaEntry.LOADSTARTED;
}
public boolean
imageUpdate(Image image, int flags, int x, int y, int width, int height)
{
// implement me
return true;
}
} // class ImageMediaEntry
/* Copyright (C) 2000 Free Software Foundation
/* Insets.java -- Information about a container border.
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt;
/**
* This class represents the "margin" or space around a container.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class Insets implements Cloneable, java.io.Serializable
{
public int top;
public int left;
public int bottom;
public int right;
public Insets(int top, int left, int bottom, int right)
{
this.top = top;
this.left = left;
this.bottom = bottom;
this.right = right;
}
public boolean equals(Object obj)
{
if (obj instanceof Insets)
{
Insets i = (Insets) obj;
return (i.top == top
&& i.left == left
&& i.bottom == bottom
&& i.right == right);
}
return false;
}
public int hashCode()
{
// FIXME: what is the correct algorithm for this?
return (top * (2 * left) * (3 * right) * (4 * bottom));
}
public String toString()
{
return (getClass() + "[top=" + top + ",left=" + left + ",bottom="
+ bottom + ",right=" + right + "]");
}
public Object clone()
{
Insets r = new Insets(top, left, bottom, right);
return r;
}
/*
* Instance Variable
*/
/**
* @serial The top inset
*/
public int top;
/**
* @serial This bottom inset
*/
public int bottom;
/**
* @serial The left inset
*/
public int left;
/**
* @serial The right inset
*/
public int right;
/*************************************************************************/
/**
* Initializes a new instance of <code>Inset</code> with the specified
* inset values.
*
* @param top The top inset
* @param left The left inset
* @param bottom The bottom inset
* @param right The right inset
*/
public
Insets(int top, int left, int bottom, int right)
{
this.top = top;
this.left = left;
this.bottom = bottom;
this.right = right;
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* Tests whether this object is equal to the specified object. This will
* be true if and only if the specified object:
* <p>
* <ul>
* <li>Is not <code>null</code>.
* <li>Is an instance of <code>Insets</code>.
* <li>Has the same top, bottom, left, and right inset values as this object.
* </ul>
*
* @param obj The object to test against.
*
* @return <code>true</code> if the specified object is equal to this
* one, <code>false</code> otherwise.
*/
public boolean
equals(Object obj)
{
if (!(obj instanceof Insets))
return(false);
Insets i = (Insets)obj;
if (i.top != top)
return(false);
if (i.bottom != bottom)
return(false);
if (i.left != left)
return(false);
if (i.right != right)
return(false);
return(true);
}
public int
hashCode()
{
return top + bottom + left + right;
}
/*************************************************************************/
/**
* Returns a string representation of this object.
*
* @return A string representation of this object.
*/
public String
toString()
{
return(getClass().getName() + "(top=" + top + ",bottom=" + bottom +
",left=" + left + ",right=" + right + ")");
}
/*************************************************************************/
/**
* Returns a copy of this object.
*
* @return A copy of this object.
*/
public Object
clone()
{
try
{
return(super.clone());
}
catch(Exception e)
{
return(null);
}
}
} // class Insets
......@@ -225,8 +225,8 @@ addNotify()
protected String
paramString()
{
return(getClass().getName() + "(text=" + getText() + ",alignment=" +
getAlignment() + ")");
return ("text=" + getText() + ",alignment=" +
getAlignment() + "," + super.paramString());
}
} // class Label
......
/* MediaEntry.java -- An entry in a MediaTracker
Copyright (C) 1999 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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
package java.awt;
/**
* This is an entry in the media tracker
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
abstract class MediaEntry implements java.io.Serializable
{
protected static final int LOADING = 1;
protected static final int ABORTED = 2;
protected static final int ERRORED = 4;
protected static final int COMPLETE = 8;
protected static final int LOADSTARTED = 16;
protected static final int DONE = 32;
private MediaTracker tracker;
private int ID;
private int status;
private boolean cancelled;
private MediaEntry next;
static MediaEntry
insert(MediaEntry a, MediaEntry b)
{
while (a.next != null)
a = a.next;
a.next = b;
return(b);
}
MediaEntry(MediaTracker tracker, int ID)
{
this.tracker = tracker;
this.ID = ID;
}
public int
getID()
{
return(ID);
}
public int
getStatus()
{
return(status);
}
public void
setStatus(int status)
{
this.status = status;
}
public MediaEntry
getNext()
{
return(next);
}
public void
cancel()
{
cancelled = true;
if ((status == LOADING) || (status == LOADSTARTED))
setStatus(ABORTED);
}
abstract void
startLoad();
abstract Object
getMedia();
} // class MediaEntry
/* MediaTracker.java -- Class used for keeping track of images
Copyright (C) 1999 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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
package java.awt;
/**
* This class is used for keeping track of the status of various media
* objects.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class MediaTracker implements java.io.Serializable
{
} // class MediaTracker
......@@ -221,7 +221,7 @@ getToolkit()
*
* @return The synchronization lock for this component.
*/
public final Object
protected final Object
getTreeLock()
{
return(tree_lock);
......@@ -292,7 +292,7 @@ processEvent(AWTEvent event)
public String
toString()
{
return(getClass().getName() + "(" + getName() + ")");
return this.getClass().getName() + "[" + paramString() + "]";
}
/*************************************************************************/
......@@ -303,7 +303,7 @@ toString()
protected String
paramString()
{
return(toString());
return "name=" + getName();
}
// Accessibility API not yet implemented.
......
/* Copyright (C) 1999, 2000 Free Software Foundation
/* MenuContainer.java -- Container for menu items.
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of libjava.
This file is part of GNU Classpath.
This software is copyrighted work licensed under the terms of the
Libjava License. Please consult the file "LIBJAVA_LICENSE" for
details. */
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
package java.awt;
/* Written using "Java Class Libraries", 2nd edition, plus online
* API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
package java.awt;
/**
* This interface is a container for menu components.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface MenuContainer
{
public Font getFont();
/**
* @deprecated
*/
public boolean postEvent(Event evt);
/**
* Returns the font in use by this container.
*
* @return The font in use by this container.
*/
public abstract Font
getFont();
/*************************************************************************/
/**
* Removes the specified menu component from the menu.
*
* @param component The menu component to remove.
*/
public abstract void
remove(MenuComponent component);
/*************************************************************************/
public void remove(MenuComponent comp);
}
/**
* Posts and event to the listeners. This is replaced by
* <code>dispatchEvent</code>.
*
* @param event The event to dispatch.
*
* @deprecated
*/
public abstract boolean
postEvent(Event event);
} // interface MenuContainer
......@@ -437,8 +437,8 @@ processActionEvent(ActionEvent event)
public String
paramString()
{
return(getClass().getName() + "(label+" + label + ",enabled=" + enabled +
",actionCommand=" + actionCommand + ")");
return ("label=" + label + ",enabled=" + enabled +
",actionCommand=" + actionCommand + "," + super.paramString());
}
// Accessibility API not yet implemented.
......
/* Copyright (C) 2000 Free Software Foundation
/* MenuShortcut.java -- A class for menu accelerators
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of libgcj.
This file is part of GNU Classpath.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
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.
package java.awt;
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
import java.awt.event.KeyEvent;
/* Status: Complete, except for hashCode(). Untested. */
package java.awt;
/**
* This class implements a keyboard accelerator for a menu item.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class MenuShortcut implements java.io.Serializable
{
// Fields from the serialization spec. Decalare others "transient".
int key;
boolean usesShift;
public MenuShortcut(int key)
{
this.key = key;
}
public MenuShortcut(int key, boolean useShiftModifier)
{
this.key = key;
this.usesShift = useShiftModifier;
}
public int getKey()
{
return key;
}
public boolean usesShiftModifier()
{
return usesShift;
}
public boolean equals(MenuShortcut ms)
{
return (ms.key == key && ms.usesShift == usesShift);
}
public boolean equals(Object obj)
{
if (obj instanceof MenuShortcut)
{
MenuShortcut ms = (MenuShortcut) obj;
return (ms.key == key && ms.usesShift == usesShift);
}
return false;
}
public int hashCode()
{
// FIXME: find/implement the correct algorithm for this
if (usesShift)
return (2 * key);
else
return key;
}
public String toString()
{
return paramString(); // ?
}
protected String paramString()
{
return KeyEvent.getKeyText(key);
}
/*
* Static Variables
*/
// Serialization Constant
private static final long serialVersionUID = 143448358473180225L;
/*************************************************************************/
/*
* Instance Variables
*/
/**
* @serial The virtual keycode for the shortcut.
*/
private int key;
/**
* @serial <code>true</code> if the shift key was used with this shortcut,
* or <code>false</code> otherwise.
*/
private boolean usesShift;
/*************************************************************************/
/**
* Initializes a new instance of <code>MenuShortcut</code> with the
* specified virtual key value.
*
* @param key The virtual keycode for the shortcut.
*/
public
MenuShortcut(int key)
{
this(key, false);
}
/*************************************************************************/
/**
* Initializes a new instance of <code>MenuShortcut</code> with the
* specified virtual key value and shift setting.
*
* @param key The virtual keycode for the shortcut.
* @param usesShift <code>true</code> if the shift key was pressed,
* <code>false</code> otherwise.
*/
public
MenuShortcut(int key, boolean usesShift)
{
this.key = key;
this.usesShift = usesShift;
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* Returns the virtual keycode for this shortcut.
*
* @return The virtual keycode for this shortcut.
*/
public int
getKey()
{
return(key);
}
/*************************************************************************/
/**
* Returns the shift setting for this shortcut.
*
* @return <code>true</code> if the shift key was pressed, <code>false</code>
* otherwise.
*/
public boolean
usesShiftModifier()
{
return(usesShift);
}
/*************************************************************************/
/**
* Tests this object for equality against the specified object. The two
* objects will be considered equal if and only if the specified object
* is an instance of <code>MenuShortcut</code> and has the same key value
* and shift setting as this object.
*
* @param obj The object to test for equality against.
*
* @return <code>true</code> if the two objects are equal, <code>false</code>
* otherwise.
*/
public boolean
equals(MenuShortcut obj)
{
if (obj == null)
return(false);
if (obj.key != this.key)
return(false);
if (obj.usesShift != this.usesShift)
return(false);
return(true);
}
public boolean
equals(Object obj)
{
if (obj instanceof MenuShortcut)
{
MenuShortcut ms = (MenuShortcut) obj;
return (ms.key == key && ms.usesShift == usesShift);
}
return false;
}
/*************************************************************************/
/**
* Returns a string representation of this shortcut.
*
* @return A string representation of this shortcut.
*/
public String
toString()
{
return(getClass().getName() + "[" + paramString () + "]");
}
public int
hashCode()
{
// Arbitrary.
return key + (usesShift ? 23 : 57);
}
/*************************************************************************/
/**
* Returns a debugging string for this object.
*
* @return A debugging string for this object.
*/
protected String
paramString()
{
return "key=" + key + ",usesShift=" + usesShift;
}
} // class MenuShortcut
/* Copyright (C) 2000 Free Software Foundation
/* Copyright (C) 2000, 2002 Free Software Foundation
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt;
......
/* Copyright (C) 2000 Free Software Foundation
/* Panel.java -- Simple container object.
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt;
import java.awt.peer.PanelPeer;
import java.awt.peer.ContainerPeer;
import java.awt.peer.ComponentPeer;
/* This class is complete to 1.2. */
/**
* A panel is a simple container class.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class Panel extends Container implements java.io.Serializable
{
public class Panel extends Container
/*
* Constructors
*/
/**
* Initializes a new instance of <code>Panel</code> that has a default
* layout manager of <code>FlowLayout</code>.
*/
public
Panel()
{
public Panel()
{
this (new FlowLayout ());
}
public Panel(LayoutManager layout)
{
super();
setLayout (layout);
}
//public AccessibleContext getAccessibleContext()
public void addNotify()
{
if (peer == null)
peer = getToolkit().createPanel(this);
super.addNotify();
}
this(new FlowLayout());
}
/*************************************************************************/
/**
* Initializes a new instance of <code>Panel</code> with the specified
* layout manager.
*
* @param layoutManager The layout manager for this object.
*/
public
Panel(LayoutManager layoutManager)
{
setLayout(layoutManager);
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* Notifies this object to create its native peer.
*/
public void
addNotify()
{
if (peer == null)
peer = getToolkit().createPanel(this);
super.addNotify();
}
} // class Panel
/* Copyright (C) 2000, 2001 Free Software Foundation
/* PopupMenu.java -- An AWT popup menu
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of libjava.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libjava License. Please consult the file "LIBJAVA_LICENSE" for
details. */
package java.awt;
import java.awt.peer.PopupMenuPeer;
import java.awt.peer.MenuPeer;
import java.awt.peer.MenuItemPeer;
import java.awt.peer.MenuComponentPeer;
/**
* This class implement an AWT popup menu widget
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public class PopupMenu extends Menu implements java.io.Serializable
{
/*
* Static Variables
*/
// Serialization Constant
private static final long serialVersionUID = -4620452533522760060L;
/*************************************************************************/
/*
* Constructors
*/
/**
* Initializes a new instance of <code>PopupMenu</code>.
*/
public
PopupMenu()
{
}
/* Status: Incomplete. */
/*************************************************************************/
public class PopupMenu extends Menu
/**
* Initializes a new instance of <code>PopupMenu</code> with the specified
* label.
*
* @param label The label for this popup menu.
*/
public
PopupMenu(String label)
{
public PopupMenu()
{
super();
}
public PopupMenu(String label)
{
super(label);
}
public void addNotify()
{
if (peer != null)
{
// This choice of toolkit seems unsatisfying, but I'm not sure
// what else to do.
peer = Toolkit.getDefaultToolkit ().createPopupMenu (this);
}
super.addNotify ();
}
public void show(Component origin, int x, int y)
{
if (! origin.isShowing ()
// FIXME: or ! parent is showing -- but how?
)
{
// This is an invalid call which we choose to ignore.
return;
}
addNotify (); // FIXME?
Event e = new Event (origin, 0, 0, x, y, 0, 0);
PopupMenuPeer p = (PopupMenuPeer) peer;
p.show (e);
}
// Accessibility API not yet implemented.
// public AccessibleContext getAccessibleContext()
super(label);
}
/*************************************************************************/
/*
* Instance Methods
*/
/**
* Creates this object's native peer.
*/
public void
addNotify()
{
if (peer != null)
peer = getToolkit ().createPopupMenu (this);
super.addNotify ();
}
/*************************************************************************/
/**
* Displays this popup menu at the specified coordinates relative to
* the specified component.
*
* @param component The component to which the display coordinates are relative.
* @param x The X coordinate of the menu.
* @param y The Y coordinate of the menu.
*/
public void
show(Component component, int x, int y)
{
PopupMenuPeer pmp = (PopupMenuPeer)getPeer();
if (pmp != null)
{
/* XXX
Event e = new Event (component, Event.ACTION_EVENT, component);
e.x = x;
e.y = y;*/
pmp.show (component, x, y);
}
}
} // class PopupMenu
/* Copyright (C) 2000 Free Software Foundation
/* ButtonPeer.java -- Peer interface for buttons
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface ButtonPeer extends ComponentPeer
{
void setLabel(String label);
}
public abstract void setLabel(String label);
} // interface ButtonPeer
/* Copyright (C) 2000 Free Software Foundation
/* CanvasPeer.java -- Peer interface for a canvas
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface CanvasPeer extends ComponentPeer
{
}
} // interface CanvasPeer
/* Copyright (C) 2000 Free Software Foundation
/* CheckboxMenuItemPeer.java -- Peer interface for checkbox menu items
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface CheckboxMenuItemPeer extends MenuItemPeer
{
void setState(boolean state);
}
public abstract void setState(boolean state);
} // interface CheckboxMenuItemPeer
/* Copyright (C) 2000 Free Software Foundation
/* CheckboxPeer.java -- Interface for checkbox peer
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface CheckboxPeer extends ComponentPeer
{
void setCheckboxGroup(java.awt.CheckboxGroup group);
void setLabel(String label);
void setState(boolean state);
}
public abstract void setCheckboxGroup(java.awt.CheckboxGroup group);
public abstract void setLabel(String label);
public abstract void setState(boolean state);
} // interface CheckboxPeer
/* Copyright (C) 2000 Free Software Foundation
/* ChoicePeer.java -- Peer for choice box
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface ChoicePeer extends ComponentPeer
{
void add(String item, int index);
void remove(int index);
void select(int index);
}
public abstract void add(String item, int index);
public abstract void addItem(String item, int index);
public abstract void remove(int index);
public abstract void select(int index);
} // interface ChoicePeer
/* Copyright (C) 2000 Free Software Foundation
/* ComponentPeer.java -- Toplevel component peer
Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -13,10 +32,42 @@ import java.awt.image.*;
public interface ComponentPeer
{
int checkImage(Image img, int width, int height, ImageObserver o);
Image createImage(ImageProducer prod);
Image createImage(int width, int height);
void dispose();
public int checkImage(Image img, int width, int height,
ImageObserver ob);
public Image createImage(ImageProducer prod);
public Image createImage(int width, int height);
public void disable();
public void dispose();
public void enable();
public ColorModel getColorModel();
public FontMetrics getFontMetrics(Font f);
public Graphics getGraphics();
public Point getLocationOnScreen();
public Dimension getMinimumSize();
public Dimension getPreferredSize();
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 hide();
public boolean isFocusTraversable();
public Dimension minimumSize();
public Dimension preferredSize();
public void paint(Graphics graphics);
public boolean prepareImage(Image img, int width, int height,
ImageObserver ob);
public void print(Graphics graphics);
public void repaint(long tm, int x, int y, int width, int height);
public void requestFocus();
public void reshape(int x, int y, int width, int height);
public void setBackground(Color color);
public void setBounds(int x, int y, int width, int height);
public void setCursor(Cursor cursor);
public void setEnabled(boolean enabled);
public void setFont(Font font);
public void setForeground(Color color);
public void setVisible(boolean visible);
public void show();
/**
* Get the graphics configuration of the component. The color model
......@@ -24,27 +75,5 @@ public interface ComponentPeer
*/
GraphicsConfiguration getGraphicsConfiguration();
FontMetrics getFontMetrics(Font f);
Graphics getGraphics();
Point getLocationOnScreen();
Dimension getMinimumSize();
Dimension getPreferredSize();
Toolkit getToolkit();
// The JCL says that handleEvent returns boolean. However, we've
// experimentally determined that it in fact actually returns void.
void handleEvent(AWTEvent e);
boolean isFocusTraversable();
void paint(Graphics graphics);
boolean prepareImage(Image img, int width, int height, ImageObserver o);
void print(Graphics graphics);
void repaint(long tm, int x, int y, int width, int height);
void requestFocus();
void setBackground(Color color);
void setBounds(int x, int y, int width, int height);
void setCursor(Cursor cursor);
void setEnabled(boolean enabled);
void setEventMask(long eventMask);
void setFont(Font font);
void setForeground(Color color);
void setVisible(boolean visible);
public void setEventMask (long mask);
}
/* Copyright (C) 2000 Free Software Foundation
/* ContainerPeer.java -- Interface for container peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -12,7 +31,11 @@ import java.awt.Insets;
public interface ContainerPeer extends ComponentPeer
{
Insets getInsets();
void beginValidate();
void endValidate();
}
public abstract Insets insets();
public abstract Insets getInsets();
public abstract void beginValidate();
public abstract void endValidate();
} // interface ContainerPeer
/* Copyright (C) 2000 Free Software Foundation
/* DialogPeer.java -- Interface for dialog box peer
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface DialogPeer extends WindowPeer
{
void setResizable(boolean resizeable);
void setTitle(String title);
}
public abstract void setResizable(boolean resizeable);
public abstract void setTitle(String title);
} // interface DialogPeer
/* Copyright (C) 2000 Free Software Foundation
/* FileDialogPeer.java -- Interface for file selection dialog box peer
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -12,7 +31,10 @@ import java.io.FilenameFilter;
public interface FileDialogPeer extends DialogPeer
{
void setDirectory(String dir);
void setFile(String file);
void setFilenameFilter(FilenameFilter filter);
}
public abstract void setFile(String file);
public abstract void setDirectory(String dir);
public abstract void setFilenameFilter(FilenameFilter ff);
} // interface FileDialogPeer
/* Copyright (C) 2000 Free Software Foundation
/* FontPeer.java -- Interface for font peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface FontPeer
{
}
} // interface FontPeer
/* Copyright (C) 2000 Free Software Foundation
/* FramePeer.java -- Interface for frame peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -13,8 +32,11 @@ import java.awt.MenuBar;
public interface FramePeer extends WindowPeer
{
void setIconImage(Image image);
void setMenuBar(MenuBar mb);
void setResizable(boolean resizable);
void setTitle(String title);
}
public abstract void setIconImage(Image image);
public abstract void setMenuBar(MenuBar mb);
public abstract void setResizable(boolean resizable);
public abstract void setTitle(String title);
} // interface FramePeer
/* Copyright (C) 2000 Free Software Foundation
/* LabelPeer.java -- Interface for simple text lable peer
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface LabelPeer extends ComponentPeer
{
void setAlignment(int alignment);
void setText(String text);
}
public abstract void setAlignment(int alignment);
public abstract void setText(String text);
} // interface LabelPeer
/* Copyright (C) 2000 Free Software Foundation
/* LightweightPeer.java -- Interface for lightweight peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface LightweightPeer extends ComponentPeer
{
}
} // interface LightweightPeer
/* Copyright (C) 2000 Free Software Foundation
/* ListPeer.java -- Interface for list box peer
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -12,12 +31,20 @@ import java.awt.Dimension;
public interface ListPeer extends ComponentPeer
{
void add(String item, int index);
void delItems(int start_index, int end_index);
void deselect(int index);
int[] getSelectedIndexes();
void makeVisible(int index);
void removeAll();
void select(int index);
void setMultipleMode(boolean multipleMode);
}
public abstract void add(String item, int index);
public abstract void addItem(String item, int index);
public abstract void clear();
public abstract void delItems(int start_index, int end_index);
public abstract void deselect(int index);
public abstract int[] getSelectedIndexes();
public abstract void makeVisible(int index);
public abstract Dimension minimumSize(int s);
public abstract Dimension preferredSize(int s);
public abstract void removeAll();
public abstract void select(int index);
public abstract void setMultipleMode(boolean multi);
public abstract void setMultipleSelections(boolean multi);
} // interface ListPeer
/* Copyright (C) 2000 Free Software Foundation
/* MenuBarPeer.java -- Interface for menu bar peer
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -12,7 +31,10 @@ import java.awt.Menu;
public interface MenuBarPeer extends MenuComponentPeer
{
void addHelpMenu(Menu menu);
void add(Menu menu);
void remove(int index);
}
public abstract void addHelpMenu(Menu menu);
public abstract void addMenu(Menu menu);
public abstract void delMenu(int index);
} // interface MenuBarPeer
/* Copyright (C) 2000 Free Software Foundation
/* MenuComponentPeer.java --
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface MenuComponentPeer
{
void dispose();
}
public abstract void dispose();
} // interface MenuComponentPeer
/* Copyright (C) 2000 Free Software Foundation
/* MenuItemPeer.java -- Interface for menu item peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface MenuItemPeer extends MenuComponentPeer
{
void setEnabled(boolean enabled);
void setLabel(String text);
}
public abstract void disable();
public abstract void enable();
public abstract void setEnabled(boolean enabled);
public abstract void setLabel(String text);
} // interface MenuItemPeer
/* Copyright (C) 2000 Free Software Foundation
/* MenuPeer.java -- Interface for menu peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -12,7 +31,8 @@ import java.awt.MenuItem;
public interface MenuPeer extends MenuItemPeer
{
void add(MenuItem item);
void addSeparator();
void remove(int index);
public abstract void addItem (MenuItem item);
public abstract void addSeparator ();
public abstract void delItem (int index);
}
/* Copyright (C) 2000 Free Software Foundation
/* PanelPeer.java -- Interface for panel peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface PanelPeer extends ContainerPeer
{
}
} // interface PanelPeer
/* Copyright (C) 2000 Free Software Foundation
/* PopupMenuPeer.java -- Interface for popup menu peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
This file is part of GNU Classpath.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
package java.awt.peer;
import java.awt.Event;
package java.awt.peer;
import java.awt.Component;
public interface PopupMenuPeer extends MenuPeer
{
void show(Event e);
}
public abstract void show (Component origin, int x, int y);
} // interface PopupMenuPeer
/* Copyright (C) 2000 Free Software Foundation
/* ScrollPanePeer.java -- Interface for scrollable panes
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -12,10 +31,13 @@ import java.awt.Adjustable;
public interface ScrollPanePeer extends ContainerPeer
{
void childResized(int width, int height);
int getHScrollbarHeight();
int getVScrollbarWidth();
void setScrollPosition(int x, int y);
void setUnitIncrement(Adjustable adj, int increment);
void setValue(Adjustable adj, int value);
}
public abstract int getHScrollbarHeight();
public abstract int getVScrollbarWidth();
public abstract void setScrollPosition(int h, int v);
public abstract void childResized(int width, int height);
public abstract void setUnitIncrement(Adjustable item, int inc);
public abstract void setValue(Adjustable item, int value);
} // interface ScollPanePeer
/* Copyright (C) 2000 Free Software Foundation
/* ScrollbarPeer.java -- Interface for scrollbar peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface ScrollbarPeer extends ComponentPeer
{
void setLineIncrement(int increment);
void setPageIncrement(int increment);
void setValues(int value, int visible, int minimum, int maximum);
}
public abstract void setLineIncrement(int inc);
public abstract void setPageIncrement(int inc);
public abstract void setValues(int value, int visible, int min, int max);
} // interface ScrollbarPeer
/* Copyright (C) 2000 Free Software Foundation
/* TextAreaPeer.java -- Interface for text area peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -12,6 +31,14 @@ import java.awt.Dimension;
public interface TextAreaPeer extends TextComponentPeer
{
void insert(String text, int pos);
void replaceRange(String text, int start, int end);
}
public abstract void insert(String text, int pos);
public abstract void insertText(String text, int pos);
public abstract Dimension minimumSize(int rows, int cols);
public abstract Dimension getMinimumSize(int rows, int cols);
public abstract Dimension preferredSize(int rows, int cols);
public abstract Dimension getPreferredSize(int rows, int cols);
public abstract void replaceRange(String text, int start_pos, int end_pos);
public abstract void replaceText(String text, int start_pos, int end_pos);
} // interface TextAreaPeer
/* Copyright (C) 2000 Free Software Foundation
/* TextComponentPeer.java -- Superclass interface for text components
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface TextComponentPeer extends ComponentPeer
{
int getCaretPosition();
int getSelectionEnd();
int getSelectionStart();
String getText();
void select(int start, int end);
void setCaretPosition(int pos);
void setEditable(boolean editable);
void setText(String text);
}
public abstract int getSelectionEnd();
public abstract int getSelectionStart();
public abstract String getText();
public abstract void setText(String text);
public abstract void select(int start_pos, int end_pos);
public abstract void setEditable(boolean editable);
public abstract int getCaretPosition();
public abstract void setCaretPosition(int pos);
} // interface TextComponentPeer
/* Copyright (C) 2000 Free Software Foundation
/* TextFieldPeer.java -- Interface for text field peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
......@@ -12,5 +31,13 @@ import java.awt.Dimension;
public interface TextFieldPeer extends TextComponentPeer
{
void setEchoChar(char echo);
}
public abstract Dimension minimumSize(int len);
public abstract Dimension preferredSize(int len);
public abstract Dimension getMinimumSize(int len);
public abstract Dimension getPreferredSize(int len);
public abstract void setEchoChar(char echo_char);
public abstract void setEchoCharacter(char echo_char);
} // interface TextFieldPeer
/* Copyright (C) 2000 Free Software Foundation
/* WindowPeer.java -- Interface for window peers
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of libgcj.
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.
As a special exception, if you link this library with other files to
produce an executable, this library does not by itself cause the
resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why the
executable file might be covered by the GNU General Public License. */
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package java.awt.peer;
public interface WindowPeer extends ContainerPeer
{
void toBack();
void toFront();
}
public abstract void toBack();
public abstract void toFront();
} // 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