Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.java.awt.peer.gtk.GtkGenericPeer
gnu.java.awt.peer.gtk.GtkComponentPeer
Field Summary |
Fields inherited from class gnu.java.awt.peer.gtk.GtkGenericPeer | |
awtWidget |
Constructor Summary | |
|
Method Summary | |
boolean |
|
int |
|
void |
|
void |
|
Image |
|
Image |
|
VolatileImage |
|
void |
|
void |
|
void |
|
void |
|
Image |
|
Color | |
Rectangle |
|
ColorModel |
|
FontMetrics |
|
Color | |
Graphics |
|
GraphicsConfiguration |
|
Point |
|
Dimension |
|
Dimension |
|
Toolkit |
|
void |
|
boolean |
|
void |
|
boolean |
|
boolean |
|
protected boolean |
|
boolean |
|
boolean |
|
void |
|
Dimension |
|
void | |
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
protected void | |
Dimension |
|
boolean |
|
void | |
void |
|
void |
|
void |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
String |
|
protected void |
|
void |
|
Methods inherited from class gnu.java.awt.peer.gtk.GtkGenericPeer | |
dispose , gtkWidgetModifyFont , gtkWidgetModifyFont , postActionEvent |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public boolean canDetermineObscurity()
Returnstrue
if this component peer can determine if the component has been obscured,false
otherwise.
- Specified by:
- canDetermineObscurity in interface ComponentPeer
- Returns:
true
if this component peer can determine if the component has been obscured,false
otherwise
public int checkImage(Image image, int width, int height, ImageObserver observer)
Returns the construction status of the specified image. This is called byComponent.checkImage(Image,int,int,ImageObserver)
.
- Specified by:
- checkImage in interface ComponentPeer
- Parameters:
width
- the width of the imageheight
- the height of the image
- Returns:
- a bitwise ORed set of ImageObserver flags
public void coalescePaintEvent(PaintEvent e)
Coalesces the specified paint event.
- Specified by:
- coalescePaintEvent in interface ComponentPeer
- 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.
- Specified by:
- createBuffers in interface ComponentPeer
- 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
.
- Specified by:
- createImage in interface ComponentPeer
- 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 producer)
Creates an image by starting the specified image producer. This is called byComponent.createImage(ImageProducer)
.
- Specified by:
- createImage in interface ComponentPeer
- Parameters:
- 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.
- Specified by:
- createVolatileImage in interface ComponentPeer
- 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.
- Specified by:
- destroyBuffers in interface ComponentPeer
- Since:
- 1.2
public void disable()
Disables the component. This is called byComponent.disable()
.
- Specified by:
- disable in interface ComponentPeer
public void enable()
Enables the component. This is called byComponent.enable()
.
- Specified by:
- enable in interface ComponentPeer
public void flip(BufferCapabilities.FlipContents contents)
Perform a page flip, leaving the contents of the back buffer in the specified state.
- Specified by:
- flip in interface ComponentPeer
- Parameters:
contents
- the state in which to leave the back buffer
- Since:
- 1.2
public Image getBackBuffer()
Return the back buffer of this component.
- Specified by:
- getBackBuffer in interface ComponentPeer
- Returns:
- the back buffer of this component.
- Since:
- 1.2
public Rectangle getBounds()
Get the bounds of this component peer.
- Specified by:
- getBounds in interface ComponentPeer
- Returns:
- component peer bounds
- Since:
- 1.5
public ColorModel getColorModel()
Returns the color model of the component. This is currently not used.
- Specified by:
- getColorModel in interface ComponentPeer
- Returns:
- the color model of the component
public FontMetrics getFontMetrics(Font font)
Returns the font metrics for the specified font. This is called byComponent.getFontMetrics(Font)
.
- Specified by:
- getFontMetrics in interface ComponentPeer
- Parameters:
- 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()
.
- Specified by:
- getGraphics in interface ComponentPeer
- 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.
- Specified by:
- getGraphicsConfiguration in interface ComponentPeer
- Returns:
- the graphics configuration of the component
public Point getLocationOnScreen()
Returns the location of this component in screen coordinates. This is called byComponent.getLocationOnScreen()
.
- Specified by:
- getLocationOnScreen in interface ComponentPeer
- Returns:
- the location of this component in screen coordinates
public Dimension getMinimumSize()
Returns the minimum size for the component. This is called byComponent.getMinimumSize()
.
- Specified by:
- getMinimumSize in interface ComponentPeer
- Returns:
- the minimum size for the component
public Dimension getPreferredSize()
Returns the preferred size for the component. This is called byComponent.getPreferredSize()
.
- Specified by:
- getPreferredSize in interface ComponentPeer
- Returns:
- the preferred size for the component
public Toolkit getToolkit()
Returns the toolkit that created this peer.
- Specified by:
- getToolkit in interface ComponentPeer
- Returns:
- the toolkit that created this peer
public void handleEvent(AWTEvent event)
Handles the given event. This is called fromComponent.dispatchEvent(AWTEvent)
to give the peer a chance to react to events for the component.
- Specified by:
- handleEvent in interface ComponentPeer
- Parameters:
public boolean handlesWheelScrolling()
Returns true, if this component can handle wheel scrolling,false
otherwise.
- Specified by:
- handlesWheelScrolling in interface ComponentPeer
- Returns:
- true, if this component can handle wheel scrolling,
false
otherwise
public void hide()
Makes the component invisible. This is called fromComponent.hide()
.
- Specified by:
- hide in interface ComponentPeer
public boolean isFocusTraversable()
Returnstrue
if the component can receive keyboard input focus. This is called fromComponent.isFocusTraversable()
.
- Specified by:
- isFocusTraversable in interface ComponentPeer
public boolean isFocusable()
Returnstrue
if the component can receive keyboard input focus. This is called fromComponent.isFocusable()
.
- Specified by:
- isFocusable in interface ComponentPeer
protected boolean isLightweightDescendant(Component c)
Returnstrue
if the component is a direct (== no intermediate heavyweights) lightweight descendant of this peer's component.
- Parameters:
c
- the component to check
- Returns:
true
if the component is a direct (== no intermediate heavyweights) lightweight descendant of this peer's component
public boolean isObscured()
Returnstrue
if this component has been obscured,false
otherwise. This will only work ifComponentPeer.canDetermineObscurity()
also returnstrue
.
- Specified by:
- isObscured in interface ComponentPeer
- Returns:
true
if this component has been obscured,false
otherwise.
public boolean isReparentSupported()
Check if this component supports being reparented.
- Specified by:
- isReparentSupported in interface ComponentPeer
- Returns:
- true if this component can be reparented, false otherwise.
- Since:
- 1.5
public void layout()
Layout this component peer.
- Specified by:
- layout in interface ComponentPeer
- Since:
- 1.5
public Dimension minimumSize()
Returns the minimum size for the component. This is called byComponent.minimumSize()
.
- Specified by:
- minimumSize in interface ComponentPeer
- Returns:
- the minimum size for the component
protected void postFocusEvent(int id, boolean temporary)
Referenced from native code.
- Parameters:
id
-temporary
-
protected void postKeyEvent(int id, long when, int mods, int keyCode, char keyChar, int keyLocation)
protected void postMouseEvent(int id, long when, int mods, int x, int y, int clickCount, boolean popupTrigger)
protected void postMouseWheelEvent(int id, long when, int mods, int x, int y, int clickCount, boolean popupTrigger, int type, int amount, int rotation)
Callback for component_scroll_cb.
public Dimension preferredSize()
Returns the preferred size for the component. This is called byComponent.getPreferredSize()
.
- Specified by:
- preferredSize in interface ComponentPeer
- Returns:
- the preferred size for the component
public boolean prepareImage(Image image, int width, int height, ImageObserver observer)
Prepares an image for rendering on this component. This is called byComponent.prepareImage(Image,int,int,ImageObserver)
.
- Specified by:
- prepareImage in interface ComponentPeer
- Parameters:
width
- the desired width of the rendered imageheight
- the desired height of the rendered image
- 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)
.
- Specified by:
- repaint in interface ComponentPeer
- 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.
- Specified by:
- reparent in interface ComponentPeer
- Parameters:
parent
-
- Since:
- 1.5
public void requestFocus()
Requests that this component receives the focus. This is called fromComponent.requestFocus()
.
- Specified by:
- requestFocus in interface ComponentPeer
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.
- Specified by:
- requestFocus in interface ComponentPeer
- 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 boolean requestFocus(Component lightweightChild, boolean temporary, boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)
Requests the focus on the component.
- Specified by:
- requestFocus in interface ComponentPeer
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)
.
- Specified by:
- reshape in interface ComponentPeer
- 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 c)
Sets the background color of the component. This is called byComponent.setBackground(Color)
.
- Specified by:
- setBackground in interface ComponentPeer
- Parameters:
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)
.
- Specified by:
- setBounds in interface ComponentPeer
- 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.
- Specified by:
- setBounds in interface ComponentPeer
- 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)
.
- Specified by:
- setCursor in interface ComponentPeer
public void setEnabled(boolean b)
Sets the enabled/disabled state of this component. This is called byComponent.setEnabled(boolean)
.
- Specified by:
- setEnabled in interface ComponentPeer
- Parameters:
public void setEventMask(long mask)
Part of an older API, no longer needed.
- Specified by:
- setEventMask in interface ComponentPeer
public void setFont(Font f)
Sets the font of the component. This is called byComponent.setFont(Font)
.
- Specified by:
- setFont in interface ComponentPeer
- Parameters:
public void setForeground(Color c)
Sets the foreground color of the component. This is called byComponent.setForeground(Color)
.
- Specified by:
- setForeground in interface ComponentPeer
- Parameters:
public void setVisible(boolean b)
Sets the visibility state of the component. This is called byComponent.setVisible(boolean)
.
- Specified by:
- setVisible in interface ComponentPeer
- Parameters:
public void show()
Makes the component visible. This is called byComponent.show()
.
- Specified by:
- show in interface ComponentPeer
public String toString()
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it intoSystem.out.println()
and such. It is typical, but not required, to ensure that this method never completes abruptly with aRuntimeException
. This method will be called when performing string concatenation with this object. If the result isnull
, string concatenation will instead use"null"
. The default implementation returnsgetClass().getName() + "@" + Integer.toHexString(hashCode())
.
- Returns:
- the String representing this Object, which may be null
- See Also:
getClass()
,Object.hashCode()
,Class.getName()
,Integer.toHexString(int)
public void updateCursorImmediately()
Updates the cursor.
- Specified by:
- updateCursorImmediately in interface ComponentPeer