FileDocCategorySizeDatePackage
Component.javaAPI DocAndroid 1.5 API182089Wed May 06 22:41:54 BST 2009java.awt

Component

public abstract class Component extends Object implements Serializable, ImageObserver, MenuContainer
The abstract Component class specifies an object with a graphical representation that can be displayed on the screen and that can interact with the user (for example: scrollbars, buttons, checkboxes).
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
The Constant serialVersionUID.
public static final float
TOP_ALIGNMENT
The Constant TOP_ALIGNMENT indicates the top alignment of the component.
public static final float
CENTER_ALIGNMENT
The Constant CENTER_ALIGNMENT indicates the center alignment of the component.
public static final float
BOTTOM_ALIGNMENT
The Constant BOTTOM_ALIGNMENT indicates the bottom alignment of the component.
public static final float
LEFT_ALIGNMENT
The Constant LEFT_ALIGNMENT indicates the left alignment of the component.
public static final float
RIGHT_ALIGNMENT
The Constant RIGHT_ALIGNMENT indicates the right alignment of the component.
private static final Hashtable
childClassesFlags
The Constant childClassesFlags.
private static final ComponentPeer
peer
The Constant peer.
private static final boolean
incrementalImageUpdate
The Constant incrementalImageUpdate.
final transient Toolkit
toolkit
The toolkit.
final transient ComponentBehavior
behaviour
The behaviour.
private String
name
The name.
private boolean
autoName
The auto name.
private Font
font
The font.
private Color
backColor
The back color.
private Color
foreColor
The fore color.
boolean
deprecatedEventHandler
The deprecated event handler.
private long
enabledEvents
The enabled events.
private long
enabledAWTEvents
The enabled AWT events.
private final AWTListenerList
componentListeners
The component listeners.
private final AWTListenerList
focusListeners
The focus listeners.
private final AWTListenerList
hierarchyListeners
The hierarchy listeners.
private final AWTListenerList
hierarchyBoundsListeners
The hierarchy bounds listeners.
private final AWTListenerList
keyListeners
The key listeners.
private final AWTListenerList
mouseListeners
The mouse listeners.
private final AWTListenerList
mouseMotionListeners
The mouse motion listeners.
private final AWTListenerList
mouseWheelListeners
The mouse wheel listeners.
private final AWTListenerList
inputMethodListeners
The input method listeners.
int
x
The x.
int
y
The y.
int
w
The w.
int
h
The h.
private Dimension
maximumSize
The maximum size.
private Dimension
minimumSize
The minimum size.
private Dimension
preferredSize
The preferred size.
private int
boundsMaskParam
The bounds mask param.
private boolean
ignoreRepaint
The ignore repaint.
private boolean
enabled
The enabled.
private boolean
inputMethodsEnabled
The input methods enabled.
transient boolean
dispatchToIM
The dispatch to im.
private boolean
focusable
The focusable.
boolean
visible
The visible.
private boolean
calledSetFocusable
The called set focusable.
private boolean
overridenIsFocusable
The overridden is focusable.
private boolean
focusTraversalKeysEnabled
The focus traversal keys enabled.
private final Map
traversalKeys
Possible keys are: FORWARD_TRAVERSAL_KEYS, BACKWARD_TRAVERSAL_KEYS, UP_CYCLE_TRAVERSAL_KEYS.
int[]
traversalIDs
The traversal i ds.
private Locale
locale
The locale.
private ComponentOrientation
orientation
The orientation.
private PropertyChangeSupport
propertyChangeSupport
The property change support.
private boolean
coalescer
The coalescer.
private Hashtable
eventsTable
The events table.
private LinkedList
eventsList
Cashed reference used during EventQueue.postEvent()
private int
hierarchyChangingCounter
The hierarchy changing counter.
private boolean
wasShowing
The was showing.
private boolean
wasDisplayable
The was displayable.
Cursor
cursor
The cursor.
private boolean
mouseExitedExpected
The mouse exited expected.
transient org.apache.harmony.awt.gl.MultiRectArea
repaintRegion
The repaint region.
transient Object
redrawManager
The redraw manager.
private boolean
valid
The valid.
private HashMap
updatedImages
The updated images.
private final transient Object
componentLock
The component lock.
Constructors Summary
protected Component()
Instantiates a new component.

     
        PrivilegedAction<String[]> action = new PrivilegedAction<String[]>() {
            public String[] run() {
                String properties[] = new String[2];
                properties[0] = System.getProperty("awt.image.redrawrate", "100"); //$NON-NLS-1$ //$NON-NLS-2$
                properties[1] = System.getProperty("awt.image.incrementaldraw", "true"); //$NON-NLS-1$ //$NON-NLS-2$
                return properties;
            }
        };
        String properties[] = AccessController.doPrivileged(action);
        // FIXME: rate is never used, can this code and the get property above
        // be removed?
        // int rate;
        //
        // try {
        // rate = Integer.decode(properties[0]).intValue();
        // } catch (NumberFormatException e) {
        // rate = 100;
        // }
        incrementalImageUpdate = properties[1].equals("true"); //$NON-NLS-1$
    
        toolkit.lockAWT();
        try {
            orientation = ComponentOrientation.UNKNOWN;
            redrawManager = null;
            // ???AWT
            /*
             * traversalIDs = this instanceof Container ?
             * KeyboardFocusManager.contTraversalIDs :
             * KeyboardFocusManager.compTraversalIDs; for (int element :
             * traversalIDs) { traversalKeys.put(new Integer(element), null); }
             * behaviour = createBehavior();
             */
            behaviour = null;

            deriveCoalescerFlag();
        } finally {
            toolkit.unlockAWT();
        }
    
Methods Summary
public booleanaction(java.awt.Event evt, java.lang.Object what)
Handles the event. Use ActionListener instead of this.

param
evt the Event.
param
what the event's key.
return
true, if successful.
deprecated
Use ActionListener class for registering event listener.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
voidaddAWTComponentListener(java.awt.event.ComponentListener l)
Adds the awt component listener.

param
l the l.

        enableAWTEvents(AWTEvent.COMPONENT_EVENT_MASK);
        componentListeners.addSystemListener(l);
    
voidaddAWTFocusListener(java.awt.event.FocusListener l)
Adds the awt focus listener.

param
l the l.

        enableAWTEvents(AWTEvent.FOCUS_EVENT_MASK);
        focusListeners.addSystemListener(l);
    
voidaddAWTInputMethodListener(java.awt.event.InputMethodListener l)
Adds the awt input method listener.

param
l the l.

        enableAWTEvents(AWTEvent.INPUT_METHOD_EVENT_MASK);
        inputMethodListeners.addSystemListener(l);
    
voidaddAWTKeyListener(java.awt.event.KeyListener l)
Adds the awt key listener.

param
l the l.

        enableAWTEvents(AWTEvent.KEY_EVENT_MASK);
        keyListeners.addSystemListener(l);
    
voidaddAWTMouseListener(java.awt.event.MouseListener l)
Adds the awt mouse listener.

param
l the l.

        enableAWTEvents(AWTEvent.MOUSE_EVENT_MASK);
        mouseListeners.addSystemListener(l);
    
voidaddAWTMouseMotionListener(java.awt.event.MouseMotionListener l)
Adds the awt mouse motion listener.

param
l the l.

        enableAWTEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
        mouseMotionListeners.addSystemListener(l);
    
voidaddAWTMouseWheelListener(java.awt.event.MouseWheelListener l)
Adds the awt mouse wheel listener.

param
l the l.

        enableAWTEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);
        mouseWheelListeners.addSystemListener(l);
    
public voidaddComponentListener(java.awt.event.ComponentListener l)
Adds the specified component listener to the Component for receiving component's event.

param
l the ComponentListener.

        componentListeners.addUserListener(l);
    
public voidaddFocusListener(java.awt.event.FocusListener l)
Adds the specified focus listener to the Component for receiving focus events.

param
l the FocusListener.

        focusListeners.addUserListener(l);
    
public voidaddHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)
Adds the specified hierarchy bounds listener.

param
l the HierarchyBoundsListener.

        hierarchyBoundsListeners.addUserListener(l);
    
public voidaddHierarchyListener(java.awt.event.HierarchyListener l)
Adds the specified hierarchy listener.

param
l the HierarchyListener.

        hierarchyListeners.addUserListener(l);
    
public voidaddInputMethodListener(java.awt.event.InputMethodListener l)
Adds the specified input method listener.

param
l the InputMethodListener.

        inputMethodListeners.addUserListener(l);
    
public voidaddKeyListener(java.awt.event.KeyListener l)
Adds the specified key listener.

param
l the KeyListener.

        keyListeners.addUserListener(l);
    
public voidaddMouseListener(java.awt.event.MouseListener l)
Adds the specified mouse listener.

param
l the MouseListener.

        mouseListeners.addUserListener(l);
    
public voidaddMouseMotionListener(java.awt.event.MouseMotionListener l)
Adds the specified mouse motion listener.

param
l the MouseMotionListener.

        mouseMotionListeners.addUserListener(l);
    
public voidaddMouseWheelListener(java.awt.event.MouseWheelListener l)
Adds the specified mouse wheel listener.

param
l the MouseWheelListener.

        mouseWheelListeners.addUserListener(l);
    
voidaddNewEvent(java.awt.AWTEvent event)
Adds the new event.

param
event the event.

        eventsList.addLast(event);
    
public voidaddNotify()
Connects this Component to a native screen resource and makes it displayable. This method not be called directly by user applications.

        toolkit.lockAWT();
        try {
            prepare4HierarchyChange();
            behaviour.addNotify();
            // ???AWT
            // finishHierarchyChange(this, parent, 0);
            // if (dropTarget != null) {
            // dropTarget.addNotify(peer);
            // }
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanareFocusTraversalKeysSet(int id)
Returns true if the set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Component.

param
id the ID of traversal key.
return
true, if the set of focus traversal keys for the given focus. traversal operation has been explicitly defined for this Component, false otherwise.

        toolkit.lockAWT();
        try {
            Integer Id = new Integer(id);
            if (traversalKeys.containsKey(Id)) {
                return traversalKeys.get(Id) != null;
            }
            // awt.14F=invalid focus traversal key identifier
            throw new IllegalArgumentException(Messages.getString("awt.14F")); //$NON-NLS-1$
        } finally {
            toolkit.unlockAWT();
        }
    
java.lang.StringautoName()
Auto name.

return
the string.

        String name = getClass().getName();
        if (name.indexOf("$") != -1) { //$NON-NLS-1$
            return null;
        }
        // ???AWT
        // int number = toolkit.autoNumber.nextComponent++;
        int number = 0;
        name = name.substring(name.lastIndexOf(".") + 1) + Integer.toString(number); //$NON-NLS-1$
        return name;
    
public java.awt.Rectanglebounds()
Gets the bounds of the Component.

return
the rectangle bounds of the Component.
deprecated
Use getBounds() methood.

        toolkit.lockAWT();
        try {
            return new Rectangle(x, y, w, h);
        } finally {
            toolkit.unlockAWT();
        }
    
public intcheckImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)
Returns the construction status of a specified image with the specified width and height that is being created.

param
image the image to be checked.
param
width the width of scaled image which status is being checked, or -1.
param
height the height of scaled image which status is being checked, or -1.
param
observer the ImageObserver object to be notified while the image is being prepared.
return
the ImageObserver flags of the current state of the image data.

        toolkit.lockAWT();
        try {
            return toolkit.checkImage(image, width, height, observer);
        } finally {
            toolkit.unlockAWT();
        }
    
public intcheckImage(java.awt.Image image, java.awt.image.ImageObserver observer)
Returns the construction status of a specified image that is being created.

param
image the image to be checked.
param
observer the ImageObserver object to be notified while the image is being prepared.
return
the ImageObserver flags of the current state of the image data.

        toolkit.lockAWT();
        try {
            return toolkit.checkImage(image, -1, -1, observer);
        } finally {
            toolkit.unlockAWT();
        }
    
protected java.awt.AWTEventcoalesceEvents(java.awt.AWTEvent existingEvent, java.awt.AWTEvent newEvent)
Coalesces the existed event with new event.

param
existingEvent the existing event in the EventQueue.
param
newEvent the new event to be posted to the EventQueue.
return
the coalesced AWTEvent, or null if there is no coalescing done.

        toolkit.lockAWT();
        try {
            // Nothing to do:
            // 1. Mouse events coalesced at WTK level
            // 2. Paint events handled by RedrawManager
            // This method is for overriding only
            return null;
        } finally {
            toolkit.unlockAWT();
        }
    
public booleancontains(java.awt.Point p)
Returns true, if the component contains the specified Point.

param
p the Point.
return
true, if the component contains the specified Point, false otherwise.

        toolkit.lockAWT();
        try {
            return contains(p.x, p.y);
        } finally {
            toolkit.unlockAWT();
        }
    
public booleancontains(int x, int y)
Returns true, if the component contains the point with the specified coordinates.

param
x the x coordinate.
param
y the y coordinate.
return
true, if the component contains the point with the specified coordinates, false otherwise.

        toolkit.lockAWT();
        try {
            return inside(x, y);
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.ImagecreateImage(java.awt.image.ImageProducer producer)
Creates the image with the specified ImageProducer.

param
producer the ImageProducer to be used for image creation.
return
the image with the specified ImageProducer.

        toolkit.lockAWT();
        try {
            return toolkit.createImage(producer);
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.ImagecreateImage(int width, int height)
Creates an off-screen drawable image to be used for double buffering.

param
width the width of the image.
param
height the height of the image.
return
the off-screen drawable image or null if the component is not displayable or GraphicsEnvironment.isHeadless() method returns true.

        toolkit.lockAWT();
        try {
            if (!isDisplayable()) {
                return null;
            }
            GraphicsConfiguration gc = getGraphicsConfiguration();
            if (gc == null) {
                return null;
            }
            ColorModel cm = gc.getColorModel(Transparency.OPAQUE);
            WritableRaster wr = cm.createCompatibleWritableRaster(width, height);
            Image image = new BufferedImage(cm, wr, cm.isAlphaPremultiplied(), null);
            fillImageBackground(image, width, height);
            return image;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.image.VolatileImagecreateVolatileImage(int width, int height, java.awt.ImageCapabilities caps)
Creates an off-screen drawable image with the specified width, height and ImageCapabilities.

param
width the width.
param
height the height.
param
caps the ImageCapabilities.
return
the volatile image.
throws
AWTException if an image with the specified capabilities cannot be created.

        toolkit.lockAWT();
        try {
            if (!isDisplayable()) {
                return null;
            }
            GraphicsConfiguration gc = getGraphicsConfiguration();
            if (gc == null) {
                return null;
            }
            VolatileImage image = gc.createCompatibleVolatileImage(width, height, caps);
            fillImageBackground(image, width, height);
            return image;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.image.VolatileImagecreateVolatileImage(int width, int height)
Creates a volatile off-screen drawable image which is used for double buffering.

param
width the width of image.
param
height the height of image.
return
the volatile image a volatile off-screen drawable image which is used for double buffering or null if the component is not displayable, or GraphicsEnvironment.isHeadless() method returns true.

        toolkit.lockAWT();
        try {
            if (!isDisplayable()) {
                return null;
            }
            GraphicsConfiguration gc = getGraphicsConfiguration();
            if (gc == null) {
                return null;
            }
            VolatileImage image = gc.createCompatibleVolatileImage(width, height);
            fillImageBackground(image, width, height);
            return image;
        } finally {
            toolkit.unlockAWT();
        }
    
public voiddeliverEvent(java.awt.Event evt)
Delivers event.

param
evt the event.
deprecated
Replaced by dispatchEvent(AWTEvent e) method.

        postEvent(evt);
    
private voidderiveCoalescerFlag()
Determine that the class inherited from Component declares the method coalesceEvents(), and put the results to the childClassesFlags map.

        Class<?> thisClass = getClass();
        boolean flag = true;
        synchronized (childClassesFlags) {
            Boolean flagWrapper = childClassesFlags.get(thisClass);
            if (flagWrapper == null) {
                Method coalesceMethod = null;
                for (Class<?> c = thisClass; c != Component.class; c = c.getSuperclass()) {
                    try {
                        coalesceMethod = c.getDeclaredMethod("coalesceEvents", new Class[] { //$NON-NLS-1$
                                        Class.forName("java.awt.AWTEvent"), //$NON-NLS-1$
                                        Class.forName("java.awt.AWTEvent")}); //$NON-NLS-1$
                    } catch (Exception e) {
                    }
                    if (coalesceMethod != null) {
                        break;
                    }
                }
                flag = (coalesceMethod != null);
                childClassesFlags.put(thisClass, Boolean.valueOf(flag));
            } else {
                flag = flagWrapper.booleanValue();
            }
        }
        coalescer = flag;
        if (flag) {
            eventsTable = new Hashtable<Integer, LinkedList<AWTEvent>>();
        } else {
            eventsTable = null;
        }
    
public voiddisable()
Disables.

deprecated
Replaced by setEnabled(boolean) method.

        toolkit.lockAWT();
        try {
            setEnabledImpl(false);
        } finally {
            toolkit.unlockAWT();
        }
        // ???AWT: fireAccessibleStateChange(AccessibleState.ENABLED, false);
    
protected final voiddisableEvents(long eventsToDisable)
Disables the events with types specified by the specified event mask from being delivered to this component.

param
eventsToDisable the event mask specifying the event types.

        toolkit.lockAWT();
        try {
            enabledEvents &= ~eventsToDisable;
        } finally {
            toolkit.unlockAWT();
        }
    
public final voiddispatchEvent(java.awt.AWTEvent e)
Dispatches an event to this component.

param
e the Event.

        // ???AWT
        /*
         * if (e.isConsumed()) { return; } if (e instanceof PaintEvent) {
         * toolkit.dispatchAWTEvent(e); processPaintEvent((PaintEvent) e);
         * return; } KeyboardFocusManager kfm =
         * KeyboardFocusManager.getCurrentKeyboardFocusManager(); if
         * (!e.dispatchedByKFM && kfm.dispatchEvent(e)) { return; } if (e
         * instanceof KeyEvent) { KeyEvent ke = (KeyEvent) e; // consumes
         * KeyEvent which represents a focus traversal key if
         * (getFocusTraversalKeysEnabled()) { kfm.processKeyEvent(this, ke); if
         * (ke.isConsumed()) { return; } } } if (inputMethodsEnabled &&
         * dispatchToIM && e.isPosted && dispatchEventToIM(e)) { return; } if
         * (e.getID() == WindowEvent.WINDOW_ICONIFIED) {
         * notifyInputMethod(null); } AWTEvent.EventDescriptor descriptor =
         * toolkit.eventTypeLookup.getEventDescriptor(e);
         * toolkit.dispatchAWTEvent(e); if (descriptor != null) { if
         * (isEventEnabled(descriptor.eventMask) ||
         * (getListeners(descriptor.listenerType).length > 0)) {
         * processEvent(e); } // input events can be consumed by user listeners:
         * if (!e.isConsumed() && ((enabledAWTEvents & descriptor.eventMask) !=
         * 0)) { postprocessEvent(e, descriptor.eventMask); } }
         * postDeprecatedEvent(e);
         */
    
private booleandispatchEventToIM(java.awt.AWTEvent e)
Dispatches input & focus events to input method context.

param
e event to pass to InputContext.dispatchEvent().
return
true if event was consumed by IM, false otherwise.

        InputContext ic = getInputContext();
        if (ic == null) {
            return false;
        }
        int id = e.getID();
        boolean isInputEvent = ((id >= KeyEvent.KEY_FIRST) && (id <= KeyEvent.KEY_LAST))
                || ((id >= MouseEvent.MOUSE_FIRST) && (id <= MouseEvent.MOUSE_LAST));
        if (((id >= FocusEvent.FOCUS_FIRST) && (id <= FocusEvent.FOCUS_LAST)) || isInputEvent) {
            ic.dispatchEvent(e);
        }
        return e.isConsumed();
    
public voiddoLayout()
Prompts the layout manager to lay out this component.

        toolkit.lockAWT();
        try {
            layout();
        } finally {
            toolkit.unlockAWT();
        }
        // Implemented in Container
    
public voidenable()
Enables this component.

deprecated
Replaced by setEnabled(boolean) method.

        toolkit.lockAWT();
        try {
            setEnabledImpl(true);
        } finally {
            toolkit.unlockAWT();
        }
        // ???AWT: fireAccessibleStateChange(AccessibleState.ENABLED, true);
    
public voidenable(boolean b)
Enables or disable this component.

param
b the boolean parameter.
deprecated
Replaced by setEnabled(boolean) method.

        toolkit.lockAWT();
        try {
            if (b) {
                enable();
            } else {
                disable();
            }
        } finally {
            toolkit.unlockAWT();
        }
    
private voidenableAWTEvents(long eventsToEnable)
Enable awt events.

param
eventsToEnable the events to enable.

        enabledAWTEvents |= eventsToEnable;
    
protected final voidenableEvents(long eventsToEnable)
Enables the events with the specified event mask to be delivered to this component.

param
eventsToEnable the events mask which specifies the types of events to enable.

        toolkit.lockAWT();
        try {
            enabledEvents |= eventsToEnable;
            deprecatedEventHandler = false;
        } finally {
            toolkit.unlockAWT();
        }
    
public voidenableInputMethods(boolean enable)
Enables or disables input method support for this component.

param
enable true to enable input method support, false to disable it.

        toolkit.lockAWT();
        try {
            if (!enable) {
                removeNotifyInputContext();
            }
            inputMethodsEnabled = enable;
        } finally {
            toolkit.unlockAWT();
        }
    
private voidfillImageBackground(java.awt.Image image, int width, int height)
Fill the image being created by createImage() or createVolatileImage() with the component's background color to prepare it for double-buffered painting.

param
image the image.
param
width the width.
param
height the height.

        Graphics gr = image.getGraphics();
        gr.setColor(getBackground());
        gr.fillRect(0, 0, width, height);
        gr.dispose();
    
protected voidfirePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
Reports a bound property changes for int properties.

param
propertyName the property name.
param
oldValue the old property's value.
param
newValue the new property's value.

        firePropertyChangeImpl(propertyName, new Integer(oldValue), new Integer(newValue));
    
protected voidfirePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
Report a bound property change for a boolean-valued property.

param
propertyName the property name.
param
oldValue the property's old value.
param
newValue the property's new value.

        firePropertyChangeImpl(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
    
protected voidfirePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
Reports a bound property change for an Object-valued property.

param
propertyName the property name.
param
oldValue the property's old value.
param
newValue the property's new value.

        firePropertyChangeImpl(propertyName, oldValue, newValue);
    
public voidfirePropertyChange(java.lang.String propertyName, byte oldValue, byte newValue)
Report a bound property change for a byte-valued property.

param
propertyName the property name.
param
oldValue the property's old value.
param
newValue the property's new value.

        firePropertyChangeImpl(propertyName, new Byte(oldValue), new Byte(newValue));
    
public voidfirePropertyChange(java.lang.String propertyName, char oldValue, char newValue)
Report a bound property change for a char-valued property.

param
propertyName the property name.
param
oldValue the old property's value.
param
newValue the new property's value.

        firePropertyChangeImpl(propertyName, new Character(oldValue), new Character(newValue));
    
public voidfirePropertyChange(java.lang.String propertyName, short oldValue, short newValue)
Report a bound property change for a short-valued property.

param
propertyName the property name.
param
oldValue the old property's value.
param
newValue the new property's value.

        firePropertyChangeImpl(propertyName, new Short(oldValue), new Short(newValue));
    
public voidfirePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
Report a bound property change for a long-valued property.

param
propertyName the property name.
param
oldValue the old property's value.
param
newValue the new property's value.

        firePropertyChangeImpl(propertyName, new Long(oldValue), new Long(newValue));
    
public voidfirePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
Report a bound property change for a float-valued property.

param
propertyName the property name.
param
oldValue the old property's value.
param
newValue the new property's value.

        firePropertyChangeImpl(propertyName, new Float(oldValue), new Float(newValue));
    
public voidfirePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
Report a bound property change for a double-valued property.

param
propertyName the property name.
param
oldValue the old property's value.
param
newValue the new property's value.

        firePropertyChangeImpl(propertyName, new Double(oldValue), new Double(newValue));
    
private voidfirePropertyChangeImpl(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
Fire property change impl.

param
propertyName the property name.
param
oldValue the old value.
param
newValue the new value.

        PropertyChangeSupport pcs;
        synchronized (componentLock) {
            if (propertyChangeSupport == null) {
                return;
            }
            pcs = propertyChangeSupport;
        }
        pcs.firePropertyChange(propertyName, oldValue, newValue);
    
public floatgetAlignmentX()
Gets the alignment along the x axis.

return
the alignment along the x axis.

        toolkit.lockAWT();
        try {
            return CENTER_ALIGNMENT;
        } finally {
            toolkit.unlockAWT();
        }
    
public floatgetAlignmentY()
Gets the alignment along the y axis.

return
the alignment along y axis.

        toolkit.lockAWT();
        try {
            return CENTER_ALIGNMENT;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.ColorgetBackground()
Gets the background color for this component.

return
the background color for this component.

        toolkit.lockAWT();
        try {
            // ???AWT
            /*
             * if ((backColor == null) && (parent != null)) { return
             * parent.getBackground(); }
             */
            return backColor;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.RectanglegetBounds()
Gets the bounding rectangle of this component.

return
the bounding rectangle of this component.

        toolkit.lockAWT();
        try {
            return bounds();
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.RectanglegetBounds(java.awt.Rectangle rv)
Writes the data of the bounding rectangle to the specified Rectangle object.

param
rv the Rectangle object where the bounding rectangle's data is stored.
return
the bounding rectangle.

        toolkit.lockAWT();
        try {
            if (rv == null) {
                rv = new Rectangle();
            }
            rv.setBounds(x, y, w, h);
            return rv;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.image.ColorModelgetColorModel()
Gets the color model of the Component.

return
the color model of the Component.

        toolkit.lockAWT();
        try {
            return getToolkit().getColorModel();
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.ComponentgetComponentAt(java.awt.Point p)
Gets the Component which contains the specified Point.

param
p the Point.
return
the Component which contains the specified Point.

        toolkit.lockAWT();
        try {
            return getComponentAt(p.x, p.y);
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.ComponentgetComponentAt(int x, int y)
Gets the Component which contains the point with the specified coordinates.

param
x the x coordinate of the point.
param
y the y coordinate of the point.
return
the Component which contains the point with the specified coordinates.

        toolkit.lockAWT();
        try {
            return locate(x, y);
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.event.ComponentListener[]getComponentListeners()
Gets an array of all component's listeners registered for this component.

return
an array of all component's listeners registered for this component.

        return componentListeners.getUserListeners(new ComponentListener[0]);
    
public java.awt.ComponentOrientationgetComponentOrientation()
Gets the component's orientation.

return
the component's orientation.

        toolkit.lockAWT();
        try {
            return orientation;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.CursorgetCursor()
Gets the cursor of the Component.

return
the Cursor.

        toolkit.lockAWT();
        try {
            if (cursor != null) {
                return cursor;
                // ???AWT
                /*
                 * } else if (parent != null) { return parent.getCursor();
                 */
            }
            return Cursor.getDefaultCursor();
        } finally {
            toolkit.unlockAWT();
        }
    
java.awt.ColorgetDefaultBackground()
Gets the default background.

return
the default background.

        // ???AWT: return getWindowAncestor().getDefaultBackground();
        return getBackground();
    
java.awt.ColorgetDefaultForeground()
Gets the default foreground.

return
the default foreground.

        // ???AWT return getWindowAncestor().getDefaultForeground();
        return getForeground();
    
java.awt.DimensiongetDefaultMinimumSize()
Gets the default minimum size.

return
the default minimum size.

        return null;
    
java.awt.DimensiongetDefaultPreferredSize()
Gets the default preferred size.

return
the default preferred size.

        return null;
    
public java.awt.event.FocusListener[]getFocusListeners()
Gets an array of focus listeners registered for this Component.

return
the array of focus listeners registered for this Component.

        return focusListeners.getUserListeners(new FocusListener[0]);
    
public booleangetFocusTraversalKeysEnabled()
Checks if the the focus traversal keys are enabled for this component.

return
true, if the the focus traversal keys are enabled for this component, false otherwise.

        toolkit.lockAWT();
        try {
            return focusTraversalKeysEnabled;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.FontMetricsgetFontMetrics(java.awt.Font f)
Gets the font metrics of the specified Font.

param
f the Font.
return
the FontMetrics of the specified Font.

        return toolkit.getFontMetrics(f);
    
public java.awt.ColorgetForeground()
Gets the foreground color of the Component.

return
the foreground color of the Component.

        toolkit.lockAWT();
        try {
            // ???AWT
            /*
             * if (foreColor == null && parent != null) { return
             * parent.getForeground(); }
             */
            return foreColor;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.GraphicsgetGraphics()
Gets the Graphics of the Component or null if this Component is not displayable.

return
the Graphics of the Component or null if this Component is not displayable.

        toolkit.lockAWT();
        try {
            if (!isDisplayable()) {
                return null;
            }
            Graphics g = behaviour.getGraphics(0, 0, w, h);
            g.setColor(foreColor);
            g.setFont(font);
            return g;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.GraphicsConfigurationgetGraphicsConfiguration()
Gets the GraphicsConfiguration associated with this Component.

return
the GraphicsConfiguration associated with this Component.

        // ???AWT
        /*
         * toolkit.lockAWT(); try { Window win = getWindowAncestor(); if (win ==
         * null) { return null; } return win.getGraphicsConfiguration(); }
         * finally { toolkit.unlockAWT(); }
         */
        return null;
    
public intgetHeight()
Gets the height of the Component.

return
the height of the Component.

        toolkit.lockAWT();
        try {
            return h;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.event.HierarchyBoundsListener[]getHierarchyBoundsListeners()
Gets an array of HierarchyBoundsListener objects registered to this Component.

return
an array of HierarchyBoundsListener objects.

        return hierarchyBoundsListeners.getUserListeners(new HierarchyBoundsListener[0]);
    
public java.awt.event.HierarchyListener[]getHierarchyListeners()
Gets an array of registered HierarchyListeners for this Component.

return
an array of registered HierarchyListeners for this Component.

        return hierarchyListeners.getUserListeners(new HierarchyListener[0]);
    
public booleangetIgnoreRepaint()
Returns true if paint messages received from the operating system should be ignored.

return
true if paint messages received from the operating system should be ignored, false otherwise.

        toolkit.lockAWT();
        try {
            return ignoreRepaint;
        } finally {
            toolkit.unlockAWT();
        }
    
java.lang.StringgetIndentStr(int indent)
Gets a string composed of the desired number of whitespace characters.

param
indent the length of the String to return.
return
the string composed of the desired number of whitespace characters.

        char[] ind = new char[indent];
        for (int i = 0; i < indent; ind[i++] = ' ") {
            ;
        }
        return new String(ind);
    
public java.awt.im.InputContextgetInputContext()
Gets the input context of this component for handling the communication with input methods when text is entered in this component.

return
the InputContext used by this Component or null if no context is specifined.

        toolkit.lockAWT();
        try {
            // ???AWT
            /*
             * Container parent = getParent(); if (parent != null) { return
             * parent.getInputContext(); }
             */
            return null;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.event.InputMethodListener[]getInputMethodListeners()
Gets an array of the InputMethodListener listeners registered to the Component.

return
an array of the InputMethodListener listeners registered to the Component.

        return inputMethodListeners.getUserListeners(new InputMethodListener[0]);
    
public java.awt.im.InputMethodRequestsgetInputMethodRequests()
Gets the input method request handler which supports requests from input methods for this component, or null for default.

return
the input method request handler which supports requests from input methods for this component, or null for default.

        return null;
    
java.awt.InsetsgetInsets()
Gets the insets.

return
the insets.

        return new Insets(0, 0, 0, 0);
    
public java.awt.event.KeyListener[]getKeyListeners()
Gets an array of the key listeners registered to the Component.

return
an array of the key listeners registered to the Component.

        return keyListeners.getUserListeners(new KeyListener[0]);
    
public T[]getListeners(java.lang.Class listenerType)
Gets an array of all listener's objects based on the specified listener type and registered to this Component.

param
listenerType the listener type.
return
an array of all listener's objects based on the specified listener type and registered to this Component.

        if (ComponentListener.class.isAssignableFrom(listenerType)) {
            return (T[])getComponentListeners();
        } else if (FocusListener.class.isAssignableFrom(listenerType)) {
            return (T[])getFocusListeners();
        } else if (HierarchyBoundsListener.class.isAssignableFrom(listenerType)) {
            return (T[])getHierarchyBoundsListeners();
        } else if (HierarchyListener.class.isAssignableFrom(listenerType)) {
            return (T[])getHierarchyListeners();
        } else if (InputMethodListener.class.isAssignableFrom(listenerType)) {
            return (T[])getInputMethodListeners();
        } else if (KeyListener.class.isAssignableFrom(listenerType)) {
            return (T[])getKeyListeners();
        } else if (MouseWheelListener.class.isAssignableFrom(listenerType)) {
            return (T[])getMouseWheelListeners();
        } else if (MouseMotionListener.class.isAssignableFrom(listenerType)) {
            return (T[])getMouseMotionListeners();
        } else if (MouseListener.class.isAssignableFrom(listenerType)) {
            return (T[])getMouseListeners();
        } else if (PropertyChangeListener.class.isAssignableFrom(listenerType)) {
            return (T[])getPropertyChangeListeners();
        }
        return (T[])Array.newInstance(listenerType, 0);
    
public java.util.LocalegetLocale()
Gets the locale of this Component.

return
the locale of this Component.

        toolkit.lockAWT();
        try {
            // ???AWT
            /*
             * if (locale == null) { if (parent == null) { if (this instanceof
             * Window) { return Locale.getDefault(); } // awt.150=no parent
             * throw new
             * IllegalComponentStateException(Messages.getString("awt.150"));
             * //$NON-NLS-1$ } return getParent().getLocale(); }
             */
            return locale;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.PointgetLocation(java.awt.Point rv)
Stores the location of this component to the specified Point object; returns the point of the component's top-left corner.

param
rv the Point object where the component's top-left corner position will be stored.
return
the Point which specifies the component's top-left corner.

        toolkit.lockAWT();
        try {
            if (rv == null) {
                rv = new Point();
            }
            rv.setLocation(getX(), getY());
            return rv;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.PointgetLocation()
Gets the location of this component on the form; returns the point of the component's top-left corner.

return
the Point which specifies the component's top-left corner.

        toolkit.lockAWT();
        try {
            return location();
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.PointgetLocationOnScreen()
Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.

return
the Point giving the component's location in the screen's coordinate space.
throws
IllegalComponentStateException if the component is not shown on the screen.

        toolkit.lockAWT();
        try {
            Point p = new Point();
            if (isShowing()) {
                // ???AWT
                /*
                 * Component comp; for (comp = this; comp != null && !(comp
                 * instanceof Window); comp = comp .getParent()) {
                 * p.translate(comp.getX(), comp.getY()); } if (comp instanceof
                 * Window) { p.translate(comp.getX(), comp.getY()); }
                 */
                return p;
            }
            // awt.151=component must be showing on the screen to determine its
            // location
            throw new IllegalComponentStateException(Messages.getString("awt.151")); //$NON-NLS-1$
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.DimensiongetMaximumSize()
Gets the maximum size of the Component.

return
the maximum size of the Component.

        toolkit.lockAWT();
        try {
            return isMaximumSizeSet() ? new Dimension(maximumSize) : new Dimension(Short.MAX_VALUE,
                    Short.MAX_VALUE);
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.DimensiongetMinimumSize()
Gets the minimum size of the Component.

return
the minimum size of the Component.

        toolkit.lockAWT();
        try {
            return minimumSize();
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.event.MouseListener[]getMouseListeners()
Gets an array of the mouse listeners registered to the Component.

return
an array of the mouse listeners registered to the Component.

        return mouseListeners.getUserListeners(new MouseListener[0]);
    
public java.awt.event.MouseMotionListener[]getMouseMotionListeners()
Gets an array of the mouse motion listeners registered to the Component.

return
an array of the MouseMotionListeners registered to the Component.

        return mouseMotionListeners.getUserListeners(new MouseMotionListener[0]);
    
public java.awt.event.MouseWheelListener[]getMouseWheelListeners()
Gets an array of the mouse wheel listeners registered to the Component.

return
an array of the MouseWheelListeners registered to the Component.

        return mouseWheelListeners.getUserListeners(new MouseWheelListener[0]);
    
public java.lang.StringgetName()
Gets the name of this Component.

return
the name of this Component.

        toolkit.lockAWT();
        try {
            if ((name == null) && autoName) {
                name = autoName();
            }
            return name;
        } finally {
            toolkit.unlockAWT();
        }
    
java.awt.InsetsgetNativeInsets()
Gets the native insets.

return
the native insets.

        return new Insets(0, 0, 0, 0);
    
org.apache.harmony.awt.wtk.NativeWindowgetNativeWindow()
Gets the native window.

return
the native window.

        return behaviour.getNativeWindow();
    
public java.awt.peer.ComponentPeergetPeer()
Gets the peer. This method should not be called directly by user applications.

return
the ComponentPeer.
deprecated
Replaced by isDisplayable().

        toolkit.lockAWT();
        try {
            if (behaviour.isDisplayable()) {
                return peer;
            }
            return null;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.DimensiongetPreferredSize()
Gets the preferred size of the Component.

return
the preferred size of the Component.

        toolkit.lockAWT();
        try {
            return preferredSize();
        } finally {
            toolkit.unlockAWT();
        }
    
public java.beans.PropertyChangeListener[]getPropertyChangeListeners()
Gets an array of the property change listeners registered to this Component.

return
an array of the PropertyChangeListeners registered to this Component.

        return getPropertyChangeSupport().getPropertyChangeListeners();
    
public java.beans.PropertyChangeListener[]getPropertyChangeListeners(java.lang.String propertyName)
Gets an array of PropertyChangeListener objects registered to this Component for the specified property.

param
propertyName the property name.
return
an array of PropertyChangeListener objects registered to this Component for the specified property.

        return getPropertyChangeSupport().getPropertyChangeListeners(propertyName);
    
private java.beans.PropertyChangeSupportgetPropertyChangeSupport()
Gets the property change support.

return
the property change support.

        synchronized (componentLock) {
            if (propertyChangeSupport == null) {
                propertyChangeSupport = new PropertyChangeSupport(this);
            }
            return propertyChangeSupport;
        }
    
java.awt.AWTEventgetRelativeEvent(int id)
Gets the relative event.

param
id the id.
return
the relative event.

        Integer idWrapper = new Integer(id);
        eventsList = eventsTable.get(idWrapper);
        if (eventsList == null) {
            eventsList = new LinkedList<AWTEvent>();
            eventsTable.put(idWrapper, eventsList);
            return null;
        }
        if (eventsList.isEmpty()) {
            return null;
        }
        return eventsList.getLast();
    
public java.awt.DimensiongetSize()
Gets the size of this Component.

return
the size of this Component.

        toolkit.lockAWT();
        try {
            return size();
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.DimensiongetSize(java.awt.Dimension rv)
Stores the size of this Component to the specified Dimension object.

param
rv the Dimension object where the size of the Component will be stored.
return
the Dimension of this Component.

        toolkit.lockAWT();
        try {
            if (rv == null) {
                rv = new Dimension();
            }
            rv.setSize(getWidth(), getHeight());
            return rv;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.ToolkitgetToolkit()
Gets Toolkit for the current Component.

return
the Toolkit of this Component.

        return toolkit;
    
public final java.lang.ObjectgetTreeLock()
Gets this component's locking object for AWT component tree and layout operations.

return
the tree locking object.

        return toolkit.awtTreeLock;
    
public intgetWidth()
Gets the width of the Component.

return
the width of the Component.

        toolkit.lockAWT();
        try {
            return w;
        } finally {
            toolkit.unlockAWT();
        }
    
public intgetX()
Gets the x coordinate of the component's top-left corner.

return
the x coordinate of the component's top-left corner.

        toolkit.lockAWT();
        try {
            return x;
        } finally {
            toolkit.unlockAWT();
        }
    
public intgetY()
Gets the y coordinate of the component's top-left corner.

return
the y coordinate of the component's top-left corner.

        toolkit.lockAWT();
        try {
            return y;
        } finally {
            toolkit.unlockAWT();
        }
    
public booleangotFocus(java.awt.Event evt, java.lang.Object what)
Got the focus.

param
evt the Event.
param
what the Object.
return
true, if successful.
deprecated
Replaced by processFocusEvent(FocusEvent) method.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public booleanhandleEvent(java.awt.Event evt)
Handles event.

param
evt the Event.
return
true, if successful.
deprecated
Replaced by processEvent(AWTEvent) method.

        switch (evt.id) {
            case Event.ACTION_EVENT:
                return action(evt, evt.arg);
            case Event.GOT_FOCUS:
                return gotFocus(evt, null);
            case Event.LOST_FOCUS:
                return lostFocus(evt, null);
            case Event.MOUSE_DOWN:
                return mouseDown(evt, evt.x, evt.y);
            case Event.MOUSE_DRAG:
                return mouseDrag(evt, evt.x, evt.y);
            case Event.MOUSE_ENTER:
                return mouseEnter(evt, evt.x, evt.y);
            case Event.MOUSE_EXIT:
                return mouseExit(evt, evt.x, evt.y);
            case Event.MOUSE_MOVE:
                return mouseMove(evt, evt.x, evt.y);
            case Event.MOUSE_UP:
                return mouseUp(evt, evt.x, evt.y);
            case Event.KEY_ACTION:
            case Event.KEY_PRESS:
                return keyDown(evt, evt.key);
            case Event.KEY_ACTION_RELEASE:
            case Event.KEY_RELEASE:
                return keyUp(evt, evt.key);
        }
        return false;// event not handled
    
public booleanhasFocus()
Checks whether the Component is the focus owner or not.

return
true, if the Component is the focus owner, false otherwise.

        toolkit.lockAWT();
        try {
            // ???AWT: return isFocusOwner();
            return false;
        } finally {
            toolkit.unlockAWT();
        }
    
public voidhide()
Hides the Component.

deprecated
Replaced by setVisible(boolean) method.

        toolkit.lockAWT();
        try {
            if (!visible) {
                return;
            }
            prepare4HierarchyChange();
            visible = false;
            moveFocusOnHide();
            behaviour.setVisible(false);
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_HIDDEN));
            // ???AWT: finishHierarchyChange(this, parent, 0);
            notifyInputMethod(null);
            // ???AWT: invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanimageUpdate(java.awt.Image img, int infoflags, int x, int y, int w, int h)

        toolkit.lockAWT();
        try {
            boolean done = false;
            if ((infoflags & (ALLBITS | FRAMEBITS)) != 0) {
                done = true;
            } else if ((infoflags & SOMEBITS) != 0 && incrementalImageUpdate) {
                done = true;
            }
            if (done) {
                repaint();
            }
            return (infoflags & (ABORT | ALLBITS)) == 0;
        } finally {
            toolkit.unlockAWT();
        }
    
voidinitGraphics(java.awt.Graphics g, java.awt.event.PaintEvent e)
Inits the graphics.

param
g the g.
param
e the e.

        Rectangle clip = e.getUpdateRect();
        if (clip instanceof ClipRegion) {
            g.setClip(((ClipRegion)clip).getClip());
        } else {
            g.setClip(clip);
        }
        if (isPrepainter()) {
            prepaint(g);
        } else if (!isLightweight() && (e.getID() == PaintEvent.PAINT)) {
            g.setColor(getBackground());
            g.fillRect(0, 0, w, h);
        }
        g.setFont(getFont());
        g.setColor(getForeground());
    
public booleaninside(int x, int y)
Checks whether or not the point with the specified coordinates belongs to the Commponent.

param
x the x coordinate of the Point.
param
y the y coordinate of the Point.
return
true, if the point with the specified coordinates belongs to the Commponent, false otherwise.
deprecated
Replaced by contains(int, int) method.

        toolkit.lockAWT();
        try {
            return x >= 0 && x < getWidth() && y >= 0 && y < getHeight();
        } finally {
            toolkit.unlockAWT();
        }
    
public voidinvalidate()
Invalidates the component, this component and all parents above it are marked as needing to be laid out.

        toolkit.lockAWT();
        try {
            valid = false;
            resetDefaultSize();
            // ???AWT: invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisBackgroundSet()
Checks whether or not the background color is set to this Component.

return
true, if the background color is set to this Component, false otherwise.

        toolkit.lockAWT();
        try {
            return backColor != null;
        } finally {
            toolkit.unlockAWT();
        }
    
booleanisCoalescer()
Checks if this Component is a coalescer.

return
true, if is coalescer.

        return coalescer;
    
public booleanisCursorSet()
Checks whether or not a cursor is set for the Component.

return
true, if a cursor is set for the Component, false otherwise.

        toolkit.lockAWT();
        try {
            return cursor != null;
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisDisplayable()
Checks whether or not this Component is displayable.

return
true, if this Component is displayable, false otherwise.

        toolkit.lockAWT();
        try {
            return behaviour.isDisplayable();
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisDoubleBuffered()
Checks whether or not this component is painted to an buffer which is copied to the screen later.

return
true, if this component is painted to an buffer which is copied to the screen later, false otherwise.

        toolkit.lockAWT();
        try {
            // false by default
            return false;
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisEnabled()
Checks whether or not this Component is enabled.

return
true, if this Component is enabled, false otherwise.

        toolkit.lockAWT();
        try {
            return enabled;
        } finally {
            toolkit.unlockAWT();
        }
    
booleanisEventEnabled(long eventMask)
Checks if is event enabled.

param
eventMask the event mask.
return
true, if is event enabled.

        return ((enabledEvents & eventMask) != 0);
    
public booleanisFocusTraversable()
Checks whether or not this Component can be focusable.

return
true, if this Component can be focusable, false otherwise.
deprecated
Replaced by isFocusable().

        toolkit.lockAWT();
        try {
            overridenIsFocusable = false;
            return focusable; // a Component must either be both focusable and
            // focus traversable, or neither
        } finally {
            toolkit.unlockAWT();
        }
    
booleanisFocusabilityExplicitlySet()

return
true if focusability was explicitly set via a call to setFocusable() or via overriding isFocusable() or isFocusTraversable().

        return calledSetFocusable || overridenIsFocusable;
    
public booleanisFocusable()
Checks if this Component can be focusable or not.

return
true, if this Component can be focusable, false otherwise.

        toolkit.lockAWT();
        try {
            return isFocusTraversable();
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisFontSet()
Checks if the Font is set for this Component or not.

return
true, if the Font is set, false otherwise.

        toolkit.lockAWT();
        try {
            return font != null;
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisForegroundSet()
Checks if foreground color is set for the Component or not.

return
true, if is foreground color is set for the Component, false otherwise.

        toolkit.lockAWT();
        try {
            return foreColor != null;
        } finally {
            toolkit.unlockAWT();
        }
    
booleanisIndirectlyEnabled()
"Recursive" isEnabled().

return
true if not only component itself is enabled but its heavyweight parent is also "indirectly" enabled.

        Component comp = this;
        while (comp != null) {
            if (!comp.isLightweight() && !comp.isEnabled()) {
                return false;
            }
            // ???AWT: comp = comp.getRealParent();
        }
        return true;
    
booleanisKeyEnabled()
Checks if the component is key enabled.

return
true, if the component is enabled and indirectly enabled.

        if (!isEnabled()) {
            return false;
        }
        return isIndirectlyEnabled();
    
public booleanisLightweight()
Returns true if this component has a lightweight peer.

return
true, if this component has a lightweight peer, false if it has a native peer or no peer.

        toolkit.lockAWT();
        try {
            return behaviour.isLightweight();
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisMaximumSizeSet()
Checks whether or not a maximum size is set for the Component.

return
true, if the maximum size is set for the Component, false otherwise.

        toolkit.lockAWT();
        try {
            return maximumSize != null;
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisMinimumSizeSet()
Checks whether or not the minimum size is set for the component.

return
true, if the minimum size is set for the component, false otherwise.

        toolkit.lockAWT();
        try {
            return minimumSize != null;
        } finally {
            toolkit.unlockAWT();
        }
    
booleanisMouseEventEnabled(long eventMask)
Checks if is mouse event enabled.

param
eventMask the event mask.
return
true, if is mouse event enabled.

        return (isEventEnabled(eventMask) || (enabledAWTEvents & eventMask) != 0);
    
booleanisMouseExitedExpected()
Checks if is mouse exited expected.

return
true, if is mouse exited expected.

        return mouseExitedExpected;
    
public booleanisOpaque()
Checks whether or not this component is completely opaque.

return
true, if this component is completely opaque, false by default.

        toolkit.lockAWT();
        try {
            return behaviour.isOpaque();
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisPreferredSizeSet()
Checks whether or not the preferred size is set for the Component.

return
true, if the preferred size is set for the Component, false otherwise.

        toolkit.lockAWT();
        try {
            return preferredSize != null;
        } finally {
            toolkit.unlockAWT();
        }
    
booleanisPrepainter()
Checks if is prepainter.

return
true, if is prepainter.

        return false;
    
public booleanisShowing()
Checks whether or not this Component is shown.

return
true, if this Component is shown, false otherwise.

        // ???AWT
        /*
         * toolkit.lockAWT(); try { return (isVisible() && isDisplayable() &&
         * (parent != null) && parent.isShowing()); } finally {
         * toolkit.unlockAWT(); }
         */
        return false;
    
public booleanisValid()
Checks whether or not this Component is valid. A component is valid if it is correctly sized and positioned within its parent container and all its children are also valid.

return
true, if the Component is valid, false otherwise.

        toolkit.lockAWT();
        try {
            return valid && behaviour.isDisplayable();
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanisVisible()
Checks whether or not this Component is visible.

return
true, if the Component is visible, false otherwise.

        toolkit.lockAWT();
        try {
            return visible;
        } finally {
            toolkit.unlockAWT();
        }
    
public booleankeyDown(java.awt.Event evt, int key)
Deprecated: replaced by processKeyEvent(KeyEvent) method.

param
evt the Event.
param
key the key code.
return
true, if successful.
deprecated
Replaced by replaced by processKeyEvent(KeyEvent) method.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public booleankeyUp(java.awt.Event evt, int key)
Deprecated: replaced by processKeyEvent(KeyEvent) method.

param
evt the Event.
param
key the key code.
return
true, if successful.
deprecated
Replaced by processKeyEvent(KeyEvent) method.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public voidlayout()
Deprecated: Replaced by doLayout() method.

deprecated
Replaced by doLayout() method.

        toolkit.lockAWT();
        try {
            // Implemented in Container
        } finally {
            toolkit.unlockAWT();
        }
    
public voidlist(java.io.PrintStream out, int indent)
Prints a list of this component with the specified number of leading whitespace characters to the specified PrintStream.

param
out the output PrintStream object.
param
indent how many leading whitespace characters to prepend.

        toolkit.lockAWT();
        try {
            out.println(getIndentStr(indent) + this);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidlist(java.io.PrintWriter out)
Prints a list of this component to the specified PrintWriter.

param
out the output PrintWriter object.

        toolkit.lockAWT();
        try {
            list(out, 1);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidlist(java.io.PrintWriter out, int indent)
Prints a list of this component with the specified number of leading whitespace characters to the specified PrintWriter.

param
out the output PrintWriter object.
param
indent how many leading whitespace characters to prepend.

        toolkit.lockAWT();
        try {
            out.println(getIndentStr(indent) + this);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidlist(java.io.PrintStream out)
Prints a list of this component to the specified PrintStream.

param
out the output PrintStream object.

        toolkit.lockAWT();
        try {
            // default indent = 1
            list(out, 1);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidlist()
Prints a list of this component to the standard system output stream.

        toolkit.lockAWT();
        try {
            list(System.out);
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.Componentlocate(int x, int y)
Deprecated: replaced by getComponentAt(int, int) method.

param
x the x coordinate.
param
y the y coordinate.
return
The component.
deprecated
Replaced by getComponentAt(int, int) method.

        toolkit.lockAWT();
        try {
            if (contains(x, y)) {
                return this;
            }
            return null;
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.Pointlocation()
Deprecated: replaced by getComponentAt(int, int) method.

return
the Point.
deprecated
Replaced by getComponentAt(int, int) method.

        toolkit.lockAWT();
        try {
            return new Point(x, y);
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanlostFocus(java.awt.Event evt, java.lang.Object what)
Deprecated: replaced by processFocusEvent(FocusEvent).

param
evt the Event.
param
what the Object.
return
true, if successful.
deprecated
Replaced by processFocusEvent(FocusEvent).

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
voidmapToDisplay(boolean b)
Map to display.

param
b the b.

        // ???AWT
        /*
         * if (b && !isDisplayable()) { if ((this instanceof Window) || ((parent
         * != null) && parent.isDisplayable())) { addNotify(); } } else if (!b
         * && isDisplayable()) { removeNotify(); }
         */
    
public java.awt.DimensionminimumSize()
Deprecated: replaced by getMinimumSize() method.

return
the Dimension.
deprecated
Replaced by getMinimumSize() method.

        toolkit.lockAWT();
        try {
            if (isMinimumSizeSet()) {
                return (Dimension)minimumSize.clone();
            }
            Dimension defSize = getDefaultMinimumSize();
            if (defSize != null) {
                return (Dimension)defSize.clone();
            }
            return isDisplayable() ? new Dimension(1, 1) : new Dimension(w, h);
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanmouseDown(java.awt.Event evt, int x, int y)
Deprecated: replaced by processMouseEvent(MouseEvent) method.

param
evt the MouseEvent.
param
x the x coordinate.
param
y the y coordinate.
return
true, if successful.
deprecated
Replaced by processMouseEvent(MouseEvent) method.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public booleanmouseDrag(java.awt.Event evt, int x, int y)
Deprecated: replaced by getMinimumSize() method.

param
evt the Event.
param
x the x coordinate.
param
y the y coordinate.
return
true, if successful.
deprecated
Replaced by getMinimumSize() method.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public booleanmouseEnter(java.awt.Event evt, int x, int y)
Replaced by processMouseEvent(MouseEvent) method.

param
evt the Event.
param
x the x coordinate.
param
y the y coordinate.
return
true, if successful.
deprecated
replaced by processMouseEvent(MouseEvent) method.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public booleanmouseExit(java.awt.Event evt, int x, int y)
Replaced by processMouseEvent(MouseEvent) method.

param
evt the Event.
param
x the x coordinate.
param
y the y coordinate.
return
true, if successful.
deprecated
Replaced by processMouseEvent(MouseEvent) method.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public booleanmouseMove(java.awt.Event evt, int x, int y)
Replaced by processMouseEvent(MouseEvent) method.

param
evt the Event.
param
x the x coordinate.
param
y the y coordinate.
deprecated
Replaced by processMouseEvent(MouseEvent) method.
return
true, if successful.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public booleanmouseUp(java.awt.Event evt, int x, int y)
Replaced by processMouseEvent(MouseEvent) method.

param
evt the Event.
param
x the x coordinate.
param
y the y coordinate.
return
true, if successful.
deprecated
Replaced by processMouseEvent(MouseEvent) method.

        // to be overridden: do nothing,
        // just return false to propagate event up to the parent container
        return false;
    
public voidmove(int x, int y)
Deprecated: replaced by setLocation(int, int) method.

param
x the x coordinates.
param
y the y coordinates.
deprecated
Replaced by setLocation(int, int) method.

        toolkit.lockAWT();
        try {
            boundsMaskParam = NativeWindow.BOUNDS_NOSIZE;
            setBounds(x, y, w, h);
        } finally {
            toolkit.unlockAWT();
        }
    
voidmoveFocusOnHide()
For Container there's a difference between moving focus when being made invisible or made unfocusable in some other way, because when container is made invisible, component still remains visible, i. e. its hide() or setVisible() is not called.

        // ???AWT: moveFocus();
    
voidnativeWindowCreated(org.apache.harmony.awt.wtk.NativeWindow win)
Called when native resource for this component is created (for heavyweights only).

param
win the win.

        // to be overridden
    
voidnotifyInputMethod(java.awt.Rectangle bounds)
Calls InputContextImpl.notifyClientWindowChanged.

param
bounds the bounds.

        // only Window actually notifies IM of bounds change
    
final voidonDrawImage(java.awt.Image image, java.awt.Point destLocation, java.awt.Dimension destSize, java.awt.Rectangle source)
Determine the component's area hidden behind the windows that have higher Z-order, including windows of other applications.

param
image the image.
param
destLocation the dest location.
param
destSize the dest size.
param
source the source.
return
the calculated region, or null if it cannot be determined.

        ImageParameters imageParams;
        if (updatedImages == null) {
            updatedImages = new HashMap<Image, ImageParameters>();
        }
        imageParams = updatedImages.get(image);
        if (imageParams == null) {
            imageParams = new ImageParameters();
            updatedImages.put(image, imageParams);
        }
        imageParams.addDrawing(destLocation, destSize, source);
    
public voidpaint(java.awt.Graphics g)
Paints this component.

param
g the Graphics to be used for painting.

        toolkit.lockAWT();
        try {
            // Just to nothing
        } finally {
            toolkit.unlockAWT();
        }
    
public voidpaintAll(java.awt.Graphics g)
Paints the component and all of its subcomponents.

param
g the Graphics to be used for painting.

        toolkit.lockAWT();
        try {
            paint(g);
        } finally {
            toolkit.unlockAWT();
        }
    
protected java.lang.StringparamString()
Returns a string representation of the component's state.

return
the string representation of the component's state.

        /*
         * The format is based on 1.5 release behavior which can be revealed by
         * the following code: Component c = new Component(){};
         * c.setVisible(false); System.out.println(c);
         */
        toolkit.lockAWT();
        try {
            return getName() + "," + getX() + "," + getY() + "," + getWidth() + "x" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                    + getHeight() + (!isVisible() ? ",hidden" : ""); //$NON-NLS-1$ //$NON-NLS-2$
        } finally {
            toolkit.unlockAWT();
        }
    
private voidpostDeprecatedEvent(java.awt.AWTEvent e)
Post deprecated event.

param
e the e.

        if (deprecatedEventHandler) {
            Event evt = e.getEvent();
            if (evt != null) {
                postEvent(evt);
            }
        }
    
public booleanpostEvent(java.awt.Event evt)

        boolean handled = handleEvent(evt);
        if (handled) {
            return true;
        }
        // ???AWT
        /*
         * // propagate non-handled events up to parent Component par = parent;
         * // try to call postEvent only on components which // override any of
         * deprecated method handlers // while (par != null &&
         * !par.deprecatedEventHandler) { // par = par.parent; // } // translate
         * event coordinates before posting it to parent if (par != null) {
         * evt.translate(x, y); par.postEvent(evt); }
         */
        return false;
    
voidpostEvent(java.awt.AWTEvent e)
Post event.

param
e the e.

        getToolkit().getSystemEventQueueImpl().postEvent(e);
    
voidpostprocessEvent(java.awt.AWTEvent e, long eventMask)
Postprocess event.

param
e the e.
param
eventMask the event mask.

        toolkit.lockAWT();
        try {
            // call system listeners under AWT lock
            if (eventMask == AWTEvent.FOCUS_EVENT_MASK) {
                preprocessFocusEvent((FocusEvent)e);
            } else if (eventMask == AWTEvent.KEY_EVENT_MASK) {
                preprocessKeyEvent((KeyEvent)e);
            } else if (eventMask == AWTEvent.MOUSE_EVENT_MASK) {
                preprocessMouseEvent((MouseEvent)e);
            } else if (eventMask == AWTEvent.MOUSE_MOTION_EVENT_MASK) {
                preprocessMouseMotionEvent((MouseEvent)e);
            } else if (eventMask == AWTEvent.COMPONENT_EVENT_MASK) {
                preprocessComponentEvent((ComponentEvent)e);
            } else if (eventMask == AWTEvent.MOUSE_WHEEL_EVENT_MASK) {
                preprocessMouseWheelEvent((MouseWheelEvent)e);
            } else if (eventMask == AWTEvent.INPUT_METHOD_EVENT_MASK) {
                preprocessInputMethodEvent((InputMethodEvent)e);
            }
        } finally {
            toolkit.unlockAWT();
        }
    
public java.awt.DimensionpreferredSize()
Deprecated: replaced by getPreferredSize() method.

return
the Dimension.
deprecated
Replaced by getPreferredSize() method.

        toolkit.lockAWT();
        try {
            if (isPreferredSizeSet()) {
                return new Dimension(preferredSize);
            }
            Dimension defSize = getDefaultPreferredSize();
            if (defSize != null) {
                return new Dimension(defSize);
            }
            return new Dimension(getMinimumSize());
        } finally {
            toolkit.unlockAWT();
        }
    
voidprepaint(java.awt.Graphics g)
Prepares the component to be painted.

param
g the Graphics to be used for painting.

        // Just to nothing. For overriding.
    
voidprepare4HierarchyChange()
Prepare4 hierarchy change.

        if (hierarchyChangingCounter++ == 0) {
            wasShowing = isShowing();
            wasDisplayable = isDisplayable();
            prepareChildren4HierarchyChange();
        }
    
voidprepareChildren4HierarchyChange()
Prepare children4 hierarchy change.

        // To be inherited by Container
    
public booleanprepareImage(java.awt.Image image, java.awt.image.ImageObserver observer)
Prepares an image for rendering on the Component.

param
image the Image to be prepared.
param
observer the ImageObserver object to be notified as soon as the image is prepared.
return
true if the image has been fully prepared, false otherwise.

        toolkit.lockAWT();
        try {
            return toolkit.prepareImage(image, -1, -1, observer);
        } finally {
            toolkit.unlockAWT();
        }
    
public booleanprepareImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)
Prepares an image for rendering on the Component with the specified width, height, and ImageObserver.

param
image the Image to be prepared.
param
width the width of scaled image.
param
height the height of scaled height.
param
observer the ImageObserver object to be notified as soon as the image is prepared.
return
true if the image is been fully prepared, false otherwise.

        toolkit.lockAWT();
        try {
            return toolkit.prepareImage(image, width, height, observer);
        } finally {
            toolkit.unlockAWT();
        }
    
private voidpreprocessComponentEvent(java.awt.event.ComponentEvent e)
Preprocess component event.

param
e the e.

        processComponentEventImpl(e, componentListeners.getSystemListeners());
    
voidpreprocessFocusEvent(java.awt.event.FocusEvent e)
Preprocess focus event.

param
e the e.

        processFocusEventImpl(e, focusListeners.getSystemListeners());
    
private voidpreprocessInputMethodEvent(java.awt.event.InputMethodEvent e)
Preprocess input method event.

param
e the e.

        processInputMethodEventImpl(e, inputMethodListeners.getSystemListeners());
    
voidpreprocessKeyEvent(java.awt.event.KeyEvent e)
Preprocess key event.

param
e the e.

        processKeyEventImpl(e, keyListeners.getSystemListeners());
    
voidpreprocessMouseEvent(java.awt.event.MouseEvent e)
Preprocess mouse event.

param
e the e

        processMouseEventImpl(e, mouseListeners.getSystemListeners());
    
voidpreprocessMouseMotionEvent(java.awt.event.MouseEvent e)
Preprocess mouse motion event.

param
e the e.

        processMouseMotionEventImpl(e, mouseMotionListeners.getSystemListeners());
    
private voidpreprocessMouseWheelEvent(java.awt.event.MouseWheelEvent e)
Preprocess mouse wheel event.

param
e the e.

        processMouseWheelEventImpl(e, mouseWheelListeners.getSystemListeners());
    
public voidprint(java.awt.Graphics g)
Prints this component.

param
g the Graphics to be used for painting.

        toolkit.lockAWT();
        try {
            paint(g);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidprintAll(java.awt.Graphics g)
Prints the component and all of its subcomponents.

param
g the Graphics to be used for painting.

        toolkit.lockAWT();
        try {
            paintAll(g);
        } finally {
            toolkit.unlockAWT();
        }
    
protected voidprocessComponentEvent(java.awt.event.ComponentEvent e)
Processes a component event that has occurred on this component by dispatching them to any registered ComponentListener objects.

param
e the ComponentEvent.

        processComponentEventImpl(e, componentListeners.getUserListeners());
    
private voidprocessComponentEventImpl(java.awt.event.ComponentEvent e, java.util.Collection c)
Process component event impl.

param
e the e.
param
c the c.

        for (ComponentListener listener : c) {
            switch (e.getID()) {
                case ComponentEvent.COMPONENT_HIDDEN:
                    listener.componentHidden(e);
                    break;
                case ComponentEvent.COMPONENT_MOVED:
                    listener.componentMoved(e);
                    break;
                case ComponentEvent.COMPONENT_RESIZED:
                    listener.componentResized(e);
                    break;
                case ComponentEvent.COMPONENT_SHOWN:
                    listener.componentShown(e);
                    break;
            }
        }
    
protected voidprocessEvent(java.awt.AWTEvent e)
Processes AWTEvent occurred on this component.

param
e the AWTEvent.

        long eventMask = toolkit.eventTypeLookup.getEventMask(e);
        if (eventMask == AWTEvent.COMPONENT_EVENT_MASK) {
            processComponentEvent((ComponentEvent)e);
        } else if (eventMask == AWTEvent.FOCUS_EVENT_MASK) {
            processFocusEvent((FocusEvent)e);
        } else if (eventMask == AWTEvent.KEY_EVENT_MASK) {
            processKeyEvent((KeyEvent)e);
        } else if (eventMask == AWTEvent.MOUSE_EVENT_MASK) {
            processMouseEvent((MouseEvent)e);
        } else if (eventMask == AWTEvent.MOUSE_WHEEL_EVENT_MASK) {
            processMouseWheelEvent((MouseWheelEvent)e);
        } else if (eventMask == AWTEvent.MOUSE_MOTION_EVENT_MASK) {
            processMouseMotionEvent((MouseEvent)e);
        } else if (eventMask == AWTEvent.HIERARCHY_EVENT_MASK) {
            processHierarchyEvent((HierarchyEvent)e);
        } else if (eventMask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) {
            processHierarchyBoundsEvent((HierarchyEvent)e);
        } else if (eventMask == AWTEvent.INPUT_METHOD_EVENT_MASK) {
            processInputMethodEvent((InputMethodEvent)e);
        }
    
protected voidprocessFocusEvent(java.awt.event.FocusEvent e)
Processes a FocusEvent that has occurred on this component by dispatching it to the registered listeners.

param
e the FocusEvent.

        processFocusEventImpl(e, focusListeners.getUserListeners());
    
private voidprocessFocusEventImpl(java.awt.event.FocusEvent e, java.util.Collection c)
Process focus event impl.

param
e the e.
param
c the c.

        for (FocusListener listener : c) {
            switch (e.getID()) {
                case FocusEvent.FOCUS_GAINED:
                    listener.focusGained(e);
                    break;
                case FocusEvent.FOCUS_LOST:
                    listener.focusLost(e);
                    break;
            }
        }
    
protected voidprocessHierarchyBoundsEvent(java.awt.event.HierarchyEvent e)
Processes a hierarchy bounds event that has occurred on this component by dispatching it to the registered listeners.

param
e the HierarchyBoundsEvent.

        for (HierarchyBoundsListener listener : hierarchyBoundsListeners.getUserListeners()) {
            switch (e.getID()) {
                case HierarchyEvent.ANCESTOR_MOVED:
                    listener.ancestorMoved(e);
                    break;
                case HierarchyEvent.ANCESTOR_RESIZED:
                    listener.ancestorResized(e);
                    break;
            }
        }
    
protected voidprocessHierarchyEvent(java.awt.event.HierarchyEvent e)
Processes a hierarchy event that has occurred on this component by dispatching it to the registered listeners.

param
e the HierarchyEvent.

        for (HierarchyListener listener : hierarchyListeners.getUserListeners()) {
            switch (e.getID()) {
                case HierarchyEvent.HIERARCHY_CHANGED:
                    listener.hierarchyChanged(e);
                    break;
            }
        }
    
protected voidprocessInputMethodEvent(java.awt.event.InputMethodEvent e)
Processes an input method event that has occurred on this component by dispatching it to the registered listeners.

param
e the InputMethodEvent.

        processInputMethodEventImpl(e, inputMethodListeners.getUserListeners());
    
private voidprocessInputMethodEventImpl(java.awt.event.InputMethodEvent e, java.util.Collection c)
Process input method event impl.

param
e the e.
param
c the c.

        for (InputMethodListener listener : c) {
            switch (e.getID()) {
                case InputMethodEvent.CARET_POSITION_CHANGED:
                    listener.caretPositionChanged(e);
                    break;
                case InputMethodEvent.INPUT_METHOD_TEXT_CHANGED:
                    listener.inputMethodTextChanged(e);
                    break;
            }
        }
    
protected voidprocessKeyEvent(java.awt.event.KeyEvent e)
Processes a key event that has occurred on this component by dispatching it to the registered listeners.

param
e the KeyEvent.

        processKeyEventImpl(e, keyListeners.getUserListeners());
    
private voidprocessKeyEventImpl(java.awt.event.KeyEvent e, java.util.Collection c)
Process key event impl.

param
e the e.
param
c the c.

        for (KeyListener listener : c) {
            switch (e.getID()) {
                case KeyEvent.KEY_PRESSED:
                    listener.keyPressed(e);
                    break;
                case KeyEvent.KEY_RELEASED:
                    listener.keyReleased(e);
                    break;
                case KeyEvent.KEY_TYPED:
                    listener.keyTyped(e);
                    break;
            }
        }
    
protected voidprocessMouseEvent(java.awt.event.MouseEvent e)
Processes a mouse event that has occurred on this component by dispatching it to the registered listeners.

param
e the MouseEvent.

        processMouseEventImpl(e, mouseListeners.getUserListeners());
    
private voidprocessMouseEventImpl(java.awt.event.MouseEvent e, java.util.Collection c)
Process mouse event impl.

param
e the e.
param
c the c.

        for (MouseListener listener : c) {
            switch (e.getID()) {
                case MouseEvent.MOUSE_CLICKED:
                    listener.mouseClicked(e);
                    break;
                case MouseEvent.MOUSE_ENTERED:
                    listener.mouseEntered(e);
                    break;
                case MouseEvent.MOUSE_EXITED:
                    listener.mouseExited(e);
                    break;
                case MouseEvent.MOUSE_PRESSED:
                    listener.mousePressed(e);
                    break;
                case MouseEvent.MOUSE_RELEASED:
                    listener.mouseReleased(e);
                    break;
            }
        }
    
protected voidprocessMouseMotionEvent(java.awt.event.MouseEvent e)
Processes a mouse motion event that has occurred on this component by dispatching it to the registered listeners.

param
e the MouseEvent.

        processMouseMotionEventImpl(e, mouseMotionListeners.getUserListeners());
    
private voidprocessMouseMotionEventImpl(java.awt.event.MouseEvent e, java.util.Collection c)
Process mouse motion event impl.

param
e the e.
param
c the c.

        for (MouseMotionListener listener : c) {
            switch (e.getID()) {
                case MouseEvent.MOUSE_DRAGGED:
                    listener.mouseDragged(e);
                    break;
                case MouseEvent.MOUSE_MOVED:
                    listener.mouseMoved(e);
                    break;
            }
        }
    
protected voidprocessMouseWheelEvent(java.awt.event.MouseWheelEvent e)
Processes a mouse wheel event that has occurred on this component by dispatching it to the registered listeners.

param
e the MouseWheelEvent.

        processMouseWheelEventImpl(e, mouseWheelListeners.getUserListeners());
    
private voidprocessMouseWheelEventImpl(java.awt.event.MouseWheelEvent e, java.util.Collection c)
Process mouse wheel event impl.

param
e the e.
param
c the c.

        for (MouseWheelListener listener : c) {
            switch (e.getID()) {
                case MouseEvent.MOUSE_WHEEL:
                    listener.mouseWheelMoved(e);
                    break;
            }
        }
    
private voidprocessPaintEvent(java.awt.event.PaintEvent event)
Process paint event.

param
event the event.

        if (redrawManager == null) {
            return;
        }
        Rectangle clipRect = event.getUpdateRect();
        if ((clipRect.width <= 0) || (clipRect.height <= 0)) {
            return;
        }
        Graphics g = getGraphics();
        if (g == null) {
            return;
        }
        initGraphics(g, event);
        if (!getIgnoreRepaint()) {
            if (event.getID() == PaintEvent.PAINT) {
                paint(g);
            } else {
                update(g);
            }
        }
        g.dispose();
    
booleanpropagateFont()
Invalidate the component if it inherits the font from the parent. This method is overridden in Container.

return
true if the component was invalidated, false otherwise.

        if (font == null) {
            invalidate();
            return true;
        }
        return false;
    
public voidremoveComponentListener(java.awt.event.ComponentListener l)
Removes the component listener registered for this Component.

param
l the ComponentListener.

        componentListeners.removeUserListener(l);
    
public voidremoveFocusListener(java.awt.event.FocusListener l)
Removes the focus listener registered for this Component.

param
l the FocusListener.

        focusListeners.removeUserListener(l);
    
public voidremoveHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)
Removes the hierarchy bounds listener registered for this Component.

param
l the HierarchyBoundsListener.

        hierarchyBoundsListeners.removeUserListener(l);
    
public voidremoveHierarchyListener(java.awt.event.HierarchyListener l)
Removes the hierarchy listener registered for this component.

param
l the HierarchyListener.

        hierarchyListeners.removeUserListener(l);
    
public voidremoveInputMethodListener(java.awt.event.InputMethodListener l)
Removes the input method listener registered for this component.

param
l the InputMethodListener.

        inputMethodListeners.removeUserListener(l);
    
public voidremoveKeyListener(java.awt.event.KeyListener l)
Removes the key listener registered for this Component.

param
l the KeyListener.

        keyListeners.removeUserListener(l);
    
public voidremoveMouseListener(java.awt.event.MouseListener l)
Removes the mouse listener registered for this Component.

param
l the MouseListener.

        mouseListeners.removeUserListener(l);
    
public voidremoveMouseMotionListener(java.awt.event.MouseMotionListener l)
Removes the mouse motion listener registered for this component.

param
l the MouseMotionListener.

        mouseMotionListeners.removeUserListener(l);
    
public voidremoveMouseWheelListener(java.awt.event.MouseWheelListener l)
Removes the mouse wheel listener registered for this component.

param
l the MouseWheelListener.

        mouseWheelListeners.removeUserListener(l);
    
voidremoveNextEvent(int id)
Removes the next event.

param
id the id.

        eventsTable.get(new Integer(id)).removeFirst();
    
public voidremoveNotify()
Makes this Component undisplayable.

        toolkit.lockAWT();
        try {
            // ???AWT
            /*
             * if (dropTarget != null) { dropTarget.removeNotify(peer); }
             */
            prepare4HierarchyChange();
            // /???AWT: moveFocus();
            behaviour.removeNotify();
            // ???AWT: finishHierarchyChange(this, parent, 0);
            removeNotifyInputContext();
        } finally {
            toolkit.unlockAWT();
        }
    
private voidremoveNotifyInputContext()
Calls InputContext.removeNotify.

        if (!inputMethodsEnabled) {
            return;
        }
        InputContext ic = getInputContext();
        if (ic != null) {
            // ???AWT: ic.removeNotify(this);
        }
    
public voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the property change listener registered for this component.

param
listener the PropertyChangeListener.

        getPropertyChangeSupport().removePropertyChangeListener(listener);
    
public voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
Removes the property change listener registered fot this component for the specified propertyy.

param
propertyName the property name.
param
listener the PropertyChangeListener.

        getPropertyChangeSupport().removePropertyChangeListener(propertyName, listener);
    
voidremoveRelativeEvent()
Removes the relative event.

        eventsList.removeLast();
    
public voidrepaint(long tm, int x, int y, int width, int height)
Repaints the specified rectangle of this component within tm milliseconds.

param
tm the time in milliseconds before updating.
param
x the x coordinate of Rectangle.
param
y the y coordinate of Rectangle.
param
width the width of Rectangle.
param
height the height of Rectangle.

        // ???AWT
        /*
         * toolkit.lockAWT(); try { if (width <= 0 || height <= 0 ||
         * (redrawManager == null) || !isShowing()) { return; } if (behaviour
         * instanceof LWBehavior) { if (parent == null || !parent.visible ||
         * !parent.behaviour.isDisplayable()) { return; } if (repaintRegion ==
         * null) { repaintRegion = new MultiRectArea(new Rectangle(x, y, width,
         * height)); } repaintRegion.intersect(new Rectangle(0, 0, this.w,
         * this.h)); repaintRegion.translate(this.x, this.y);
         * parent.repaintRegion = repaintRegion; repaintRegion = null;
         * parent.repaint(tm, x + this.x, y + this.y, width, height); } else {
         * if (repaintRegion != null) { redrawManager.addUpdateRegion(this,
         * repaintRegion); repaintRegion = null; } else {
         * redrawManager.addUpdateRegion(this, new Rectangle(x, y, width,
         * height)); }
         * toolkit.getSystemEventQueueCore().notifyEventMonitor(toolkit); } }
         * finally { toolkit.unlockAWT(); }
         */
    
public voidrepaint(int x, int y, int width, int height)
Repaints the specified Rectangle of this Component.

param
x the x coordinate of Rectangle.
param
y the y coordinate of Rectangle.
param
width the width of Rectangle.
param
height the height of Rectangle.

        toolkit.lockAWT();
        try {
            repaint(0, x, y, width, height);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidrepaint()
Repaints this component.

        toolkit.lockAWT();
        try {
            if (w > 0 && h > 0) {
                repaint(0, 0, 0, w, h);
            }
        } finally {
            toolkit.unlockAWT();
        }
    
public voidrepaint(long tm)
Repaints the component within tm milliseconds.

param
tm the time in milliseconds before updating.

        toolkit.lockAWT();
        try {
            repaint(tm, 0, 0, w, h);
        } finally {
            toolkit.unlockAWT();
        }
    
protected booleanrequestFocus(boolean temporary)
Requests that this Component get the input focus temporarily. This component must be displayable, visible, and focusable.

param
temporary this parameter is true if the focus change is temporary, when the window loses the focus.
return
true if the focus change request is succeeded, false otherwise.

        toolkit.lockAWT();
        try {
            // ???AWT: return requestFocusImpl(temporary, true, false);
        } finally {
            toolkit.unlockAWT();
        }
        // ???AWT
        return false;
    
public voidrequestFocus()
Requests that this Component get the input focus. This component must be displayable, visible, and focusable.

        toolkit.lockAWT();
        try {
            requestFocus(false);
        } finally {
            toolkit.unlockAWT();
        }
    
voidresetDefaultSize()
Reset default size.

    
public voidreshape(int x, int y, int w, int h)
Deprecated: replaced by setBounds(int, int, int, int) method.

param
x the x coordinate.
param
y the y coordinate.
param
w the width.
param
h the height.
deprecated
Replaced by setBounds(int, int, int, int) method.

        toolkit.lockAWT();
        try {
            setBounds(x, y, w, h, boundsMaskParam, true);
            boundsMaskParam = 0;
        } finally {
            toolkit.unlockAWT();
        }
    
public voidresize(int width, int height)
Deprecated: replaced by setSize(int, int) method.

param
width the width.
param
height the height.
deprecated
Replaced by setSize(int, int) method.

        toolkit.lockAWT();
        try {
            boundsMaskParam = NativeWindow.BOUNDS_NOMOVE;
            setBounds(x, y, width, height);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidresize(java.awt.Dimension size)
Deprecated: replaced by setSize(int, int) method.

param
size the size.
deprecated
Replaced by setSize(int, int) method.

        toolkit.lockAWT();
        try {
            setSize(size.width, size.height);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidsetBackground(java.awt.Color c)
Sets the background color for the Component.

param
c the new background color for this component.

        Color oldBkColor;
        toolkit.lockAWT();
        try {
            oldBkColor = backColor;
            backColor = c;
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("background", oldBkColor, backColor); //$NON-NLS-1$
        repaint();
    
public voidsetBounds(int x, int y, int w, int h)
Sets rectangle for this Component to be the rectangle with the specified x,y coordinates of the top-left corner and the width and height.

param
x the x coordinate of the rectangle's top-left corner.
param
y the y coordinate of the rectangle's top-left corner.
param
w the width of rectangle.
param
h the height of rectangle.

        toolkit.lockAWT();
        try {
            reshape(x, y, w, h);
        } finally {
            toolkit.unlockAWT();
        }
    
voidsetBounds(int x, int y, int w, int h, int bMask, boolean updateBehavior)
Sets rectangle for this Component to be the rectangle with the specified x,y coordinates of the top-left corner and the width and height and posts the appropriate events.

param
x the x coordinate of the rectangle's top-left corner.
param
y the y coordinate of the rectangle's top-left corner.
param
w the width of rectangle.
param
h the height of rectangle.
param
bMask the bitmask of bounds options.
param
updateBehavior the whether to update the behavoir's bounds as well.

        int oldX = this.x;
        int oldY = this.y;
        int oldW = this.w;
        int oldH = this.h;
        setBoundsFields(x, y, w, h, bMask);
        // Moved
        if ((oldX != this.x) || (oldY != this.y)) {
            // ???AWT: invalidateRealParent();
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_MOVED));
            spreadHierarchyBoundsEvents(this, HierarchyEvent.ANCESTOR_MOVED);
        }
        // Resized
        if ((oldW != this.w) || (oldH != this.h)) {
            invalidate();
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));
            spreadHierarchyBoundsEvents(this, HierarchyEvent.ANCESTOR_RESIZED);
        }
        if (updateBehavior) {
            behaviour.setBounds(this.x, this.y, this.w, this.h, bMask);
        }
        notifyInputMethod(new Rectangle(x, y, w, h));
    
public voidsetBounds(java.awt.Rectangle r)
Sets the new bounding rectangle for this Component.

param
r the new bounding rectangle.

        toolkit.lockAWT();
        try {
            setBounds(r.x, r.y, r.width, r.height);
        } finally {
            toolkit.unlockAWT();
        }
    
private voidsetBoundsFields(int x, int y, int w, int h, int bMask)
Sets the bounds fields.

param
x the x.
param
y the y.
param
w the w.
param
h the h.
param
bMask the b mask.

        if ((bMask & NativeWindow.BOUNDS_NOSIZE) == 0) {
            this.w = w;
            this.h = h;
        }
        if ((bMask & NativeWindow.BOUNDS_NOMOVE) == 0) {
            this.x = x;
            this.y = y;
        }
    
voidsetCaretPos(int x, int y)
Set native caret at the given position
Note: this method takes AWT lock inside because it walks through the component hierarchy.

param
x the x.
param
y the y.

        Runnable r = new Runnable() {
            public void run() {
                toolkit.lockAWT();
                try {
                    setCaretPosImpl(x, y);
                } finally {
                    toolkit.unlockAWT();
                }
            }
        };
        if (Thread.currentThread() instanceof EventDispatchThread) {
            r.run();
        } else {
            toolkit.getSystemEventQueueImpl().postEvent(new InvocationEvent(this, r));
        }
    
voidsetCaretPosImpl(int x, int y)
This method should be called only at event dispatch thread.

param
x the x.
param
y the y.

        Component c = this;
        while ((c != null) && c.behaviour.isLightweight()) {
            x += c.x;
            y += c.y;
            // ???AWT: c = c.getParent();
        }
        if (c == null) {
            return;
        }
        // ???AWT
        /*
         * if (c instanceof Window) { Insets insets = c.getNativeInsets(); x -=
         * insets.left; y -= insets.top; }
         * toolkit.getWindowFactory().setCaretPosition(x, y);
         */
    
public voidsetComponentOrientation(java.awt.ComponentOrientation o)
Sets the component orientation which affects the component's elements and text within this component.

param
o the ComponentOrientation object.

        ComponentOrientation oldOrientation;
        toolkit.lockAWT();
        try {
            oldOrientation = orientation;
            orientation = o;
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("componentOrientation", oldOrientation, orientation); //$NON-NLS-1$
        invalidate();
    
public voidsetCursor(java.awt.Cursor cursor)
Sets the specified cursor for this Component.

param
cursor the new Cursor.

        toolkit.lockAWT();
        try {
            this.cursor = cursor;
            setCursor();
        } finally {
            toolkit.unlockAWT();
        }
    
voidsetCursor()
Set current cursor shape to Component's Cursor.

        if (isDisplayable() && isShowing()) {
            Rectangle absRect = new Rectangle(getLocationOnScreen(), getSize());
            Point absPointerPos = toolkit.dispatcher.mouseDispatcher.getPointerPos();
            // ???AWT
            /*
             * if (absRect.contains(absPointerPos)) { // set Cursor only on
             * top-level Windows(on X11) Window topLevelWnd =
             * getWindowAncestor(); if (topLevelWnd != null) { Point pointerPos
             * = MouseDispatcher.convertPoint(null, absPointerPos, topLevelWnd);
             * Component compUnderCursor =
             * topLevelWnd.findComponentAt(pointerPos); // if (compUnderCursor
             * == this || // compUnderCursor.getCursorAncestor() == this) {
             * NativeWindow wnd = topLevelWnd.getNativeWindow(); if
             * (compUnderCursor != null && wnd != null) {
             * compUnderCursor.getRealCursor().getNativeCursor()
             * .setCursor(wnd.getId()); } // } } }
             */
        }
    
public voidsetEnabled(boolean value)
Sets this component to the "enabled" or "disabled" state depending on the specified boolean parameter.

param
value true if this component should be enabled; false if this component should be disabled.

        toolkit.lockAWT();
        try {
            enable(value);
        } finally {
            toolkit.unlockAWT();
        }
    
voidsetEnabledImpl(boolean value)
Sets the enabled impl.

param
value the new enabled impl.

        if (enabled != value) {
            enabled = value;
            setCursor();
            if (!enabled) {
                moveFocusOnHide();
            }
            behaviour.setEnabled(value);
        }
    
public voidsetFocusTraversalKeysEnabled(boolean value)
Sets the focus traversal keys state for this component.

param
value true if the focus traversal keys state is enabled, false if the focus traversal keys state is disabled.

        boolean oldFocusTraversalKeysEnabled;
        toolkit.lockAWT();
        try {
            oldFocusTraversalKeysEnabled = focusTraversalKeysEnabled;
            focusTraversalKeysEnabled = value;
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("focusTraversalKeysEnabled", oldFocusTraversalKeysEnabled, //$NON-NLS-1$
                focusTraversalKeysEnabled);
    
public voidsetFont(java.awt.Font f)
Sets the font for this Component.

param
f the new font of the Component.

        Font oldFont;
        toolkit.lockAWT();
        try {
            oldFont = font;
            setFontImpl(f);
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("font", oldFont, font); //$NON-NLS-1$
    
voidsetFontImpl(java.awt.Font f)
Sets the font impl.

param
f the new font impl.

        font = f;
        invalidate();
        if (isShowing()) {
            repaint();
        }
    
public voidsetForeground(java.awt.Color c)
Sets the foreground color for this Component.

param
c the new foreground color.

        Color oldFgColor;
        toolkit.lockAWT();
        try {
            oldFgColor = foreColor;
            foreColor = c;
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("foreground", oldFgColor, foreColor); //$NON-NLS-1$
        repaint();
    
public voidsetIgnoreRepaint(boolean value)
Sets the flag for whether paint messages received from the operating system should be ignored or not.

param
value true if paint messages received from the operating system should be ignored, false otherwise.

        toolkit.lockAWT();
        try {
            ignoreRepaint = value;
        } finally {
            toolkit.unlockAWT();
        }
    
public voidsetLocale(java.util.Locale locale)
Sets the locale of the component.

param
locale the new Locale.

        Locale oldLocale;
        toolkit.lockAWT();
        try {
            oldLocale = this.locale;
            this.locale = locale;
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("locale", oldLocale, locale); //$NON-NLS-1$
    
public voidsetLocation(java.awt.Point p)
Sets the location of the Component to the specified point.

param
p the new location of the Component.

        toolkit.lockAWT();
        try {
            setLocation(p.x, p.y);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidsetLocation(int x, int y)
Sets the location of the Component to the specified x, y coordinates.

param
x the x coordinate.
param
y the y coordinate.

        toolkit.lockAWT();
        try {
            move(x, y);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidsetMaximumSize(java.awt.Dimension maximumSize)
Sets the maximum size of the Component.

param
maximumSize the new maximum size of the Component.

        Dimension oldMaximumSize;
        toolkit.lockAWT();
        try {
            oldMaximumSize = this.maximumSize;
            if (oldMaximumSize != null) {
                oldMaximumSize = oldMaximumSize.getSize();
            }
            if (this.maximumSize == null) {
                if (maximumSize != null) {
                    this.maximumSize = new Dimension(maximumSize);
                }
            } else {
                if (maximumSize != null) {
                    this.maximumSize.setSize(maximumSize);
                } else {
                    this.maximumSize = null;
                }
            }
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("maximumSize", oldMaximumSize, this.maximumSize); //$NON-NLS-1$
        toolkit.lockAWT();
        try {
            // ???AWT: invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
        }
    
public voidsetMinimumSize(java.awt.Dimension minimumSize)
Sets the minimum size of the Component.

param
minimumSize the new minimum size of the Component.

        Dimension oldMinimumSize;
        toolkit.lockAWT();
        try {
            oldMinimumSize = this.minimumSize;
            if (oldMinimumSize != null) {
                oldMinimumSize = oldMinimumSize.getSize();
            }
            if (this.minimumSize == null) {
                if (minimumSize != null) {
                    this.minimumSize = new Dimension(minimumSize);
                }
            } else {
                if (minimumSize != null) {
                    this.minimumSize.setSize(minimumSize);
                } else {
                    this.minimumSize = null;
                }
            }
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("minimumSize", oldMinimumSize, this.minimumSize); //$NON-NLS-1$
        toolkit.lockAWT();
        try {
            // ???AWT: invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
        }
    
voidsetMouseExitedExpected(boolean expected)
Sets the mouse exited expected.

param
expected the new mouse exited expected.

        mouseExitedExpected = expected;
    
public voidsetName(java.lang.String name)
Sets the name of the Component.

param
name the new name of the Component.

        String oldName;
        toolkit.lockAWT();
        try {
            autoName = false;
            oldName = this.name;
            this.name = name;
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("name", oldName, name); //$NON-NLS-1$
    
public voidsetPreferredSize(java.awt.Dimension preferredSize)
Sets the preferred size of the Component.

param
preferredSize the new preferred size of the Component.

        Dimension oldPreferredSize;
        toolkit.lockAWT();
        try {
            oldPreferredSize = this.preferredSize;
            if (oldPreferredSize != null) {
                oldPreferredSize = oldPreferredSize.getSize();
            }
            if (this.preferredSize == null) {
                if (preferredSize != null) {
                    this.preferredSize = new Dimension(preferredSize);
                }
            } else {
                if (preferredSize != null) {
                    this.preferredSize.setSize(preferredSize);
                } else {
                    this.preferredSize = null;
                }
            }
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("preferredSize", oldPreferredSize, this.preferredSize); //$NON-NLS-1$
        toolkit.lockAWT();
        try {
            // ???AWT: invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
        }
    
public voidsetSize(int width, int height)
Sets the size of the Component specified by width and height parameters.

param
width the width of the Component.
param
height the height of the Component.

        toolkit.lockAWT();
        try {
            resize(width, height);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidsetSize(java.awt.Dimension d)
Sets the size of the Component specified by Dimension object.

param
d the new size of the Component.

        toolkit.lockAWT();
        try {
            resize(d);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidsetVisible(boolean b)
Sets the visibility state of the component.

param
b true if the component is visible, false if the component is not shown.

        // show() & hide() are not deprecated for Window,
        // so have to call them from setVisible()
        show(b);
    
public voidshow()
Deprecated: replaced by setVisible(boolean) method.

deprecated
Replaced by setVisible(boolean) method.

        toolkit.lockAWT();
        try {
            if (visible) {
                return;
            }
            prepare4HierarchyChange();
            mapToDisplay(true);
            validate();
            visible = true;
            behaviour.setVisible(true);
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_SHOWN));
            // ???AWT: finishHierarchyChange(this, parent, 0);
            notifyInputMethod(new Rectangle(x, y, w, h));
            // ???AWT: invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
        }
    
public voidshow(boolean b)
Deprecated: replaced by setVisible(boolean) method.

param
b the visibility's state.
deprecated
Replaced by setVisible(boolean) method.

        if (b) {
            show();
        } else {
            hide();
        }
    
public java.awt.Dimensionsize()
Deprecated: replaced by replaced by getSize() method.

return
the dimension.
deprecated
Replaced by getSize() method.

        toolkit.lockAWT();
        try {
            return new Dimension(w, h);
        } finally {
            toolkit.unlockAWT();
        }
    
voidspreadHierarchyBoundsEvents(java.awt.Component changed, int id)
Spread hierarchy bounds events.

param
changed the changed.
param
id the id.

        // To be inherited by Container
    
public java.lang.StringtoString()
Returns the string representation of the Component.

return
the string representation of the Component.

        /*
         * The format is based on 1.5 release behavior which can be revealed by
         * the following code: Component c = new Component(){};
         * c.setVisible(false); System.out.println(c);
         */
        toolkit.lockAWT();
        try {
            return getClass().getName() + "[" + paramString() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
        } finally {
            toolkit.unlockAWT();
        }
    
public voidupdate(java.awt.Graphics g)
Updates this Component.

param
g the Graphics to be used for updating.

        toolkit.lockAWT();
        try {
            if (!isLightweight() && !isPrepainter()) {
                g.setColor(getBackground());
                g.fillRect(0, 0, w, h);
                g.setColor(getForeground());
            }
            paint(g);
        } finally {
            toolkit.unlockAWT();
        }
    
public voidvalidate()
Validates that this component has a valid layout.

        toolkit.lockAWT();
        try {
            if (!behaviour.isDisplayable()) {
                return;
            }
            validateImpl();
        } finally {
            toolkit.unlockAWT();
        }
    
voidvalidateImpl()
Validate impl.

        valid = true;