public interface

ComponentPeer

java.awt.peer.ComponentPeer
Known Indirect Subclasses

Class Overview

The peer interfaces are intended only for use in porting the AWT. They are not intended for use by application developers, and developers should not implement peers nor invoke any of the peer methods directly on the peer instances.

Summary

Constants
int DEFAULT_OPERATION
int NO_EMBEDDED_CHECK
int RESET_OPERATION
int SET_BOUNDS
int SET_CLIENT_SIZE
int SET_LOCATION
int SET_SIZE
Public Methods
abstract void applyShape(Region shape)
Applies the shape to the native component window.
abstract boolean canDetermineObscurity()
abstract int checkImage(Image img, int w, int h, ImageObserver o)
abstract void coalescePaintEvent(PaintEvent e)
abstract void createBuffers(int numBuffers, BufferCapabilities caps)
abstract Image createImage(ImageProducer producer)
abstract Image createImage(int width, int height)
abstract VolatileImage createVolatileImage(int width, int height)
abstract void destroyBuffers()
abstract void disable()
DEPRECATED: Replaced by setEnabled(boolean).
abstract void dispose()
abstract void enable()
DEPRECATED: Replaced by setEnabled(boolean).
abstract void flip(BufferCapabilities.FlipContents flipAction)
abstract Image getBackBuffer()
abstract Rectangle getBounds()
abstract ColorModel getColorModel()
abstract FontMetrics getFontMetrics(Font font)
abstract Graphics getGraphics()
abstract GraphicsConfiguration getGraphicsConfiguration()
abstract Point getLocationOnScreen()
abstract Dimension getMinimumSize()
abstract Dimension getPreferredSize()
abstract Toolkit getToolkit()
abstract void handleEvent(AWTEvent e)
abstract boolean handlesWheelScrolling()
abstract void hide()
DEPRECATED: Replaced by setVisible(boolean).
abstract boolean isFocusable()
abstract boolean isObscured()
abstract boolean isReparentSupported()
Returns whether this peer supports reparenting to another parent withour destroying the peer
abstract void layout()
Used by lightweight implementations to tell a ComponentPeer to layout its sub-elements.
abstract Dimension minimumSize()
DEPRECATED: Replaced by getMinimumSize().
abstract void paint(Graphics g)
abstract Dimension preferredSize()
DEPRECATED: Replaced by getPreferredSize().
abstract boolean prepareImage(Image img, int w, int h, ImageObserver o)
abstract void print(Graphics g)
abstract void repaint(long tm, int x, int y, int width, int height)
abstract void reparent(ContainerPeer newContainer)
Reparents this peer to the new parent referenced by newContainer peer Implementation depends on toolkit and container.
abstract boolean requestFocus(Component lightweightChild, boolean temporary, boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)
abstract void reshape(int x, int y, int width, int height)
DEPRECATED: Replaced by setBounds(int, int, int, int).
abstract void setBackground(Color c)
abstract void setBounds(int x, int y, int width, int height, int op)
abstract void setEnabled(boolean b)
abstract void setFont(Font f)
abstract void setForeground(Color c)
abstract void setVisible(boolean b)
abstract void show()
DEPRECATED: Replaced by setVisible(boolean).
abstract void updateCursorImmediately()

Constants

public static final int DEFAULT_OPERATION

Constant Value: 3 (0x00000003)

public static final int NO_EMBEDDED_CHECK

Constant Value: 16384 (0x00004000)

public static final int RESET_OPERATION

Constant Value: 5 (0x00000005)

public static final int SET_BOUNDS

Constant Value: 3 (0x00000003)

public static final int SET_CLIENT_SIZE

Constant Value: 4 (0x00000004)

public static final int SET_LOCATION

Constant Value: 1 (0x00000001)

public static final int SET_SIZE

Constant Value: 2 (0x00000002)

Public Methods

public abstract void applyShape (Region shape)

Applies the shape to the native component window.

public abstract boolean canDetermineObscurity ()

public abstract int checkImage (Image img, int w, int h, ImageObserver o)

public abstract void coalescePaintEvent (PaintEvent e)

public abstract void createBuffers (int numBuffers, BufferCapabilities caps)

Throws
AWTException

public abstract Image createImage (ImageProducer producer)

public abstract Image createImage (int width, int height)

public abstract VolatileImage createVolatileImage (int width, int height)

public abstract void destroyBuffers ()

public abstract void disable ()

DEPRECATED: Replaced by setEnabled(boolean).

public abstract void dispose ()

public abstract void enable ()

DEPRECATED: Replaced by setEnabled(boolean).

public abstract void flip (BufferCapabilities.FlipContents flipAction)

public abstract Image getBackBuffer ()

public abstract Rectangle getBounds ()

public abstract ColorModel getColorModel ()

public abstract FontMetrics getFontMetrics (Font font)

public abstract Graphics getGraphics ()

public abstract GraphicsConfiguration getGraphicsConfiguration ()

public abstract Point getLocationOnScreen ()

public abstract Dimension getMinimumSize ()

public abstract Dimension getPreferredSize ()

public abstract Toolkit getToolkit ()

public abstract void handleEvent (AWTEvent e)

public abstract boolean handlesWheelScrolling ()

public abstract void hide ()

DEPRECATED: Replaced by setVisible(boolean).

public abstract boolean isFocusable ()

public abstract boolean isObscured ()

public abstract boolean isReparentSupported ()

Returns whether this peer supports reparenting to another parent withour destroying the peer

Returns
  • true if appropriate reparent is supported, false otherwise

public abstract void layout ()

Used by lightweight implementations to tell a ComponentPeer to layout its sub-elements. For instance, a lightweight Checkbox needs to layout the box, as well as the text label.

public abstract Dimension minimumSize ()

DEPRECATED: Replaced by getMinimumSize().

public abstract void paint (Graphics g)

public abstract Dimension preferredSize ()

DEPRECATED: Replaced by getPreferredSize().

public abstract boolean prepareImage (Image img, int w, int h, ImageObserver o)

public abstract void print (Graphics g)

public abstract void repaint (long tm, int x, int y, int width, int height)

public abstract void reparent (ContainerPeer newContainer)

Reparents this peer to the new parent referenced by newContainer peer Implementation depends on toolkit and container.

Parameters
newContainer peer of the new parent container

public abstract boolean requestFocus (Component lightweightChild, boolean temporary, boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)

public abstract void reshape (int x, int y, int width, int height)

DEPRECATED: Replaced by setBounds(int, int, int, int).

public abstract void setBackground (Color c)

public abstract void setBounds (int x, int y, int width, int height, int op)

public abstract void setEnabled (boolean b)

public abstract void setFont (Font f)

public abstract void setForeground (Color c)

public abstract void setVisible (boolean b)

public abstract void show ()

DEPRECATED: Replaced by setVisible(boolean).

public abstract void updateCursorImmediately ()