Methods Summary |
---|
public boolean | action(java.awt.Event evt, java.lang.Object what)Handles the event. Use ActionListener instead of this.
// to be overridden: do nothing,
// just return false to propagate event up to the parent container
return false;
|
void | addAWTComponentListener(java.awt.event.ComponentListener l)Adds the awt component listener.
enableAWTEvents(AWTEvent.COMPONENT_EVENT_MASK);
componentListeners.addSystemListener(l);
|
void | addAWTFocusListener(java.awt.event.FocusListener l)Adds the awt focus listener.
enableAWTEvents(AWTEvent.FOCUS_EVENT_MASK);
focusListeners.addSystemListener(l);
|
void | addAWTInputMethodListener(java.awt.event.InputMethodListener l)Adds the awt input method listener.
enableAWTEvents(AWTEvent.INPUT_METHOD_EVENT_MASK);
inputMethodListeners.addSystemListener(l);
|
void | addAWTKeyListener(java.awt.event.KeyListener l)Adds the awt key listener.
enableAWTEvents(AWTEvent.KEY_EVENT_MASK);
keyListeners.addSystemListener(l);
|
void | addAWTMouseListener(java.awt.event.MouseListener l)Adds the awt mouse listener.
enableAWTEvents(AWTEvent.MOUSE_EVENT_MASK);
mouseListeners.addSystemListener(l);
|
void | addAWTMouseMotionListener(java.awt.event.MouseMotionListener l)Adds the awt mouse motion listener.
enableAWTEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
mouseMotionListeners.addSystemListener(l);
|
void | addAWTMouseWheelListener(java.awt.event.MouseWheelListener l)Adds the awt mouse wheel listener.
enableAWTEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);
mouseWheelListeners.addSystemListener(l);
|
public void | addComponentListener(java.awt.event.ComponentListener l)Adds the specified component listener to the Component for receiving
component's event.
componentListeners.addUserListener(l);
|
public void | addFocusListener(java.awt.event.FocusListener l)Adds the specified focus listener to the Component for receiving focus
events.
focusListeners.addUserListener(l);
|
public void | addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)Adds the specified hierarchy bounds listener.
hierarchyBoundsListeners.addUserListener(l);
|
public void | addHierarchyListener(java.awt.event.HierarchyListener l)Adds the specified hierarchy listener.
hierarchyListeners.addUserListener(l);
|
public void | addInputMethodListener(java.awt.event.InputMethodListener l)Adds the specified input method listener.
inputMethodListeners.addUserListener(l);
|
public void | addKeyListener(java.awt.event.KeyListener l)Adds the specified key listener.
keyListeners.addUserListener(l);
|
public void | addMouseListener(java.awt.event.MouseListener l)Adds the specified mouse listener.
mouseListeners.addUserListener(l);
|
public void | addMouseMotionListener(java.awt.event.MouseMotionListener l)Adds the specified mouse motion listener.
mouseMotionListeners.addUserListener(l);
|
public void | addMouseWheelListener(java.awt.event.MouseWheelListener l)Adds the specified mouse wheel listener.
mouseWheelListeners.addUserListener(l);
|
void | addNewEvent(java.awt.AWTEvent event)Adds the new event.
eventsList.addLast(event);
|
public void | addNotify()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 boolean | areFocusTraversalKeysSet(int id)Returns true if the set of focus traversal keys for the given focus
traversal operation has been explicitly defined for this Component.
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.String | autoName()Auto name.
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.Rectangle | bounds()Gets the bounds of the Component.
toolkit.lockAWT();
try {
return new Rectangle(x, y, w, h);
} finally {
toolkit.unlockAWT();
}
|
public int | checkImage(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.
toolkit.lockAWT();
try {
return toolkit.checkImage(image, width, height, observer);
} finally {
toolkit.unlockAWT();
}
|
public int | checkImage(java.awt.Image image, java.awt.image.ImageObserver observer)Returns the construction status of a specified image that is being
created.
toolkit.lockAWT();
try {
return toolkit.checkImage(image, -1, -1, observer);
} finally {
toolkit.unlockAWT();
}
|
protected java.awt.AWTEvent | coalesceEvents(java.awt.AWTEvent existingEvent, java.awt.AWTEvent newEvent)Coalesces the existed event with new event.
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 boolean | contains(java.awt.Point p)Returns true, if the component contains the specified Point.
toolkit.lockAWT();
try {
return contains(p.x, p.y);
} finally {
toolkit.unlockAWT();
}
|
public boolean | contains(int x, int y)Returns true, if the component contains the point with the specified
coordinates.
toolkit.lockAWT();
try {
return inside(x, y);
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Image | createImage(java.awt.image.ImageProducer producer)Creates the image with the specified ImageProducer.
toolkit.lockAWT();
try {
return toolkit.createImage(producer);
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Image | createImage(int width, int height)Creates an off-screen drawable image to be used for double buffering.
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.VolatileImage | createVolatileImage(int width, int height, java.awt.ImageCapabilities caps)Creates an off-screen drawable image with the specified width, height and
ImageCapabilities.
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.VolatileImage | createVolatileImage(int width, int height)Creates a volatile off-screen drawable image which is used for double
buffering.
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 void | deliverEvent(java.awt.Event evt)Delivers event.
postEvent(evt);
|
private void | deriveCoalescerFlag()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 void | disable()Disables.
toolkit.lockAWT();
try {
setEnabledImpl(false);
} finally {
toolkit.unlockAWT();
}
// ???AWT: fireAccessibleStateChange(AccessibleState.ENABLED, false);
|
protected final void | disableEvents(long eventsToDisable)Disables the events with types specified by the specified event mask from
being delivered to this component.
toolkit.lockAWT();
try {
enabledEvents &= ~eventsToDisable;
} finally {
toolkit.unlockAWT();
}
|
public final void | dispatchEvent(java.awt.AWTEvent e)Dispatches an event to this component.
// ???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 boolean | dispatchEventToIM(java.awt.AWTEvent e)Dispatches input & focus events to input method context.
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 void | doLayout()Prompts the layout manager to lay out this component.
toolkit.lockAWT();
try {
layout();
} finally {
toolkit.unlockAWT();
}
// Implemented in Container
|
public void | enable()Enables this component.
toolkit.lockAWT();
try {
setEnabledImpl(true);
} finally {
toolkit.unlockAWT();
}
// ???AWT: fireAccessibleStateChange(AccessibleState.ENABLED, true);
|
public void | enable(boolean b)Enables or disable this component.
toolkit.lockAWT();
try {
if (b) {
enable();
} else {
disable();
}
} finally {
toolkit.unlockAWT();
}
|
private void | enableAWTEvents(long eventsToEnable)Enable awt events.
enabledAWTEvents |= eventsToEnable;
|
protected final void | enableEvents(long eventsToEnable)Enables the events with the specified event mask to be delivered to this
component.
toolkit.lockAWT();
try {
enabledEvents |= eventsToEnable;
deprecatedEventHandler = false;
} finally {
toolkit.unlockAWT();
}
|
public void | enableInputMethods(boolean enable)Enables or disables input method support for this component.
toolkit.lockAWT();
try {
if (!enable) {
removeNotifyInputContext();
}
inputMethodsEnabled = enable;
} finally {
toolkit.unlockAWT();
}
|
private void | fillImageBackground(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.
Graphics gr = image.getGraphics();
gr.setColor(getBackground());
gr.fillRect(0, 0, width, height);
gr.dispose();
|
protected void | firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)Reports a bound property changes for int properties.
firePropertyChangeImpl(propertyName, new Integer(oldValue), new Integer(newValue));
|
protected void | firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)Report a bound property change for a boolean-valued property.
firePropertyChangeImpl(propertyName, Boolean.valueOf(oldValue), Boolean.valueOf(newValue));
|
protected void | firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)Reports a bound property change for an Object-valued property.
firePropertyChangeImpl(propertyName, oldValue, newValue);
|
public void | firePropertyChange(java.lang.String propertyName, byte oldValue, byte newValue)Report a bound property change for a byte-valued property.
firePropertyChangeImpl(propertyName, new Byte(oldValue), new Byte(newValue));
|
public void | firePropertyChange(java.lang.String propertyName, char oldValue, char newValue)Report a bound property change for a char-valued property.
firePropertyChangeImpl(propertyName, new Character(oldValue), new Character(newValue));
|
public void | firePropertyChange(java.lang.String propertyName, short oldValue, short newValue)Report a bound property change for a short-valued property.
firePropertyChangeImpl(propertyName, new Short(oldValue), new Short(newValue));
|
public void | firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)Report a bound property change for a long-valued property.
firePropertyChangeImpl(propertyName, new Long(oldValue), new Long(newValue));
|
public void | firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)Report a bound property change for a float-valued property.
firePropertyChangeImpl(propertyName, new Float(oldValue), new Float(newValue));
|
public void | firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)Report a bound property change for a double-valued property.
firePropertyChangeImpl(propertyName, new Double(oldValue), new Double(newValue));
|
private void | firePropertyChangeImpl(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)Fire property change impl.
PropertyChangeSupport pcs;
synchronized (componentLock) {
if (propertyChangeSupport == null) {
return;
}
pcs = propertyChangeSupport;
}
pcs.firePropertyChange(propertyName, oldValue, newValue);
|
public float | getAlignmentX()Gets the alignment along the x axis.
toolkit.lockAWT();
try {
return CENTER_ALIGNMENT;
} finally {
toolkit.unlockAWT();
}
|
public float | getAlignmentY()Gets the alignment along the y axis.
toolkit.lockAWT();
try {
return CENTER_ALIGNMENT;
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Color | getBackground()Gets 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.Rectangle | getBounds()Gets the bounding rectangle of this component.
toolkit.lockAWT();
try {
return bounds();
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Rectangle | getBounds(java.awt.Rectangle rv)Writes the data of the bounding rectangle to the specified Rectangle
object.
toolkit.lockAWT();
try {
if (rv == null) {
rv = new Rectangle();
}
rv.setBounds(x, y, w, h);
return rv;
} finally {
toolkit.unlockAWT();
}
|
public java.awt.image.ColorModel | getColorModel()Gets the color model of the Component.
toolkit.lockAWT();
try {
return getToolkit().getColorModel();
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Component | getComponentAt(java.awt.Point p)Gets the Component which contains the specified Point.
toolkit.lockAWT();
try {
return getComponentAt(p.x, p.y);
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Component | getComponentAt(int x, int y)Gets 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 componentListeners.getUserListeners(new ComponentListener[0]);
|
public java.awt.ComponentOrientation | getComponentOrientation()Gets the component's orientation.
toolkit.lockAWT();
try {
return orientation;
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Cursor | getCursor()Gets the cursor of the Component.
toolkit.lockAWT();
try {
if (cursor != null) {
return cursor;
// ???AWT
/*
* } else if (parent != null) { return parent.getCursor();
*/
}
return Cursor.getDefaultCursor();
} finally {
toolkit.unlockAWT();
}
|
java.awt.Color | getDefaultBackground()Gets the default background.
// ???AWT: return getWindowAncestor().getDefaultBackground();
return getBackground();
|
java.awt.Color | getDefaultForeground()Gets the default foreground.
// ???AWT return getWindowAncestor().getDefaultForeground();
return getForeground();
|
java.awt.Dimension | getDefaultMinimumSize()Gets the default minimum size.
return null;
|
java.awt.Dimension | getDefaultPreferredSize()Gets the default preferred size.
return null;
|
public java.awt.event.FocusListener[] | getFocusListeners()Gets an array of focus listeners registered for this Component.
return focusListeners.getUserListeners(new FocusListener[0]);
|
public boolean | getFocusTraversalKeysEnabled()Checks if the the focus traversal keys are enabled for this component.
toolkit.lockAWT();
try {
return focusTraversalKeysEnabled;
} finally {
toolkit.unlockAWT();
}
|
public java.awt.FontMetrics | getFontMetrics(java.awt.Font f)Gets the font metrics of the specified Font.
return toolkit.getFontMetrics(f);
|
public java.awt.Color | getForeground()Gets 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.Graphics | getGraphics()Gets 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.GraphicsConfiguration | getGraphicsConfiguration()Gets 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 int | getHeight()Gets 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 hierarchyBoundsListeners.getUserListeners(new HierarchyBoundsListener[0]);
|
public java.awt.event.HierarchyListener[] | getHierarchyListeners()Gets an array of registered HierarchyListeners for this Component.
return hierarchyListeners.getUserListeners(new HierarchyListener[0]);
|
public boolean | getIgnoreRepaint()Returns true if paint messages received from the operating system should
be ignored.
toolkit.lockAWT();
try {
return ignoreRepaint;
} finally {
toolkit.unlockAWT();
}
|
java.lang.String | getIndentStr(int indent)Gets a 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.InputContext | getInputContext()Gets the input context of this component for handling the communication
with input methods when text is entered in this component.
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 inputMethodListeners.getUserListeners(new InputMethodListener[0]);
|
public java.awt.im.InputMethodRequests | getInputMethodRequests()Gets the input method request handler which supports requests from input
methods for this component, or null for default.
return null;
|
java.awt.Insets | getInsets()Gets 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 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.
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.Locale | getLocale()Gets 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.Point | getLocation(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.
toolkit.lockAWT();
try {
if (rv == null) {
rv = new Point();
}
rv.setLocation(getX(), getY());
return rv;
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Point | getLocation()Gets the location of this component on the form; returns the point of the
component's top-left corner.
toolkit.lockAWT();
try {
return location();
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Point | getLocationOnScreen()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.
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.Dimension | getMaximumSize()Gets 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.Dimension | getMinimumSize()Gets 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 mouseListeners.getUserListeners(new MouseListener[0]);
|
public java.awt.event.MouseMotionListener[] | getMouseMotionListeners()Gets an array of the mouse motion listeners 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 mouseWheelListeners.getUserListeners(new MouseWheelListener[0]);
|
public java.lang.String | getName()Gets the name of this Component.
toolkit.lockAWT();
try {
if ((name == null) && autoName) {
name = autoName();
}
return name;
} finally {
toolkit.unlockAWT();
}
|
java.awt.Insets | getNativeInsets()Gets the native insets.
return new Insets(0, 0, 0, 0);
|
org.apache.harmony.awt.wtk.NativeWindow | getNativeWindow()Gets the native window.
return behaviour.getNativeWindow();
|
public java.awt.peer.ComponentPeer | getPeer()Gets the peer. This method should not be called directly by user
applications.
toolkit.lockAWT();
try {
if (behaviour.isDisplayable()) {
return peer;
}
return null;
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Dimension | getPreferredSize()Gets 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 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.
return getPropertyChangeSupport().getPropertyChangeListeners(propertyName);
|
private java.beans.PropertyChangeSupport | getPropertyChangeSupport()Gets the property change support.
synchronized (componentLock) {
if (propertyChangeSupport == null) {
propertyChangeSupport = new PropertyChangeSupport(this);
}
return propertyChangeSupport;
}
|
java.awt.AWTEvent | getRelativeEvent(int id)Gets 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.Dimension | getSize()Gets the size of this Component.
toolkit.lockAWT();
try {
return size();
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Dimension | getSize(java.awt.Dimension rv)Stores the size of this Component to the specified Dimension object.
toolkit.lockAWT();
try {
if (rv == null) {
rv = new Dimension();
}
rv.setSize(getWidth(), getHeight());
return rv;
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Toolkit | getToolkit()Gets Toolkit for the current Component.
return toolkit;
|
public final java.lang.Object | getTreeLock()Gets this component's locking object for AWT component tree and layout
operations.
return toolkit.awtTreeLock;
|
public int | getWidth()Gets the width of the Component.
toolkit.lockAWT();
try {
return w;
} finally {
toolkit.unlockAWT();
}
|
public int | getX()Gets the x coordinate of the component's top-left corner.
toolkit.lockAWT();
try {
return x;
} finally {
toolkit.unlockAWT();
}
|
public int | getY()Gets the y coordinate of the component's top-left corner.
toolkit.lockAWT();
try {
return y;
} finally {
toolkit.unlockAWT();
}
|
public boolean | gotFocus(java.awt.Event evt, java.lang.Object what)Got the focus.
// to be overridden: do nothing,
// just return false to propagate event up to the parent container
return false;
|
public boolean | handleEvent(java.awt.Event evt)Handles event.
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 boolean | hasFocus()Checks whether the Component is the focus owner or not.
toolkit.lockAWT();
try {
// ???AWT: return isFocusOwner();
return false;
} finally {
toolkit.unlockAWT();
}
|
public void | hide()Hides the Component.
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 boolean | imageUpdate(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();
}
|
void | initGraphics(java.awt.Graphics g, java.awt.event.PaintEvent e)Inits the graphics.
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 boolean | inside(int x, int y)Checks whether or not the point with the specified coordinates belongs to
the Commponent.
toolkit.lockAWT();
try {
return x >= 0 && x < getWidth() && y >= 0 && y < getHeight();
} finally {
toolkit.unlockAWT();
}
|
public void | invalidate()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 boolean | isBackgroundSet()Checks whether or not the background color is set to this Component.
toolkit.lockAWT();
try {
return backColor != null;
} finally {
toolkit.unlockAWT();
}
|
boolean | isCoalescer()Checks if this Component is a coalescer.
return coalescer;
|
public boolean | isCursorSet()Checks whether or not a cursor is set for the Component.
toolkit.lockAWT();
try {
return cursor != null;
} finally {
toolkit.unlockAWT();
}
|
public boolean | isDisplayable()Checks whether or not this Component is displayable.
toolkit.lockAWT();
try {
return behaviour.isDisplayable();
} finally {
toolkit.unlockAWT();
}
|
public boolean | isDoubleBuffered()Checks whether or not this component is painted to an buffer which is
copied to the screen later.
toolkit.lockAWT();
try {
// false by default
return false;
} finally {
toolkit.unlockAWT();
}
|
public boolean | isEnabled()Checks whether or not this Component is enabled.
toolkit.lockAWT();
try {
return enabled;
} finally {
toolkit.unlockAWT();
}
|
boolean | isEventEnabled(long eventMask)Checks if is event enabled.
return ((enabledEvents & eventMask) != 0);
|
public boolean | isFocusTraversable()Checks whether or not this Component can be focusable.
toolkit.lockAWT();
try {
overridenIsFocusable = false;
return focusable; // a Component must either be both focusable and
// focus traversable, or neither
} finally {
toolkit.unlockAWT();
}
|
boolean | isFocusabilityExplicitlySet()
return calledSetFocusable || overridenIsFocusable;
|
public boolean | isFocusable()Checks if this Component can be focusable or not.
toolkit.lockAWT();
try {
return isFocusTraversable();
} finally {
toolkit.unlockAWT();
}
|
public boolean | isFontSet()Checks if the Font is set for this Component or not.
toolkit.lockAWT();
try {
return font != null;
} finally {
toolkit.unlockAWT();
}
|
public boolean | isForegroundSet()Checks if foreground color is set for the Component or not.
toolkit.lockAWT();
try {
return foreColor != null;
} finally {
toolkit.unlockAWT();
}
|
boolean | isIndirectlyEnabled()"Recursive" isEnabled().
Component comp = this;
while (comp != null) {
if (!comp.isLightweight() && !comp.isEnabled()) {
return false;
}
// ???AWT: comp = comp.getRealParent();
}
return true;
|
boolean | isKeyEnabled()Checks if the component is key enabled.
if (!isEnabled()) {
return false;
}
return isIndirectlyEnabled();
|
public boolean | isLightweight()Returns true if this component has a lightweight peer.
toolkit.lockAWT();
try {
return behaviour.isLightweight();
} finally {
toolkit.unlockAWT();
}
|
public boolean | isMaximumSizeSet()Checks whether or not a maximum size is set for the Component.
toolkit.lockAWT();
try {
return maximumSize != null;
} finally {
toolkit.unlockAWT();
}
|
public boolean | isMinimumSizeSet()Checks whether or not the minimum size is set for the component.
toolkit.lockAWT();
try {
return minimumSize != null;
} finally {
toolkit.unlockAWT();
}
|
boolean | isMouseEventEnabled(long eventMask)Checks if is mouse event enabled.
return (isEventEnabled(eventMask) || (enabledAWTEvents & eventMask) != 0);
|
boolean | isMouseExitedExpected()Checks if is mouse exited expected.
return mouseExitedExpected;
|
public boolean | isOpaque()Checks whether or not this component is completely opaque.
toolkit.lockAWT();
try {
return behaviour.isOpaque();
} finally {
toolkit.unlockAWT();
}
|
public boolean | isPreferredSizeSet()Checks whether or not the preferred size is set for the Component.
toolkit.lockAWT();
try {
return preferredSize != null;
} finally {
toolkit.unlockAWT();
}
|
boolean | isPrepainter()Checks if is prepainter.
return false;
|
public boolean | isShowing()Checks whether or not this Component is shown.
// ???AWT
/*
* toolkit.lockAWT(); try { return (isVisible() && isDisplayable() &&
* (parent != null) && parent.isShowing()); } finally {
* toolkit.unlockAWT(); }
*/
return false;
|
public boolean | isValid()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.
toolkit.lockAWT();
try {
return valid && behaviour.isDisplayable();
} finally {
toolkit.unlockAWT();
}
|
public boolean | isVisible()Checks whether or not this Component is visible.
toolkit.lockAWT();
try {
return visible;
} finally {
toolkit.unlockAWT();
}
|
public boolean | keyDown(java.awt.Event evt, int key)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 boolean | keyUp(java.awt.Event evt, int key)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 void | layout()Deprecated: Replaced by doLayout() method.
toolkit.lockAWT();
try {
// Implemented in Container
} finally {
toolkit.unlockAWT();
}
|
public void | list(java.io.PrintStream out, int indent)Prints a list of this component with the specified number of leading
whitespace characters to the specified PrintStream.
toolkit.lockAWT();
try {
out.println(getIndentStr(indent) + this);
} finally {
toolkit.unlockAWT();
}
|
public void | list(java.io.PrintWriter out)Prints a list of this component to the specified PrintWriter.
toolkit.lockAWT();
try {
list(out, 1);
} finally {
toolkit.unlockAWT();
}
|
public void | list(java.io.PrintWriter out, int indent)Prints a list of this component with the specified number of leading
whitespace characters to the specified PrintWriter.
toolkit.lockAWT();
try {
out.println(getIndentStr(indent) + this);
} finally {
toolkit.unlockAWT();
}
|
public void | list(java.io.PrintStream out)Prints a list of this component to the specified PrintStream.
toolkit.lockAWT();
try {
// default indent = 1
list(out, 1);
} finally {
toolkit.unlockAWT();
}
|
public void | list()Prints a list of this component to the standard system output stream.
toolkit.lockAWT();
try {
list(System.out);
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Component | locate(int x, int y)Deprecated: replaced by getComponentAt(int, int) method.
toolkit.lockAWT();
try {
if (contains(x, y)) {
return this;
}
return null;
} finally {
toolkit.unlockAWT();
}
|
public java.awt.Point | location()Deprecated: replaced by getComponentAt(int, int) method.
toolkit.lockAWT();
try {
return new Point(x, y);
} finally {
toolkit.unlockAWT();
}
|
public boolean | lostFocus(java.awt.Event evt, java.lang.Object what)Deprecated: replaced by processFocusEvent(FocusEvent).
// to be overridden: do nothing,
// just return false to propagate event up to the parent container
return false;
|
void | mapToDisplay(boolean b)Map to display.
// ???AWT
/*
* if (b && !isDisplayable()) { if ((this instanceof Window) || ((parent
* != null) && parent.isDisplayable())) { addNotify(); } } else if (!b
* && isDisplayable()) { removeNotify(); }
*/
|
public java.awt.Dimension | minimumSize()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 boolean | mouseDown(java.awt.Event evt, int x, int y)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 boolean | mouseDrag(java.awt.Event evt, int x, int y)Deprecated: replaced by getMinimumSize() method.
// to be overridden: do nothing,
// just return false to propagate event up to the parent container
return false;
|
public boolean | mouseEnter(java.awt.Event evt, int x, int y)Replaced by processMouseEvent(MouseEvent) method.
// to be overridden: do nothing,
// just return false to propagate event up to the parent container
return false;
|
public boolean | mouseExit(java.awt.Event evt, int x, int y)Replaced by processMouseEvent(MouseEvent) method.
// to be overridden: do nothing,
// just return false to propagate event up to the parent container
return false;
|
public boolean | mouseMove(java.awt.Event evt, int x, int y)Replaced by processMouseEvent(MouseEvent) method.
// to be overridden: do nothing,
// just return false to propagate event up to the parent container
return false;
|
public boolean | mouseUp(java.awt.Event evt, int x, int y)Replaced by processMouseEvent(MouseEvent) method.
// to be overridden: do nothing,
// just return false to propagate event up to the parent container
return false;
|
public void | move(int x, int y)Deprecated: replaced by setLocation(int, int) method.
toolkit.lockAWT();
try {
boundsMaskParam = NativeWindow.BOUNDS_NOSIZE;
setBounds(x, y, w, h);
} finally {
toolkit.unlockAWT();
}
|
void | moveFocusOnHide()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();
|
void | nativeWindowCreated(org.apache.harmony.awt.wtk.NativeWindow win)Called when native resource for this component is created (for
heavyweights only).
// to be overridden
|
void | notifyInputMethod(java.awt.Rectangle bounds)Calls InputContextImpl.notifyClientWindowChanged.
// only Window actually notifies IM of bounds change
|
final void | onDrawImage(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.
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 void | paint(java.awt.Graphics g)Paints this component.
toolkit.lockAWT();
try {
// Just to nothing
} finally {
toolkit.unlockAWT();
}
|
public void | paintAll(java.awt.Graphics g)Paints the component and all of its subcomponents.
toolkit.lockAWT();
try {
paint(g);
} finally {
toolkit.unlockAWT();
}
|
protected java.lang.String | paramString()Returns a 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 void | postDeprecatedEvent(java.awt.AWTEvent e)Post deprecated event.
if (deprecatedEventHandler) {
Event evt = e.getEvent();
if (evt != null) {
postEvent(evt);
}
}
|
public boolean | postEvent(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;
|
void | postEvent(java.awt.AWTEvent e)Post event.
getToolkit().getSystemEventQueueImpl().postEvent(e);
|
void | postprocessEvent(java.awt.AWTEvent e, long eventMask)Postprocess event.
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.Dimension | preferredSize()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();
}
|
void | prepaint(java.awt.Graphics g)Prepares the component to be painted.
// Just to nothing. For overriding.
|
void | prepare4HierarchyChange()Prepare4 hierarchy change.
if (hierarchyChangingCounter++ == 0) {
wasShowing = isShowing();
wasDisplayable = isDisplayable();
prepareChildren4HierarchyChange();
}
|
void | prepareChildren4HierarchyChange()Prepare children4 hierarchy change.
// To be inherited by Container
|
public boolean | prepareImage(java.awt.Image image, java.awt.image.ImageObserver observer)Prepares an image for rendering on the Component.
toolkit.lockAWT();
try {
return toolkit.prepareImage(image, -1, -1, observer);
} finally {
toolkit.unlockAWT();
}
|
public boolean | prepareImage(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.
toolkit.lockAWT();
try {
return toolkit.prepareImage(image, width, height, observer);
} finally {
toolkit.unlockAWT();
}
|
private void | preprocessComponentEvent(java.awt.event.ComponentEvent e)Preprocess component event.
processComponentEventImpl(e, componentListeners.getSystemListeners());
|
void | preprocessFocusEvent(java.awt.event.FocusEvent e)Preprocess focus event.
processFocusEventImpl(e, focusListeners.getSystemListeners());
|
private void | preprocessInputMethodEvent(java.awt.event.InputMethodEvent e)Preprocess input method event.
processInputMethodEventImpl(e, inputMethodListeners.getSystemListeners());
|
void | preprocessKeyEvent(java.awt.event.KeyEvent e)Preprocess key event.
processKeyEventImpl(e, keyListeners.getSystemListeners());
|
void | preprocessMouseEvent(java.awt.event.MouseEvent e)Preprocess mouse event.
processMouseEventImpl(e, mouseListeners.getSystemListeners());
|
void | preprocessMouseMotionEvent(java.awt.event.MouseEvent e)Preprocess mouse motion event.
processMouseMotionEventImpl(e, mouseMotionListeners.getSystemListeners());
|
private void | preprocessMouseWheelEvent(java.awt.event.MouseWheelEvent e)Preprocess mouse wheel event.
processMouseWheelEventImpl(e, mouseWheelListeners.getSystemListeners());
|
public void | print(java.awt.Graphics g)Prints this component.
toolkit.lockAWT();
try {
paint(g);
} finally {
toolkit.unlockAWT();
}
|
public void | printAll(java.awt.Graphics g)Prints the component and all of its subcomponents.
toolkit.lockAWT();
try {
paintAll(g);
} finally {
toolkit.unlockAWT();
}
|
protected void | processComponentEvent(java.awt.event.ComponentEvent e)Processes a component event that has occurred on this component by
dispatching them to any registered ComponentListener objects.
processComponentEventImpl(e, componentListeners.getUserListeners());
|
private void | processComponentEventImpl(java.awt.event.ComponentEvent e, java.util.Collection c)Process component event impl.
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 void | processEvent(java.awt.AWTEvent e)Processes AWTEvent occurred on this component.
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 void | processFocusEvent(java.awt.event.FocusEvent e)Processes a FocusEvent that has occurred on this component by dispatching
it to the registered listeners.
processFocusEventImpl(e, focusListeners.getUserListeners());
|
private void | processFocusEventImpl(java.awt.event.FocusEvent e, java.util.Collection c)Process focus event impl.
for (FocusListener listener : c) {
switch (e.getID()) {
case FocusEvent.FOCUS_GAINED:
listener.focusGained(e);
break;
case FocusEvent.FOCUS_LOST:
listener.focusLost(e);
break;
}
}
|
protected void | processHierarchyBoundsEvent(java.awt.event.HierarchyEvent e)Processes a hierarchy bounds event that has occurred on this component by
dispatching it to the registered listeners.
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 void | processHierarchyEvent(java.awt.event.HierarchyEvent e)Processes a hierarchy event that has occurred on this component by
dispatching it to the registered listeners.
for (HierarchyListener listener : hierarchyListeners.getUserListeners()) {
switch (e.getID()) {
case HierarchyEvent.HIERARCHY_CHANGED:
listener.hierarchyChanged(e);
break;
}
}
|
protected void | processInputMethodEvent(java.awt.event.InputMethodEvent e)Processes an input method event that has occurred on this component by
dispatching it to the registered listeners.
processInputMethodEventImpl(e, inputMethodListeners.getUserListeners());
|
private void | processInputMethodEventImpl(java.awt.event.InputMethodEvent e, java.util.Collection c)Process input method event impl.
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 void | processKeyEvent(java.awt.event.KeyEvent e)Processes a key event that has occurred on this component by dispatching
it to the registered listeners.
processKeyEventImpl(e, keyListeners.getUserListeners());
|
private void | processKeyEventImpl(java.awt.event.KeyEvent e, java.util.Collection c)Process key event impl.
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 void | processMouseEvent(java.awt.event.MouseEvent e)Processes a mouse event that has occurred on this component by
dispatching it to the registered listeners.
processMouseEventImpl(e, mouseListeners.getUserListeners());
|
private void | processMouseEventImpl(java.awt.event.MouseEvent e, java.util.Collection c)Process mouse event impl.
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 void | processMouseMotionEvent(java.awt.event.MouseEvent e)Processes a mouse motion event that has occurred on this component by
dispatching it to the registered listeners.
processMouseMotionEventImpl(e, mouseMotionListeners.getUserListeners());
|
private void | processMouseMotionEventImpl(java.awt.event.MouseEvent e, java.util.Collection c)Process mouse motion event impl.
for (MouseMotionListener listener : c) {
switch (e.getID()) {
case MouseEvent.MOUSE_DRAGGED:
listener.mouseDragged(e);
break;
case MouseEvent.MOUSE_MOVED:
listener.mouseMoved(e);
break;
}
}
|
protected void | processMouseWheelEvent(java.awt.event.MouseWheelEvent e)Processes a mouse wheel event that has occurred on this component by
dispatching it to the registered listeners.
processMouseWheelEventImpl(e, mouseWheelListeners.getUserListeners());
|
private void | processMouseWheelEventImpl(java.awt.event.MouseWheelEvent e, java.util.Collection c)Process mouse wheel event impl.
for (MouseWheelListener listener : c) {
switch (e.getID()) {
case MouseEvent.MOUSE_WHEEL:
listener.mouseWheelMoved(e);
break;
}
}
|
private void | processPaintEvent(java.awt.event.PaintEvent event)Process paint 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();
|
boolean | propagateFont()Invalidate the component if it inherits the font from the parent. This
method is overridden in Container.
if (font == null) {
invalidate();
return true;
}
return false;
|
public void | removeComponentListener(java.awt.event.ComponentListener l)Removes the component listener registered for this Component.
componentListeners.removeUserListener(l);
|
public void | removeFocusListener(java.awt.event.FocusListener l)Removes the focus listener registered for this Component.
focusListeners.removeUserListener(l);
|
public void | removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)Removes the hierarchy bounds listener registered for this Component.
hierarchyBoundsListeners.removeUserListener(l);
|
public void | removeHierarchyListener(java.awt.event.HierarchyListener l)Removes the hierarchy listener registered for this component.
hierarchyListeners.removeUserListener(l);
|
public void | removeInputMethodListener(java.awt.event.InputMethodListener l)Removes the input method listener registered for this component.
inputMethodListeners.removeUserListener(l);
|
public void | removeKeyListener(java.awt.event.KeyListener l)Removes the key listener registered for this Component.
keyListeners.removeUserListener(l);
|
public void | removeMouseListener(java.awt.event.MouseListener l)Removes the mouse listener registered for this Component.
mouseListeners.removeUserListener(l);
|
public void | removeMouseMotionListener(java.awt.event.MouseMotionListener l)Removes the mouse motion listener registered for this component.
mouseMotionListeners.removeUserListener(l);
|
public void | removeMouseWheelListener(java.awt.event.MouseWheelListener l)Removes the mouse wheel listener registered for this component.
mouseWheelListeners.removeUserListener(l);
|
void | removeNextEvent(int id)Removes the next event.
eventsTable.get(new Integer(id)).removeFirst();
|
public void | removeNotify()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 void | removeNotifyInputContext()Calls InputContext.removeNotify.
if (!inputMethodsEnabled) {
return;
}
InputContext ic = getInputContext();
if (ic != null) {
// ???AWT: ic.removeNotify(this);
}
|
public void | removePropertyChangeListener(java.beans.PropertyChangeListener listener)Removes the property change listener registered for this component.
getPropertyChangeSupport().removePropertyChangeListener(listener);
|
public void | removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Removes the property change listener registered fot this component for
the specified propertyy.
getPropertyChangeSupport().removePropertyChangeListener(propertyName, listener);
|
void | removeRelativeEvent()Removes the relative event.
eventsList.removeLast();
|
public void | repaint(long tm, int x, int y, int width, int height)Repaints the specified rectangle of this component within tm
milliseconds.
// ???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 void | repaint(int x, int y, int width, int height)Repaints the specified Rectangle of this Component.
toolkit.lockAWT();
try {
repaint(0, x, y, width, height);
} finally {
toolkit.unlockAWT();
}
|
public void | repaint()Repaints this component.
toolkit.lockAWT();
try {
if (w > 0 && h > 0) {
repaint(0, 0, 0, w, h);
}
} finally {
toolkit.unlockAWT();
}
|
public void | repaint(long tm)Repaints the component within tm milliseconds.
toolkit.lockAWT();
try {
repaint(tm, 0, 0, w, h);
} finally {
toolkit.unlockAWT();
}
|
protected boolean | requestFocus(boolean temporary)Requests that this Component get the input focus temporarily. This
component must be displayable, visible, and focusable.
toolkit.lockAWT();
try {
// ???AWT: return requestFocusImpl(temporary, true, false);
} finally {
toolkit.unlockAWT();
}
// ???AWT
return false;
|
public void | requestFocus()Requests that this Component get the input focus. This component must be
displayable, visible, and focusable.
toolkit.lockAWT();
try {
requestFocus(false);
} finally {
toolkit.unlockAWT();
}
|
void | resetDefaultSize()Reset default size.
|
public void | reshape(int x, int y, int w, int h)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 void | resize(int width, int height)Deprecated: replaced by setSize(int, int) method.
toolkit.lockAWT();
try {
boundsMaskParam = NativeWindow.BOUNDS_NOMOVE;
setBounds(x, y, width, height);
} finally {
toolkit.unlockAWT();
}
|
public void | resize(java.awt.Dimension size)Deprecated: replaced by setSize(int, int) method.
toolkit.lockAWT();
try {
setSize(size.width, size.height);
} finally {
toolkit.unlockAWT();
}
|
public void | setBackground(java.awt.Color c)Sets the background color for the Component.
Color oldBkColor;
toolkit.lockAWT();
try {
oldBkColor = backColor;
backColor = c;
} finally {
toolkit.unlockAWT();
}
firePropertyChange("background", oldBkColor, backColor); //$NON-NLS-1$
repaint();
|
public void | setBounds(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.
toolkit.lockAWT();
try {
reshape(x, y, w, h);
} finally {
toolkit.unlockAWT();
}
|
void | setBounds(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.
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 void | setBounds(java.awt.Rectangle r)Sets the new bounding rectangle for this Component.
toolkit.lockAWT();
try {
setBounds(r.x, r.y, r.width, r.height);
} finally {
toolkit.unlockAWT();
}
|
private void | setBoundsFields(int x, int y, int w, int h, int bMask)Sets the bounds fields.
if ((bMask & NativeWindow.BOUNDS_NOSIZE) == 0) {
this.w = w;
this.h = h;
}
if ((bMask & NativeWindow.BOUNDS_NOMOVE) == 0) {
this.x = x;
this.y = y;
}
|
void | setCaretPos(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.
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));
}
|
void | setCaretPosImpl(int x, int y)This method should be called only at event dispatch thread.
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 void | setComponentOrientation(java.awt.ComponentOrientation o)Sets the component orientation which affects the component's elements and
text within this component.
ComponentOrientation oldOrientation;
toolkit.lockAWT();
try {
oldOrientation = orientation;
orientation = o;
} finally {
toolkit.unlockAWT();
}
firePropertyChange("componentOrientation", oldOrientation, orientation); //$NON-NLS-1$
invalidate();
|
public void | setCursor(java.awt.Cursor cursor)Sets the specified cursor for this Component.
toolkit.lockAWT();
try {
this.cursor = cursor;
setCursor();
} finally {
toolkit.unlockAWT();
}
|
void | setCursor()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 void | setEnabled(boolean value)Sets this component to the "enabled" or "disabled" state depending on the
specified boolean parameter.
toolkit.lockAWT();
try {
enable(value);
} finally {
toolkit.unlockAWT();
}
|
void | setEnabledImpl(boolean value)Sets the enabled impl.
if (enabled != value) {
enabled = value;
setCursor();
if (!enabled) {
moveFocusOnHide();
}
behaviour.setEnabled(value);
}
|
public void | setFocusTraversalKeysEnabled(boolean value)Sets the focus traversal keys state for this component.
boolean oldFocusTraversalKeysEnabled;
toolkit.lockAWT();
try {
oldFocusTraversalKeysEnabled = focusTraversalKeysEnabled;
focusTraversalKeysEnabled = value;
} finally {
toolkit.unlockAWT();
}
firePropertyChange("focusTraversalKeysEnabled", oldFocusTraversalKeysEnabled, //$NON-NLS-1$
focusTraversalKeysEnabled);
|
public void | setFont(java.awt.Font f)Sets the font for this Component.
Font oldFont;
toolkit.lockAWT();
try {
oldFont = font;
setFontImpl(f);
} finally {
toolkit.unlockAWT();
}
firePropertyChange("font", oldFont, font); //$NON-NLS-1$
|
void | setFontImpl(java.awt.Font f)Sets the font impl.
font = f;
invalidate();
if (isShowing()) {
repaint();
}
|
public void | setForeground(java.awt.Color c)Sets the foreground color for this Component.
Color oldFgColor;
toolkit.lockAWT();
try {
oldFgColor = foreColor;
foreColor = c;
} finally {
toolkit.unlockAWT();
}
firePropertyChange("foreground", oldFgColor, foreColor); //$NON-NLS-1$
repaint();
|
public void | setIgnoreRepaint(boolean value)Sets the flag for whether paint messages received from the operating
system should be ignored or not.
toolkit.lockAWT();
try {
ignoreRepaint = value;
} finally {
toolkit.unlockAWT();
}
|
public void | setLocale(java.util.Locale locale)Sets the locale of the component.
Locale oldLocale;
toolkit.lockAWT();
try {
oldLocale = this.locale;
this.locale = locale;
} finally {
toolkit.unlockAWT();
}
firePropertyChange("locale", oldLocale, locale); //$NON-NLS-1$
|
public void | setLocation(java.awt.Point p)Sets the location of the Component to the specified point.
toolkit.lockAWT();
try {
setLocation(p.x, p.y);
} finally {
toolkit.unlockAWT();
}
|
public void | setLocation(int x, int y)Sets the location of the Component to the specified x, y coordinates.
toolkit.lockAWT();
try {
move(x, y);
} finally {
toolkit.unlockAWT();
}
|
public void | setMaximumSize(java.awt.Dimension maximumSize)Sets the 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 void | setMinimumSize(java.awt.Dimension minimumSize)Sets the 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();
}
|
void | setMouseExitedExpected(boolean expected)Sets the mouse exited expected.
mouseExitedExpected = expected;
|
public void | setName(java.lang.String name)Sets the 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 void | setPreferredSize(java.awt.Dimension preferredSize)Sets the 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 void | setSize(int width, int height)Sets the size of the Component specified by width and height parameters.
toolkit.lockAWT();
try {
resize(width, height);
} finally {
toolkit.unlockAWT();
}
|
public void | setSize(java.awt.Dimension d)Sets the size of the Component specified by Dimension object.
toolkit.lockAWT();
try {
resize(d);
} finally {
toolkit.unlockAWT();
}
|
public void | setVisible(boolean b)Sets the visibility state of the component.
// show() & hide() are not deprecated for Window,
// so have to call them from setVisible()
show(b);
|
public void | show()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 void | show(boolean b)Deprecated: replaced by setVisible(boolean) method.
if (b) {
show();
} else {
hide();
}
|
public java.awt.Dimension | size()Deprecated: replaced by replaced by getSize() method.
toolkit.lockAWT();
try {
return new Dimension(w, h);
} finally {
toolkit.unlockAWT();
}
|
void | spreadHierarchyBoundsEvents(java.awt.Component changed, int id)Spread hierarchy bounds events.
// To be inherited by Container
|
public java.lang.String | toString()Returns 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 void | update(java.awt.Graphics g)Updates this Component.
toolkit.lockAWT();
try {
if (!isLightweight() && !isPrepainter()) {
g.setColor(getBackground());
g.fillRect(0, 0, w, h);
g.setColor(getForeground());
}
paint(g);
} finally {
toolkit.unlockAWT();
}
|
public void | validate()Validates that this component has a valid layout.
toolkit.lockAWT();
try {
if (!behaviour.isDisplayable()) {
return;
}
validateImpl();
} finally {
toolkit.unlockAWT();
}
|
void | validateImpl()Validate impl.
valid = true;
|