summaryrefslogtreecommitdiff
path: root/java/awt/Component.java
Commit message (Collapse)AuthorAgeFilesLines
...
* 2006-03-31 Lillian Angel <langel@redhat.com>Lillian Angel2006-03-311-1/+1
| | | | | | * java/awt/Component.java (translateEvent): oldKey should be the value of the key char.
* 2006-03-23 David Gilbert <david.gilbert@object-refinery.com>David Gilbert2006-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/awt/Component.java (getAccessibleName): Just return accessibleName, * javax/swing/AbstractButton.java (getAccessibleStateSet): Mark as stub, (getAccessibleName): Implemented, (getAcessibleIcon): Mark as stub, (getAccessibleRelationSet): Likewise, (getAccessibleAction): Likewise, (getAccessibleValue): Likewise, (getAccessibleActionCount): Likewise, (getAccessibleActionDescription): Likewise, (doAccessibleAction): Likewise, (getCurrentAccessibleValue): Likewise, (setCurrentAccessibleValue): Likewise, (getMinimumAccessibleValue): Likewise, (getMaximumAccessibleValue): Likewise, (getAccessibleText): Likewise, (getIndexAtPoint): Likewise, (getCharacterBounds): Likewise, (getCharCount): Likewise, (getCaretPosition): Likewise, (getAtIndex): Likewise, (getAfterIndex): Likewise, (getBeforeIndex): Likewise, (getCharacterAttribute): Likewise, (getSelectionStart): Likewise, (getSelectionEnd): Likewise, (getSelectedText): Likewise, (getTextRectangle): Likewise, (setIconTextGap): Fire PropertyChangeEvent, not state changed, (getIconTextGap): Added @since 1.4, (setContentAreaFilled): Reordered code to make event sequence match reference implementation, * javax/swing/JButton.java (getSelectedObjects): Removed, *javax/swing/JComponent.java (getAccessibleName): Call super. ----------------------------------------------------------------------
* Fixes PR #26737.Robert Schuster2006-03-231-6/+6
| | | | | | | | | | | 2006-03-21 Robert Schuster <robertschuster@fsfe.org> * java/awt/Component.java: (processMouseEvent): Remove call to consume event. (dispatchEventImpl): Handle specific events first, do focus request only when mouse event was not yet consumed. * javax/swing/text/DefaultCaret.java: (mousePressed): Rewritten.
* * java/awt/Component.java (eventTypeEnabled): HandleMark Wielaard2006-03-181-0/+3
| | | | | | | | | | | | | | | | | MouseEvent.MOUSE_WHEEL. * gnu/java/awt/peer/gtk/GtkComponentPeer.java (postMouseWheelEvent): New callback method. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c (AWT_MOUSE_WHEEL): New constant. (AWT_WHEEL_UNIT_SCROLL): Likewise. (postMouseWheelEventID): New static variable. (cp_gtk_component_init_jni): Record postMouseWheelEventID. (cp_gtk_component_connect_mouse_signals): Connect scroll-event. (button_number): Renamed to ... (button_number_direction): variable to hold button number or scroll direction. (component_button_press_cb): Use button_number_direction. (component_scroll_cb): New static callback function.
* 2006-03-15 Lillian Angel <langel@redhat.com>Lillian Angel2006-03-151-1/+1
| | | | | | * java/awt/Component.java (show): repaint should only be called if the component isShowing and isLightweight.
* * java/awt/Component.java (addNotify): Expand documentation.Mark Wielaard2006-03-031-4/+5
|
* 2006-02-28 Roman Kennke <kennke@aicas.com>Roman Kennke2006-02-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * java/awt/Component.java (dispatchEventImpl): Let the Toolkit dispatch global events. * java/awt/Container.java (dispatchEventImpl): Let the LightweightDispatcher handle events first. * java/awt/EventQueue.java (dispatchEvent): Don't do the global event dispatching here. This is moved to the Component. (globalDispatchEvent): Moved this method to Toolkit. * java/awt/LightweightDispatcher.java (instances): New field. (getInstance): New method. Delivers an instance of LightweightDispatcher. (LightweightDispatcher): Made default constructor private. (dispatchEvent): New method. Replaces the eventDispatched method. This now returns true when the event was actually dispatched. (eventDispatched): Replaced by dispatchEvent. (handleMouseEvent): Send MOUSE_CLICKED to the same component that received the last MOUSE_RELEASED. * java/awt/Toolkit.java (Toolkit): Don't register LightweightDispatcher as global event handler. (globalDispatchEvent): Moved here from EventQueue.
* 2006-02-24 Lillian Angel <langel@redhat.com>Lillian Angel2006-02-241-1/+74
| | | | | | | | * java/awt/Component.java (reshape): Reverted last patch. Should have check here. (addNotify): Added check. If parent is lightweight, then initialize listener on the parent. (HeavyweightInLightweightListener): New class.
* 2006-02-23 Lillian Angel <langel@redhat.com>Lillian Angel2006-02-231-8/+6
| | | | | | | | | | | | | | | | | | | * gnu/java/awt/peer/GLightweightPeer.java (repaint): Scott's proposed fix. Send repaint to the component's parent. * gnu/java/awt/peer/gtk/GtkComponentPeer.java (setBounds): Removed next_parent, not needed. Removed lightweightChild, we always need to compensate for the menu bar's height. * java/awt/Component.java (setBounds): Removed check. Caused lots of problems, because some components were not being invalidated. Components should be invalidated when they are resized or moved, and in some cases, when a parent is resized/moved, the components do not know about it and do not adjust. * java/awt/Graphics.java (hitClip): Scott's proposed fix. Added check to handle a null clip.
* * java/awt/Component.java (translateEvent): TranslateMark Wielaard2006-02-211-1/+22
| | | | | | | | | | | | | | | AdjustmentEvents to 1.0 Events. * java/awt/Scrollbar.java (dispatchEventImpl): Set valueIsAdjusting. Call setValue() before processing event. * gnu/java/awt/peer/gtk/GtkScrollbarPeer.java (setValues): Check whether we are currently changing and being called back from the Scrollbar component. (setBarValues): New native method. (postAdjustmentEvent): Mark AdjustmentEvent as user generated. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollbarPeer.c (Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_setValues): Renamed to Java_gnu_java_awt_peer_gtk_GtkScrollbarPeer_setBarValue * include/gnu_java_awt_peer_gtk_GtkScrollbarPeer.h: Regenerated.
* 2006-02-15 Lillian Angel <langel@redhat.com>Lillian Angel2006-02-151-1/+1
| | | | | * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c: Removed duplicate methods.
* 2006-02-15 Lillian Angel <langel@redhat.com>Lillian Angel2006-02-151-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | * gnu/java/awt/peer/gtk/GtkDialogPeer.java (setVisible): Removed method. * gnu/java/awt/peer/gtk/GtkWindowPeer.java (setLocation): New method. (setLocationUnlocked): New method. (show): Changed to use setLocation instead of setBounds. * java/awt/Component.java (show): Should call peer.show(), not peer.setVisible(), so the location of the component is correctly set. (preferredSize): Added curly braces so else statements are properly associated with if's. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (Java_gnu_java_awt_peer_gtk_GtkWindowPeer_nativeSetLocation): New function. (Java_gnu_java_awt_peer_gtk_GtkWindowPeer_nativeSet LocationUnlocked): New function. * include/gnu_java_awt_peer_gtk_GtkWindowPeer.h: Added declarations for Java_gnu_java_awt_peer_gtk_ GtkWindowPeer_nativeSetLocation and Java_gnu_java_awt_peer_gtk_GtkWindowPeer _nativeSetLocationUnlocked.
* 2006-02-13 Lillian Angel <langel@redhat.com>Lillian Angel2006-02-131-6/+3
| | | | | | | * java/awt/Component.java (repaint): No need to call isShowing, it is done in the other repaint call. (repaint): Likewise. (repaint): Likewise.
* 2006-02-13 Lillian Angel <langel@redhat.com>Lillian Angel2006-02-131-3/+6
| | | | | | | * java/awt/Component.java (repaint): Reverted last change. (repaint): Likewise. (repaint): Likewise.
* 2006-02-13 Lillian Angel <langel@redhat.com>Lillian Angel2006-02-131-6/+3
| | | | | | | | | | | | * gnu/java/awt/peer/gtk/GtkPanelPeer.java (handleEvent): Made more efficent by handling paint event and setting the clip for the graphics. * gnu/java/awt/peer/gtk/GtkWindowPeer.java (handleEvent): Likewise. * java/awt/Component.java (repaint): No need to call isShowing, it is done in the other repaint call. (repaint): Likewise. (repaint): Likewise.
* 2006-02-06 Roman Kennke <kennke@aicas.com>Roman Kennke2006-02-071-7/+7
| | | | | | | | | | * java/awt/Component.java (firePropertyChange(String,byte,byte)): Made method public. (firePropertyChange(String,char,char)): Made method public. (firePropertyChange(String,short,short)): Made method public. (firePropertyChange(String,long,long)): Made method public. (firePropertyChange(String,float,float)): Made method public. (firePropertyChange(String,double,double)): Made method public.
* 2006-02-06 Roman Kennke <kennke@aicas.com>Roman Kennke2006-02-061-0/+103
| | | | | | | | | | * java/awt/Component.java (firePropertyChange(String,byte,byte)): New method. (firePropertyChange(String,char,char)): New method. (firePropertyChange(String,short,short)): New method. (firePropertyChange(String,long,long)): New method. (firePropertyChange(String,float,float)): New method. (firePropertyChange(String,double,double)): New method.
* 2006-01-27 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-271-10/+0
| | | | | | * java/awt/Component.java (coalescePaintEvent): Don't try to optimize coalescing. This hurts more than it helps.
* 2006-01-13 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-131-5/+5
| | | | | | | | | * java/awt/Component.java (dispatchEvent): Moved handling of old style events from dispatchEventImpl() to this method. (translateEvent): Removed unnecessary cast. (dispatchEventImpl): Moved handling of old style events to dispatchEvent().
* 2005-11-30 Anthony Balkissoon <abalkiss@redhat.com>Anthony Balkissoon2005-11-301-7/+8
| | | | | | | | | Fixes bug #25165 * java/awt/Component.java: (processFocusEvent): Don't check if focus opposite is the same as the receiving Component, this is now done in dispatchEventImpl. (dispatchEventImpl): Don't dispatch FocusEvents whose opposite Components are the same.
* 2005-11-30 Anthony Balkissoon <abalkiss@redhat.com>Anthony Balkissoon2005-11-301-0/+5
| | | | | | * java/awt/Component.java: (processFocusEvent): Don't dispatch events if the focus opposite is the same as the receiving Component.
* 2005-11-23 David Gilbert <david.gilbert@object-refinery.com>David Gilbert2005-11-231-3/+12
| | | | | * java/awt/Component.java (getListeners): Added some details to the API docs.
* 2005-11-17 Roman Kennke <kennke@aicas.com>Roman Kennke2005-11-181-10/+7
| | | | | | | | | * java/awt/Component.java (setBackground): Don't inherit background from parent. (addMouseMotionListener): Enable MOUSE_MOTION_EVENT_MASK instead of MOUSE_EVENT_MASK. (eventTypeEnabled): Handle mouse events and mouse motion events separately.
* 2005-11-17 Roman Kennke <kennke@aicas.com>Roman Kennke2005-11-171-29/+4
| | | | | | | | | | | Reported by Roman Schnider <schnider@aicas.com>: * java/awt/Component.java (reshape): Removed unused statement. (repaint()): Don't forward to parent when not showing. (repaint(int)): Don't forward to parent when not showing. (repaint(int,int,int,int)): Don't forward to parent when not showing. (repaint(float,int,int,int,int)): Don't forward to parent when not showing.
* 2005-11-08 Roman Kennke <kennke@aicas.com>Roman Kennke2005-11-081-1/+1
| | | | | * java/awt/Component.java (invalidate): Don't invalidate invalid parents.
* 2005-11-07 Roman Kennke <kennke@aicas.com>Roman Kennke2005-11-071-1/+1
| | | | | | | * java/awt/Component.java (invalidate): Invalidate up the whole tree, regardless if some parent is already marked invalid. This is needed in some situations for layout managers to throw away their cache.
* 2005-11-02 Roman Kennke <kennke@aicas.com>Roman Kennke2005-11-021-1/+6
| | | | | | * java/awt/Component.java (getForeground): Return null as default color, instead of some system color.
* 2005-11-02 Roman Kennke <kennke@aicas.com>Roman Kennke2005-11-021-1/+1
| | | | | | | * java/awt/Component.java (getMaximumSize): Return (Short.MAX_VALUE, Short.MAX_VALUE) instead of (Integer.MAX_VALUE, Integer.MAX_VALUE) as shown by the Mauve test.
* 2005-10-28 Anthony Balkissoon <abalkiss@redhat.com>Anthony Balkissoon2005-10-281-3/+6
| | | | | | | * java/awt/Component.java: (requestFocus): If this component is a Container, start here, not at its parent when looking for the top-level ancestor. If no top-level ancestor is found (parent == null), return.
* 2005-10-19 Roman Kennke <kennke@aicas.com>Roman Kennke2005-10-191-4/+6
| | | | | | | * java/awt/Component.java (isShowing): Fixed condition. (show): Only repaint if component is showing. (hide): Only repaint if component was showing.
* 2005-10-12 Roman Kennke <kennke@aicas.com>Roman Kennke2005-10-121-7/+4
| | | | | | | * java/awt/Component.java (reshape): Fixed calculation of newBounds and oldBounds to create rectangles relative to the parent, and not to the parent's parent. Solves a painting problem in an app here.
* 2005-10-04 Roman Kennke <kennke@aicas.com>Roman Kennke2005-10-041-5/+6
| | | | | | | | | | | * java/awt/Component.java (getFont): Fall back to peer.getGraphics().getFont() if no font is found. (getGraphics): Set font here. This avoids a loop in the above fallback. * gnu/java/awt/peer/gtk/GdkGraphics.java (GdkGraphics): Don't initialize font here. This would cause a loop in the above fallback.
* 2005-09-27 Lillian Angel <langel@redhat.com>Lillian Angel2005-09-271-2/+5
| | | | | | | | | | | Fixes Bug #24067 * java/awt/Component.java (removeNotify): Should call hide on the peer before disposing of it. This stops the flashing when the tooltips are removed from the component. * javax/swing/plaf/basic/BasicToolTipUI.java (getPreferredSize): If the accelerator is null, we should paint the mnenomic if it is available.
* 2005-09-27 Roman Kennke <kennke@aicas.com>Roman Kennke2005-09-271-9/+9
| | | | | | | | | | * java/awt/Component.java (hide): Repaint component before invalidating the parent. (show): Repaint component before invalidating the parent. * javax/swing/JComponent.java (revalidate): Check if we are in the event thread, and if not, then queue a self-request in the event thread. (setVisible): Repaint the parent and queue a revalidate.
* 2005-09-23 Lillian Angel <langel@redhat.com>Lillian Angel2005-09-231-3/+2
| | | | | | | | * java/awt/Component.java (getFont): Should return null, not a default font. * javax/swing/ToolTipManager.java (showTip): Called revalidate currentTip before painted, and called validate on JDialog toolTip.
* Fixes infinite recursion and puts a selected checkbox into the properRobert Schuster2005-09-191-2/+2
| | | | | | | | | | | | | checkbox group. 2005-09-19 Robert Schuster <robertschuster@fsfe.org> * java/awt/Checkbox.java: (Checkbox): Properly set as selected checkbox in corresponding checkbox group. (paramString): Removed checkbox group information. * java/awt/Component.java: (paramString): Removed redundant "=".
* 2005-09-15 Anthony Balkissoon <abalkiss@redhat.com>Anthony Balkissoon2005-09-151-4/+3
| | | | | | * java/awt/Component.java: (isDisplayable): Don't check the parent's displayability, only return true if peer is non-null and false if peer is null.
* 2005-09-15 Anthony Balkissoon <abalkiss@redhat.com>Anthony Balkissoon2005-09-151-1/+1
| | | | | | | * java/awt/Component.java: (isDisplayable): Return true if peer != null. * java/awt/Window.java: (isDisplayable): Removed this method. Now inherits from Component.
* 2005-08-17 Roman Kennke <roman@kennke.org>Roman Kennke2005-08-171-3/+24
| | | | | | | * java/awt/Component.java This applies to various variants of the repaint() methods: (repaint): If the component is not showing, forward repaint request to the parent.
* 2005-08-16 Jeroen Frijters <jeroen@frijters.net>Jeroen Frijters2005-08-161-3/+4
| | | | | * java/awt/Component.java (dispatchEventImpl): Always call peer.handleEvent().
* 2005-08-12 Roman Kennke <roman@kennke.org>Roman Kennke2005-08-121-27/+26
| | | | | | | | | | | | | | | | | | | | * java/awt/Component.java (reshape): Simplified repainting of parent. (paint): Don't call peer.paint() here. The paint method is exclusivly meant to be overridden by subclasses that wish to perform custom painting and should do nothing by default. (repaint): Use local variable in null pointer checks to avoid NullPointerExceptions. (imageUpdate): Slight formatting adjustments. (dispatchEvent): Don't call peer.handleEvent() here, this must be done in dispatchEventImpl(). (dispatchEventImpl): Dispatch PAINT and UPDATE events to the peer. * java/awt/Container.java (paint): Don't call super.paint() here, this method does nothing anyway. Visit only lightweight children. (update): Instead of clearing the background only for top-level containers, clear the background for all heavyweight containers.
* 2005-08-05 Roman Kennke <roman@kennke.org>Roman Kennke2005-08-051-2/+10
| | | | | | | | | | | | | | | | | | | * java/awt/Container.java: (preferredSize): Call getLayout() instead of directly referencing the private field. This makes components work that override getLayout(). (minimumSize): Call getLayout() instead of directly referencing the private field. This makes components work that override getLayout(). Use cached size if component is still valid. (maximumSize): Call getLayout() instead of directly referencing the private field. This makes components work that override getLayout(). Use cached size if component is still valid. (update): If we are a top-level-container, call super.update(), otherwise directly call paint(). (visitChildren): Also visit children that are itself Containers. * java/awt/Component.java (update): Clear the background only for lightweight and top-level components.
* 2005-08-02 Roman Kennke <roman@kennke.org>Roman Kennke2005-08-021-2/+0
| | | | | * java/awt/Component.java (getBounds): Removed debug statements that accidentally slipped in.
* 2005-08-02 Roman Kennke <roman@kennke.org>Roman Kennke2005-08-021-0/+2
| | | | | | * java/awt/Toolkit.java (createCustomCursor): Added check for headless environment. (getBestCursorSize): Added check for headless environment.
* 2005-07-27 Sven de Marothy <sven@physto.se>Sven de Marothy2005-07-271-1/+1
| | | | * java/awt/Component.java: Reverted earlier change.
* 2005-07-25 Roman Kennke <roman@kennke.org>Roman Kennke2005-07-251-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/java/awt/AWTUtilities.java: Added methods from SwingUtilities so that AWT does not have to depend on Swing. * java/awt/Component.java: Reverted my DEFAULT_FONT patch from yesterday. This does not seem to work with the Gtk peers. * java/awt/Container.java (addImpl): Call addNotify() on the added child. Invalidate not only the container but also the added child. Repaint the container. (remove): Repaint the container. (invalidate): Also invalidate the LayoutManager. (invalidateTree): Call super.invalidate to invalidate the container itself. Also invalidate the LayoutManager. (setFont): Only set the font if the specified argument actually differs from the current font. (preferredSize): Optimized this method so the LayoutManager is only called if the layout is invalid. Otherwise we return the preferred size that has been stored during last validation/layout. (getAlignmentX): Despite common belief, this method does _not_ call the LayoutManagers getAlignmentX in the JDK. So we also don't. (getAlignmentY): Despite common belief, this method does _not_ call the LayoutManagers getAlignmentX in the JDK. So we also don't. (dispatchEventImpl): Let the dispatcher decide if it is enabled for the incoming event type. (eventTypeEnabled): Enables only container events for containers. (addNotifyContainerChildren): Coalesced two if statements into one. Enable events on the dispatcher for this container. (LightweightDispatcher): Made this class reentrant. Handle events enabling/disabling here.
* 2005-07-23 Sven de Marothy <sven@physto.se>Sven de Marothy2005-07-231-2/+3
| | | | * java/awt/List.java (List): Initialize selected[] to an empty array.
* 2005-07-22 Roman Kennke <roman@kennke.org>Roman Kennke2005-07-221-20/+37
| | | | | | | | | | | | | | | | | * java/awt/Component.java (setForeground): Fire PropertyChangeEvent after the foreground has actually changed, instead of before. (setBackground): Fire PropertyChangeEvent after the foreground has actually changed, instead of before. Avoid one comparison at the beginning of method. (getBackground): If background is null and parent is null, return null, instead of SystemColor.window. This is what it's supposed to do. (getFont): Avoid NPE by creating a local reference. Return static final DEFAULT_FONT instead of creating a new font every time we and our parents have no font set. (setFont): Made check for font equality more precise. (paramString): Added parent in paramString.
* 2005-07-22 Roman Kennke <roman@kennke.org>Roman Kennke2005-07-221-6/+31
| | | | | | | | | | * java/awt/Component.java (show): Instead of invalidating the component, only invalidate the parent, if there is one. Also, avoid NPEs by creating local references. (hide): Instead of invalidating the component, only invalidate the parent, if there is one. Also, avoid NPEs by creating local references.
* 2005-07-06 David Gilbert <david.gilbert@object-refinery.com>David Gilbert2005-07-061-3/+3
| | | | | | | | | | | | | | | * java/awt/AWTKeyStroke.java: fixed API doc links, * java/awt/BufferCapabilities.java: likewise, * java/awt/ColorPaintContext.java: likewise, * java/awt/Component.java: likewise, * java/awt/Container.java: likewise, * java/awt/EventQueue.java: likewise, * java/awt/GraphicsDevice.java: likewise, * java/awt/Image.java: likewise, * java/awt/KeyboardFocusManager.java: likewise, * java/awt/MediaTracker.java: likewise, * java/awt/PrintJob.java: likewise, * java/awt/Robot.java: likewise.