OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [libjava/] [classpath/] [java/] [awt/] [peer/] [ComponentPeer.java] - Diff between revs 771 and 783

Only display areas with differences | Details | Blame | View Log

Rev 771 Rev 783
/* ComponentPeer.java -- Toplevel component peer
/* ComponentPeer.java -- Toplevel component peer
   Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
   Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
 
 
This file is part of GNU Classpath.
This file is part of GNU Classpath.
 
 
GNU Classpath is free software; you can redistribute it and/or modify
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
the Free Software Foundation; either version 2, or (at your option)
any later version.
any later version.
 
 
GNU Classpath is distributed in the hope that it will be useful, but
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.
General Public License for more details.
 
 
You should have received a copy of the GNU General Public License
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
along with GNU Classpath; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
02110-1301 USA.
 
 
Linking this library statically or dynamically with other modules is
Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
conditions of the GNU General Public License cover the whole
combination.
combination.
 
 
As a special exception, the copyright holders of this library give you
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
independent module, the terms and conditions of the license of that
module.  An independent module is a module which is not derived from
module.  An independent module is a module which is not derived from
or based on this library.  If you modify this library, you may extend
or based on this library.  If you modify this library, you may extend
this exception to your version of the library, but you are not
this exception to your version of the library, but you are not
obligated to do so.  If you do not wish to do so, delete this
obligated to do so.  If you do not wish to do so, delete this
exception statement from your version. */
exception statement from your version. */
 
 
 
 
package java.awt.peer;
package java.awt.peer;
 
 
import java.awt.AWTEvent;
import java.awt.AWTEvent;
import java.awt.AWTException;
import java.awt.AWTException;
import java.awt.BufferCapabilities;
import java.awt.BufferCapabilities;
import java.awt.Color;
import java.awt.Color;
import java.awt.Component;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Image;
import java.awt.Point;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.Toolkit;
import java.awt.event.PaintEvent;
import java.awt.event.PaintEvent;
import java.awt.image.ColorModel;
import java.awt.image.ColorModel;
import java.awt.image.ImageObserver;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.awt.image.ImageProducer;
import java.awt.image.VolatileImage;
import java.awt.image.VolatileImage;
 
 
import sun.awt.CausedFocusEvent;
import sun.awt.CausedFocusEvent;
 
 
/**
/**
 * Defines the methods that a component peer is required to implement.
 * Defines the methods that a component peer is required to implement.
 */
 */
public interface ComponentPeer
public interface ComponentPeer
{
{
  /**
  /**
   * Returns the construction status of the specified image. This is called
   * Returns the construction status of the specified image. This is called
   * by {@link Component#checkImage(Image, int, int, ImageObserver)}.
   * by {@link Component#checkImage(Image, int, int, ImageObserver)}.
   *
   *
   * @param img the image
   * @param img the image
   * @param width the width of the image
   * @param width the width of the image
   * @param height the height of the image
   * @param height the height of the image
   * @param ob the image observer to be notified of updates of the status
   * @param ob the image observer to be notified of updates of the status
   *
   *
   * @return a bitwise ORed set of ImageObserver flags
   * @return a bitwise ORed set of ImageObserver flags
   */
   */
  int checkImage(Image img, int width, int height,
  int checkImage(Image img, int width, int height,
                 ImageObserver ob);
                 ImageObserver ob);
 
 
  /**
  /**
   * Creates an image by starting the specified image producer. This is called
   * Creates an image by starting the specified image producer. This is called
   * by {@link Component#createImage(ImageProducer)}.
   * by {@link Component#createImage(ImageProducer)}.
   *
   *
   * @param prod the image producer to be used to create the image
   * @param prod the image producer to be used to create the image
   *
   *
   * @return the created image
   * @return the created image
   */
   */
  Image createImage(ImageProducer prod);
  Image createImage(ImageProducer prod);
 
 
  /**
  /**
   * Creates an empty image with the specified <code>width</code> and
   * Creates an empty image with the specified <code>width</code> and
   * <code>height</code>.
   * <code>height</code>.
   *
   *
   * @param width the width of the image to be created
   * @param width the width of the image to be created
   * @param height the height of the image to be created
   * @param height the height of the image to be created
   *
   *
   * @return the created image
   * @return the created image
   */
   */
  Image createImage(int width, int height);
  Image createImage(int width, int height);
 
 
  /**
  /**
   * Disables the component. This is called by {@link Component#disable()}.
   * Disables the component. This is called by {@link Component#disable()}.
   */
   */
  void disable();
  void disable();
 
 
  /**
  /**
   * Disposes the component peer. This should release all resources held by the
   * Disposes the component peer. This should release all resources held by the
   * peer. This is called when the component is no longer in use.
   * peer. This is called when the component is no longer in use.
   */
   */
  void dispose();
  void dispose();
 
 
  /**
  /**
   * Enables the component. This is called by {@link Component#enable()}.
   * Enables the component. This is called by {@link Component#enable()}.
   */
   */
  void enable();
  void enable();
 
 
  /**
  /**
   * Returns the color model of the component. This is currently not used.
   * Returns the color model of the component. This is currently not used.
   *
   *
   * @return the color model of the component
   * @return the color model of the component
   */
   */
  ColorModel getColorModel();
  ColorModel getColorModel();
 
 
  /**
  /**
   * Returns the font metrics for the specified font. This is called by
   * Returns the font metrics for the specified font. This is called by
   * {@link Component#getFontMetrics(Font)}.
   * {@link Component#getFontMetrics(Font)}.
   *
   *
   * @param f the font for which to query the font metrics
   * @param f the font for which to query the font metrics
   *
   *
   * @return the font metrics for the specified font
   * @return the font metrics for the specified font
   */
   */
  FontMetrics getFontMetrics(Font f);
  FontMetrics getFontMetrics(Font f);
 
 
  /**
  /**
   * Returns a {@link Graphics} object suitable for drawing on this component.
   * Returns a {@link Graphics} object suitable for drawing on this component.
   * This is called by {@link Component#getGraphics()}.
   * This is called by {@link Component#getGraphics()}.
   *
   *
   * @return a graphics object suitable for drawing on this component
   * @return a graphics object suitable for drawing on this component
   */
   */
  Graphics getGraphics();
  Graphics getGraphics();
 
 
  /**
  /**
   * Returns the location of this component in screen coordinates. This is
   * Returns the location of this component in screen coordinates. This is
   * called by {@link Component#getLocationOnScreen()}.
   * called by {@link Component#getLocationOnScreen()}.
   *
   *
   * @return the location of this component in screen coordinates
   * @return the location of this component in screen coordinates
   */
   */
  Point getLocationOnScreen();
  Point getLocationOnScreen();
 
 
  /**
  /**
   * Returns the minimum size for the component. This is called by
   * Returns the minimum size for the component. This is called by
   * {@link Component#getMinimumSize()}.
   * {@link Component#getMinimumSize()}.
   *
   *
   * @return the minimum size for the component
   * @return the minimum size for the component
   *
   *
   * @specnote Presumably this method got added to replace minimumSize().
   * @specnote Presumably this method got added to replace minimumSize().
   *           However, testing shows that this is never called in the RI
   *           However, testing shows that this is never called in the RI
   *           (tested with JDK5), but instead minimumSize() is called
   *           (tested with JDK5), but instead minimumSize() is called
   *           directly. It is advisable to implement this method to delegate
   *           directly. It is advisable to implement this method to delegate
   *           to minimumSize() and put the real implementation in there.
   *           to minimumSize() and put the real implementation in there.
   */
   */
  Dimension getMinimumSize();
  Dimension getMinimumSize();
 
 
  /**
  /**
   * Returns the preferred size for the component. This is called by
   * Returns the preferred size for the component. This is called by
   * {@link Component#getPreferredSize()}.
   * {@link Component#getPreferredSize()}.
   *
   *
   * @return the preferred size for the component
   * @return the preferred size for the component
   *
   *
   * @specnote Presumably this method got added to replace preferredSize().
   * @specnote Presumably this method got added to replace preferredSize().
   *           However, testing shows that this is never called in the RI
   *           However, testing shows that this is never called in the RI
   *           (tested with JDK5), but instead preferredSize() is called
   *           (tested with JDK5), but instead preferredSize() is called
   *           directly. It is advisable to implement this method to delegate
   *           directly. It is advisable to implement this method to delegate
   *           to preferredSize() and put the real implementation in there.
   *           to preferredSize() and put the real implementation in there.
   */
   */
  Dimension getPreferredSize();
  Dimension getPreferredSize();
 
 
  /**
  /**
   * Returns the toolkit that created this peer.
   * Returns the toolkit that created this peer.
   *
   *
   * @return the toolkit that created this peer
   * @return the toolkit that created this peer
   */
   */
  Toolkit getToolkit();
  Toolkit getToolkit();
 
 
  /**
  /**
   * Handles the given event. This is called from
   * Handles the given event. This is called from
   * {@link Component#dispatchEvent(AWTEvent)} to give the peer a chance to
   * {@link Component#dispatchEvent(AWTEvent)} to give the peer a chance to
   * react to events for the component.
   * react to events for the component.
   *
   *
   * @param e the event
   * @param e the event
   */
   */
  void handleEvent(AWTEvent e);
  void handleEvent(AWTEvent e);
 
 
  /**
  /**
   * Makes the component invisible. This is called from
   * Makes the component invisible. This is called from
   * {@link Component#hide()}.
   * {@link Component#hide()}.
   */
   */
  void hide();
  void hide();
 
 
  /**
  /**
   * Returns <code>true</code> if the component can receive keyboard input
   * Returns <code>true</code> if the component can receive keyboard input
   * focus. This is called from {@link Component#isFocusTraversable()}.
   * focus. This is called from {@link Component#isFocusTraversable()}.
   *
   *
   * @specnote Part of the earlier 1.1 API, replaced by isFocusable().
   * @specnote Part of the earlier 1.1 API, replaced by isFocusable().
   */
   */
  boolean isFocusTraversable();
  boolean isFocusTraversable();
 
 
  /**
  /**
   * Returns <code>true</code> if the component can receive keyboard input
   * Returns <code>true</code> if the component can receive keyboard input
   * focus. This is called from {@link Component#isFocusable()}.
   * focus. This is called from {@link Component#isFocusable()}.
   */
   */
  boolean isFocusable();
  boolean isFocusable();
 
 
  /**
  /**
   * Returns the minimum size for the component. This is called by
   * Returns the minimum size for the component. This is called by
   * {@link Component#minimumSize()}.
   * {@link Component#minimumSize()}.
   *
   *
   * @return the minimum size for the component
   * @return the minimum size for the component
   */
   */
  Dimension minimumSize();
  Dimension minimumSize();
 
 
  /**
  /**
   * Returns the preferred size for the component. This is called by
   * Returns the preferred size for the component. This is called by
   * {@link Component#getPreferredSize()}.
   * {@link Component#getPreferredSize()}.
   *
   *
   * @return the preferred size for the component
   * @return the preferred size for the component
   */
   */
  Dimension preferredSize();
  Dimension preferredSize();
 
 
  void paint(Graphics graphics);
  void paint(Graphics graphics);
 
 
  /**
  /**
   * Prepares an image for rendering on this component. This is called by
   * Prepares an image for rendering on this component. This is called by
   * {@link Component#prepareImage(Image, int, int, ImageObserver)}.
   * {@link Component#prepareImage(Image, int, int, ImageObserver)}.
   *
   *
   * @param img the image to prepare
   * @param img the image to prepare
   * @param width the desired width of the rendered image
   * @param width the desired width of the rendered image
   * @param height the desired height of the rendered image
   * @param height the desired height of the rendered image
   * @param ob the image observer to be notified of updates in the preparation
   * @param ob the image observer to be notified of updates in the preparation
   *        process
   *        process
   *
   *
   * @return <code>true</code> if the image has been fully prepared,
   * @return <code>true</code> if the image has been fully prepared,
   *         <code>false</code> otherwise (in which case the image observer
   *         <code>false</code> otherwise (in which case the image observer
   *         receives updates)
   *         receives updates)
   */
   */
  boolean prepareImage(Image img, int width, int height,
  boolean prepareImage(Image img, int width, int height,
                              ImageObserver ob);
                              ImageObserver ob);
 
 
  void print(Graphics graphics);
  void print(Graphics graphics);
 
 
  /**
  /**
   * Repaints the specified rectangle of this component. This is called from
   * Repaints the specified rectangle of this component. This is called from
   * {@link Component#repaint(long, int, int, int, int)}.
   * {@link Component#repaint(long, int, int, int, int)}.
   *
   *
   * @param tm number of milliseconds to wait with repainting
   * @param tm number of milliseconds to wait with repainting
   * @param x the X coordinate of the upper left corner of the damaged rectangle
   * @param x the X coordinate of the upper left corner of the damaged rectangle
   * @param y the Y coordinate of the upper left corner of the damaged rectangle
   * @param y the Y coordinate of the upper left corner of the damaged rectangle
   * @param width the width of the damaged rectangle
   * @param width the width of the damaged rectangle
   * @param height the height of the damaged rectangle
   * @param height the height of the damaged rectangle
   */
   */
  void repaint(long tm, int x, int y, int width, int height);
  void repaint(long tm, int x, int y, int width, int height);
 
 
  /**
  /**
   * Requests that this component receives the focus. This is called from
   * Requests that this component receives the focus. This is called from
   * {@link Component#requestFocus()}.
   * {@link Component#requestFocus()}.
   *
   *
   * @specnote Part of the earlier 1.1 API, apparently replaced by argument
   * @specnote Part of the earlier 1.1 API, apparently replaced by argument
   *           form of the same method.
   *           form of the same method.
   */
   */
  void requestFocus();
  void requestFocus();
 
 
  /**
  /**
   * Requests that this component receives the focus. This is called from
   * Requests that this component receives the focus. This is called from
   * {@link Component#requestFocus()}.
   * {@link Component#requestFocus()}.
   *
   *
   * This method is only called for heavyweight component's peers. Lightweight
   * This method is only called for heavyweight component's peers. Lightweight
   * components ask their nearest heavyweight component to request focus.
   * components ask their nearest heavyweight component to request focus.
   * It's up to the heavyweight peer to decide if any of it's lightweight
   * It's up to the heavyweight peer to decide if any of it's lightweight
   * descendants are allowed to receive keyboard input focus or not. If the
   * descendants are allowed to receive keyboard input focus or not. If the
   * focus request is finally approved, then the peer must post a FOCUS_GAINED
   * focus request is finally approved, then the peer must post a FOCUS_GAINED
   * event for the requested component.
   * event for the requested component.
   *
   *
   * @param request the component for which the focus is requested
   * @param request the component for which the focus is requested
   * @param temporary indicates if the focus change is temporary (true) or
   * @param temporary indicates if the focus change is temporary (true) or
   *        permanent (false)
   *        permanent (false)
   * @param allowWindowFocus indicates if it's allowed to change window focus
   * @param allowWindowFocus indicates if it's allowed to change window focus
   * @param time the timestamp
   * @param time the timestamp
   */
   */
  boolean requestFocus(Component request, boolean temporary,
  boolean requestFocus(Component request, boolean temporary,
                       boolean allowWindowFocus, long time);
                       boolean allowWindowFocus, long time);
 
 
  /**
  /**
   * Notifies the peer that the bounds of this component have changed. This
   * Notifies the peer that the bounds of this component have changed. This
   * is called by {@link Component#reshape(int, int, int, int)}.
   * is called by {@link Component#reshape(int, int, int, int)}.
   *
   *
   * @param x the X coordinate of the upper left corner of the component
   * @param x the X coordinate of the upper left corner of the component
   * @param y the Y coordinate of the upper left corner of the component
   * @param y the Y coordinate of the upper left corner of the component
   * @param width the width of the component
   * @param width the width of the component
   * @param height the height of the component
   * @param height the height of the component
   */
   */
  void reshape(int x, int y, int width, int height);
  void reshape(int x, int y, int width, int height);
 
 
  /**
  /**
   * Sets the background color of the component. This is called by
   * Sets the background color of the component. This is called by
   * {@link Component#setBackground(Color)}.
   * {@link Component#setBackground(Color)}.
   *
   *
   * @param color the background color to set
   * @param color the background color to set
   */
   */
  void setBackground(Color color);
  void setBackground(Color color);
 
 
  /**
  /**
   * Notifies the peer that the bounds of this component have changed. This
   * Notifies the peer that the bounds of this component have changed. This
   * is called by {@link Component#setBounds(int, int, int, int)}.
   * is called by {@link Component#setBounds(int, int, int, int)}.
   *
   *
   * @param x the X coordinate of the upper left corner of the component
   * @param x the X coordinate of the upper left corner of the component
   * @param y the Y coordinate of the upper left corner of the component
   * @param y the Y coordinate of the upper left corner of the component
   * @param width the width of the component
   * @param width the width of the component
   * @param height the height of the component
   * @param height the height of the component
   */
   */
  void setBounds(int x, int y, int width, int height);
  void setBounds(int x, int y, int width, int height);
 
 
  /**
  /**
   * Sets the cursor of the component. This is called by
   * Sets the cursor of the component. This is called by
   * {@link Component#setCursor(Cursor)}.
   * {@link Component#setCursor(Cursor)}.
   *
   *
   * @specnote Part of the earlier 1.1 API, apparently no longer needed.
   * @specnote Part of the earlier 1.1 API, apparently no longer needed.
   */
   */
  void setCursor(Cursor cursor);
  void setCursor(Cursor cursor);
 
 
  /**
  /**
   * Sets the enabled/disabled state of this component. This is called by
   * Sets the enabled/disabled state of this component. This is called by
   * {@link Component#setEnabled(boolean)}.
   * {@link Component#setEnabled(boolean)}.
   *
   *
   * @param enabled <code>true</code> to enable the component,
   * @param enabled <code>true</code> to enable the component,
   *        <code>false</code> to disable it
   *        <code>false</code> to disable it
   */
   */
  void setEnabled(boolean enabled);
  void setEnabled(boolean enabled);
 
 
  /**
  /**
   * Sets the font of the component. This is called by
   * Sets the font of the component. This is called by
   * {@link Component#setFont(Font)}.
   * {@link Component#setFont(Font)}.
   *
   *
   * @param font the font to set
   * @param font the font to set
   */
   */
  void setFont(Font font);
  void setFont(Font font);
 
 
  /**
  /**
   * Sets the foreground color of the component. This is called by
   * Sets the foreground color of the component. This is called by
   * {@link Component#setForeground(Color)}.
   * {@link Component#setForeground(Color)}.
   *
   *
   * @param color the foreground color to set
   * @param color the foreground color to set
   */
   */
  void setForeground(Color color);
  void setForeground(Color color);
 
 
  /**
  /**
   * Sets the visibility state of the component. This is called by
   * Sets the visibility state of the component. This is called by
   * {@link Component#setVisible(boolean)}.
   * {@link Component#setVisible(boolean)}.
   *
   *
   * @param visible <code>true</code> to make the component visible,
   * @param visible <code>true</code> to make the component visible,
   *        <code>false</code> to make it invisible
   *        <code>false</code> to make it invisible
   */
   */
  void setVisible(boolean visible);
  void setVisible(boolean visible);
 
 
  /**
  /**
   * Makes the component visible. This is called by {@link Component#show()}.
   * Makes the component visible. This is called by {@link Component#show()}.
   */
   */
  void show();
  void show();
 
 
  /**
  /**
   * Get the graphics configuration of the component. The color model
   * Get the graphics configuration of the component. The color model
   * of the component can be derived from the configuration.
   * of the component can be derived from the configuration.
   *
   *
   * @return the graphics configuration of the component
   * @return the graphics configuration of the component
   */
   */
  GraphicsConfiguration getGraphicsConfiguration();
  GraphicsConfiguration getGraphicsConfiguration();
 
 
  /**
  /**
   * Part of an older API, no longer needed.
   * Part of an older API, no longer needed.
   */
   */
  void setEventMask(long mask);
  void setEventMask(long mask);
 
 
  /**
  /**
   * Returns <code>true</code> if this component has been obscured,
   * Returns <code>true</code> if this component has been obscured,
   * <code>false</code> otherwise. This will only work if
   * <code>false</code> otherwise. This will only work if
   * {@link #canDetermineObscurity()} also returns <code>true</code>.
   * {@link #canDetermineObscurity()} also returns <code>true</code>.
   *
   *
   * @return <code>true</code> if this component has been obscured,
   * @return <code>true</code> if this component has been obscured,
   *         <code>false</code> otherwise.
   *         <code>false</code> otherwise.
   */
   */
  boolean isObscured();
  boolean isObscured();
 
 
  /**
  /**
   * Returns <code>true</code> if this component peer can determine if the
   * Returns <code>true</code> if this component peer can determine if the
   * component has been obscured, <code>false</code> otherwise.
   * component has been obscured, <code>false</code> otherwise.
   *
   *
   * @return <code>true</code> if this component peer can determine if the
   * @return <code>true</code> if this component peer can determine if the
   *         component has been obscured, <code>false</code> otherwise
   *         component has been obscured, <code>false</code> otherwise
   */
   */
  boolean canDetermineObscurity();
  boolean canDetermineObscurity();
 
 
  /**
  /**
   * Coalesces the specified paint event.
   * Coalesces the specified paint event.
   *
   *
   * @param e the paint event
   * @param e the paint event
   */
   */
  void coalescePaintEvent(PaintEvent e);
  void coalescePaintEvent(PaintEvent e);
 
 
  /**
  /**
   * Updates the cursor.
   * Updates the cursor.
   */
   */
  void updateCursorImmediately();
  void updateCursorImmediately();
 
 
  /**
  /**
   * Returns true, if this component can handle wheel scrolling,
   * Returns true, if this component can handle wheel scrolling,
   * <code>false</code> otherwise.
   * <code>false</code> otherwise.
   *
   *
   * @return true, if this component can handle wheel scrolling,
   * @return true, if this component can handle wheel scrolling,
   *         <code>false</code> otherwise
   *         <code>false</code> otherwise
   */
   */
  boolean handlesWheelScrolling();
  boolean handlesWheelScrolling();
 
 
  /**
  /**
   * A convenience method that creates a volatile image.  The volatile
   * A convenience method that creates a volatile image.  The volatile
   * image is created on the screen device on which this component is
   * image is created on the screen device on which this component is
   * displayed, in the device's current graphics configuration.
   * displayed, in the device's current graphics configuration.
   *
   *
   * @param width width of the image
   * @param width width of the image
   * @param height height of the image
   * @param height height of the image
   *
   *
   * @see VolatileImage
   * @see VolatileImage
   *
   *
   * @since 1.2
   * @since 1.2
   */
   */
  VolatileImage createVolatileImage(int width, int height);
  VolatileImage createVolatileImage(int width, int height);
 
 
  /**
  /**
   * Create a number of image buffers that implement a buffering
   * Create a number of image buffers that implement a buffering
   * strategy according to the given capabilities.
   * strategy according to the given capabilities.
   *
   *
   * @param numBuffers the number of buffers
   * @param numBuffers the number of buffers
   * @param caps the buffering capabilities
   * @param caps the buffering capabilities
   *
   *
   * @throws AWTException if the specified buffering strategy is not
   * @throws AWTException if the specified buffering strategy is not
   * implemented
   * implemented
   *
   *
   * @since 1.2
   * @since 1.2
   */
   */
  void createBuffers(int numBuffers, BufferCapabilities caps)
  void createBuffers(int numBuffers, BufferCapabilities caps)
    throws AWTException;
    throws AWTException;
 
 
  /**
  /**
   * Return the back buffer of this component.
   * Return the back buffer of this component.
   *
   *
   * @return the back buffer of this component.
   * @return the back buffer of this component.
   *
   *
   * @since 1.2
   * @since 1.2
   */
   */
  Image getBackBuffer();
  Image getBackBuffer();
 
 
  /**
  /**
   * Perform a page flip, leaving the contents of the back buffer in
   * Perform a page flip, leaving the contents of the back buffer in
   * the specified state.
   * the specified state.
   *
   *
   * @param contents the state in which to leave the back buffer
   * @param contents the state in which to leave the back buffer
   *
   *
   * @since 1.2
   * @since 1.2
   */
   */
  void flip(BufferCapabilities.FlipContents contents);
  void flip(BufferCapabilities.FlipContents contents);
 
 
  /**
  /**
   * Destroy the resources created by createBuffers.
   * Destroy the resources created by createBuffers.
   *
   *
   * @since 1.2
   * @since 1.2
   */
   */
  void destroyBuffers();
  void destroyBuffers();
 
 
  /**
  /**
   * Get the bounds of this component peer.
   * Get the bounds of this component peer.
   *
   *
   * @return component peer bounds
   * @return component peer bounds
   * @since 1.5
   * @since 1.5
   */
   */
  Rectangle getBounds();
  Rectangle getBounds();
 
 
  /**
  /**
   * Reparent this component under another container.
   * Reparent this component under another container.
   *
   *
   * @param parent
   * @param parent
   * @since 1.5
   * @since 1.5
   */
   */
  void reparent(ContainerPeer parent);
  void reparent(ContainerPeer parent);
 
 
  /**
  /**
   * Set the bounds of this component peer.
   * Set the bounds of this component peer.
   *
   *
   * @param x the new x co-ordinate
   * @param x the new x co-ordinate
   * @param y the new y co-ordinate
   * @param y the new y co-ordinate
   * @param width the new width
   * @param width the new width
   * @param height the new height
   * @param height the new height
   * @param z the new stacking level
   * @param z the new stacking level
   * @since 1.5
   * @since 1.5
   */
   */
  void setBounds (int x, int y, int width, int height, int z);
  void setBounds (int x, int y, int width, int height, int z);
 
 
  /**
  /**
   * Check if this component supports being reparented.
   * Check if this component supports being reparented.
   *
   *
   * @return true if this component can be reparented,
   * @return true if this component can be reparented,
   * false otherwise.
   * false otherwise.
   * @since 1.5
   * @since 1.5
   */
   */
  boolean isReparentSupported();
  boolean isReparentSupported();
 
 
  /**
  /**
   * Layout this component peer.
   * Layout this component peer.
   *
   *
   * @since 1.5
   * @since 1.5
   */
   */
  void layout();
  void layout();
 
 
 
 
  /**
  /**
   * Requests the focus on the component.
   * Requests the focus on the component.
   */
   */
  boolean requestFocus(Component lightweightChild, boolean temporary,
  boolean requestFocus(Component lightweightChild, boolean temporary,
                       boolean focusedWindowChangeAllowed, long time,
                       boolean focusedWindowChangeAllowed, long time,
                       CausedFocusEvent.Cause cause);
                       CausedFocusEvent.Cause cause);
 
 
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.