GNU Classpath (0.95) | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface ComponentPeer
Method Summary | |
boolean |
|
int |
|
void |
|
void |
|
Image |
|
Image |
|
VolatileImage |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Image |
|
Rectangle |
|
ColorModel |
|
FontMetrics |
|
Graphics |
|
GraphicsConfiguration |
|
Point |
|
Dimension |
|
Dimension |
|
Toolkit |
|
void |
|
boolean |
|
void |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
Dimension |
|
void | |
Dimension |
|
boolean |
|
void | |
void |
|
void |
|
void |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
public boolean canDetermineObscurity()
Returnstrue
if this component peer can determine if the component has been obscured,false
otherwise.
- Returns:
true
if this component peer can determine if the component has been obscured,false
otherwise
public int checkImage(Image img, int width, int height, ImageObserver ob)
Returns the construction status of the specified image. This is called byComponent.checkImage(Image,int,int,ImageObserver)
.
- Parameters:
img
- the imagewidth
- the width of the imageheight
- the height of the imageob
- the image observer to be notified of updates of the status
- Returns:
- a bitwise ORed set of ImageObserver flags
public void coalescePaintEvent(PaintEvent e)
Coalesces the specified paint event.
- Parameters:
e
- the paint event
public void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException
Create a number of image buffers that implement a buffering strategy according to the given capabilities.
- Parameters:
numBuffers
- the number of bufferscaps
- the buffering capabilities
- Throws:
AWTException
- if the specified buffering strategy is not implemented
- Since:
- 1.2
public Image createImage(int width, int height)
Creates an empty image with the specifiedwidth
andheight
.
- Parameters:
width
- the width of the image to be createdheight
- the height of the image to be created
- Returns:
- the created image
public Image createImage(ImageProducer prod)
Creates an image by starting the specified image producer. This is called byComponent.createImage(ImageProducer)
.
- Parameters:
prod
- the image producer to be used to create the image
- Returns:
- the created image
public VolatileImage createVolatileImage(int width, int height)
A convenience method that creates a volatile image. The volatile image is created on the screen device on which this component is displayed, in the device's current graphics configuration.
- Parameters:
width
- width of the imageheight
- height of the image
- Since:
- 1.2
- See Also:
VolatileImage
public void destroyBuffers()
Destroy the resources created by createBuffers.
- Since:
- 1.2
public void dispose()
Disposes the component peer. This should release all resources held by the peer. This is called when the component is no longer in use.
public void flip(BufferCapabilities.FlipContents contents)
Perform a page flip, leaving the contents of the back buffer in the specified state.
- Parameters:
contents
- the state in which to leave the back buffer
- Since:
- 1.2
public Image getBackBuffer()
Return the back buffer of this component.
- Returns:
- the back buffer of this component.
- Since:
- 1.2
public Rectangle getBounds()
Get the bounds of this component peer.
- Returns:
- component peer bounds
- Since:
- 1.5
public ColorModel getColorModel()
Returns the color model of the component. This is currently not used.
- Returns:
- the color model of the component
public FontMetrics getFontMetrics(Font f)
Returns the font metrics for the specified font. This is called byComponent.getFontMetrics(Font)
.
- Parameters:
f
- the font for which to query the font metrics
- Returns:
- the font metrics for the specified font
public Graphics getGraphics()
Returns aGraphics
object suitable for drawing on this component. This is called byComponent.getGraphics()
.
- Returns:
- a graphics object suitable for drawing on this component
public GraphicsConfiguration getGraphicsConfiguration()
Get the graphics configuration of the component. The color model of the component can be derived from the configuration.
- Returns:
- the graphics configuration of the component
public Point getLocationOnScreen()
Returns the location of this component in screen coordinates. This is called byComponent.getLocationOnScreen()
.
- Returns:
- the location of this component in screen coordinates
public Dimension getMinimumSize()
Returns the minimum size for the component. This is called byComponent.getMinimumSize()
.
- Returns:
- the minimum size for the component
public Dimension getPreferredSize()
Returns the preferred size for the component. This is called byComponent.getPreferredSize()
.
- Returns:
- the preferred size for the component
public Toolkit getToolkit()
Returns the toolkit that created this peer.
- Returns:
- the toolkit that created this peer
public void handleEvent(AWTEvent e)
Handles the given event. This is called fromComponent.dispatchEvent(AWTEvent)
to give the peer a chance to react to events for the component.
- Parameters:
e
- the event
public boolean handlesWheelScrolling()
Returns true, if this component can handle wheel scrolling,false
otherwise.
- Returns:
- true, if this component can handle wheel scrolling,
false
otherwise
public boolean isFocusTraversable()
Returnstrue
if the component can receive keyboard input focus. This is called fromComponent.isFocusTraversable()
.
public boolean isFocusable()
Returnstrue
if the component can receive keyboard input focus. This is called fromComponent.isFocusable()
.
public boolean isObscured()
Returnstrue
if this component has been obscured,false
otherwise. This will only work ifcanDetermineObscurity()
also returnstrue
.
- Returns:
true
if this component has been obscured,false
otherwise.
public boolean isReparentSupported()
Check if this component supports being reparented.
- Returns:
- true if this component can be reparented, false otherwise.
- Since:
- 1.5
public Dimension minimumSize()
Returns the minimum size for the component. This is called byComponent.minimumSize()
.
- Returns:
- the minimum size for the component
public Dimension preferredSize()
Returns the preferred size for the component. This is called byComponent.getPreferredSize()
.
- Returns:
- the preferred size for the component
public boolean prepareImage(Image img, int width, int height, ImageObserver ob)
Prepares an image for rendering on this component. This is called byComponent.prepareImage(Image,int,int,ImageObserver)
.
- Parameters:
img
- the image to preparewidth
- the desired width of the rendered imageheight
- the desired height of the rendered imageob
- the image observer to be notified of updates in the preparation process
- Returns:
true
if the image has been fully prepared,false
otherwise (in which case the image observer receives updates)
public void repaint(long tm, int x, int y, int width, int height)
Repaints the specified rectangle of this component. This is called fromComponent.repaint(long,int,int,int,int)
.
- Parameters:
tm
- number of milliseconds to wait with repaintingx
- the X coordinate of the upper left corner of the damaged rectangley
- the Y coordinate of the upper left corner of the damaged rectanglewidth
- the width of the damaged rectangleheight
- the height of the damaged rectangle
public void reparent(ContainerPeer parent)
Reparent this component under another container.
- Parameters:
parent
-
- Since:
- 1.5
public void requestFocus()
Requests that this component receives the focus. This is called fromComponent.requestFocus()
.
public boolean requestFocus(Component request, boolean temporary, boolean allowWindowFocus, long time)
Requests that this component receives the focus. This is called fromComponent.requestFocus()
. This method is only called for heavyweight component's peers. Lightweight components ask their nearest heavyweight component to request focus. 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 focus request is finally approved, then the peer must post a FOCUS_GAINED event for the requested component.
- Parameters:
request
- the component for which the focus is requestedtemporary
- indicates if the focus change is temporary (true) or permanent (false)allowWindowFocus
- indicates if it's allowed to change window focustime
- the timestamp
public void reshape(int x, int y, int width, int height)
Notifies the peer that the bounds of this component have changed. This is called byComponent.reshape(int,int,int,int)
.
- Parameters:
x
- the X coordinate of the upper left corner of the componenty
- the Y coordinate of the upper left corner of the componentwidth
- the width of the componentheight
- the height of the component
public void setBackground(Color color)
Sets the background color of the component. This is called byComponent.setBackground(Color)
.
- Parameters:
color
- the background color to set
public void setBounds(int x, int y, int width, int height)
Notifies the peer that the bounds of this component have changed. This is called byComponent.setBounds(int,int,int,int)
.
- Parameters:
x
- the X coordinate of the upper left corner of the componenty
- the Y coordinate of the upper left corner of the componentwidth
- the width of the componentheight
- the height of the component
public void setBounds(int x, int y, int width, int height, int z)
Set the bounds of this component peer.
- Parameters:
x
- the new x co-ordinatey
- the new y co-ordinatewidth
- the new widthheight
- the new heightz
- the new stacking level
- Since:
- 1.5
public void setCursor(Cursor cursor)
Sets the cursor of the component. This is called byComponent.setCursor(Cursor)
.
public void setEnabled(boolean enabled)
Sets the enabled/disabled state of this component. This is called byComponent.setEnabled(boolean)
.
- Parameters:
enabled
-true
to enable the component,false
to disable it
public void setFont(Font font)
Sets the font of the component. This is called byComponent.setFont(Font)
.
- Parameters:
font
- the font to set
public void setForeground(Color color)
Sets the foreground color of the component. This is called byComponent.setForeground(Color)
.
- Parameters:
color
- the foreground color to set
public void setVisible(boolean visible)
Sets the visibility state of the component. This is called byComponent.setVisible(boolean)
.
- Parameters:
visible
-true
to make the component visible,false
to make it invisible
GNU Classpath (0.95) |