gnu.awt.virtual
Class VirtualComponentPeer
java.lang.Object
|
+--gnu.awt.virtual.VirtualComponentPeer
- All Implemented Interfaces:
- java.awt.peer.ComponentPeer
- Direct Known Subclasses:
- VirtualFramePeer, VirtualLightweightPeer
- public abstract class VirtualComponentPeer
- extends Object
- implements java.awt.peer.ComponentPeer
Base class for virtual component peers. Satisfies the requirements for AWT peers without
actually displaying anything (hence, they are virtual) or by delegating to the parent component,
under the assumption is that somewhere up in the hierarchy there is a parent who can produce a
display.
Method Summary |
boolean |
canDetermineObscurity()
|
int |
checkImage(Image img,
int w,
int h,
ImageObserver o)
|
void |
coalescePaintEvent(PaintEvent e)
|
void |
createBuffers(int x,
BufferCapabilities bufferCapabilities)
|
Image |
createImage(ImageProducer producer)
|
Image |
createImage(int width,
int height)
|
VolatileImage |
createVolatileImage(int width,
int height)
|
void |
destroyBuffers()
|
void |
disable()
|
void |
dispose()
|
void |
enable()
|
void |
flip(BufferCapabilities.FlipContents flipContents)
|
Image |
getBackBuffer()
|
ColorModel |
getColorModel()
|
FontMetrics |
getFontMetrics(Font font)
|
Graphics |
getGraphics()
|
GraphicsConfiguration |
getGraphicsConfiguration()
|
Point |
getLocationOnScreen()
|
Dimension |
getMinimumSize()
|
Dimension |
getPreferredSize()
|
Toolkit |
getToolkit()
|
void |
handleEvent(AWTEvent e)
|
boolean |
handlesWheelScrolling()
|
void |
hide()
|
boolean |
isFocusable()
|
boolean |
isObscured()
|
Dimension |
minimumSize()
|
void |
paint(Graphics g)
|
Dimension |
preferredSize()
|
boolean |
prepareImage(Image img,
int w,
int h,
ImageObserver o)
|
void |
print(Graphics g)
|
void |
repaint(long tm,
int x,
int y,
int width,
int height)
|
boolean |
requestFocus(Component lightweightChild,
boolean temporary,
boolean focusedWindowChangeAllowed,
long time)
|
void |
reshape(int x,
int y,
int width,
int height)
|
void |
setBackground(Color c)
|
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setEnabled(boolean b)
|
void |
setFont(Font f)
|
void |
setForeground(Color c)
|
void |
setVisible(boolean b)
|
void |
show()
|
void |
updateCursorImmediately()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
component
protected Component component
toolkit
protected Toolkit toolkit
location
protected Point location
size
protected Dimension size
VirtualComponentPeer
public VirtualComponentPeer(Toolkit toolkit,
Component component)
paint
public void paint(Graphics g)
- Specified by:
paint
in interface java.awt.peer.ComponentPeer
repaint
public void repaint(long tm,
int x,
int y,
int width,
int height)
- Specified by:
repaint
in interface java.awt.peer.ComponentPeer
print
public void print(Graphics g)
- Specified by:
print
in interface java.awt.peer.ComponentPeer
getGraphics
public Graphics getGraphics()
- Specified by:
getGraphics
in interface java.awt.peer.ComponentPeer
getGraphicsConfiguration
public GraphicsConfiguration getGraphicsConfiguration()
- Specified by:
getGraphicsConfiguration
in interface java.awt.peer.ComponentPeer
setBounds
public void setBounds(int x,
int y,
int width,
int height)
- Specified by:
setBounds
in interface java.awt.peer.ComponentPeer
getLocationOnScreen
public Point getLocationOnScreen()
- Specified by:
getLocationOnScreen
in interface java.awt.peer.ComponentPeer
getPreferredSize
public Dimension getPreferredSize()
- Specified by:
getPreferredSize
in interface java.awt.peer.ComponentPeer
getMinimumSize
public Dimension getMinimumSize()
- Specified by:
getMinimumSize
in interface java.awt.peer.ComponentPeer
setVisible
public void setVisible(boolean b)
- Specified by:
setVisible
in interface java.awt.peer.ComponentPeer
setEnabled
public void setEnabled(boolean b)
- Specified by:
setEnabled
in interface java.awt.peer.ComponentPeer
isObscured
public boolean isObscured()
- Specified by:
isObscured
in interface java.awt.peer.ComponentPeer
canDetermineObscurity
public boolean canDetermineObscurity()
- Specified by:
canDetermineObscurity
in interface java.awt.peer.ComponentPeer
isFocusable
public boolean isFocusable()
- Specified by:
isFocusable
in interface java.awt.peer.ComponentPeer
requestFocus
public boolean requestFocus(Component lightweightChild,
boolean temporary,
boolean focusedWindowChangeAllowed,
long time)
- Specified by:
requestFocus
in interface java.awt.peer.ComponentPeer
handleEvent
public void handleEvent(AWTEvent e)
- Specified by:
handleEvent
in interface java.awt.peer.ComponentPeer
coalescePaintEvent
public void coalescePaintEvent(PaintEvent e)
- Specified by:
coalescePaintEvent
in interface java.awt.peer.ComponentPeer
handlesWheelScrolling
public boolean handlesWheelScrolling()
- Specified by:
handlesWheelScrolling
in interface java.awt.peer.ComponentPeer
getColorModel
public ColorModel getColorModel()
- Specified by:
getColorModel
in interface java.awt.peer.ComponentPeer
setForeground
public void setForeground(Color c)
- Specified by:
setForeground
in interface java.awt.peer.ComponentPeer
setBackground
public void setBackground(Color c)
- Specified by:
setBackground
in interface java.awt.peer.ComponentPeer
getFontMetrics
public FontMetrics getFontMetrics(Font font)
- Specified by:
getFontMetrics
in interface java.awt.peer.ComponentPeer
setFont
public void setFont(Font f)
- Specified by:
setFont
in interface java.awt.peer.ComponentPeer
updateCursorImmediately
public void updateCursorImmediately()
- Specified by:
updateCursorImmediately
in interface java.awt.peer.ComponentPeer
getToolkit
public Toolkit getToolkit()
- Specified by:
getToolkit
in interface java.awt.peer.ComponentPeer
dispose
public void dispose()
- Specified by:
dispose
in interface java.awt.peer.ComponentPeer
createBuffers
public void createBuffers(int x,
BufferCapabilities bufferCapabilities)
- Specified by:
createBuffers
in interface java.awt.peer.ComponentPeer
destroyBuffers
public void destroyBuffers()
- Specified by:
destroyBuffers
in interface java.awt.peer.ComponentPeer
flip
public void flip(BufferCapabilities.FlipContents flipContents)
- Specified by:
flip
in interface java.awt.peer.ComponentPeer
getBackBuffer
public Image getBackBuffer()
- Specified by:
getBackBuffer
in interface java.awt.peer.ComponentPeer
createImage
public Image createImage(ImageProducer producer)
- Specified by:
createImage
in interface java.awt.peer.ComponentPeer
createImage
public Image createImage(int width,
int height)
- Specified by:
createImage
in interface java.awt.peer.ComponentPeer
createVolatileImage
public VolatileImage createVolatileImage(int width,
int height)
- Specified by:
createVolatileImage
in interface java.awt.peer.ComponentPeer
prepareImage
public boolean prepareImage(Image img,
int w,
int h,
ImageObserver o)
- Specified by:
prepareImage
in interface java.awt.peer.ComponentPeer
checkImage
public int checkImage(Image img,
int w,
int h,
ImageObserver o)
- Specified by:
checkImage
in interface java.awt.peer.ComponentPeer
preferredSize
public Dimension preferredSize()
- Specified by:
preferredSize
in interface java.awt.peer.ComponentPeer
minimumSize
public Dimension minimumSize()
- Specified by:
minimumSize
in interface java.awt.peer.ComponentPeer
show
public void show()
- Specified by:
show
in interface java.awt.peer.ComponentPeer
hide
public void hide()
- Specified by:
hide
in interface java.awt.peer.ComponentPeer
enable
public void enable()
- Specified by:
enable
in interface java.awt.peer.ComponentPeer
disable
public void disable()
- Specified by:
disable
in interface java.awt.peer.ComponentPeer
reshape
public void reshape(int x,
int y,
int width,
int height)
- Specified by:
reshape
in interface java.awt.peer.ComponentPeer