ComponentNameComponent
DescriptionThe Component class is the parent of all non-menu GUI components. Class Definition
public abstract class java.awt.Component extends java.lang.Object implements java.awt.image.ImageObserver implements java.awt.MenuContainer implements java.io.Serializable { // Constants public final static float BOTTOM_ALIGNMENT; public final static float CENTER_ALIGNMENT; public final static float LEFT_ALIGNMENT; public final static float RIGHT_ALIGNMENT; public final static float TOP_ALIGNMENT; // Variables protected Locale locale; // Constructors protected Component(); // Instance Methods public boolean action (Event e, Object o); public synchronized void add (PopupMenu popup); public synchronized void addComponentListener (ComponentListener l); public synchronized void addFocusListener (FocusListener l); public synchronized void addKeyListener (KeyListener l); public synchronized void addMouseListener (MouseListener l); public synchronized void addMouseMotionListener (MouseMotionListener l); public void addNotify(); public Rectangle bounds(); public int checkImage (Image image, ImageObserver observer); public int checkImage (Image image, int width, int height, ImageObserver observer); public boolean contains (int x, int y); public boolean contains (Point p); public Image createImage (ImageProducer producer); public Image createImage (int width, int height); public void deliverEvent (Event e); public void disable(); public final void dispatchEvent (AWTEvent e) public void doLayout(); public void enable(); public void enable (boolean condition); public float getAlignmentX(); public float getAlignmentY(); public Color getBackground(); public Rectangle getBounds(); public synchronized ColorModel getColorModel(); public Component getComponentAt (int x, int y); public Component getComponentAt (Point p); public Cursor getCursor(); public Font getFont(); public FontMetrics getFontMetrics (Font f); public Color getForeground(); public Graphics getGraphics(); public Locale getLocale(); public Point getLocation(); public Point getLocationOnScreen(); public Dimension getMaximumSize(); public Dimension getMinimumSize(); public String getName(); public Container getParent(); public ComponentPeer getPeer(); public Dimension getPreferredSize(); public Dimension getSize(); public Toolkit getToolkit(); public final Object getTreeLock(); public boolean gotFocus (Event e, Object o); public boolean handleEvent (Event e); public void hide(); public boolean imageUpdate (Image image, int infoflags, int x, int y, int width, int height); public boolean inside (int x, int y); public void invalidate(); public boolean isEnabled(); public boolean isFocusTraversable(); public boolean isShowing(); public boolean isValid(); public boolean isVisible(); public boolean keyDown (Event e, int key); public boolean keyUp (Event e, int key); public void layout(); public void list(); public void list (PrintStream out); public void list (PrintStream out, int indentation); public void list (PrintWriter out); public void list (PrintWriter out, int indentation); public Component locate (int x, int y); public Point location(); public boolean lostFocus (Event e, Object o); public Dimension minimumSize(); public boolean mouseDown (Event e, int x, int y); public boolean mouseDrag (Event e, int x, int y); public boolean mouseEnter (Event e, int x, int y); public boolean mouseExit (Event e, int x, int y); public boolean mouseMove (Event e, int x, int y); public boolean mouseUp (Event e, int x, int y); public void move (int x, int y); public void nextFocus(); public void paint (Graphics g); public void paintAll (Graphics g); public boolean postEvent (Event e); public Dimension preferredSize(); public boolean prepareImage (Image image, ImageObserver observer); public boolean prepareImage (Image image, int width, int height, ImageObserver observer); public void print (Graphics g); public void printAll (Graphics g); public synchronized void remove (MenuComponent popup); public synchronized void removeComponentListener (ComponentListener l); public synchronized void removeFocusListener (FocusListener l); public synchronized void removeKeyListener (KeyListener l); public synchronized void removeMouseListener (MouseListener l); public synchronized void removeMouseMotionListener (MouseMotionListener l); public void removeNotify(); public void repaint(); public void repaint (long tm); public void repaint (int x, int y, int width, int height); public void repaint (long tm, int x, int y, int width, int height); public void requestFocus(); public void reshape (int x, int y, int width, int height); public void resize (Dimension d); public void resize (int width, int height); public void setBackground (Color c); public void setBounds (int x, int y, int width, int height); public void setBounds (Rectangle r); public synchronized void setCursor (Cursor cursor); public void setEnabled (boolean b); public synchronized void setFont (Font f); public void setForeground (Color c); public void setLocale (Locale l); public void setLocation (int x, int y); public void setLocation (Point p); public void setName (String name); public void setSize (int width, int height); public void setSize (Dimension d); public void setVisible (boolean b); public void show(); public void show (boolean condition); public Dimension size(); public String toString(); public void transferFocus(); public void update (Graphics g); public void validate(); // Protected Instance Methods protected final void disableEvents (long eventsToDisable); protected final void enableEvents (long eventsToEnable); protected String paramString(); protected void processComponentEvent (ComponentEvent e); protected void processEvent (AWTEvent e); protected void processFocusEvent (FocusEvent e); protected void processKeyEvent (KeyEvent e); protected void processMouseEvent (MouseEvent e); protected void processMouseMotionEvent (MouseEvent e); } ConstantsBOTTOM_ALIGNMENTpublic final static float BOTTOM_ALIGNMENTConstant representing bottom alignment in getAlignmentY(). CENTER_ALIGNMENTpublic final static float CENTER_ALIGNMENTConstant representing center alignment in getAlignmentX() and getAlignmentY(). LEFT_ALIGNMENTpublic final static float LEFT_ALIGNMENTConstant representing left alignment in getAlignmentX(). RIGHT_ALIGNMENTpublic final static float RIGHT_ALIGNMENTConstant representing right alignment in getAlignmentX(). TOP_ALIGNMENTpublic final static float TOP_ALIGNMENTConstant representing top alignment in getAlignmentY(). Variableslocaleprotected Locale locale
ConstructorsComponentprotected Component()
Instance Methodsactionpublic boolean action (Event e, Object o)
addpublic synchronized void add (PopupMenu popup)
addComponentListenerpublic void addComponentListener (ComponentListener l)
addFocusListenerpublic void addFocusListener (FocusListener l)
addKeyListenerpublic void addKeyListener (KeyListener l)
addMouseListenerpublic void addMouseListener (MouseListener l)
addMouseMotionListenerpublic void addMouseMotionListener (MouseMotionListener l)
addNotifypublic void addNotify()
boundspublic Rectangle bounds()
checkImagepublic int checkImage (Image image, ImageObserver observer)
public int checkImage (Image image, int width, int height, ImageObserver observer)
containspublic boolean contains (int x, int y)
public boolean contains (Point p)
createImagepublic Image createImage (ImageProducer producer)
public Image createImage (int width, int height)
deliverEventpublic void deliverEvent (Event e)
disablepublic void disable()
dispatchEventpublic final void dispatchEvent (AWTEvent e)
doLayoutpublic void doLayout()
enablepublic void enable()
public void enable (boolean condition)
getAlignmentXpublic float getAlignmentX()
getAlignmentYpublic float getAlignmentY()
getBackgroundpublic Color getBackground()
getBoundspublic Rectangle getBounds()
getColorModelpublic synchronized ColorModel getColorModel()
getComponentAtpublic Component getComponentAt (int x, int y)
public Component getComponentAt (Point p)
getCursorpublic Cursor getCursor()
getFontpublic Font getFont()
getFontMetricspublic FontMetrics getFontMetrics (Font f)
getForegroundpublic Color getForeground()
getGraphicspublic Graphics getGraphics()
getLocalepublic Locale getLocale()
getLocationpublic Point getLocation()
getLocationOnScreenpublic Point getLocationOnScreen()
getMaximumSizepublic Dimension getMaximumSize()
getMinimumSizepublic Dimension getMinimumSize()
getNamepublic String getName()
getParentpublic Container getParent()
getPeerpublic ComponentPeer getPeer()
getPreferredSizepublic Dimension getPreferredSize()
getSizepublic Dimension getSize()
getToolkitpublic Toolkit getToolkit()
getTreeLockpublic final Object getTreeLock()
gotFocuspublic boolean gotFocus (Event e, Object o)
handleEventpublic boolean handleEvent (Event e)
hidepublic void hide()
imageUpdatepublic boolean imageUpdate (Image image, int infoflags, int x, int y, int width, int height)
insidepublic boolean inside (int x, int y)
invalidatepublic void invalidate()
isEnabledpublic boolean isEnabled()
isFocusTraversablepublic boolean isFocusTraversable()
isShowingpublic boolean isShowing()
isValidpublic boolean isValid()
isVisiblepublic boolean isVisible()
keyDownpublic boolean keyDown (Event e, int key)
keyUppublic boolean keyUp (Event e, int key)
layoutpublic void layout()
listpublic void list()
public void list (PrintStream out)
public void list (PrintStream out, int indentation)
public void list (PrintWriter out)
public void list (PrintWriter out, int indentation)
locatepublic Component locate (int x, int y)
locationpublic Point location()
lostFocuspublic boolean lostFocus (Event e, Object o)
minimizeSizepublic Dimension minimumSize()
mouseDownpublic boolean mouseDown (Event e, int x, int y)
mouseDragpublic boolean mouseDrag (Event e, int x, int y)
mouseEnterpublic boolean mouseEnter (Event e, int x, int y)
mouseExitpublic boolean mouseExit (Event e, int x, int y)
mouseMovepublic boolean mouseMove (Event e, int x, int y)
mouseUppublic boolean mouseUp (Event e, int x, int y)
movepublic void move (int x, int y)
nextFocuspublic void nextFocus()
paintpublic void paint (Graphics g)
paintAllpublic void paintAll (Graphics g)
postEventpublic boolean postEvent (Event e)
preferredSizepublic Dimension preferredSize()
prepareImagepublic boolean prepareImage (Image image, ImageObserver observer)
public boolean prepareImage (Image image, int width, int height, ImageObserver observer)
public void print (Graphics g)
printAllpublic void printAll (Graphics g)
removepublic void remove (MenuComponent popup)
removeComponentListenerpublic void removeComponentListener (ComponentListener l)
removeFocusListenerpublic void removeFocusListener (FocusListener l)
removeKeyListenerpublic void removeKeyListener (KeyListener l)
removeMouseListenerpublic void removeMouseListener (MouseListener l)
removeMouseMotionListenerpublic void removeMouseMotionListener (MouseMotionListener l)
removeNotifypublic void removeNotify()
repaintpublic void repaint()
public void repaint (long tm)
public void repaint (int x, int y, int width, int height)
public void repaint (long tm, int x, int y, int width, int height)
requestFocuspublic void requestFocus()
reshapepublic void reshape (int x, int y, int width, int height)
resizepublic void resize (Dimension d)
public void resize (int width, int height)
setBackgroundpublic void setBackground (Color c)
setBoundspublic void setBounds (int x, int y, int width, int height)
public void setBounds (Rectangle r)
setCursorpublic synchronized void setCursor (Cursor cursor)
setEnabledpublic void setEnabled (boolean b)
setFontpublic synchronized void setFont (Font f)
setForegroundpublic void setForeground (Color c)
setLocalepublic void setLocale (Locale l)
setLocationpublic void setLocation (int x, int y)
public void setLocation (Point p)
setNamepublic void setName (String name)
setSizepublic void setSize (int width, int height)
public void setSize (Dimension d)
setVisiblepublic void setVisible (boolean b)
showpublic void show()
public void show (boolean condition)
sizepublic Dimension size()
toStringpublic String toString()
transferFocuspublic void transferFocus()
updatepublic void update (Graphics g)
validatepublic void validate()
Protected Instance MethodsdisableEventsprotected final void disableEvents (long eventsToDisable)
enableEventsprotected final void enableEvents (long eventsToEnable)
paramStringprotected String paramString()
processComponentEventprotected void processComponentEvent(ComponentEvent e)
processEventprotected void processEvent(AWTEvent e)
processFocusEventprotected void processFocusEvent(FocusEvent e)
processKeyEventprotected void processKeyEvent(KeyEvent e)
processMouseEventprotected void processMouseEvent(MouseEvent e)
processMouseMotionEventprotected void processMouseMotionEvent(MouseEvent e)
See AlsoButton, Canvas, Checkbox, Choice, Color, ColorModel, ComponentPeer, Container, Dimension, Event, Font, FontMetrics, Graphics, ImageObserver, ImageProducer, Label, List, MenuContainer, Object, Point, PrintStream, Rectangle, Scrollbar, Serializable, String, TextComponent, Toolkit |
|