boolean | action(Event evt, Object what)- in classes which support actions, use
processActionEvent(ActionEvent) instead
|
void | add(PopupMenu popup)- Adds the specified popup menu to this component.
|
void | addComponentListener(ComponentListener listener)- Adds the specified listener to this component.
|
void | addFocusListener(FocusListener listener)- Adds the specified listener to this component.
|
void | addHierarchyBoundsListener(HierarchyBoundsListener listener)- Adds the specified listener to this component.
|
void | addHierarchyListener(HierarchyListener listener)- Adds the specified listener to this component.
|
void | addInputMethodListener(InputMethodListener listener)- Adds the specified listener to this component.
|
void | addKeyListener(KeyListener listener)- Adds the specified listener to this component.
|
void | addMouseListener(MouseListener listener)- Adds the specified listener to this component.
|
void | addMouseMotionListener(MouseMotionListener listener)- Adds the specified listener to this component.
|
void | addMouseWheelListener(MouseWheelListener listener)- Adds the specified listener to this component.
|
void | addNotify()- Called when the parent of this Component is made visible or when
the Component is added to an already visible Container and needs
to be shown.
|
void | addPropertyChangeListener(PropertyChangeListener listener)- Adds the specified property listener to this component.
|
void | addPropertyChangeListener(String propertyName, PropertyChangeListener listener)- Adds the specified property listener to this component.
|
void | applyComponentOrientation(ComponentOrientation o)- Sets the text layout orientation of this component.
|
boolean | areFocusTraversalKeysSet(int id)- Tests whether the focus traversal keys for a given action are explicitly
set or inherited.
|
Rectangle | bounds()- use
getBounds() instead
|
int | checkImage(Image image, int width, int height, ImageObserver observer)- Returns the status of the loading of the specified image.
|
int | checkImage(Image image, ImageObserver observer)- Returns the status of the loading of the specified image.
|
protected AWTEvent | coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent)- This is called by the EventQueue if two events with the same event id
and owner component are queued.
|
boolean | contains(int x, int y)- Tests whether or not the specified point is contained within this
component.
|
boolean | contains(Point p)- Tests whether or not the specified point is contained within this
component.
|
Image | createImage(int width, int height)- Creates an image with the specified width and height for use in
double buffering.
|
Image | createImage(ImageProducer producer)- Creates an image from the specified producer.
|
VolatileImage | createVolatileImage(int width, int height)- Creates an image with the specified width and height for use in
double buffering.
|
VolatileImage | createVolatileImage(int width, int height, ImageCapabilities caps)- Creates an image with the specified width and height for use in
double buffering.
|
void | deliverEvent(Event e)- use
(AWTEvent) instead
|
void | disable()- use
setEnabled(boolean) instead
|
protected void | disableEvents(long eventsToDisable)- Disables the specified events.
|
void | dispatchEvent(AWTEvent e)- Forwards AWT events to processEvent() if:
- Events have been enabled for this type of event via
enableEvents() - There is at least one registered listener for this type of event
|
void | doLayout()- Calls the layout manager to re-layout the component.
|
void | enable()- use
setEnabled(boolean) instead
|
void | enable(boolean enabled)- use
setEnabled(boolean) instead
|
protected void | enableEvents(long eventsToEnable)- Enables the specified events.
|
void | enableInputMethods(boolean enable)- Enables or disables input method support for this component.
|
| extends EventListener> T[] getListeners(Class listenerType)- Returns all registered
EventListeners of the given
listenerType.
|
protected void | firePropertyChange(String propertyName, boolean oldValue, boolean newValue)- Report a change in a bound property to any registered property listeners.
|
void | firePropertyChange(String propertyName, byte oldValue, byte newValue)- Report a change in a bound property to any registered property listeners.
|
void | firePropertyChange(String propertyName, char oldValue, char newValue)- Report a change in a bound property to any registered property listeners.
|
void | firePropertyChange(String propertyName, double oldValue, double newValue)- Report a change in a bound property to any registered property listeners.
|
void | firePropertyChange(String propertyName, float oldValue, float newValue)- Report a change in a bound property to any registered property listeners.
|
protected void | firePropertyChange(String propertyName, int oldValue, int newValue)- Report a change in a bound property to any registered property listeners.
|
protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue)- Report a change in a bound property to any registered property listeners.
|
void | firePropertyChange(String propertyName, long oldValue, long newValue)- Report a change in a bound property to any registered property listeners.
|
void | firePropertyChange(String propertyName, short oldValue, short newValue)- Report a change in a bound property to any registered property listeners.
|
AccessibleContext | getAccessibleContext()- Returns the accessibility framework context of this class.
|
float | getAlignmentX()- Returns the preferred horizontal alignment of this component.
|
float | getAlignmentY()- Returns the preferred vertical alignment of this component.
|
Color | getBackground()- Returns this component's background color.
|
Rectangle | getBounds()- Returns a bounding rectangle for this component.
|
Rectangle | getBounds(Rectangle r)- Returns the bounds of this component.
|
ColorModel | getColorModel()- Returns the color model of the device this componet is displayed on.
|
Component | getComponentAt(int x, int y)- Returns the component occupying the position (x,y).
|
Component | getComponentAt(Point p)- Returns the component occupying the position (x,y).
|
ComponentListener[] | getComponentListeners()- Returns an array of all specified listeners registered on this component.
|
ComponentOrientation | getComponentOrientation()- Determines the text layout orientation used by this component.
|
Cursor | getCursor()- Returns the cursor for this component.
|
DropTarget | getDropTarget()- Gets the associated drag-and-drop target, if there is one.
|
Container | getFocusCycleRootAncestor()- Returns the root container that owns the focus cycle where this
component resides.
|
FocusListener[] | getFocusListeners()- Returns an array of all specified listeners registered on this component.
|
Set | getFocusTraversalKeys(int id)- Returns the set of keys for a given focus traversal action, as
defined in
setFocusTraversalKeys.
|
boolean | getFocusTraversalKeysEnabled()- Check whether or not focus traversal keys are enabled on this
Component.
|
Font | getFont()- Returns the font in use for this component.
|
FontMetrics | getFontMetrics(Font font)- Returns the font metrics for the specified font in this component.
|
Color | getForeground()- Returns this component's foreground color.
|
Graphics | getGraphics()- Returns a graphics object for this component.
|
GraphicsConfiguration | getGraphicsConfiguration()- Returns the graphics configuration of this component, if there is one.
|
int | getHeight()- Gets the height of the component.
|
HierarchyBoundsListener[] | getHierarchyBoundsListeners()- Returns an array of all specified listeners registered on this component.
|
HierarchyListener[] | getHierarchyListeners()- Returns an array of all specified listeners registered on this component.
|
boolean | getIgnoreRepaint()- Test whether paint events from the operating system are ignored.
|
InputContext | getInputContext()- Gets the input context of this component, which is inherited from the
parent unless this is overridden.
|
InputMethodListener[] | getInputMethodListeners()- Returns an array of all specified listeners registered on this component.
|
InputMethodRequests | getInputMethodRequests()- Returns the input method request handler, for subclasses which support
on-the-spot text input.
|
KeyListener[] | getKeyListeners()- Returns an array of all specified listeners registered on this component.
|
Locale | getLocale()- Returns the locale for this component.
|
Point | getLocation()- Returns the location of this component's top left corner relative to
its parent component.
|
Point | getLocation(Point p)- Returns the location of this component.
|
Point | getLocationOnScreen()- Returns the location of this component's top left corner in screen
coordinates.
|
Dimension | getMaximumSize()- Returns the component's maximum size.
|
Dimension | getMinimumSize()- Returns the component's minimum size.
|
MouseListener[] | getMouseListeners()- Returns an array of all specified listeners registered on this component.
|
MouseMotionListener[] | getMouseMotionListeners()- Returns an array of all specified listeners registered on this component.
|
MouseWheelListener[] | getMouseWheelListeners()- Returns an array of all specified listeners registered on this component.
|
String | getName()- Returns the name of this component.
|
Container | getParent()- Returns the parent of this component.
|
ComponentPeer | getPeer()- user programs should not directly manipulate peers; use
isDisplayable() instead
|
Dimension | getPreferredSize()- Returns the component's preferred size.
|
PropertyChangeListener[] | getPropertyChangeListeners()- Returns an array of all specified listeners registered on this component.
|
PropertyChangeListener[] | getPropertyChangeListeners(String property)- Returns an array of all specified listeners on the named property that
are registered on this component.
|
Dimension | getSize()- Returns the size of this object.
|
Dimension | getSize(Dimension d)- Returns the size of this component.
|
Toolkit | getToolkit()- Returns the toolkit in use for this component.
|
Object | getTreeLock()- Returns the object used for synchronization locks on this component
when performing tree and layout functions.
|
int | getWidth()- Gets the width of the component.
|
int | getX()- Gets the x coordinate of the upper left corner.
|
int | getY()- Gets the y coordinate of the upper left corner.
|
boolean | gotFocus(Event evt, Object what)- use
processFocusEvent(FocusEvent) instead
|
boolean | handleEvent(Event evt)- use
processEvent(AWTEvent) instead
|
boolean | hasFocus()- Tests if this component is the focus owner.
|
void | hide()- use
setVisible(boolean) instead
|
boolean | imageUpdate(Image img, int flags, int x, int y, int w, int h)- Called when an image has changed so that this component is repainted.
|
boolean | inside(int x, int y)- use
contains(int,int) instead
|
void | invalidate()- Invalidates this component and all of its parent components.
|
boolean | isBackgroundSet()- Tests if the background was explicitly set, or just inherited from the
parent.
|
boolean | isCursorSet()- Tests if the cursor was explicitly set, or just inherited from the parent.
|
boolean | isDisplayable()- Tests if the component is displayable.
|
boolean | isDoubleBuffered()- Checks if this image is painted to an offscreen image buffer that is
later copied to screen (double buffering reduces flicker).
|
boolean | isEnabled()- Tests whether or not this component is enabled.
|
boolean | isFocusCycleRoot(Container c)- Tests if the container is the ancestor of the focus cycle that
this component belongs to.
|
boolean | isFocusOwner()- Tests if this component is the focus owner.
|
boolean | isFocusTraversable()- use
isFocusable() instead
|
boolean | isFocusable()- Tests if this component can receive focus.
|
boolean | isFontSet()- Tests if the font was explicitly set, or just inherited from the parent.
|
boolean | isForegroundSet()- Tests if the foreground was explicitly set, or just inherited from the
parent.
|
boolean | isLightweight()- Return whether the component is lightweight.
|
boolean | isMaximumSizeSet()- Returns
true if the current maximum size is not
null and was set by a call to
setMaximumSize(Dimension), otherwise returns false.
|
boolean | isMinimumSizeSet()- Returns
true if the current minimum size is not
null and was set by a call to
setMinimumSize(Dimension), otherwise returns false.
|
boolean | isOpaque()- Tests if this component is opaque.
|
boolean | isPreferredSizeSet()- Returns
true if the current preferred size is not
null and was set by a call to
setPreferredSize(Dimension), otherwise returns false.
|
boolean | isShowing()- Tests whether or not this component is actually being shown on
the screen.
|
boolean | isValid()- Tests whether or not this component is valid.
|
boolean | isVisible()- Tests whether or not this component is visible.
|
boolean | keyDown(Event evt, int key)- use
processKeyEvent(KeyEvent) instead
|
boolean | keyUp(Event evt, int key)- use
processKeyEvent(KeyEvent) instead
|
void | layout()- use
doLayout() instead
|
void | list()- Prints a listing of this component to
System.out.
|
void | list(PrintStream out)- Prints a listing of this component to the specified print stream.
|
void | list(PrintStream out, int indent)- Prints a listing of this component to the specified print stream,
starting at the specified indentation point.
|
void | list(PrintWriter out)- Prints a listing of this component to the specified print writer.
|
void | list(PrintWriter out, int indent)- Prints a listing of this component to the specified print writer,
starting at the specified indentation point.
|
Component | locate(int x, int y)- use
getComponentAt(int,int) instead
|
Point | location()- use
getLocation() instead
|
boolean | lostFocus(Event evt, Object what)- use
processFocusEvent(FocusEvent) instead
|
Dimension | minimumSize()- use
getMinimumSize() instead
|
boolean | mouseDown(Event evt, int x, int y)- use
processMouseEvent(MouseEvent) instead
|
boolean | mouseDrag(Event evt, int x, int y)- use
processMouseMotionEvent(MouseEvent) instead
|
boolean | mouseEnter(Event evt, int x, int y)- use
processMouseEvent(MouseEvent) instead
|
boolean | mouseExit(Event evt, int x, int y)- use
processMouseEvent(MouseEvent) instead
|
boolean | mouseMove(Event evt, int x, int y)- use
processMouseMotionEvent(MouseEvent) instead
|
boolean | mouseUp(Event evt, int x, int y)- use
processMouseEvent(MouseEvent) instead
|
void | move(int x, int y)- use
setLocation(int,int) instead
|
void | nextFocus()- use
() instead
|
void | paint(Graphics g)- Paints this component on the screen.
|
void | paintAll(Graphics g)- Paints this entire component, including any sub-components.
|
protected String | paramString()- Returns a debugging string representing this component.
|
boolean | postEvent(Event e)- use
dispatchEvent(AWTEvent) instead
|
Dimension | preferredSize()- use
getPreferredSize() instead
|
boolean | prepareImage(Image image, int width, int height, ImageObserver observer)- Prepares the specified image for rendering on this component at the
specified scaled width and height
|
boolean | prepareImage(Image image, ImageObserver observer)- Prepares the specified image for rendering on this component.
|
void | print(Graphics g)- Prints this component.
|
void | printAll(Graphics g)- Prints this component, including all sub-components.
|
protected void | processComponentEvent(ComponentEvent e)- Called when a component event is dispatched and component events are
enabled.
|
protected void | processEvent(AWTEvent e)- Processes the specified event.
|
protected void | processFocusEvent(FocusEvent e)- Called when a focus event is dispatched and component events are
enabled.
|
protected void | processHierarchyBoundsEvent(HierarchyEvent e)- Called when a hierarchy bounds event is dispatched and component events
are enabled.
|
protected void | processHierarchyEvent(HierarchyEvent e)- Called when a hierarchy change event is dispatched and component events
are enabled.
|
protected void | processInputMethodEvent(InputMethodEvent e)- Called when an input method event is dispatched and component events are
enabled.
|
protected void | processKeyEvent(KeyEvent e)- Called when a key event is dispatched and component events are
enabled.
|
protected void | processMouseEvent(MouseEvent e)- Called when a regular mouse event is dispatched and component events are
enabled.
|
protected void | processMouseMotionEvent(MouseEvent e)- Called when a mouse motion event is dispatched and component events are
enabled.
|
protected void | processMouseWheelEvent(MouseWheelEvent e)- Called when a mouse wheel event is dispatched and component events are
enabled.
|
void | remove(MenuComponent popup)- Removes the specified popup menu from this component.
|
void | removeComponentListener(ComponentListener listener)- Removes the specified listener from the component.
|
void | removeFocusListener(FocusListener listener)- Removes the specified listener from the component.
|
void | removeHierarchyBoundsListener(HierarchyBoundsListener listener)- Removes the specified listener from the component.
|
void | removeHierarchyListener(HierarchyListener listener)- Removes the specified listener from the component.
|
void | removeInputMethodListener(InputMethodListener listener)- Removes the specified listener from the component.
|
void | removeKeyListener(KeyListener listener)- Removes the specified listener from the component.
|
void | removeMouseListener(MouseListener listener)- Removes the specified listener from the component.
|
void | removeMouseMotionListener(MouseMotionListener listener)- Removes the specified listener from the component.
|
void | removeMouseWheelListener(MouseWheelListener listener)- Removes the specified listener from the component.
|
void | removeNotify()- Called to inform this component is has been removed from its
container.
|
void | removePropertyChangeListener(PropertyChangeListener listener)- Removes the specified property listener from the component.
|
void | removePropertyChangeListener(String propertyName, PropertyChangeListener listener)- Removes the specified property listener on a particular property from
the component.
|
void | repaint()- Repaint this entire component.
|
void | repaint(int x, int y, int w, int h)- Repaints the specified rectangular region within this component.
|
void | repaint(long tm)- Repaint this entire component.
|
void | repaint(long tm, int x, int y, int width, int height)- Repaints the specified rectangular region within this component.
|
void | requestFocus()- Request that this Component be given the keyboard input focus and
that its top-level ancestor become the focused Window.
|
protected boolean | requestFocus(boolean temporary)- Request that this Component be given the keyboard input focus and
that its top-level ancestor become the focused Window.
|
boolean | requestFocusInWindow()- Request that this component be given the keyboard input focus, if
its top-level ancestor is the currently focused Window.
|
protected boolean | requestFocusInWindow(boolean temporary)- Request that this component be given the keyboard input focus, if
its top-level ancestor is the currently focused Window.
|
void | reshape(int x, int y, int width, int height)- use
setBounds(int,int,int,int) instead
|
void | resize(int width, int height)- use
setSize(int,int) instead
|
void | resize(Dimension d)- use
setSize(Dimension) instead
|
void | setBackground(Color c)- Sets this component's background color to the specified color.
|
void | setBounds(int x, int y, int w, int h)- Sets the bounding rectangle for this component to the specified values.
|
void | setBounds(Rectangle r)- Sets the bounding rectangle for this component to the specified
rectangle.
|
void | setComponentOrientation(ComponentOrientation o)- Sets the text layout orientation of this component.
|
void | setCursor(Cursor cursor)- Sets the cursor for this component to the specified cursor.
|
void | setDropTarget(DropTarget dt)- Set the associated drag-and-drop target, which receives events when this
is enabled.
|
void | setEnabled(boolean enabled)- Enables or disables this component.
|
void | setFocusTraversalKeys(int id, AWTKeyStroke> keystrokes)- Sets the focus traversal keys for one of the three focus
traversal directions supported by Components:
KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS.
|
void | setFocusTraversalKeysEnabled(boolean focusTraversalKeysEnabled)- Enable or disable focus traversal keys on this Component.
|
void | setFocusable(boolean focusable)- Specify whether this component can receive focus.
|
void | setFont(Font f)- Sets the font for this component to the specified font.
|
void | setForeground(Color c)- Sets this component's foreground color to the specified color.
|
void | setIgnoreRepaint(boolean ignoreRepaint)- Sets whether paint messages delivered by the operating system should be
ignored.
|
void | setLocale(Locale newLocale)- Sets the locale for this component to the specified locale.
|
void | setLocation(int x, int y)- Moves this component to the specified location, relative to the parent's
coordinates.
|
void | setLocation(Point p)- Moves this component to the specified location, relative to the parent's
coordinates.
|
void | setMaximumSize(Dimension size)- Sets the maximum size that will be returned by
getMaximumSize()
always, and sends a PropertyChangeEvent (with the property name
'maximumSize') to all registered listeners.
|
void | setMinimumSize(Dimension size)- Sets the minimum size that will be returned by
getMinimumSize()
always, and sends a PropertyChangeEvent (with the property name
'minimumSize') to all registered listeners.
|
void | setName(String name)- Sets the name of this component to the specified name (this is a bound
property with the name 'name').
|
void | setPreferredSize(Dimension size)- Sets the preferred size that will be returned by
getPreferredSize() always, and sends a
PropertyChangeEvent (with the property name 'preferredSize') to
all registered listeners.
|
void | setSize(int width, int height)- Sets the size of this component to the specified width and height.
|
void | setSize(Dimension d)- Sets the size of this component to the specified value.
|
void | setVisible(boolean visible)- Makes this component visible or invisible.
|
void | show()- use
setVisible(boolean) instead
|
void | show(boolean visible)- use
setVisible(boolean) instead
|
Dimension | size()- use
getSize() instead
|
String | toString()- Returns a string representation of this component.
|
void | transferFocus()- Transfers focus to the next component in the focus traversal
order, as though this were the current focus owner.
|
void | transferFocusBackward()- Transfers focus to the previous component in the focus traversal
order, as though this were the current focus owner.
|
void | transferFocusUpCycle()- Transfers focus to the focus cycle root of this component.
|
void | update(Graphics g)- Updates this component.
|
void | validate()- Called to ensure that the layout for this component is valid.
|