Bug 27624 - menu painting: three drawing issues
Summary: menu painting: three drawing issues
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: 0.90
: P3 normal
Target Milestone: 0.92
Assignee: Roman Kennke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 10:39 UTC by Robert Schuster
Modified: 2006-08-02 23:19 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
drawing issues (21.82 KB, image/png)
2006-05-16 10:39 UTC, Robert Schuster
Details
menu painting in RI (13.54 KB, image/png)
2006-05-16 10:40 UTC, Robert Schuster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schuster 2006-05-16 10:39:09 UTC
Look at the accompanying image to see what I mean.

#1: At the bottom of the selected menu item should be a small white line.

#2: The text in a child menu should try to align with the menu item that opened the child menu. (I write try because if someone puts in image into the child menu it may be impossible to properly align the texts.)

#3: The child menu and its parent should overlap horizontally.
Comment 1 Robert Schuster 2006-05-16 10:39:52 UTC
Created attachment 11473 [details]
drawing issues
Comment 2 Robert Schuster 2006-05-16 10:40:31 UTC
Created attachment 11474 [details]
menu painting in RI
Comment 3 cvs-commit@developer.classpath.org 2006-08-02 23:06:35 UTC
Subject: Bug 27624

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Changes by:	Roman Kennke <rabbit78>	06/08/02 23:06:00

Modified files:
	javax/swing    : JMenu.java JPopupMenu.java Popup.java 
	javax/swing/plaf/basic: BasicMenuItemUI.java BasicMenuUI.java 
	.              : ChangeLog 

Log message:
	2006-08-02  Roman Kennke  <kennke@aicas.com>
	
		PR 27624
		* javax/swing/JMenu.java
		(JMenu()): Removed setting of delay.
		(JMenu(String)): Removed setting of delay.
		(JMenu(Action)): Removed setting of delay.
		(JMenu(String,boolean)): Removed setting of delay.
		(setSelectedHelper): Removed unneeded method.
		(setSelected): Simply set the model state.
		(setPopupMenuVisible): Recognize the popup location
		determined by getPopupMenuOrigin().
		(getPopupMenuOrigin): Recognize the UI properties for
		X and Y offset.
		(menuSelectionChanged): Call setSelected() directly.
		* javax/swing/JPopupMenu.java
		(menuSelectionChanged): If invoker is a JMenu, then delegate
		to that to get the position right.
		* javax/swing/Popup.java
		(LightweightPopup.show): Insert the popup as first component
		in the layer, so that it overlaps it's caller.
		* javax/swing/plaf/basic/BasicMenuItemUI.java
		(getPath): Don't include the popup.
		* javax/swing/plaf/basic/BasicMenuUI.java
		(SelectMenuAction): New class. This invokes the popup when
		a menu is selected.
		(installDefaults): Install delay of 200 ms.
		(setupPostTimer): Implemented.
		(MouseInputHandler.mouseClicked): Do nothing here.
		(MouseInputHandler.mouseEntered): Use MenuSelectionManager
		magic to handle the selection. Open the menu via a timer.
		(MouseInputHandler.mousePressed): Use MenuSelectionManager
		magic to handle the selection. Open the menu via a timer.
		(MenuDragMouseHandler.menuMouseDragged): Probably use
		timer.
		(menuDragMouseEntered): Do nothing here.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JMenu.java?cvsroot=classpath&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JPopupMenu.java?cvsroot=classpath&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/Popup.java?cvsroot=classpath&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java?cvsroot=classpath&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicMenuUI.java?cvsroot=classpath&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.8301&r2=1.8302



Comment 4 Roman Kennke 2006-08-02 23:19:20 UTC
Fixed in CVS. The line was already there. The offsets for the popup must be fetched from UIManager properties.