Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.4
-
Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Windows XP x64 SP2
Description
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