You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Chris Bartlett (JIRA)" <ji...@apache.org> on 2010/05/21 13:07:16 UTC

[jira] Created: (PIVOT-501) org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar

org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar
-----------------------------------------------------------------------------------------------------------------

                 Key: PIVOT-501
                 URL: https://issues.apache.org/jira/browse/PIVOT-501
             Project: Pivot
          Issue Type: Bug
          Components: core-beans, tutorials, wtk-terra
    Affects Versions: 1.5
         Environment: Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Windows XP x64 SP2
            Reporter: Chris Bartlett


Using code from revision 946968, the Component Explorer demo fails to handle an exception which is thrown when 'exploring' ScrollBar in the Bounded Range Components section.

As shown below, the exception is thrown by BeanAdapter when it tries to get the 'backgroundColor' property (of org.apache.pivot.wtk.skin.terra.TerraScrollBarSkin) which happens to be a java.awt.GradientPaint rather than a java.awt.Color.

 java.lang.RuntimeException: Unable to access property "backgroundColor". 
	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:231)
	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:63)
	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:1)
	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addColorControl(ComponentInspectorSkin.java:1277)
	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addControl(ComponentInspectorSkin.java:157)
	at org.apache.pivot.tools.wtk.ComponentStyleInspectorSkin.sourceChanged(ComponentStyleInspectorSkin.java:75)
	at org.apache.pivot.tools.wtk.ComponentInspector$ComponentInspectorListenerList.sourceChanged(ComponentInspector.java:33)
	at org.apache.pivot.tools.wtk.ComponentInspector.setSource(ComponentInspector.java:52)
	at org.apache.pivot.tutorials.explorer.ComponentExplorer$1.selectedPathsChanged(ComponentExplorer.java:191)
	at org.apache.pivot.wtk.TreeView$TreeViewSelectionListenerList.selectedPathsChanged(TreeView.java:615)
	at org.apache.pivot.wtk.TreeView.setSelectedPaths(TreeView.java:1336)
	at org.apache.pivot.wtk.TreeView.setSelectedPath(TreeView.java:1393)
	at org.apache.pivot.wtk.skin.terra.TerraTreeViewSkin.mouseDown(TerraTreeViewSkin.java:1606)
	at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:451)
	at org.apache.pivot.wtk.Component.mouseDown(Component.java:2600)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:804)
	at java.awt.Component.processEvent(Unknown Source)
	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:656)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Background paint is not a Color.
	at org.apache.pivot.wtk.skin.ContainerSkin.getBackgroundColor(ContainerSkin.java:202)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:227)
	... 33 more


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-501) org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-501:
-----------------------------

    Attachment: PIVOT-501.patch

The problem here appears to be two-fold:

1) ContainerSkin#getBackgroundColor() was throwing an IllegalStateException when the installed background paint was not a color. It should arguably return null instead of throwing, since we generally only throw exceptions in mutator methods.

2) TerraScrollBarSkin was overriding setBackgroundColor() and converting the color to a GradientPaint. This prevented a color from ever being set as the background paint and also produced a NullPointerException: calling setBackgroundColor(Color) fires a change event that the Component Explorer app responded to in order to keep the style color picker in sync with the scroll bar's background - however, this ultimate fails because getBackgroundColor() would always return null.

The attached patch fixes both issues.


> org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-501
>                 URL: https://issues.apache.org/jira/browse/PIVOT-501
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 1.4
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
> Windows XP x64 SP2
>            Reporter: Chris Bartlett
>             Fix For: 1.5
>
>         Attachments: PIVOT-501.patch
>
>
> Using code from revision 946968, the Component Explorer demo fails to handle an exception which is thrown when 'exploring' ScrollBar in the Bounded Range Components section.
> As shown below, the exception is thrown by BeanAdapter when it tries to get the 'backgroundColor' property (of org.apache.pivot.wtk.skin.terra.TerraScrollBarSkin) which happens to be a java.awt.GradientPaint rather than a java.awt.Color.
>  java.lang.RuntimeException: Unable to access property "backgroundColor". 
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:231)
> 	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:63)
> 	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:1)
> 	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addColorControl(ComponentInspectorSkin.java:1277)
> 	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addControl(ComponentInspectorSkin.java:157)
> 	at org.apache.pivot.tools.wtk.ComponentStyleInspectorSkin.sourceChanged(ComponentStyleInspectorSkin.java:75)
> 	at org.apache.pivot.tools.wtk.ComponentInspector$ComponentInspectorListenerList.sourceChanged(ComponentInspector.java:33)
> 	at org.apache.pivot.tools.wtk.ComponentInspector.setSource(ComponentInspector.java:52)
> 	at org.apache.pivot.tutorials.explorer.ComponentExplorer$1.selectedPathsChanged(ComponentExplorer.java:191)
> 	at org.apache.pivot.wtk.TreeView$TreeViewSelectionListenerList.selectedPathsChanged(TreeView.java:615)
> 	at org.apache.pivot.wtk.TreeView.setSelectedPaths(TreeView.java:1336)
> 	at org.apache.pivot.wtk.TreeView.setSelectedPath(TreeView.java:1393)
> 	at org.apache.pivot.wtk.skin.terra.TerraTreeViewSkin.mouseDown(TerraTreeViewSkin.java:1606)
> 	at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:451)
> 	at org.apache.pivot.wtk.Component.mouseDown(Component.java:2600)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:804)
> 	at java.awt.Component.processEvent(Unknown Source)
> 	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:656)
> 	at java.awt.Component.dispatchEventImpl(Unknown Source)
> 	at java.awt.Component.dispatchEvent(Unknown Source)
> 	at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.IllegalStateException: Background paint is not a Color.
> 	at org.apache.pivot.wtk.skin.ContainerSkin.getBackgroundColor(ContainerSkin.java:202)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:227)
> 	... 33 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PIVOT-501) org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown resolved PIVOT-501.
------------------------------

    Resolution: Fixed

> org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-501
>                 URL: https://issues.apache.org/jira/browse/PIVOT-501
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 1.4
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
> Windows XP x64 SP2
>            Reporter: Chris Bartlett
>            Assignee: Todd Volkert
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: PIVOT-501.patch
>
>
> Using code from revision 946968, the Component Explorer demo fails to handle an exception which is thrown when 'exploring' ScrollBar in the Bounded Range Components section.
> As shown below, the exception is thrown by BeanAdapter when it tries to get the 'backgroundColor' property (of org.apache.pivot.wtk.skin.terra.TerraScrollBarSkin) which happens to be a java.awt.GradientPaint rather than a java.awt.Color.
>  java.lang.RuntimeException: Unable to access property "backgroundColor". 
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:231)
> 	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:63)
> 	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:1)
> 	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addColorControl(ComponentInspectorSkin.java:1277)
> 	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addControl(ComponentInspectorSkin.java:157)
> 	at org.apache.pivot.tools.wtk.ComponentStyleInspectorSkin.sourceChanged(ComponentStyleInspectorSkin.java:75)
> 	at org.apache.pivot.tools.wtk.ComponentInspector$ComponentInspectorListenerList.sourceChanged(ComponentInspector.java:33)
> 	at org.apache.pivot.tools.wtk.ComponentInspector.setSource(ComponentInspector.java:52)
> 	at org.apache.pivot.tutorials.explorer.ComponentExplorer$1.selectedPathsChanged(ComponentExplorer.java:191)
> 	at org.apache.pivot.wtk.TreeView$TreeViewSelectionListenerList.selectedPathsChanged(TreeView.java:615)
> 	at org.apache.pivot.wtk.TreeView.setSelectedPaths(TreeView.java:1336)
> 	at org.apache.pivot.wtk.TreeView.setSelectedPath(TreeView.java:1393)
> 	at org.apache.pivot.wtk.skin.terra.TerraTreeViewSkin.mouseDown(TerraTreeViewSkin.java:1606)
> 	at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:451)
> 	at org.apache.pivot.wtk.Component.mouseDown(Component.java:2600)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:804)
> 	at java.awt.Component.processEvent(Unknown Source)
> 	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:656)
> 	at java.awt.Component.dispatchEventImpl(Unknown Source)
> 	at java.awt.Component.dispatchEvent(Unknown Source)
> 	at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.IllegalStateException: Background paint is not a Color.
> 	at org.apache.pivot.wtk.skin.ContainerSkin.getBackgroundColor(ContainerSkin.java:202)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:227)
> 	... 33 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-501) org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar

Posted by "Chris Bartlett (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869945#action_12869945 ] 

Chris Bartlett commented on PIVOT-501:
--------------------------------------

Apologies - I included the wrong stack trace
Correct one below (I hope!)

java.lang.RuntimeException: Unable to access property "backgroundColor".
	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:229)
	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:63)
	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:1)
	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addColorControl(ComponentInspectorSkin.java:1277)
	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addControl(ComponentInspectorSkin.java:157)
	at org.apache.pivot.tools.wtk.ComponentStyleInspectorSkin.sourceChanged(ComponentStyleInspectorSkin.java:75)
	at org.apache.pivot.tools.wtk.ComponentInspector$ComponentInspectorListenerList.sourceChanged(ComponentInspector.java:33)
	at org.apache.pivot.tools.wtk.ComponentInspector.setSource(ComponentInspector.java:52)
	at org.apache.pivot.tutorials.explorer.ComponentExplorer$1.selectedPathsChanged(ComponentExplorer.java:191)
	at org.apache.pivot.wtk.TreeView$TreeViewSelectionListenerList.selectedPathsChanged(TreeView.java:615)
	at org.apache.pivot.wtk.TreeView.setSelectedPaths(TreeView.java:1336)
	at org.apache.pivot.wtk.TreeView.setSelectedPath(TreeView.java:1393)
	at org.apache.pivot.wtk.skin.terra.TerraTreeViewSkin.mouseDown(TerraTreeViewSkin.java:1606)
	at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:451)
	at org.apache.pivot.wtk.Component.mouseDown(Component.java:2600)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:804)
	at java.awt.Component.processEvent(Unknown Source)
	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:656)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Background paint is not a Color.
	at org.apache.pivot.wtk.skin.ContainerSkin.getBackgroundColor(ContainerSkin.java:202)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:225)
	... 33 more


> org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-501
>                 URL: https://issues.apache.org/jira/browse/PIVOT-501
>             Project: Pivot
>          Issue Type: Bug
>          Components: core-beans, tutorials, wtk-terra
>    Affects Versions: 1.5
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
> Windows XP x64 SP2
>            Reporter: Chris Bartlett
>
> Using code from revision 946968, the Component Explorer demo fails to handle an exception which is thrown when 'exploring' ScrollBar in the Bounded Range Components section.
> As shown below, the exception is thrown by BeanAdapter when it tries to get the 'backgroundColor' property (of org.apache.pivot.wtk.skin.terra.TerraScrollBarSkin) which happens to be a java.awt.GradientPaint rather than a java.awt.Color.
>  java.lang.RuntimeException: Unable to access property "backgroundColor". 
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:231)
> 	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:63)
> 	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:1)
> 	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addColorControl(ComponentInspectorSkin.java:1277)
> 	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addControl(ComponentInspectorSkin.java:157)
> 	at org.apache.pivot.tools.wtk.ComponentStyleInspectorSkin.sourceChanged(ComponentStyleInspectorSkin.java:75)
> 	at org.apache.pivot.tools.wtk.ComponentInspector$ComponentInspectorListenerList.sourceChanged(ComponentInspector.java:33)
> 	at org.apache.pivot.tools.wtk.ComponentInspector.setSource(ComponentInspector.java:52)
> 	at org.apache.pivot.tutorials.explorer.ComponentExplorer$1.selectedPathsChanged(ComponentExplorer.java:191)
> 	at org.apache.pivot.wtk.TreeView$TreeViewSelectionListenerList.selectedPathsChanged(TreeView.java:615)
> 	at org.apache.pivot.wtk.TreeView.setSelectedPaths(TreeView.java:1336)
> 	at org.apache.pivot.wtk.TreeView.setSelectedPath(TreeView.java:1393)
> 	at org.apache.pivot.wtk.skin.terra.TerraTreeViewSkin.mouseDown(TerraTreeViewSkin.java:1606)
> 	at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:451)
> 	at org.apache.pivot.wtk.Component.mouseDown(Component.java:2600)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:804)
> 	at java.awt.Component.processEvent(Unknown Source)
> 	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:656)
> 	at java.awt.Component.dispatchEventImpl(Unknown Source)
> 	at java.awt.Component.dispatchEvent(Unknown Source)
> 	at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.IllegalStateException: Background paint is not a Color.
> 	at org.apache.pivot.wtk.skin.ContainerSkin.getBackgroundColor(ContainerSkin.java:202)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:227)
> 	... 33 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-501) org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Greg Brown updated PIVOT-501:
-----------------------------

             Assignee: Todd Volkert
        Fix Version/s: 1.5
    Affects Version/s: 1.4
                           (was: 1.5)
             Priority: Minor  (was: Major)
          Component/s:     (was: core-beans)
                           (was: tutorials)

> org.apache.pivot.tutorials.explorer.ComponentExplorer fails to handle exception thrown when 'exploring' ScrollBar
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-501
>                 URL: https://issues.apache.org/jira/browse/PIVOT-501
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 1.4
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
> Windows XP x64 SP2
>            Reporter: Chris Bartlett
>            Assignee: Todd Volkert
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: PIVOT-501.patch
>
>
> Using code from revision 946968, the Component Explorer demo fails to handle an exception which is thrown when 'exploring' ScrollBar in the Bounded Range Components section.
> As shown below, the exception is thrown by BeanAdapter when it tries to get the 'backgroundColor' property (of org.apache.pivot.wtk.skin.terra.TerraScrollBarSkin) which happens to be a java.awt.GradientPaint rather than a java.awt.Color.
>  java.lang.RuntimeException: Unable to access property "backgroundColor". 
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:231)
> 	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:63)
> 	at org.apache.pivot.wtk.Component$StyleDictionary.get(Component.java:1)
> 	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addColorControl(ComponentInspectorSkin.java:1277)
> 	at org.apache.pivot.tools.wtk.ComponentInspectorSkin.addControl(ComponentInspectorSkin.java:157)
> 	at org.apache.pivot.tools.wtk.ComponentStyleInspectorSkin.sourceChanged(ComponentStyleInspectorSkin.java:75)
> 	at org.apache.pivot.tools.wtk.ComponentInspector$ComponentInspectorListenerList.sourceChanged(ComponentInspector.java:33)
> 	at org.apache.pivot.tools.wtk.ComponentInspector.setSource(ComponentInspector.java:52)
> 	at org.apache.pivot.tutorials.explorer.ComponentExplorer$1.selectedPathsChanged(ComponentExplorer.java:191)
> 	at org.apache.pivot.wtk.TreeView$TreeViewSelectionListenerList.selectedPathsChanged(TreeView.java:615)
> 	at org.apache.pivot.wtk.TreeView.setSelectedPaths(TreeView.java:1336)
> 	at org.apache.pivot.wtk.TreeView.setSelectedPath(TreeView.java:1393)
> 	at org.apache.pivot.wtk.skin.terra.TerraTreeViewSkin.mouseDown(TerraTreeViewSkin.java:1606)
> 	at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:451)
> 	at org.apache.pivot.wtk.Component.mouseDown(Component.java:2600)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.Container.mouseDown(Container.java:710)
> 	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:804)
> 	at java.awt.Component.processEvent(Unknown Source)
> 	at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:656)
> 	at java.awt.Component.dispatchEventImpl(Unknown Source)
> 	at java.awt.Component.dispatchEvent(Unknown Source)
> 	at java.awt.EventQueue.dispatchEvent(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> 	at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: java.lang.IllegalStateException: Background paint is not a Color.
> 	at org.apache.pivot.wtk.skin.ContainerSkin.getBackgroundColor(ContainerSkin.java:202)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.pivot.beans.BeanAdapter.get(BeanAdapter.java:227)
> 	... 33 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.