gvSIG bugs #2070
Bad implementation of ActionInfo.getValue(Action.SMALL_ICON)
Status: | Closed | % Done: | 0% | |
---|---|---|---|---|
Priority: | Normal | Spent time: | - | |
Assignee: | - | |||
Category: | Application | |||
Target version: | 2.1.0-2217-devel | |||
Severity: | Add-on version: | |||
gvSIG version: | 2.1.0 | Add-on build: | ||
gvSIG build: | 2066 | Add-on resolve version: | ||
Operative System: | Add-on resolve build: | |||
Keywords: | Proyecto: | |||
Has patch: | No | Hito: | ||
Add-on name: | Unknown |
Description
On DefaultActionInfo.getValue
implementation returns a String for Action.SMALL_ICON
while java.swing API expects a java.swing.Icon instance (or null
).
This generates a ClassCastException when you try to create a JButton from a ActionInfo instance:
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to javax.swing.Icon at javax.swing.AbstractButton.setIconFromAction(AbstractButton.java:1257) at javax.swing.AbstractButton.configurePropertiesFromAction(AbstractButton.java:1143) at javax.swing.AbstractButton.setAction(AbstractButton.java:1087) at javax.swing.JButton.<init>(JButton.java:104)
Associated revisions
Fix getValue(Action.SMALL_ICON)
refs #2070
History
#1 Updated by Joaquín del Cerro Murciano over 10 years ago
- Status changed from New to Fixed
- Target version set to 2.1.0-2217-devel
#2 Updated by Álvaro Anguix over 10 years ago
- Status changed from Fixed to Closed