java.awt
Class LightweightPeer

java.lang.Object
  |
  +--java.awt.LightweightPeer

class LightweightPeer
extends Object
implements java.awt.peer.LightweightPeer

Implements the LightweightPeer interface for use in lightweight components that have no native window associated with them. This gets created by default in Component so that Component and Container can be directly extended to create useful components written entirely in java. These components must be hosted somewhere higher up in the component tree by a native container (such as a Frame). This implementation provides no useful semantics and serves only as a marker. One could provide alternative implementations in java that do something useful for some of the other peer interfaces to minimize the native code.


Constructor Summary
LightweightPeer(Component target)
           
 
Method Summary
 int checkImage(Image img, int w, int h, java.awt.image.ImageObserver o)
           
 Image createImage(java.awt.image.ImageProducer producer)
           
 Image createImage(int width, int height)
           
 void disable()
           
 void dispose()
           
 void enable()
           
 java.awt.image.ColorModel getColorModel()
           
 FontMetrics getFontMetrics(Font font)
           
 Graphics getGraphics()
           
 Point getLocationOnScreen()
           
 Dimension getMinimumSize()
           
 Dimension getPreferredSize()
           
 Toolkit getToolkit()
           
 void handleEvent(AWTEvent arg0)
           
 boolean handleEvent(Event e)
           
 void hide()
           
 boolean isFocusTraversable()
           
 Dimension minimumSize()
           
 void paint(Graphics g)
           
 Dimension preferredSize()
           
 boolean prepareImage(Image img, int w, int h, java.awt.image.ImageObserver o)
           
 void print(Graphics g)
           
 void repaint(long tm, int x, int y, int width, int height)
           
 void requestFocus()
           
 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 setCursor(Cursor cursor)
           
 void setEnabled(boolean b)
           
 void setFont(Font f)
           
 void setForeground(Color c)
           
 void setVisible(boolean b)
           
 void show()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

LightweightPeer

public LightweightPeer(Component target)
Method Detail

isFocusTraversable

public boolean isFocusTraversable()

setVisible

public void setVisible(boolean b)

show

public void show()

hide

public void hide()

setEnabled

public void setEnabled(boolean b)

enable

public void enable()

disable

public void disable()

paint

public void paint(Graphics g)

repaint

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

print

public void print(Graphics g)

setBounds

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

reshape

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

handleEvent

public boolean handleEvent(Event e)

handleEvent

public void handleEvent(AWTEvent arg0)

getPreferredSize

public Dimension getPreferredSize()

getMinimumSize

public Dimension getMinimumSize()

getToolkit

public Toolkit getToolkit()

getColorModel

public java.awt.image.ColorModel getColorModel()

getGraphics

public Graphics getGraphics()

getFontMetrics

public FontMetrics getFontMetrics(Font font)

dispose

public void dispose()

setForeground

public void setForeground(Color c)

setBackground

public void setBackground(Color c)

setFont

public void setFont(Font f)

setCursor

public void setCursor(Cursor cursor)

requestFocus

public void requestFocus()

createImage

public Image createImage(java.awt.image.ImageProducer producer)

createImage

public Image createImage(int width,
                         int height)

prepareImage

public boolean prepareImage(Image img,
                            int w,
                            int h,
                            java.awt.image.ImageObserver o)

checkImage

public int checkImage(Image img,
                      int w,
                      int h,
                      java.awt.image.ImageObserver o)

preferredSize

public Dimension preferredSize()

minimumSize

public Dimension minimumSize()

getLocationOnScreen

public Point getLocationOnScreen()