This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


java.awt.peer
interface ComponentPeer

All Known Subinterfaces:
ButtonPeer, CanvasPeer, CheckboxPeer, ChoicePeer, ContainerPeer, LabelPeer, LightweightPeer, ListPeer, ScrollbarPeer, TextComponentPeer, PanelPeer, ScrollPanePeer, WindowPeer, TextAreaPeer, TextFieldPeer, DialogPeer, FramePeer, FileDialogPeer

public interface ComponentPeer

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.


Field Summary
static int DEFAULT_OPERATION
          
static int NO_EMBEDDED_CHECK
          
static int RESET_OPERATION
          
static int SET_BOUNDS
          
static int SET_CLIENT_SIZE
          
static int SET_LOCATION
          
static int SET_SIZE
          
 
Method Summary
 boolean

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

          
 void

          
 void
createBuffers(int numBuffers, BufferCapabilities caps)

          
 Image

          
 Image
createImage(int width, int height)

          
 VolatileImage
createVolatileImage(int width, int height)

          
 void

          
 void

          DEPRECATED: Replaced by setEnabled(boolean).
 void

          
 void

          DEPRECATED: Replaced by setEnabled(boolean).
 void

          
 Image

          
 Rectangle

          
 ColorModel

          
 FontMetrics

          
 Graphics

          
 GraphicsConfiguration

          
 Point

          
 Dimension

          
 Dimension

          
 Toolkit

          
 void

          
 boolean

          
 void

          DEPRECATED: Replaced by setVisible(boolean).
 boolean

          
 boolean

          
 boolean

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

          Used by lightweight implementations to tell a ComponentPeer to layout its sub-elements.
 Dimension

          DEPRECATED: Replaced by getMinimumSize().
 void

          
 Dimension

          DEPRECATED: Replaced by getPreferredSize().
 boolean
prepareImage(Image img, int w, int h, ImageObserver o)

          
 void

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

          
 void
reparent(ContainerPeer newContainer)

          Reparents this peer to the new parent referenced by newContainer peer Implementation depends on toolkit and container.
 boolean
requestFocus(Component lightweightChild, boolean temporary, boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)

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

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

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

          
 void
setEnabled(boolean b)

          
 void

          
 void

          
 void
setVisible(boolean b)

          
 void

          DEPRECATED: Replaced by setVisible(boolean).
 void

          
 

Field Detail

DEFAULT_OPERATION

public static final int DEFAULT_OPERATION

NO_EMBEDDED_CHECK

public static final int NO_EMBEDDED_CHECK

RESET_OPERATION

public static final int RESET_OPERATION

SET_BOUNDS

public static final int SET_BOUNDS

SET_CLIENT_SIZE

public static final int SET_CLIENT_SIZE

SET_LOCATION

public static final int SET_LOCATION

SET_SIZE

public static final int SET_SIZE
Method Detail

canDetermineObscurity

public boolean canDetermineObscurity()

checkImage

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

coalescePaintEvent

public void coalescePaintEvent(PaintEvent e)
Parameters:
e

createBuffers

public void createBuffers(int numBuffers,
                          BufferCapabilities caps)
                   throws AWTException
Parameters:
numBuffers
caps
Throws:
AWTException

createImage

public Image createImage(ImageProducer producer)
Parameters:
producer

createImage

public Image createImage(int width,
                         int height)
Parameters:
width
height

createVolatileImage

public VolatileImage createVolatileImage(int width,
                                         int height)
Parameters:
width
height

destroyBuffers

public void destroyBuffers()

disable

public void disable()
DEPRECATED: Replaced by setEnabled(boolean).


dispose

public void dispose()

enable

public void enable()
DEPRECATED: Replaced by setEnabled(boolean).


flip

public void flip(BufferCapabilities.FlipContents flipAction)
Parameters:
flipAction

getBackBuffer

public Image getBackBuffer()

getBounds

public Rectangle getBounds()

getColorModel

public ColorModel getColorModel()

getFontMetrics

public FontMetrics getFontMetrics(Font font)
Parameters:
font

getGraphics

public Graphics getGraphics()

getGraphicsConfiguration

public GraphicsConfiguration getGraphicsConfiguration()

getLocationOnScreen

public Point getLocationOnScreen()

getMinimumSize

public Dimension getMinimumSize()

getPreferredSize

public Dimension getPreferredSize()

getToolkit

public Toolkit getToolkit()

handleEvent

public void handleEvent(AWTEvent e)
Parameters:
e

handlesWheelScrolling

public boolean handlesWheelScrolling()

hide

public void hide()
DEPRECATED: Replaced by setVisible(boolean).


isFocusable

public boolean isFocusable()

isObscured

public boolean isObscured()

isReparentSupported

public boolean isReparentSupported()
Returns whether this peer supports reparenting to another parent withour destroying the peer

Returns:
true if appropriate reparent is supported, false otherwise

layout

public 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.


minimumSize

public Dimension minimumSize()
DEPRECATED: Replaced by getMinimumSize().


paint

public void paint(Graphics g)
Parameters:
g

preferredSize

public Dimension preferredSize()
DEPRECATED: Replaced by getPreferredSize().


prepareImage

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

print

public void print(Graphics g)
Parameters:
g

repaint

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

reparent

public 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

requestFocus

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

reshape

public void reshape(int x,
                    int y,
                    int width,
                    int height)
DEPRECATED: Replaced by setBounds(int, int, int, int).

Parameters:
x
y
width
height

setBackground

public void setBackground(Color c)
Parameters:
c

setBounds

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

setEnabled

public void setEnabled(boolean b)
Parameters:
b

setFont

public void setFont(Font f)
Parameters:
f

setForeground

public void setForeground(Color c)
Parameters:
c

setVisible

public void setVisible(boolean b)
Parameters:
b

show

public void show()
DEPRECATED: Replaced by setVisible(boolean).


updateCursorImmediately

public void updateCursorImmediately()


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.