You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Todd Volkert (JIRA)" <ji...@apache.org> on 2009/08/23 05:03:14 UTC
[jira] Created: (PIVOT-241) Clicking on a MenuBar.Item with no menu
yields exception
Clicking on a MenuBar.Item with no menu yields exception
--------------------------------------------------------
Key: PIVOT-241
URL: https://issues.apache.org/jira/browse/PIVOT-241
Project: Pivot
Issue Type: Bug
Components: wtk
Reporter: Todd Volkert
Priority: Minor
Fix For: 1.3
Create a frame with a menu bar as follows:
<Frame maximized="true"
styles="{showWindowControls:false}"
xmlns:wtkx="http://pivot.apache.org/wtkx"
xmlns="org.apache.pivot.wtk">
<menuBar>
<MenuBar>
<items>
<MenuBar.Item buttonData="Foo" />
</items>
</MenuBar>
</menuBar>
<content>
...
</content>
</Frame>
Then click on the "Foo" menu bar item, and you'll get the following exception:
java.lang.RuntimeException: Infinite loop in focus traversal policy for org.apache.pivot.wtk.MenuPopup#105
at org.apache.pivot.wtk.Container.requestFocus(Container.java:446)
at org.apache.pivot.wtk.skin.MenuBarItemSkin.stateChanged(MenuBarItemSkin.java:204)
at org.apache.pivot.wtk.Button$ButtonStateListenerList.stateChanged(Button.java:217)
at org.apache.pivot.wtk.Button.setState(Button.java:470)
at org.apache.pivot.wtk.Button.setSelected(Button.java:412)
at org.apache.pivot.wtk.skin.MenuBarItemSkin.mouseDown(MenuBarItemSkin.java:157)
at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:443)
at org.apache.pivot.wtk.Component.mouseDown(Component.java:2494)
at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
at org.apache.pivot.wtk.Window.mouseDown(Window.java:1123)
at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:787)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (PIVOT-241) Clicking on a MenuBar.Item with no
menu yields exception
Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Greg Brown resolved PIVOT-241.
------------------------------
Resolution: Fixed
Menu bar items are required to have submenus. However, the focus-related exception was misleading. An IllegalStateException is now thrown in this case.
> Clicking on a MenuBar.Item with no menu yields exception
> --------------------------------------------------------
>
> Key: PIVOT-241
> URL: https://issues.apache.org/jira/browse/PIVOT-241
> Project: Pivot
> Issue Type: Bug
> Components: wtk
> Reporter: Todd Volkert
> Assignee: Greg Brown
> Priority: Minor
> Fix For: 1.3
>
>
> Create a frame with a menu bar as follows:
> <Frame maximized="true"
> styles="{showWindowControls:false}"
> xmlns:wtkx="http://pivot.apache.org/wtkx"
> xmlns="org.apache.pivot.wtk">
> <menuBar>
> <MenuBar>
> <items>
> <MenuBar.Item buttonData="Foo" />
> </items>
> </MenuBar>
> </menuBar>
> <content>
> ...
> </content>
> </Frame>
> Then click on the "Foo" menu bar item, and you'll get the following exception:
> java.lang.RuntimeException: Infinite loop in focus traversal policy for org.apache.pivot.wtk.MenuPopup#105
> at org.apache.pivot.wtk.Container.requestFocus(Container.java:446)
> at org.apache.pivot.wtk.skin.MenuBarItemSkin.stateChanged(MenuBarItemSkin.java:204)
> at org.apache.pivot.wtk.Button$ButtonStateListenerList.stateChanged(Button.java:217)
> at org.apache.pivot.wtk.Button.setState(Button.java:470)
> at org.apache.pivot.wtk.Button.setSelected(Button.java:412)
> at org.apache.pivot.wtk.skin.MenuBarItemSkin.mouseDown(MenuBarItemSkin.java:157)
> at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:443)
> at org.apache.pivot.wtk.Component.mouseDown(Component.java:2494)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.Window.mouseDown(Window.java:1123)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:787)
> at java.awt.Component.processEvent(Component.java:6028)
> at java.awt.Component.dispatchEventImpl(Component.java:4630)
> at java.awt.Component.dispatchEvent(Component.java:4460)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (PIVOT-241) Clicking on a MenuBar.Item with no
menu yields exception
Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Greg Brown reassigned PIVOT-241:
--------------------------------
Assignee: Greg Brown
> Clicking on a MenuBar.Item with no menu yields exception
> --------------------------------------------------------
>
> Key: PIVOT-241
> URL: https://issues.apache.org/jira/browse/PIVOT-241
> Project: Pivot
> Issue Type: Bug
> Components: wtk
> Reporter: Todd Volkert
> Assignee: Greg Brown
> Priority: Minor
> Fix For: 1.3
>
>
> Create a frame with a menu bar as follows:
> <Frame maximized="true"
> styles="{showWindowControls:false}"
> xmlns:wtkx="http://pivot.apache.org/wtkx"
> xmlns="org.apache.pivot.wtk">
> <menuBar>
> <MenuBar>
> <items>
> <MenuBar.Item buttonData="Foo" />
> </items>
> </MenuBar>
> </menuBar>
> <content>
> ...
> </content>
> </Frame>
> Then click on the "Foo" menu bar item, and you'll get the following exception:
> java.lang.RuntimeException: Infinite loop in focus traversal policy for org.apache.pivot.wtk.MenuPopup#105
> at org.apache.pivot.wtk.Container.requestFocus(Container.java:446)
> at org.apache.pivot.wtk.skin.MenuBarItemSkin.stateChanged(MenuBarItemSkin.java:204)
> at org.apache.pivot.wtk.Button$ButtonStateListenerList.stateChanged(Button.java:217)
> at org.apache.pivot.wtk.Button.setState(Button.java:470)
> at org.apache.pivot.wtk.Button.setSelected(Button.java:412)
> at org.apache.pivot.wtk.skin.MenuBarItemSkin.mouseDown(MenuBarItemSkin.java:157)
> at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:443)
> at org.apache.pivot.wtk.Component.mouseDown(Component.java:2494)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.Window.mouseDown(Window.java:1123)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:787)
> at java.awt.Component.processEvent(Component.java:6028)
> at java.awt.Component.dispatchEventImpl(Component.java:4630)
> at java.awt.Component.dispatchEvent(Component.java:4460)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIVOT-241) Clicking on a MenuBar.Item with no
menu yields exception
Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747056#action_12747056 ]
Greg Brown commented on PIVOT-241:
----------------------------------
Updated to automatically disable MenuBar.Item when no menu is specified.
> Clicking on a MenuBar.Item with no menu yields exception
> --------------------------------------------------------
>
> Key: PIVOT-241
> URL: https://issues.apache.org/jira/browse/PIVOT-241
> Project: Pivot
> Issue Type: Bug
> Components: wtk
> Reporter: Todd Volkert
> Assignee: Greg Brown
> Priority: Minor
> Fix For: 1.3
>
>
> Create a frame with a menu bar as follows:
> <Frame maximized="true"
> styles="{showWindowControls:false}"
> xmlns:wtkx="http://pivot.apache.org/wtkx"
> xmlns="org.apache.pivot.wtk">
> <menuBar>
> <MenuBar>
> <items>
> <MenuBar.Item buttonData="Foo" />
> </items>
> </MenuBar>
> </menuBar>
> <content>
> ...
> </content>
> </Frame>
> Then click on the "Foo" menu bar item, and you'll get the following exception:
> java.lang.RuntimeException: Infinite loop in focus traversal policy for org.apache.pivot.wtk.MenuPopup#105
> at org.apache.pivot.wtk.Container.requestFocus(Container.java:446)
> at org.apache.pivot.wtk.skin.MenuBarItemSkin.stateChanged(MenuBarItemSkin.java:204)
> at org.apache.pivot.wtk.Button$ButtonStateListenerList.stateChanged(Button.java:217)
> at org.apache.pivot.wtk.Button.setState(Button.java:470)
> at org.apache.pivot.wtk.Button.setSelected(Button.java:412)
> at org.apache.pivot.wtk.skin.MenuBarItemSkin.mouseDown(MenuBarItemSkin.java:157)
> at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:443)
> at org.apache.pivot.wtk.Component.mouseDown(Component.java:2494)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.Window.mouseDown(Window.java:1123)
> at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
> at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:787)
> at java.awt.Component.processEvent(Component.java:6028)
> at java.awt.Component.dispatchEventImpl(Component.java:4630)
> at java.awt.Component.dispatchEvent(Component.java:4460)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.