2004-06-27 Mark Wielaard <mark@klomp.org>
* java/awt/EventQueue.java (postEvent): Throw NullPointerException
when argument is null.
2004-06-26 Mark Wielaard <mark@klomp.org>
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
(ok_clicked): Use Ljava/lang/String; not Ljava.lang.String; in JNI
GetMethodID call.
(cancel_clicked): Likewise.
From-SVN: r83731
2004-05-30 Michael Koch <konqueror@gmx.de>
* gnu/java/beans/BeanInfoEmbryo.java,
java/awt/im/InputContext.java,
javax/swing/tree/DefaultMutableTreeNode.java:
Rename enum to e because enum is a keyword in Java 1.5.
From-SVN: r82447
* java/awt/DefaultKeyboardFocusManager.java
(dispatchEvent): Call method to get key event dispatchers.
(dispatchKeyEvent): Call method to get key event post processors.
* javax/swing/JComponent.java
(listenerList): Made protected.
* javax/swing/JOptionPane.java
(message): Don't initialize.
(JOptionPane): Set message text.
* javax/swing/JPopupMenu.java
(show): Fixed typo in argument name.
* javax/swing/RepaintManager.java
(paintDirtyRegions): Use public API of java.util.Map.
* javax/swing/plaf/basic/BasicSplitPaneDivider.java
(positionForMouseEvent): Removed redundant ';'.
(continueDrag): Use method arguments.
From-SVN: r82445
2004-05-25 David Jee <djee@redhat.com>
* java/awt/Container.java
(remove): Set component's parent to null only after we removed the
component from its parent's layout manager.
2004-05-25 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
(GtkComponentPeer): Set bounds regardless of whether awtComponent
is valid.
* gnu/java/awt/peer/gtk/GtkListPeer.java
(getSize): Change native method declaration.
(minimumSize): Pass visible row count into getSize().
(preferredSize): Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
(Java_gnu_java_awt_peer_gtk_GtkListPeer_getSize): Use scroll window's
natural size. Use visible row count to determine the final height
value to return.
2004-05-21 Graydon Hoare <graydon@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java
(setClip): Minor correction to order of operations.
* javax/swing/JScrollPane.java: Extend sketchy implementation.
* javax/swing/ScrollPaneLayout.java: Likewise.
* javax/swing/JViewPort.java: Likewise.
* javax/swing/ViewportLayout.java: Likewise.
* javax/swing/JComponent.java: Rewrite.
* javax/swing/RepaintManager.java: Likewise.
* javax/swing/JLayeredPane.java: Change validate() to revalidate().
* javax/swing/JList.java
(setSelectedIndices):
(getSelectedIndices):
(getSelectedValues): New functions.
(getPreferredScrollableViewportSize): Return preferred size.
(getScrollableUnitIncrement):
(getScrollableBlockIncrement): Initial implementations.
* javax/swing/JRootPane.java: Clean up slightly.
(getUI):
(setUI):
(updateUI):
(getUIClassID):
(isValidateRoot): Add overrides from JComponent.
* javax/swing/JScrollBar.java: Set default orientation to VERTICAL.
* javax/swing/UIManager.java (getDimension): Return the dimension.
* javax/swing/plaf/basic/BasicButtonUI.java: Set component opaque.
* javax/swing/plaf/basic/BasicLabelUI.java: Likewise.
* javax/swing/plaf/basic/BasicMenuItemUI.java: Likewise.
* javax/swing/plaf/basic/BasicProgressBarUI.java: Likewise.
* javax/swing/plaf/basic/BasicSeparatorUI.java: Likewise.
* javax/swing/plaf/basic/BasicSliderUI.java: Likewise.
* javax/swing/plaf/basic/BasicTabbedPaneUI.java: Likewise.
* javax/swing/plaf/basic/BasicRootPaneUI.java:
Likewise, and set background.
* javax/swing/plaf/basic/BasicListUI.java:
Likewise, and improve a bit.
* javax/swing/plaf/basic/BasicScrollBarUI.java:
Likewise, and adjust calculations.
* javax/swing/plaf/basic/BasicViewportUI.java:
Likewise, and improve a bit.
* javax/swing/plaf/basic/BasicLookAndFeel.java
(Button.margin): Shrink.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c:
Hack to set horizontal always, workaround pango.
* jni/gtk-peer/gtkcairopeer.h: Change to match pattern API.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c:
Synchronize more often, check cairo status after ops,
handle changes to cairo pattern API, check for disposal.
2004-05-21 Olga Rodimina <rodimina@redhat.com>
* javax/swing/plaf/basic/BasicMenuItemUI.java:
(BasicMenuItemUI): Create propertyChangeListener.
(getPath):Implemented.
(installListeners): Add propertyChangeListener to menuItem.
(uninstallListeners): Remove propertyChangeListener from menuItem.
(update): Implemented.
* javax/swing/plaf/basic/BasicMenuUI.MouseInputHandler:
(mouseEntered): Take insets of popup menu into account when
calculating position of popup menu.
2004-05-18 Olga Rodimina <rodimina@redhat.com>
* Makefile.am: Added new file.
* Makefile.in: Regenerate.
* javax/swing/JMenuBar.java:
Started implementation.
* javax/swing/JPopupMenu.java:
(setVisible): Fixed location of lightweight/mediumweight
popup menu.
(show): Fixed location of PopupMenu.
* javax/swing/plaf/basic/BasicMenuBarUI.java:
New file. UI Delegate for JMenuBar.
* javax/swing/plaf/basic/BasicMenuUI.MouseInputHandler:
(mouseEntered): Corrected position of the submenu.
2004-05-18 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c: Remove calls
to _gtk_accel_group_attach.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c:
Likewise.
* gnu/java/awt/peer/gtk/GtkButtonPeer.java: Give gtkSetFont
package access. Don't override setFont.
* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java: Likewise.
* gnu/java/awt/peer/gtk/GtkComponentPeer.java: Give
gtkWidgetRequestFocus package access.
* gnu/java/awt/peer/gtk/GtkLabelPeer.java: Don't override
setFont.
* gnu/java/awt/peer/gtk/GtkListPeer.java: Override gtkSetFont.
Give gtkWidgetRequestFocus package access.
* gnu/java/awt/peer/gtk/GtkTextAreaPeer.java: Give
gtkWidgetRequestFocus package access. Don't override setFont.
* gnu/java/awt/peer/gtk/GtkTextFieldPeer.java: Don't override
setFont.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
(gtkSetLabel): Move call to gtk_bin_get_child into GDK critical
region.
(gtkSetFont): Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c (gtkSetFont):
Implement.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
(gtkSetFont): Whitespace fix.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(gtkWidgetSetUsize): Remove method.
2004-05-18 David Jee <djee@redhat.com>
* java/awt/image/MemoryImageSource.java
(newPixels(int,int,int,int,boolean)): Set only the specified
rectangle of pixels.
(newPixels(byte[],ColorModel,int,int)): Implement.
(newPixels(int[],ColorModel,int,int)): Implement.
2004-05-18 Olga Rodimina <rodimina@redhat.com>
* Makefile.am: Added new file.
* Makefile.in: Regenerate.
* javax/swing/JMenu.java: Started
implementation.
* javax/swing/JPopupMenu.java:
(insert): If specified index is -1, then
add component at the end.
(isPopupTrigger): Reimplemented.
(JPopupMenu.LightWeightPopup): setBounds
of the lightWeightPopup before adding it
to the layeredPane.
(javax/swing/plaf/basic/BasicIconFactory.java):
(getMenuArrowIcon): Implemented.
* javax/swing/plaf/basic/BasicMenuItemUI.java:
(getPreferredSize): Add size of the arrow icon
if this menu item is instance of JMenu.
(paintMenuItem): Paint arrow icon if this
menu item is a submenu.
* javax/swing/plaf/basic/BasicMenuUI.java:
New File. UI Delegate for JMenu.
2004-05-17 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java (postKeyEvent):
Post KEY_TYPED events.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(generates_key_typed_event): Remove function.
2004-05-17 Olga Rodimina <rodimina@redhat.com>
* javax/swing/JRootPane.java
(JRootPane.RootLayout): Reimplemented to
set bounds of contentPane and menuBar.
(setJMenuBar): Add menu bar to the layered pane.
(createLayeredPane): Set layout of layeredPane
to null.
* javax/swing/JLayeredPane.java:
(addImpl): Calculate index of the component in the
layeredPane according to the specified position within
the layer.
2004-05-17 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkImagePainter.java
(setPixels): Change color model to the default model after
converting pixels.
* java/awt/image/MemoryImageSource.java
(newPixels): Set only the specified rectangle of pixels.
2004-05-13 Thomas Fitzsimmons <fitzsim@redhat.com>
* libgcj.spec.in (lib): Add -l-java-awt -l-java-applet
-l-java-beans -l-javax-accessibility -l-javax-swing.
* java/awt/AWTEvent.java (toString): Print source's name rather
than the source itself.
2004-05-12 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkToolkit.java (loadSystemColors): Make
native.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
(gdk_color_to_java_color): New function.
* jni/gtk-peer/gtkpeer.h: Add SystemColor defines.
2004-05-12 David Jee <djee@redhat.com>
* java/awt/image/RGBImageFilter.java:
Initialize origmodel as null.
(makeColor): Fix pixel component order.
(filterRGBPixels): Fix pixel iteration.
(setPixels): Add extra checks for index color model. Convert pixels
to default color model if necessary.
(convertColorModelToDefault): New override method for byte pixels.
(convertColorModelToDefault): For int pixels, fix pixel iteration.
(makeColorbyDefaultCM): New override method for byte pixels.
(makeColorbyDefaultCM): For int pixel, add color model as argument.
(makeColor): Fix pixel component order.
2004-05-11 Kim Ho <kho@redhat.com>
* javax/swing/Box.java:
Comment out more parts of Box.Filler.
2004-05-11 Kim Ho <kho@redhat.com>
* javax/swing/Box.java:
Remove reference to AccessibleAWTComponent so
it compiles again.
2004-05-10 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkListPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c: Update
implementation of list peer to use GtkTreeView instead of
deprecated GtkCList.
2004-05-07 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
(gtkWidgetDispatchKeyEvent): Remove keyChar parameter.
(handleEvent): Remove keyChar argument to
gtkWidgetDispatchKeyEvent calls.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: Fix
compiler warnings.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c: Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c: Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c:
Likewise.
2004-05-06 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
(gtkWidgetRequestFocus): Mark protected.
(GtkComponentPeer): Only set the peer's bounds if its component
is valid.
* java/awt/Component.java (static): Set the default keyboard
focus manager.
(requestFocus(), requestFocus(boolean), requestFocusInWindow(),
requestFocusInWindow(temporary)): Don't request focus if the
component is not showing. Get tree lock before traversing
component hierarchy.
* java/awt/DefaultKeyboardFocusManager.java (dispatchEvent):
Only set the global focus owner if it is not a Window.
(processKeyEvent): Consume keystrokes associated with the focus
traversal keystroke.
(focusPreviousComponent, focusNextComponent, upFocusCycle,
downFocusCycle): Call requestFocusInWindow instead of
requestFocus.
* java/awt/EventDispatchThread.java (run): Move setting of
default keyboard focus manager to Component.java.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(awt_keycode_to_keysym): New function.
(gtkWidgetDispatchKeyEvent): Finish implementation.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(pre_event_handler): Add FIXME comment.
* gnu/java/awt/peer/gtk/GtkTextAreaPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
(gtkWidgetRequestFocus): New method.
* java/awt/TextArea.java (TextArea): Set focus traversal keys to
disable Tab and Shift-Tab keystrokes.
(addNotify, appendText, insertText, replaceText): Simplify peer
retrieval code.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c
(connectSignals): Remove connections to "commit" signals.
Remove C++-style comments.
* gnu/java/awt/peer/gtk/GtkButtonPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c
(handleEvent): Activate GTK button when the space bar key is
pressed.
(gtkActivate): New method.
2004-05-06 David Jee <djee@redhat.com>
* java/awt/image/CropImageFilter.java
(setPixels): Implement for byte array pixels.
* java/awt/image/ReplicateScaleFilter.java
(setPixels): Implement for byte array pixels.
(replicatePixels): Overload for byte array pixels.
2004-05-06 Kim Ho <kho@redhat.com>
* javax/swing/Box.java:
(getAccessibleContext): Return an instance of the
correct class.
2004-05-05 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics.java
(drawImage): When component is null, use SystemColor.window as
the default bgcolor.
* gnu/java/awt/peer/gtk/GtkImage.java
(setPixels): We can avoid iterating through the pixel rows only
when height is 1.
* java/awt/Image.java
(getScaledInstance): Partially implement.
* java/awt/image/CropImageFilter.java
(setProperties): Fix "filter" property.
(setPixels): Implement.
* java/awt/image/ReplicateScaleFilter.java
(setDimensions): Use scaled dimensions.
(setPixels): Implement.
(replicatePixels): New method.
2004-05-05 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkImagePainter.java
(convertPixels): If either pixels or model is null, return null.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c
(Java_gnu_java_awt_peer_gtk_GtkImagePainter_drawPixels): If jpixels
is null, do nothing and return.
2004-05-03 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkDialogPeer.java:
(getGraphics): Like GtkFramePeer, the Graphics
object needs to be translate to account for
window decorations.
(postMouseEvent): New method. Account for
translation.
(postExposeEvent): ditto.
* javax/swing/Box.java: Stubbed.
* javax/swing/JDialog.java: Ran through jalopy
to fix indentation.
(JDialog): Call SwingUtilities' getOwnerFrame
for null owners.
(setLayout): Check isRootPaneCheckingEnabled
* javax/swing/JOptionPane.java: Re-implemented.
* javax/swing/SwingUtilities.java:
(getOwnerFrame): Static method to grab a default
owner frame for Dialogs that don't specify owners.
* javax/swing/event/SwingPropertyChangeSupport.java:
(firePropertyChange): Fix early exit condition.
* javax/swing/plaf/basic/BasicLabelUI.java:
(paint): Avoid painting text if it is null
or empty.
* javax/swing/plaf/basic/BasicOptionPaneUI.java:
Implement.
2004-05-03 Olga Rodimina <rodimina@redhat.com>
* Makefile.am: Added new file.
* Makefile.in: Regenerate.
* javax/swing/JPopupMenu.java:
Started implementation.
* javax/swing/JWindow.java
(JWindow): call super() if parent for window
is not specified.
* javax/swing/plaf/basic/BasicPopupMenuUI.java:
New File. UI Delegate for JPopupMenu.
2004-04-30 Olga Rodimina <rodimina@redhat.com>
* javax/swing/JApplet.java: Indicated that JApplet
implements RootPaneContainer and made method of this
interface public.
* javax/swing/JFrame.java: Ditto.
* javax/swing/JWindow.java: Ditto.
2004-04-29 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(nativeSetBounds): Call gdk_window_move in addition to
gtk_window_move.
* java/applet/Applet.java (preferredSize): Call parent's
preferredSize if the applet stub is null.
(minimumSize): Likewise for parent's minimumSize.
2004-04-27 Olga Rodimina <rodimina@redhat.com>
* javax/swing/JMenuItem.java
(createActionPropertyChangeListener): Implemented.
(processMouseEvent): Ditto.
(fireMenuDragMouseEntered): Ditto.
(fireMenuDragMouseExited): Ditto.
(fireMenuDragMouseDragged): Ditto.
(fireMenuDragMouseReleased): Ditto.
(menuSelectionChanged): Ditto.
(getSubElements): Ditto.
(getComponent): Ditto.
(addMenuDragMouseListener): Ditto.
(removeMenuDragMouseListener):Ditto.
(addMenuKeyListener): Ditto.
(removeMenuKeyListener): Ditto.
* javax/swing/plaf/basic/BasicMenuItemUI.java
(doClick): Imlemented.
* javax/swing/plaf/basic/BasicMenuItemUI.MouseInputHandler:
Don't handle mouse events here. Pass them to
MenuSelectionManager.
2004-04-26 Olga Rodimina <rodimina@redhat.com>
Used correct version of jalopy configuration
file to fix style in the files below.
2004-04-26 Olga Rodimina <rodimina@redhat.com>
* javax/swing/JCheckBoxMenuItem.java:
Fixed style and removed unnecessary comments.
* javax/swing/JMenuItem.java: Ditto.
* javax/swing/JRadioButtonMenuItem.java: Ditto.
* javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java: Ditto.
* javax/swing/plaf/basic/BasicMenuItemUI.java: Ditto.
* javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java: Ditto.
2004-04-23 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu_java_awt_peer_gtk_GtkWindowPeer.c: Change FIXME comment to
C-style.
* gnu_java_awt_peer_gtk_GtkWindowPeer.c: Add FIXME comment.
* java/awt/ContainerOrderFocusTraversalPolicy.java
(getComponentAfter): Start from current component and work up
the component hierarchy until an acceptable component is found.
Synchronize on tree lock.
(getComponentBefore): Likewise.
2004-04-22 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java: Remove
focus-related debugging messages.
* java/awt/DefaultKeyboardFocusManager.java: Likewise.
* java/awt/EventDispatchThread.java: Likewise.
* java/awt/KeyboardFocusManager.java: Likewise.
* java/awt/Window.java: Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c: Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: Change
new C++-style comments to C-style comments.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c: Likewise.
* gnu/java/awt/peer/gtk/GtkComponentPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(handleEvent): Dispatch key press and key release events to
backing widget.
(requestFocus): Post a FOCUS_GAINED event to the event queue.
(gtkWidgetRequestFocus): New method.
(gtkWidgetDispatchKeyEvent): Likewise.
* java/awt/Component.java (requestFocus, requestFocus(boolean),
requestFocusInWindow, requestFocusInWindow(boolean),
getFocusCycleRootAncestor, nextFocus, transferFocus,
transferFocusBackward, transferFocusUpCycle, hasFocus,
isFocusOwner): Implement and document focus-handling methods.
(setFocusTraversalKeys): Inherit focus traversal keys when
keystrokes argument is null. Fix focus-handling documentation
throughout class.
* java/awt/Container.java (setFocusTraversalKeys,
getFocusTraversalKeys, areFocusTraversalKeysSet,
isFocusCycleRoot, setFocusTraversalPolicy,
getFocusTraversalPolicy, isFocusTraversalPolicySet,
setFocusCycleRoot, isFocusCycleRoot, transferFocusDownCycle):
Implement and document focus-handling methods.
(transferFocusBackward): Remove method.
(readObject, writeObject): Implement and document serialization
methods.
* java/awt/ContainerOrderFocusTraversalPolicy.java: Implement
and document.
* java/awt/DefaultFocusTraversalPolicy.java: Implement and
document.
* java/awt/DefaultKeyboardFocusManager.java: Implement and
partially document.
* java/awt/EventDispatchThread.java (run): Set default keyboard
focus manager. Attempt to dispatch each event to the keyboard
focus manager before normal dispatch.
* java/awt/KeyboardFocusManager.java: Implement and partially
document.
* java/awt/Window.java (Window): Set focusCycleRoot to true.
(show): Focus initial component when window is shown for the
first time.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(pre_event_handler): Replace complex key press and key release
logic with simple callbacks into GtkComponentPeer.
* jni/gtk-peer/gtkpeer.h: Fix FOCUS_GAINED/FOCUS_LOST reversal.
2004-04-21 Olga Rodimina <rodimina@redhat.com>
* javax/swing/MenuSelectionManager.java
(componentForPoint): Added new method.
(defaultManager): New Method. Implemented.
(getSelectedPath): Ditto.
(isComponentPartOfCurrentMenu): Ditto.
(processKeyEvent): Added new method.
(processMouseEvent): New Method. Implemented.
(setSelectedPath): Ditto.
(getPath): Ditto.
2004-04-19 Kim Ho <kho@redhat.com>
* java/awt/Container.java:
(remove): Set the component's parent to null.
(getComponentAt): Implement.
* javax/swing/JComponent.java:
(JComponent): Initialize defaultLocale
(getDefaultLocale): Implement.
(setDefaultLocale): ditto.
* javax/swing/JSlider.java:
(JSlider): Fix calculation of value.
* javax/swing/JSplitPane.java: Implement.
* javax/swing/plaf/basic/BasicLookAndFeel.java:
Change SplitPane's default divider size.
* javax/swing/plaf/basic/BasicScrollBarUI.java:
(paint): Remove unused code.
* javax/swing/plaf/basic/BasicSplitPaneDivider.java:
Added comments and ran through jalopy.
(setBasicSplitPaneUI): Get reference to hidden divider
and set up one touch buttons if necessary.
(setBorder): Fire propertyChangeEvent only if
borders are different.
(getPreferredSize): Defer to layout manager.
(propertyChange): Implement.
(oneTouchExpandableChanged): ditto.
(createLeftOneTouchButton): Use BasicArrowButton.
(createRightOneTouchButton): ditto.
(moveDividerTo): New method. Moves the divider
to a set location based on the last divider location.
(BasicSplitPaneDivider::MouseHandler): Implement.
(BasicSplitPaneDivider::OneTouchButton): Removed.
(BasicSplitPaneDivider::DragController): Implement.
(BasicSplitPaneDivider::VerticalDragController):
ditto.
(BasicSplitPaneDivider::DividerLayout): ditto.
* javax/swing/plaf/basic/BasicSplitPaneUI.java: Reimplement.
* javax/swing/plaf/basic/BasicTabbedPaneUI.java:
(calculateLayoutInfo): Don't show component if it's
null.
(paintTab): Fix title paint logic.
From-SVN: r82314
2004-05-04 Ingo Proetel <proetel@aicas.com>
* java/awt/image/ColorModel.java (getRGBdefault): Default ColorModel has
32 bit pixels not 8 bit pixels.
(isCompatibleRaster): Added javadoc comment.
2004-05-04 Ingo Proetel <proetel@aicas.com>
* java/awt/image/ComponentSampleModel.java (setDataSamples):Do not reset
scanline stride.
2004-05-04 Ingo Proetel <proetel@aicas.com>
* java/awt/ColorPaintContext.java (<init>): Added ColorModel to signature.
(getColorModel): Return the actual color model.
(getRaster): Implemented.
(ColorRaster): New inner class.
* java/awt/SystemColor.java (createContext): Use ColorModel when creating
a PaintContext.
* java/awt/Color.java (<init>): Make exception more verbose.
(createContext): Use ColorModel when creating a PaintContext.
From-SVN: r81486
2004-04-20 Ingo Proetel <proetel@aicas.com>
* java/awt/FontMetrics.java:
(charsWidth): fixed accumulation of total_width
(getWidth): simple default implementation
* java/awt/Polygon.java (getBoundingBox): Use correct y-coordinate
in Rectangle constructor.
* java/awt/image/Raster.java (toString): Added method.
* java/awt/image/SampleModel.java (<init>): Added error cause
information to thrown exception.
* java/awt/image/SinglePixelPackedSampleModel.java (getDataElements):
New method.
(setDataElements): New method.
(setPixels): New method.
(toString): New method.
2004-04-20 Sascha Brawer <brawer@dandelis.ch>
* java/awt/image/ComponentColorModel.java
(createCompatibleSampleModel): Return PixelInterleavedSampleModel
for TYPE_BYTE and TYPE_USHORT transferTypes, in order to pass the
Mauve tests on this method. Improved documentation.
From-SVN: r80894
2004-04-09 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkPanelPeer.java (connectSignals):
Remove method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPanelPeer.c: Remove
unused code.
2004-04-02 Olga Rodimina <rodimina@redhat.com>
* Makefile.am: Added new file.
* Makefile.in: Regenerate.
* javax/swing/ImageIcon.java:
(ImageIcon(file)): set description of the icon
to the file name
* javax/swing/JCheckBoxMenuItem.java:
Mostly Implemented. Work in progress.
* javax/swing/JRadioButtonMenuItem.java:
Reimplement constructors to use JToggleButtonModel.
* javax/swing/plaf/basic/BasicIconFactory.java:
(getCheckBoxMenuItemIcon): return check box
icon.
* javax/swing/plaf/basic/BasicMenuItemUI.java:
paint menu item selected only when it is armed and
pressed.
2004-04-02 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
(GtkMenuItemPeer): Only connect signals if this isn't a Menu peer.
* java/awt/Component.java
(add): Set the parent of the popup as this component.
* java/awt/PopupMenu.java
(addNotify): Create popup menu when peer is null.
(show): Call addNotify() if peer is null.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
(Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_show): Set the button
argument for gtk_menu_popup() as zero. This causes the popup menu to
respond to any mouse button.
2004-03-31 Olga Rodimina <rodimina@redhat.com>
* Makefile.am: Added new file.
* Makefile.in: Regenerate.
* javax/swing/JRadioButtonMenuItem.java:
Implemented.
* javax/swing/plaf/basic/BasicIconFactory.java:
(getRadioButtonMenuItemIcon): Return
radio button icon.
* javax/swing/plaf/basic/BasicMenuItemUI.java:
(getPreferredSize): Add size of checkIcon if it
exists.
(installDefaults): Don't initialize checkIcon.
It's value will be set in subclasses.
(uninstallDefaults): remove uninstallation of
checkIcon.
(paint): Moved code to paintMenuItem().
(paintMenuItem): Implemented.
* javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java:
UI delegate for JRadioButtonMenuItem.
2004-03-29 Olga Rodimina <rodimina@redhat.com>
* javax/swing/plaf/basic/BasicMenuItemUI.java:
Corrected position of the accelerator.
2004-03-29 Olga Rodimina <rodimina@redhat.com>
* Makefile.am: Added new file.
* Makefile.in: Regenerate.
* javax/swing/JMenuItem.java: Partly
implemented. Work in progress
* javax/swing/plaf/basic/BasicLookAndFeel.java:
Changed default value of acceleratorDelimiter.
* javax/swing/plaf/basic/BasicMenuItemUI.java:
New class. Partly implemented.
2004-03-26 Mark Wielaard <mark@klomp.org>
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
(item_activate): Declare label before use.
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(gtkSetFont): Removed unused variable label.
(addExposeFilter): Declare variables before use.
(removeExposeFilter): Likewise.
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
(ok_clicked): Declare str_fileName before use.
2004-03-26 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkMenuPeer.java
(addSeparator): Remove.
* java/awt/Menu.java
(separator): Remove static final MenuItem field.
(separatorLabel): New static final String field.
(addSeparator): Do not use peer method; use add(MenuItem) instead.
Use separatorLabel to denote that it is a separator.
(insertSeparator): Create a new MenuItem with separatorLabel, instead
of reusing the static separator instance, because a MenuItem instance
can't be added more than once without being cloned.
* java/awt/peer/MenuPeer.java
(addSeparator): Remove from interface.
2004-03-26 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
(connectSignals): New native method declaration.
(GtkMenuItemPeer): Connect signals if the parent is a Menu.
* java/awt/MenuItem.java
(getActionCommand): Return the label if the action command is not set.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuBarPeer.c
(Java_gnu_java_awt_peer_gtk_GtkMenuBarPeer_addMenu): Use
gtk_menu_shell_append().
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuItemPeer.c
(item_activate): Fix argument type.
(Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_create): Do not connect
signal here.
(Java_gnu_java_awt_peer_gtk_GtkMenuItemPeer_connectSignals): New
method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuPeer.c
(Java_gnu_java_awt_peer_gtk_GtkMenuPeer_create): Check if a label is
given. Add the menu widget's top-level GtkWindow to the global window
group, so it can grab the pointer.
(Java_gnu_java_awt_peer_gtk_GtkMenuPeer_addItem): Use
gtk_menu_shell_append().
2004-03-23 Graydon Hoare <graydon@redhat.com>
* java/text/AttributedString.java
(addAttribute): Fix off-by-one.
(getIterator): Likewise.
* java/text/AttributedStringIterator.java
(getRunLimit): Correct logic.
(getRunStart): Likewise.
(getAttribute): Fix inequality.
(getAttributes): Likewise.
* testsuite/libjava.mauve/xfails: Remove AttributedString xfail.
2004-03-23 Kim Ho <kho@redhat.com>
* javax/swing/plaf/basic/BasicTabbedPaneUI.java:
(calculateSizes): Return real width and height.
2004-03-23 Kim Ho <kho@redhat.com>
* javax/swing/plaf/basic/BasicTabbedPaneUI.java
(calculateTabRects): Set the selectedRun before
trying to rotate tabs.
2004-03-23 Kim Ho <kho@redhat.com>
* Makefile.am: New file
* Makefile.in: Regenerate
* java/awt/Graphics.java: (drawRect):
Draw to the correct point.
* javax/swing/DefaultSingleSelectionModel.java
(isSelected): Return true if the selected index
is not -1.
* javax/swing/JLabel.java: Do not change mnemonic
index if text is null.
* javax/swing/JProgressBar.java: Use JComponent's
EventListenerList.
* javax/swing/JScrollBar.java: Ditto.
* javax/swing/JSlider.java: Ditto.
* javax/swing/JTabbedPane.java: Reimplement.
* javax/swing/plaf/basic/BasicLookAndFeel.java:
Add defaults for TabbedPane.
* javax/swing/plaf/basic/BasicArrowButton.java:
Implement
* javax/swing/plaf/basic/BasicProgressBarUI.java:
(paintDeterminate): Don't paint String if it's
empty.
(paintIndeterminate): ditto.
* javax/swing/plaf/basic/BasicTabbedPaneUI.java:
Reimplement.
2004-03-19 Michael Koch <konqueror@gmx.de>
* java/awt/image/AffineTransformOp.java
(AffineTransformOp): Made public.
* javax/swing/JComponent.java
(listenerList): Made protected.
(accessibleContext): Likewise.
* javax/swing/JList.java
(valueChanged): Dont use internal fields of ListSelectionEvent.
* javax/swing/JViewport.java
(getView): Dont use internal fields of Component.
(addImpl): Likewise.
* javax/swing/Timer.java
(isRunning): Made public.
(start): Likewise.
(stop): Likewise.
* javax/swing/UIDefaults.java
(getInt): Made public.
* javax/swing/plaf/basic/BasicListUI.java
(mousePressed): Dont use internal fields of MouseEvent.
(propertyChanged): Dont use internal fields of PropertyChangeEvent.
* javax/swing/plaf/basic/BasicScrollBarUI.java
(arrowIcon): Made static.
* javax/swing/plaf/basic/BasicViewportUI.java
(stateChanged): Dont use internal field on ChangeEvent.
* javax/swing/text/JTextComponent.java
(getUI): Call UIManager.getUI().
(updateUI): Use getUI().
2004-03-19 Graydon Hoare <graydon@redhat.com>
* javax/swing/JComponent.java: Turn off double buffer by default.
* javax/swing/plaf/basic/BasicViewportUI.java: Clear rects before painting.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
(Java_gnu_java_awt_peer_gtk_GdkGraphics2D_gdkDrawDrawable):
Use cairo to copy areas.
(Java_gnu_java_awt_peer_gtk_GdkGraphics2D_cairoClip):
Initialize and set clip region.
2004-03-15 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/applet/Applet.java (preferredSize): Override deprecated
variant of getPreferredSize.
(minimumSize): Override deprecated variant of getMinimumSize.
2004-03-15 Olga Rodimina <rodimina@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java
(drawImage(img,xform,bgcolor,obs)): New Method.
Helper function that every drawImage method will
use.
(drawRaster): Added new parameter, bgcolor. All
transparent pixels are changed to bgcolor before
image is drawn.
(drawRenderedImage): Fixed to use changed drawRaster().
(drawImage(image,xform,obs): Fixed to use new helper function
(drawImage(image,op,x,y)): Ditto.
(drawImage (img,x,y,observer)): Ditto.
((PainterThread) bgcolor): New Field.
((PainterThread) (setPixels)): Changed all transparent pixels
to bgcolor.
(drawImage(img,x,y,width,height,bgcolor,observer)):
Fixed FIXME - all the transparent pixels are
changed to the specified bgcolor.
(drawImage(img, x, y, width, height, observer): Changed to
use function above.
(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,bgcolor,observer)):
Fixed FIXME- changed all transparent pixels to bgcolor.
(drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer)):
Changed to use function above.
2004-03-14 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/applet/Applet.java (dimensions): New field.
(getDimensions): New method.
(getPreferredSize): Call getDimensions.
(getMinimumSize): Likewise.
2004-03-13 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/classpath/jcl.c: Include stdlib.h, not malloc.h.
* jni/classpath/jnilink.c: Likewise.
* java/applet/Applet.java (getPreferredSize): New method.
(getMinimumSize): New method.
From-SVN: r80762
* java/awt/image/AffineTransformOp.java
(AffineTransformOp): Made public.
* javax/swing/JComponent.java
(listenerList): Made protected.
(accessibleContext): Likewise.
* javax/swing/JList.java
(valueChanged): Dont use internal fields of ListSelectionEvent.
* javax/swing/JViewport.java
(getView): Dont use internal fields of Component.
(addImpl): Likewise.
* javax/swing/Timer.java
(isRunning): Made public.
(start): Likewise.
(stop): Likewise.
* javax/swing/UIDefaults.java
(getInt): Made public.
* javax/swing/plaf/basic/BasicListUI.java
(mousePressed): Dont use internal fields of MouseEvent.
(propertyChanged): Dont use internal fields of PropertyChangeEvent.
* javax/swing/plaf/basic/BasicScrollBarUI.java
(arrowIcon): Made static.
* javax/swing/plaf/basic/BasicViewportUI.java
(stateChanged): Dont use internal field on ChangeEvent.
* javax/swing/text/JTextComponent.java
(getUI): Call UIManager.getUI().
(updateUI): Use getUI().
From-SVN: r79699
2004-03-12 Graydon Hoare <graydon@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java: Clipping fixes.
* javax/swing/JComponent.java (paint): Use persistent double buffer.
* javax/swing/JList.java (ListListener): Revalidate on changes.
* javax/swing/JScrollPane.java: Reimplement.
* javax/swing/JViewport.java: Reimplement.
* javax/swing/ScrollPaneLayout.java: Reimplement.
* javax/swing/ViewportLayout.java: Tidy up.
* javax/swing/plaf/basic/BasicButtonListener.java: Remove printlns.
* javax/swing/plaf/basic/BasicScrollPaneUI.java: Reimplement.
* javax/swing/plaf/basic/BasicSliderUI.java: Handle missing labels.
* javax/swing/plaf/basic/BasicViewportUI.java: Implement in terms of
backing store only.
2004-03-11 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(window_wm_protocols_filter): New function.
(window_focus_in_cb): Remove function.
(window_focus_out_cb): Likewise.
(window_focus_or_active_state_change_cb): New function.
(create): Add filter that removes WM_TAKE_FOCUS client messages.
(connectSignals): Don't attach handlers to focus-in-event or
focus-out-event signals. Handle notify signal.
2004-03-11 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
(gtkSetLabel): New native method declaration.
(setLabel): Use gtkSetLabel.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetLabel): New method.
2004-03-10 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics.java (setColor): Default to
black when color argument is null.
2004-03-10 Kim Ho <kho@redhat.com>
* java/awt/Container.java: Remove check
for drag events.
2004-03-10 Kim Ho <kho@redhat.com>
* java/awt/Container.java: (visitChild):
Remove candidate clip. Use the component
clip to intersect.
* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
(handleEvent): Use the PaintEvent's clip.
2004-03-10 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java:
(handleEvent): Don't set the clip for the
Graphics object.
2004-03-09 Graydon Hoare <graydon@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c:
Fix double <-> fixed macros, reset font transform.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c:
Likewise.
2004-03-09�� Kim Ho <kho@redhat.com>
* java/awt/Container.java: (visitChild): Move
the x and y coordinate of the component rectangle
to correct position.
(handleEvent): Forward drag events to the pressed
component.
* javax/swing/plaf/basic/BasicScrollBarUI.java:
Fix comments.
(ArrowButtonListener::mousePressed): Stop the
existing timer.
(mouseDragged): Implement.
(TrackListener::mousePressed): Only react if
the press doesn't occur on the thumb, otherwise
just set the offset.
(TrackListener::mouseReleased): Unset the isAdjusting
value.
(createIncreaseIcon): Switch icon.
(createDecreaseIcon): Switch icon.
(calculatePreferredSize): Use width.
(getThumbBounds): Use the top as the lower value.
(layoutVScrollBar): Switch the button locations.
(paintIncreaseHighlight): Paint correct side of thumb.
(paintDecreaseHighlight): ditto.
(valueForYPosition): Use top as the lower value.
* javax/swing/plaf/basic/BasicSliderUI.java:
Fix comments.
(mouseDragged): Implement.
(mousePressed): Only react when the thumb isn't
pressed, otherwise just set offset.
(mouseReleased): Handle a release of the thumb.
(scrollDueToClickInTrack): Stop the timer first.
* javax/swing/JProgressBar.java:
(setString): Fix change condition.
* javax/swing/JSeparator.java:
Remove println's.
2004-03-08 David Jee <djee@redhat.com>
* java/awt/image/AffineTransformOp.java:
(filter): Use Graphics2D interface instead of directly using the
GdkGraphics2D peer.
2004-03-05 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkButtonPeer.java
(handleEvent): Action events are generated upon MOUSE_RELEASED.
* java/awt/Container.java
(acquireComponentForMouseEvent): Fixed.
(handleEvent): Fixed.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(state_to_awt_mods_with_button_states): New method.
(pre_event_handler): Fixed mouse event generation.
2004-03-05 Olga Rodimina <rodimina@redhat.com>
gnu/java/awt/peer/gtk/GdkGraphics2D.java
(GdkGraphics2D (BufferedImage)): Initialize
pixmap associated with specified BufferedImage.
(setPaint): Changed implementation of Texture
Paint to use AffineTransformOp.
* java/awt/image/AffineTransformOp.java
(createCompatibleDestRaster): Throw RasterFormatException
if resulting width or height of raster is 0.
2004-03-04 Olga Rodimina <rodimina@redhat.com>
* java/awt/image/AffineTransformOp.java:
Removed unnecessary field interpolationType.
Formatted some of the lines to be consistent with
the GNU style.
(AffineTransformOp): Create new RenderingHints
containing specified interpolation type.
(createCompatibleDestImage): Implemented.
(createCompatibleDestRaster): Implemented.
(filter): Implemented.
(getBounds2D(BufferedImage)): Implemented.
(getBounds2D(Raster)): Implemented.
(getInterpolationType): Get interpolation value from
rendering hints.
2004-03-04 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkContainerPeer.java
(setFont): Check if child peers are null.
2004-03-04 Graydon Hoare <graydon@redhat.com>
* testsuite/lib/libjava.exp (libjava_find_lib): Don't include
.libs in -L option.
(libjava_arguments): Add new libraries to argument list.
2004-03-04 Tom Tromey <tromey@redhat.com>
* Makefile.in: Rebuilt.
* Makefile.am (toolexeclib_LTLIBRARIES): Added lib-java-awt.la,
lib-javax-swing.la, lib-java-applet.la, lib-java-beans.la.
(misc_java_source_files): New macro.
(swing_java_source_files): Likewise.
(awt_java_source_files): Pruned.
(applet_java_source_files): New macro.
(beans_java_source_files): Likewise.
(lib_java_applet_la_SOURCES): Likewise.
(lib_java_awt_la_SOURCES): Likewise.
(lib_javax_swing_la_SOURCES): Likewise.
(lib_java_beans_la_SOURCES): Likewise.
(all_java_object_files): Likewise.
(%.lo: %.java): Use all_java_object_files.
(all_java_source_files): Added new _SOURCES.
(ordinary_java_source_files): Removed awt_java_source_files.
2004-03-02 Olga Rodimina <rodimina@redhat.com>
* Makefile.am: Added java/awt/image/AffineTransformOp.java
* Makefile.in: Re-generated.
* java/awt/image/AffineTransformOp.java: New Class.
2004-03-01 Olga Rodimina <rodimina@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java
(setPaint): Interpret correctly TexturePaint's
anchor rectangle.
(drawImage): Fixed scale factors of the affine
transform.
2004-02-27 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics.java
(GdkGraphics(Component)): Inherit font from component.
(drawString): Use font style.
* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
(gtkSetFont): New native method declaration.
(setFont): New method.
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
(gtkSetFont): New native method declaration.
(setFont): Call new native method gtkSetFont.
* gnu/java/awt/peer/gtk/GtkContainerPeer.java
(setFont): For all child components who do not their fonts set,
set their peers' fonts with this container's font.
* gnu/java/awt/peer/gtk/GtkLabelPeer.java:
Move all native method declarations to the top for readability.
(gtkSetFont): New native method declaration.
(setFont): New method.
* java/awt/Component.java
(setFont): Invalidate after setting the font.
* java/awt/Container.java
(invalidateTree): New method.
(setFont): Invalidate the container tree after setting the font.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c
(Java_gnu_java_awt_peer_gtk_GdkGraphics_drawString): Use font style.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
(Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetFont): New method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkSetFont): New method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
(Java_gnu_java_awt_peer_gtk_GtkLabelPeer_gtkSetFont): New method.
2004-02-27 Olga Rodimina <rodimina@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java
(updateBufferedImage): New helper function.
Updates BufferedImage in memory if it was changed.
(draw): changed to update BufferedImage in memory after
this drawing operation
(fill): Ditto.
(draw3DRect): Ditto.
(fill3DRect): Ditto.
(clearRect): Ditto.
(drawRaster): Ditto.
(drawImage) : Ditto. Update only in case of GtkOffScreenImage with
no affine transformation.
(drawGlyphVector): Ditto.
2004-02-26 Olga Rodimina <rodimina@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java
(isBufferedImageGraphics): New Helper function.
Returns true if this graphics2d can be used to draw
into buffered image and false otherwise.
(updateImagePixels): New Helper function.
Updates pixels in the BufferedImage.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
(getImagePixels): New function. Returns pixels
of the buffered image associated with
this Graphics2D.
2004-02-26 David Jee <djee@redhat.com>
* java/awt/BorderLayout.java
(layoutContainer): Fix width and height calculations to ensure
that they're non-negative.
* java/awt/Component.java
(setBackground): If c is null, inherit from closest ancestor whose
background color is set.
2004-02-26�� Kim Ho�� <kho@redhat.com>
* Makefile.am: Add new files.
* Makefile.in: Re-generate.
* javax/swing/JProgressBar.java:
(JProgressBar(int, int int)): Throw
IllegalArgumentException if orientation is
invalid.
(JProgressBar(BoundedRangeModel)): Create
ChangeListener and register it. UpdateUI.
(getChangeListeners): Implement.
(setModel): Reset ChangeListener.
* javax/swing/JScrollBar.java: Implement.
* javax/swing/JSeparator.java: Implement.
* javax/swing/JSlider.java:
(JSlider(int, int, int, int)): Throw
IllegalArgumentException if orientation
is invalid.
(getChangeListeners): Fix method name.
* javax/swing/SwingUtilities.java:
(layoutCompoundLabel): If there is no text,
set the text rectangle dimensions to 0.
* javax/swing/plaf/basic/BasicButtonUI.java:
(paint): If there is no text, don't paint it.
* javax/swing/plaf/basic/BasicScrollBarUI.java:
Implement.
* javax/swing/plaf/basic/BasicSeparatorUI.java:
Implement.
* javax/swing/plaf/basic/BasicSliderUI.java:
(propertyChange): If the model changes, change
the listeners accordingly.
2004-02-25 Graydon Hoare <graydon@redhat.com>
* javax/swing/AbstractButton.java: Add "final" qualifiers.
* javax/swing/JList.java: Reimplement.
* javax/swing/DefaultListSelectionModel.java: Reimplement.
* javax/swing/plaf/basic/BasicListUI.java: Reimplement.
* javax/swing/plaf/basic/BasicLookAndFeel.java: Add "purple" values.
* javax/swing/ListModel.java: Javadoc.
* javax/swing/ListSelectionModel.java: Add missing methods.
* javax/swing/AbstractListModel.java: Javadoc and corrections.
* javax/swing/DefaultListModel.java: Javadoc and corrections.
* javax/swing/ListModel.java: Javadoc and corrections.
* javax/swing/DefaultListCellRenderer.java: Minor tidying.
2004-02-25 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkFontPeer.java
(GtkFontPeer): Change default size to 12.
* gnu/java/awt/peer/gtk/GtkToolkit.java
(getFontPeer): Change default size to 12.
(getClasspathFontPeer): Likewise. Set default name to "Default".
* java/awt/Font.java
(Font(Map)): Call Font(String,Map).
(Font(String,Map)): If attrs is null, initialize it as an empty
HashMap, which will ensure that the Font will get default attributes.
2004-02-25 David Jee <djee@redhat.com>
* gnu/java/awt/peer/gtk/GtkFontPeer.java
(GtkFontPeer(String,int)): Call the new constructor with size 1.
(GtkFontPeer(String,int,int)): New constructor with size attribute.
* gnu/java/awt/peer/gtk/GtkToolkit.java
(getFontPeer(String,int)): Call the new overload method with size 1.
(getFontPeer(String,int,int)): New method. Overloaded with size
attribute.
(getClasspathFontPeer): Set the size of the font.
2004-02-24 Olga Rodimina <rodimina@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java
(bimage): New field.
(GdkGraphics2D): New Constructor. Constructs Graphics
object that can be used to draw into the Buffered Image.
* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java:
(GdkGraphicsEnvironment): Fixed to include public
keyword.
(createGraphics): Implemented.
* gnu/java/awt/peer/gtk/GtkToolkit.java
(getLocalGraphicsEnvironment): Implemented.
* java/awt/GraphicsEnvironment.java:
(getLocalGraphicsEnvironment): Implemented.
* java/awt/image/BufferedImage.java:
(createGraphics): Implemented.
2004-02-24 David Jee <djee@redhat.com>
* java/awt/Component.java
(eventTypeEnabled): Add MOUSE_MOVED and MOUSE_DRAGGED event types.
* java/awt/Container.java
(addNotifyContainerChildren): Fix event enabling.
2004-02-23 Olga Rodimina <rodimina@redhat.com>
* Makefile.am: Added
gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
* Makefile.in: Re-generated.
* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java:
New Class.
2004-02-19 Kim Ho <kho@redhat.com>
* Makefile.am: Add BasicProgressBarUI
* Makefile.in: Regenerate.
* javax/swing/JProgressBar.java:
Re-implement.
* javax/swing/plaf/basic/BasicLookAndFeel.java
Add constants for JProgressBar.
* javax/swing/plaf/basic/BasicProgressBarUI.java
Implement.
* javax/swing/plaf/basic/BasicSliderUI.java
Change comments.
(calculateGeometry): New method
(paint): Remove unnecessary size calculations.
2004-02-18 Olga Rodimina <rodimina@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java
(drawRaster): Fixed small error that caused
imageToUser transformation to be set incorrectly.
(toString): Implemented.
2004-02-18 David Jee <djee@redhat.com>
* java/awt/CardLayout.java
(addLayoutComponent): Show the first component added as the default.
(removeLayoutComponent): After removing, show the next component.
(gotoComponent): If there is only one component, show it and return.
2004-02-18 Kim Ho <kho@redhat.com>
* javax/swing/JSlider.java: Re-order
modifiers.
* javax/swing/JLabel.java: Re-order
modifiers.
* javax/swing/JComponent.java:
(addPropertyChangeListener):
Implement.
(removePropertyChangeListener):
ditto.
(firePropertyChangeEvent):
ditto.
2004-02-17 David Jee <djee@redhat.com>
* java/awt/Component.java
(show): Dispatch ComponentEvent via system event queue.
(hide): Likewise.
(move): Likewise.
(resize): Likewise.
(reshape): Likewise.
* java/awt/Window.java
(setBoundsCallback): Likewise.
2004-02-17 David Jee <djee@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeBounds):
Use gtk_widget_set_size_request() instead of the deprecated
gtk_widget_set_usize().
2004-02-17 Kim Ho <kho@redhat.com>
* javax/swing/JSlider.java: Fix comments and
make property strings constants.
(createStandardLabels): Use the labels
preferred size as bounds.
* javax/swing/plaf/basic/BasicSliderUI.java
Fix comments.
(ScrollHandler::actionPerformed): Don't
calculate the timer stop value. Let the
MouseListeners find the stop location.
(getPreferredHorizontalSize): Re-implement.
(getPreferredVerticalSize): ditto.
(getMinimumHorizontalSize): ditto.
(getMinimumVerticalSize): ditto.
(getPreferredSize): ditto.
(getMinimumSize): ditto.
(getMaximumSize): ditto.
(paintTicks): Use doubles to find the
tick location.
(paintHorizontalLabel):�� Use preferredSize
as initial width and height.
(paintVerticalLabel): ditto.
2004-02-17 Kim Ho <kho@redhat.com>
* javax/swing/JLabel.java: Changed
property strings to constants.
(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY):
New property.
(setText): Change mnemonic index if
text is too short.
(setDisplayedMnemonicIndex): Fire property
change event.
(getDisplayedMnemonicIndex): Remove check
against short text.
2004-02-17 Olga Rodimina <rodimina@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
(drawImage(img,xform,obs)): Invert xform before
passing the xform to cairo.
(drawImage(img,x,y,bgcolor,obs)): Implemented.
(drawImage (img,x,y,w,h,bgcolor,obs)): Partly
implemented.
(drawImage (img,x,y,w,h,obs)): Implemented.
(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,
bgcolor,obs)): Partly implemented.
(drawImage (img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,obs)):
Implemented.
* java/awt/image/BufferedImage.java:
(copyData): if dest is null, create raster with same
dimensions as the current image.
2004-02-16 Graydon Hoare <graydon@redhat.com>
* javax/swing/plaf/basic/BasicLabelUI.java
(getPreferredSize): Use layoutCL.
* javax/swing/plaf/basic/BasicGraphicsUtils.java
(getPreferredButtonSize): Start with empty view rect, layout using
component's preferred alignment.
* javax/swing/plaf/basic/BasicLookAndFeel.java: Add some Label and
List defaults.
2004-02-16 David Jee <djee@redhat.com>
* java/awt/Component.java
(show): Dispatch COMPONENT_SHOWN ComponentEvent.
(hide): Dispatch COMPONENT_HIDDEN ComponentEvent.
(move): Erase old bounds and repaint new bounds. Dispatch
COMPONENT_MOVED ComponentEvent.
(resize): Erase old bounds and repaint new bounds. Dispatch
COMPONENT_RESIZED ComponentEvent.
(reshape): Dispatch COMPONENT_RESIZED and COMPONENT_MOVED
ComponentEvents.
* java/awt/Window.java
(setBoundsCallback): Dispatch COMPONENT_RESIZED and COMPONENT_MOVED
ComponentEvents.
2004-02-16 Olga Rodimina <rodimina@redhat.com>
* gnu/java/awt/peer/gtk/GdkGraphics2D.java:
(setRenderingHint): Added implementation of
Interpolation rendering hints.
(setRenderingHints): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c:
(drawPixels): fixed to allow user to choose type
of filtering that should be used when displaying images.
(cairoSurfaceSetFilter): New method. Sets filter type for
interpolation of pixel values.
2004-02-16 David Jee <djee@redhat.com>
* java/awt/GridBagLayout.java
(calcCellSizes): Rows or columns with zero sizes should still be
considered for extra space distribution.
2004-02-16 Kim Ho <kho@redhat.com>
* javax/swing/JLabel.java: Re-implement.
* javax/swing/plaf/basic/BasicLabelUI.java
Re-implement.
* javax/swing/plaf/basic/BasicLookAndFeel.java:
Added constant.
2004-02-16�� Kim Ho�� <kho@redhat.com>
* javax/swing/JSlider.java: Fix indentation and comments.
(setModel): Remove null check to conform with Sun's.
(setOrientation): Throw exception if not
HORIZONTAL or VERTICAL.
(getInverted): Use private variable instead of
ComponentOrientation.
(setInverted): ditto.
* javax/swing/plaf/basic/BasicSliderUI.java:
Fix indentation and comments.
(propertyChange): Remove check for inverted slider, handle
in main paint.
(getMinimumSize): Return preferred size.
(getMaximumSize): ditto.
(calculateFocusRect): Don't relocate rectangle.
(drawInverted): Return XOR of the slider's inversion and
the component's orientation.
(paint): Update leftToRightCache
2004-02-13 David Jee <djee@redhat.com>
* java/awt/GridBagLayout.java
(GetLayoutInfo): Fix weight and size distribution. Relocate repeated
code to helper methods.
(sortBySpan): New helper method.
(distributeSizeAndWeight): Likewise.
(calcCellWeights): Likewise.
(calcCellSizes): Add comments.
2004-02-13 David Jee <djee@redhat.com>
* java/awt/Component.java
(show): Only do something if component is invisible at the moment.
(hide): Only do something if component is visible at the moment.
(reshape): If lightweight, erase old bounds and repaint new bounds.
2004-02-13�� Kim Ho�� <kho@redhat.com>
* Makefile.am: Updated for new file.
* Makefile.in: Regenerated.
* javax/swing/JSlider.java: Reimplement.
* javax/swing/SwingUtilities.java
(layoutCompoundLabel): Use icon height
instead of width.
(paintComponent): Implement.
* javax/swing/plaf/basic/BasicLookAndFeel.java:
Add JSlider defaults.
* javax/swing/plaf/basic/BasicSliderUI.java:
Implement. New file.
From-SVN: r79607
2004-02-05 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/Scrollbar.java (next_scrollbar_number): New field.
(Scrollbar (int, int, int, int, int)): Make default page
increment 10.
(setValues): Only call peer.setValues if one of the values has
changed.
(generateName): New method.
(getUniqueLong): New method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
(range_scrollbar): Remove structure.
(post_adjustment_event): Remove function.
(post_change_event): Accept jobject argument.
(create): Cast jints to gdoubles. Round scrollbar values to the
nearest integer. Clamp min, max and value settings.
(connectJObject): Connect hook to widget->window.
(connectSignals): Remove range_scrollbar structure variables.
Remove "move-slider" connection. Pass global peer reference to
"value-changed" callback.
(setLineIncrement): Cast jint value to gdouble.
(setPageIncrement): Likewise.
(setValues): Likewise. Clamp min, max and value settings.
From-SVN: r77332
* java/awt/geom/AffineTransform.java:
Corrected comments on the field definitions for
m11 and m10.
(shear): Fixed few errors that caused shear
transformation to be performed incorrectly.
(createInverse): Fixed to return correct
inverse of the given matrix.
From-SVN: r77261
2004-02-03 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkListPeer.java,
java/awt/BorderLayout.java, java/awt/CardLayout.java,
java/awt/CheckboxGroup.java, java/awt/Choice.java,
java/awt/Component.java, java/awt/Container.java,
java/awt/FontMetrics.java, java/awt/GridBagLayout.java,
java/awt/LayoutManager2.java, java/awt/List.java,
java/awt/Menu.java, java/awt/MenuBar.java,
java/awt/MenuItem.java, java/awt/Polygon.java,
java/awt/Rectangle.java, java/awt/ScrollPane.java,
java/awt/Scrollbar.java, java/awt/TextArea.java,
java/awt/TextField.java,
java/awt/image/renderable/RenderContext.java,
javax/swing/JApplet.java: Fix handling of alias methods, where a
method has been deprecated in favour of a new one with the same
funtion but a different name. Put the method implementation in
the deprecated method and have the new method call the
deprecated one. Make all other code call the new method.
From-SVN: r77178
* gnu/java/awt/peer/gtk/GtkFramePeer.java
(removeMenuBarPeer): Remove MenuBarPeer argument.
* gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
(dispose): Call native method.
* java/awt/Frame.java (setMenuBar): Create and remove
MenuBar peers only if the Frame has a peer.
(addNotify): Create the MenuBar peer if one exists.
(removeNotify): Remove MenuBar peer if one exists.
* java/awt/Menu.java: Fix imports.
(addNotify): Don't use full class name.
(removeNotify): Call removeNotify on all children.
* java/awt/MenuBar.java (removeNotify): Call
removeNotify on all children.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(removeMenuBarPeer): Remove MenuBarPeer argument.
Iterate through children to find the Frame's MenuBar.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMenuComponentPeer.c
New file.
(dispose): Remove references to the MenuComponent.
From-SVN: r76740
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
(handleEvent): Implemented. Handles PaintEvents.
(paint): Implemented. Use GTK native methods to queue updates
for this heavyweight peer.
* gnu/java/awt/peer/gtk/GtkContainerPeer.java
(handleEvent): Removed.
* java/awt/Component.java
(paint): Implemented. Explictly paint the heavyweight peer.
(update): Clear the background for heavyweight components.
(paintAll): No need to call peer.paint() anymore.
(processEvent): Don't process PaintEvents here. It's now done in
the peer's handleEvent().
(processPaintEvent): Removed.
* java/awt/Container.java
(paint): No need to call super.paint(). Visit heavyweight
children as well.
(update): Don't clear the background here. It's done in
Component.update().
(visitChildren): Added check to not recurse into Containers.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(filter_expose_event_handler): New method. Filter unwanted
expose events while painting heavyweight peers.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_addExposeFilter):
New method. Connect filter and block pre_event_handler.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_removeExposeFilter):
New method. Disconnect filter and unblock pre_event_handler.
(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetQueueDrawArea):
New method. Invalidate and update given area.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(pre_event_handler): Add checks for unwanted expose events.
From-SVN: r76668
2004-01-25 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/TextArea.java: Fix indentation. Flesh out javadocs.
(getMinimumSize (int, int)): Fix FIXME -- return Dimension (0,0)
when peer is null.
(setColumns): Remove FIXME -- peer will retrieve number of
columns by calling getColumns.
(setRows): Likewise for number of rows.
(next_text_number): New field.
(paramString): Fix param string.
(generateName): New method.
(getUniqueLong): New method.
From-SVN: r76577
* java/awt/Container.java
(LightweightDispatcher.handleEvent): Add an extra check to avoid
dispatching MOUSE_ENTERED event twice. Translate the point for
the mouse event target before dispatching the event.
From-SVN: r76278
* java/awt/EventQueue.java (pop): Prevent racing condition to add
events to the queue out of order by acquiring locks in the proper
order and not by releasing one before acquiring the other.
From-SVN: r76161
2004-01-19 Kim Ho <kho@redhat.com>
* gnu/java/awt/peer/gtk/GtkFramePeer.java (getMenuBarHeight): Added
MenuBarPeer parameter.
(removeMenuBarPeer): New native method.
(setMenuBar): Call remove if menu bar is null. Adjust insets
appropriately.
(postSizeAllocateEvent): New method. Called when menu bar size is
allocated. Adjust insets and redo layout.
(GtkFramePeer): Set menu bar during frame creation.
(postConfigureEvent): Adjust position and size to accomodate
menu bar.
* java/awt/Frame.java (setMenuBar): addNotify to create menu bar.
* java/awt/Menu.java (addSeparator): Use peer's addSeparator.
(addNotify): Create the peer if it doesn't exist and call addNotify
for the menu's items.
* java/awt/MenuBar.java (addNotify): Create this menu bar's menus.
* java/awt/MenuItem.java (addNotify): Create the peer if it
doesn't exist.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(removeMenuBarPeer): New method. Remove menu bar on the current
frame.
(setMenuBarPeer): Add the menu bar to the current frame and the
callback for size-allocate events on the menu bar.
(getMenuBarHeight): Add menu bar parameter.
(menubar_resize_cb): New callback method for postSizeAllocate events.
Also: Fix indentation on last ChangeLog entry.
From-SVN: r76149
* java/awt/EventDispatchThread.java (run): Stop running when
interrupted.
* java/awt/EventQueue.java (pop): Stop dispatch thread when done.
Reset the queue after transferring its contents.
(push): Start a new dispatch thread if none is running.
From-SVN: r75977
* java/awt/Dialog.java (show): Enable blocking for all modal dialogs
and run secondary dispatch thread to process event queue while this
thread is blocked.
From-SVN: r75788
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java (nativeSetFile):
New name for the former setFile native method.
(setFile): New method.
(setDirectory): Implemented.
(connectSignals): New native method.
(setFilenameFilter): Improve comment.
(getGraphics): Comment.
(gtkHideFileDialog): New method.
(gtkDisposeFileDialog): New method.
(gtkSetFilename): New method.
* java/awt/Dialog.java (show): Block on modal dialogs, but only
for FileDialog for now.
(hide): New method.
(dispose): New method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c
(Java_gnu_java_awt_peer_gtk_GtkFileDialog_create): Replace
deprecated creation functions. Make dialog modal. Add it to the
window group.
(Java_gnu_java_awt_peer_gtk_GtkFileDialog_connectSignals): New
function.
(Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_gtkFileSelectionSetFilename):
Rename to...
(Java_gnu_java_awt_peer_gtk_GtkFileDialogPeer_nativeSetFile): New
name.
(window_closed): New function.
(ok_clicked): New function.
(cancel_clicked): New function.
From-SVN: r75557
* java/awt/Container.java
(update): Clear only the clipped region, instead of clearing the
entire Container.
(visitChildren): Visit children in descending order.
From-SVN: r75517
* gnu/java/awt/peer/gtk/GtkScrollPanePeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c
(create(int, int)): New method.
(create): Call new create method.
(gtkScrolledWindowNew, gtkScrolledWindowSetSize): Remove
methods.
(childResized): Remove native implementation. Implement in
Java.
(getHScrollbarHeight, getVScrollbarWidth): Call
gtk_widget_size_request to get scrollbar dimensions.
* java/awt/ScrollPane.java (getViewportSize): Reimplement. Only
call getVScrollbarWidth and getHScrollbarHeight when vertical
and horizontal scrollbars respectively are needed.
(doLayout): Enlarge child if it is smaller than the viewport.
From-SVN: r75446
* java/awt/Dialog.java (constructor): Accept null title as per spec.
* java/awt/FileDialog.java (constructor): Throw exception on invalid
argument as per spec.
From-SVN: r75444
2004-01-05 Fernando Nasser <fnasser@redhat.com>
* java/awt/Choice.java (add): Leave posting of ItemEvents to peer.
(insert): Ditto.
(remove): Ditto. Also, Check for valid argument.
(removeAll): Use peer interface method.
* gnu/java/awt/peer/gtk/GtkChoicePeer.java (nativeAdd): New name for
native add function.
(nativeRemove): New name for native remove function.
(getHistory): New native function.
(constructor): Generate ItemEvent.
(add): Ditto, if selection is changed.
(remove): Ditto, ditto.
(removeAll): Add implementation.
(handleEvent): Remove. Dead code.
(choicePostItemEvent): Add comment.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Add comments.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Rename to...
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeAdd): New name. Add
comments and fix condition to change selection.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Rename to...
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_nativeRemove): New name. Add
remove all capability.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_getHistory): New function.
(item_activate): Add cast to remove compiler warning.
From-SVN: r75443
2003-12-22 Fernando Nasser <fnasser@redhat.com>
* gnu/java/awt/peer/gtk/GtkChoicePeer.java (postItemEvent): Rename to... (choicePostItemEvent): Change signature to more specific String object.
* java/awt/Choice.java (add): Generate ItemEvent for the first item
added.
(insert): Generate ItemEvent if insertion caused
selection to change.
(remove): Generate ItemEvent if removal cause selection to change.
(removeAll): Change algorithm to prevent generation of ItemEvents.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
(connect_choice_item_selectable_hook): Change argument type.
Fix argument value.
Make sure resources are feed by registering callback.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Adjust call to the
above function.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Ditto.
(item_activate): Ditto.
(Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Destroy removed
menuitem.
(item_removed): New function. Free resources.
* jni/gtk-peer/gtkpeer.h (item_event_hook_info): Change member type and
name.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
(Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit): Obtain MethodID for
choicePostItemEvent.
From-SVN: r74979
2003-12-19 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/FlowLayout.java (layoutContainer): Let components
assume their preferred height. Centre components vertically.
From-SVN: r74844
2003-12-18 Fernando Nasser <fnasser@redhat.com>
* java/awt/List.java (replaceItem): Prevent selection to move with
replace and minimize flickering.
From-SVN: r74814
2003-12-08 Fernando Nasser <fnasser@redhat.com>
* java/awt/datatransfer/StringSelection.java (getTransferData): Return
object of type expected by specified DataFlavor.
From-SVN: r74449
2003-12-08 Fernando Nasser <fnasser@redhat.com>
* java/awt/datatransfer/DataFlavor.java (getParameter): Fix off-by-one
error which was clipping off the first character of a parameter value.
From-SVN: r74448
* java/awt/Polygon.java
(translate): Fixed error that caused polygon
to move right/left when up/down translation was required.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c:
(getSelectionStart): Initialized start position to 0.
(getSelectionEnd): Initialized end position to 0.
(getCaretPosition): Initialized caret position to 0.
(getText): Initialized selected text to NULL
From-SVN: r74445
2003-12-02 Fernando Nasser <fnasser@redhat.com>
* gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): New
method. Handle mouse and key events that must generate
ActionEvents.
* java/awt/List.java (getSelectedIndex): Return -1
if no list element is selected.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c (awt_event_handler):
Correct handling of mouse and key events so that List receives them.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c
(Java_gnu_java_awt_peer_gtk_GtkListPeer_delItems): Fix removal of
multiple list elements.
From-SVN: r74189
* java/awt/TextComponent.java:
(getSelectionStart): Updated javadocs.
(getSelectionEnd): Ditto.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer:
(getSelectionStart): Changed to return caret position if no
text is selected
(getSelectionEnd): Ditto.
From-SVN: r74124
2003-11-14 Tom Fitzsimmons <fitzsim@redhat.com>
* java/awt/GridBagLayout.java (getLayoutDimensions): Return array of two
zero-length int arrays when layoutInfo is null.
(getLayoutWeights): Return array of two zero-length double arrays when
layoutInfo is null.
From-SVN: r73622
2003-10-24 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkDialogPeer.java (handleEvent):
Remove method.
* gnu/java/awt/peer/gtk/GtkWindowPeer.java (postWindowEvent):
New method.
* java/awt/Window.java (Window(Window,GraphicsConfiguration),
show, hide, dispose, getOwnedWindows): Synchronize on tree lock.
(dispose): Post WINDOW_CLOSED event.
(addWindowFocusListener, addWindowStateListener): Assign result
of multicaster add back to window listener.
(removeWindowFocusListener, removeWindowStateListener): Assign
result of multicaster remove back to window listener.
(dispatchEventImpl): Add null checks for focus and state
listeners.
(processWindowEvent): Handle case where windowListener is null
but state or focus listeners exist.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Add JNI
glue for postWindowEvent.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c
(window_delete_cb, window_destroy_cb, window_show_cb,
window_focus_in_cb, window_focus_out_cb, window_window_state_cb,
window_get_new_state): New functions.
* jni/gtk-peer/gtkpeer.h: Define window event and frame state
macros. Declare postWindowEventID.
From-SVN: r72906
2003-10-08 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkButtonPeer.java (handleEvent): Remove
modality check.
* gnu/java/awt/peer/gtk/GtkDialogPeer.java (initializeInsets):
Initialize insets to use latest insets.
* gnu/java/awt/peer/gtk/GtkFramePeer.java: Likewise.
* gnu/java/awt/peer/gtk/GtkWindowPeer.java (latestInsets): New
field.
(postConfigureEvent): Update latestInsets field when insets
change. Remove call to setSize. Move validate call outside of
if blocks.
(setVisible): Call setBounds before showing window.
(nativeSetVisible): New native method.
* java/awt/Window.java (show): Show visible owned windows.
(hide): Hide visible owned windows.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(awt_event_handler): Implement modality using GTK grabs.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
(global_gtk_window_group): New global variable.
(gtkInit): Initialize global_gtk_window_group.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (create):
Clamp width and height values to at least 1. Add this window to
the global GTK window group.
(setVisible): Rename to nativeSetVisible.
(setup_window): Remove function.
(setSize): Clamp width and height values to at least 1.
(nativeSetBounds): Likewise.
(gdk_window_get_root_geometry): Remove function.
* jni/gtk-peer/gtkpeer.h: Remove gdk_window_get_root_geometry
and setup_window declarations. Declare global_gtk_window_group.
From-SVN: r72252
2003-10-02 Thomas Fitzsimmons <fitzsim@redhat.com>
* gnu/java/awt/peer/gtk/GtkComponentPeer.java (insets): New
field.
(initializeInsets): New method.
(GtkComponentPeer): Call initializeInsets. Call setCursor and
setBounds unconditionally.
(setBounds): Convert coordinates if parent is a Window.
* gnu/java/awt/peer/gtk/GtkContainerPeer.java (insets): Move
field to GtkComponentPeer.
(GtkContainerPeer): Don't initialize insets.
* gnu/java/awt/peer/gtk/GtkDialogPeer.java (initializeInsets):
New method.
(create): Call new GtkWindowPeer create method.
* gnu/java/awt/peer/gtk/GtkFramePeer.java (initializeInsets):
New method.
(create): Call new GtkWindowPeer create method.
(setBounds): Remove method.
(postConfigureEvent): Likewise.
* gnu/java/awt/peer/gtk/GtkWindowPeer.java: Replace GTK window
type constants with GDK window type constants.
(create(int,boolean,int,int,GtkWindowPeer)): New method.
(create(int,boolean)): Likewise.
(create()): Call create(int,boolean).
(nativeSetBounds): New native method declaration.
(setBounds): Call native method declaration.
(setSize): New native method declaration.
(setBoundsCallback): Likewise.
(postConfigureEvent): Handle change in insets. Call setSize and
setBoundsCallback methods.
* java/awt/Window.java (Window): Set visible to false.
(setBoundsCallback): New method.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(gtkWidgetGetLocationOnScreen): If this component is not a
container, adjust the location returned based on the peer's
allocation.
(set(String,boolean)): Revert change from 2003-09-19.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
(awt_event_handler): Fix inset calculation.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c: Add JNI
glue for Window.setBoundsCallback.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c (create):
Set up stacking order, window decorations and window manager
hints.
(setBoundsCallback): New method.
(setSize): New method.
(nativeSetBounds): New method.
* jni/gtk-peer/gtkpeer.h: Declare setBoundsCallbackID.
From-SVN: r72043
2003-09-26 Sascha Brawer <brawer@dandelis.ch>
* java/awt/image/SinglePixelPackedSampleModel.java (createDataBuffer):
Save space for some pixels at the buffer end. Added Javadoc.
2003-09-26 Tom Tromey <tromey@redhat.com>
* java/io/ObjectOutputStream.java (writeFields): Fixed
indentation.
(putFields): Likewise.
From-SVN: r71829
* Makefile.am: added gnu/awt/xlib/XOffScreenImage.java.
* Makefile.in: re-generated.
* gnu/awt/j2d/IntegerGraphicsState.java
(ScreenCoupledImage): new interface.
(drawImage): detect ScreenCoupledImage instances.
* gnu/awt/xlib/XCanvasPeer.java (createImage) implemented.
* gnu/awt/xlib/XEventLoop.java
(createEvent): re-formatted, and rearranged to avoid null pointer.
* gnu/awt/xlib/XGraphics.java
(drawImage): added XOffScreenImage handling.
* gnu/awt/xlib/XOffScreenImage.java: new file.
* gnu/gcj/xlib/Drawable.java (getDepth): new native method.
* gnu/gcj/xlib/GC.java (copyArea): new native method.
* gnu/gcj/xlib/XAnyEvent.java
(TYPE_KEY_PRESS): new constant.
(TYPE_KEY_RELEASE): new constant.
(TYPE_MOTION_NOTIFY): new constant.
(TYPE_ENTER_NOTIFY): new constant.
(TYPE_LEAVE_NOTIFY): new constant.
(TYPE_FOCUS_IN): new constant.
(TYPE_FOCUS_OUT): new constant.
(TYPE_KEYMAP_NOTIFY): new constant.
(TYPE_GRAPHICS_EXPOSE): new constant.
(TYPE_NO_EXPOSE): new constant.
(TYPE_VISIBILITY_NOTIFY): new constant.
(TYPE_CREATE_NOTIFY): new constant.
(TYPE_DESTROY_NOTIFY): new constant.
(TYPE_MAP_REQUEST): new constant.
(TYPE_CONFIGURE_REQUEST): new constant.
(TYPE_GRAVITY_NOTIFY): new constant.
(TYPE_RESIZE_REQUEST): new constant.
(TYPE_CIRCULATE_NOTIFY): new constant.
(TYPE_CIRCULATE_REQUEST): new constant.
(TYPE_PROPERTY_NOTIFY): new constant.
(TYPE_SELECTION_CLEAR): new constant.
(TYPE_SELECTION_REQUEST): new constant.
(TYPE_SELECTION_NOTIFY): new constant.
(TYPE_COLORMAP_NOTIFY): new constant.
(TYPE_MAPPING_NOTIFY): new constant.
* gnu/gcj/xlib/natDrawable.cc (getDepth): new method.
* gnu/gcj/xlib/natGC.cc (copyArea): new method
* java/awt/Component.java (createImage): changed to use peer method.
From-SVN: r70776
* java/awt/Container.java
(getPreferredSize): Call preferredSize.
(preferredSize): Moved body of getPreferredSize here.
(getMinimumSize): Call minimumSize.
(minimumSize): Moved body of getMinimumSize here.
From-SVN: r70386