home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book Home Java Enterprise in a Nutshell Search this book

Chapter 20. The java.awt.peer Package

The interfaces in the java.awt.peer package define the native GUI capabilities that are required by the heavyweight AWT components of the java.awt package. Application-level code never needs to use this package. Because the package is rarely used and because the interfaces of this package closely mirror the component classes of java.awt, no descriptions are provided for the individual interfaces listed here. Figure 20-1 shows the class hierarchy of this package.

figure

Figure 20-1. The java.awt.peer package

ButtonPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface ButtonPeer extends ComponentPeer {
// Public Instance Methods
public abstract void setLabel (String label);
}
CanvasPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface CanvasPeer extends ComponentPeer {
}
CheckboxMenuItemPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface CheckboxMenuItemPeer extends MenuItemPeer {
// Public Instance Methods
public abstract void setState (boolean t);
}
CheckboxPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface CheckboxPeer extends ComponentPeer {
// Public Instance Methods
public abstract void setCheckboxGroup (CheckboxGroup g);
public abstract void setLabel (String label);
public abstract void setState (boolean state);
}
ChoicePeerJava 1.0
java.awt.peerPJ1.1
public abstract interface ChoicePeer extends ComponentPeer {
// Public Instance Methods
1.1public abstract void add (String item, int index);
public abstract void addItem (String item, int index);
1.1public abstract void remove (int index);
public abstract void select (int index);
}
ComponentPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface ComponentPeer {
// Property Accessor Methods (by property name)
public abstract java.awt.image.ColorModel getColorModel ();
1.1public abstract boolean isFocusTraversable ();
public abstract Graphics getGraphics ();
1.1public abstract Point getLocationOnScreen ();
1.1public abstract Dimension getMinimumSize ();
1.1public abstract Dimension getPreferredSize ();
public abstract Toolkit getToolkit ();
// Public Instance Methods
public abstract int checkImage (Image img, int w, int h, java.awt.image.ImageObserver o);
public abstract Image createImage (java.awt.image.ImageProducer producer);
public abstract Image createImage (int width, int height);
public abstract void disable ();
public abstract void dispose ();
public abstract void enable ();
public abstract FontMetrics getFontMetrics (Font font);
1.1public abstract void handleEvent (AWTEvent e);
public abstract void hide ();
public abstract Dimension minimumSize ();
public abstract void paint (Graphics g);
public abstract Dimension preferredSize ();
public abstract boolean prepareImage (Image img, int w, int h, java.awt.image.ImageObserver o);
public abstract void print (Graphics g);
public abstract void repaint (long tm, int x, int y, int width, int height);
public abstract void requestFocus ();
public abstract void reshape (int x, int y, int width, int height);
public abstract void setBackground (Color c);
1.1public abstract void setBounds (int x, int y, int width, int height);
1.1public abstract void setCursor (Cursor cursor);
1.1public abstract void setEnabled (boolean b);
public abstract void setFont (Font f);
public abstract void setForeground (Color c);
1.1public abstract void setVisible (boolean b);
public abstract void show ();
}
ContainerPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface ContainerPeer extends ComponentPeer {
// Public Instance Methods
1.1public abstract void beginValidate ();
1.1public abstract void endValidate ();
1.1public abstract Insets getInsets ();
public abstract Insets insets ();
}
DialogPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface DialogPeer extends WindowPeer {
// Public Instance Methods
public abstract void setResizable (boolean resizeable);
public abstract void setTitle (String title);
}
FileDialogPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface FileDialogPeer extends DialogPeer {
// Public Instance Methods
public abstract void setDirectory (String dir);
public abstract void setFile (String file);
public abstract void setFilenameFilter (java.io.FilenameFilter filter);
}
FontPeerJava 1.1
java.awt.peerPJ1.1
public abstract interface FontPeer {
}
FramePeerJava 1.0
java.awt.peerPJ1.1
public abstract interface FramePeer extends WindowPeer {
// Property Accessor Methods (by property name)
1.2public abstract int getState ();
1.2public abstract void setState (int state);
// Public Instance Methods
public abstract void setIconImage (Image im);
public abstract void setMenuBar (MenuBar mb);
public abstract void setResizable (boolean resizeable);
public abstract void setTitle (String title);
}
LabelPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface LabelPeer extends ComponentPeer {
// Public Instance Methods
public abstract void setAlignment (int alignment);
public abstract void setText (String label);
}
LightweightPeerJava 1.1
java.awt.peerPJ1.1
public abstract interface LightweightPeer extends ComponentPeer {
}
ListPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface ListPeer extends ComponentPeer {
// Public Instance Methods
1.1public abstract void add (String item, int index);
public abstract void addItem (String item, int index);
public abstract void clear ();
public abstract void delItems (int start, int end);
public abstract void deselect (int index);
1.1public abstract Dimension getMinimumSize (int rows);
1.1public abstract Dimension getPreferredSize (int rows);
public abstract int[ ] getSelectedIndexes ();
public abstract void makeVisible (int index);
public abstract Dimension minimumSize (int v);
public abstract Dimension preferredSize (int v);
1.1public abstract void removeAll ();
public abstract void select (int index);
1.1public abstract void setMultipleMode (boolean b);
public abstract void setMultipleSelections (boolean v);
}
MenuBarPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface MenuBarPeer extends MenuComponentPeer {
// Public Instance Methods
public abstract void addHelpMenu (Menu m);
public abstract void addMenu (Menu m);
public abstract void delMenu (int index);
}
MenuComponentPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface MenuComponentPeer {
// Public Instance Methods
public abstract void dispose ();
}
MenuItemPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface MenuItemPeer extends MenuComponentPeer {
// Public Instance Methods
public abstract void disable ();
public abstract void enable ();
1.1public abstract void setEnabled (boolean b);
public abstract void setLabel (String label);
}
MenuPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface MenuPeer extends MenuItemPeer {
// Public Instance Methods
public abstract void addItem (MenuItem item);
public abstract void addSeparator ();
public abstract void delItem (int index);
}
PanelPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface PanelPeer extends ContainerPeer {
}
PopupMenuPeerJava 1.1
java.awt.peerPJ1.1
public abstract interface PopupMenuPeer extends MenuPeer {
// Public Instance Methods
public abstract void show (Event e);
}
ScrollbarPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface ScrollbarPeer extends ComponentPeer {
// Public Instance Methods
public abstract void setLineIncrement (int l);
public abstract void setPageIncrement (int l);
public abstract void setValues (int value, int visible, int minimum, int maximum);
}
ScrollPanePeerJava 1.1
java.awt.peerPJ1.1
public abstract interface ScrollPanePeer extends ContainerPeer {
// Public Instance Methods
public abstract void childResized (int w, int h);
public abstract int getHScrollbarHeight ();
public abstract int getVScrollbarWidth ();
public abstract void setScrollPosition (int x, int y);
public abstract void setUnitIncrement (Adjustable adj, int u);
public abstract void setValue (Adjustable adj, int v);
}
TextAreaPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface TextAreaPeer extends TextComponentPeer {
// Public Instance Methods
1.1public abstract Dimension getMinimumSize (int rows, int columns);
1.1public abstract Dimension getPreferredSize (int rows, int columns);
1.1public abstract void insert (String text, int pos);
public abstract void insertText (String txt, int pos);
public abstract Dimension minimumSize (int rows, int cols);
public abstract Dimension preferredSize (int rows, int cols);
1.1public abstract void replaceRange (String text, int start, int end);
public abstract void replaceText (String txt, int start, int end);
}
TextComponentPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface TextComponentPeer extends ComponentPeer {
// Property Accessor Methods (by property name)
1.1public abstract int getCaretPosition ();
1.1public abstract void setCaretPosition (int pos);
public abstract int getSelectionEnd ();
public abstract int getSelectionStart ();
public abstract String getText ();
public abstract void setText (String l);
// Public Instance Methods
public abstract void select (int selStart, int selEnd);
public abstract void setEditable (boolean editable);
}
TextFieldPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface TextFieldPeer extends TextComponentPeer {
// Public Instance Methods
1.1public abstract Dimension getMinimumSize (int columns);
1.1public abstract Dimension getPreferredSize (int columns);
public abstract Dimension minimumSize (int cols);
public abstract Dimension preferredSize (int cols);
1.1public abstract void setEchoChar (char echoChar);
public abstract void setEchoCharacter (char c);
}
WindowPeerJava 1.0
java.awt.peerPJ1.1
public abstract interface WindowPeer extends ContainerPeer {
// Public Constants
1.2public static final int CONSUME_EVENT ; =1
1.2public static final int FOCUS_NEXT ; =2
1.2public static final int FOCUS_PREVIOUS ; =3
1.2public static final int IGNORE_EVENT ; =0
// Public Instance Methods
1.2public abstract int handleFocusTraversalEvent (java.awt.event.KeyEvent e);
public abstract void toBack ();
public abstract void toFront ();
}


Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.