簡體   English   中英

IllegalArgumentException:在實現Substance LAF期間沒有為float找到插值器

[英]IllegalArgumentException: No interpolator found for float during implementing Substance LAF

我試圖實施Substance LAF。 我還下載了Trident庫。 應用程序通常會啟動(從包結構中選擇LAF)但是當我嘗試在JMenuBar使用菜單時,我會在下面獲得異常。

我發現了非常類似的問題,但它肯定是不同的 - Flamingo功能區:Java.lang.IllegalArgumentException:找不到java.lang.Float的內插器:java.lang.Float

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException:     No interpolator found for 
java.lang.Float:java.lang.Float 
 at org.pushingpixels.trident.TimelinePropertyBuilder.getFieldInfo    (TimelinePropertyBuilder.ja 
 va:257) 
 at org.pushingpixels.trident.Timeline.addPropertyToInterpolate    (Timeline.java:353) 
 at org.pushingpixels.trident.Timeline.addPropertyToInterpolate    (Timeline.java:363) 
 at     org.pushingpixels.substance.internal.animation.StateTransitionTracker.onModelStat    eChanged 
 (StateTransitionTracker.java:394) 
 at org.pushingpixels.substance.internal.ui.SubstanceMenuUI$1.mouseEntered        (SubstanceMenuUI.ja 
 va:155) 
 at java.awt.AWTEventMulticaster.mouseEntered(Unknown Source) 
 at java.awt.Component.processMouseEvent(Unknown Source) 
 at javax.swing.JComponent.processMouseEvent(Unknown Source) 
 at java.awt.Component.processEvent(Unknown Source) 
 at java.awt.Container.processEvent(Unknown Source) 
 at java.awt.Component.dispatchEventImpl(Unknown Source) 
 at java.awt.Container.dispatchEventImpl(Unknown Source) 
 at java.awt.Component.dispatchEvent(Unknown Source) 
 at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) 
 at java.awt.LightweightDispatcher.retargetMouseEnterExit(Unknown Source) 
 at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source) 
 at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) 
 at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) 
 at java.awt.Container.dispatchEventImpl(Unknown Source) 
 at java.awt.Window.dispatchEventImpl(Unknown Source) 
 at java.awt.Component.dispatchEvent(Unknown Source) 
 at java.awt.EventQueue.dispatchEventImpl(Unknown Source) 
 at java.awt.EventQueue.access$500(Unknown Source) 
 at java.awt.EventQueue$3.run(Unknown Source) 
 at java.awt.EventQueue$3.run(Unknown Source) 
 at java.security.AccessController.doPrivileged(Native Method) 
 at     java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege    (Unknown Sou 
 rce) 
 at     java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege    (Unknown Sou 
 rce) 
 at java.awt.EventQueue$4.run(Unknown Source) 
 at java.awt.EventQueue$4.run(Unknown Source) 
 at java.security.AccessController.doPrivileged(Native Method) 
 at     java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege    (Unknown Sou 
 rce) 
 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) 

有任何想法嗎?

經過一段時間后,我找到了解決方案。 錯誤

java.lang.IllegalArgumentException:找不到java.lang.Float的插補器:java.lang.Float

TimelinePropertyBuilder類中的代碼無關。 相反,它缺少相應頂級庫的META-INF中的trident-plugin.properties文件。 確切地說,定義了Interpolator類的來源。

所以不是尋找它,而是需要trident-plugin.properties

UIToolkitHandler=org.pushingpixels.trident.swing.SwingToolkitHandler
PropertyInterpolatorSource=org.pushingpixels.trident.swing.AWTPropertyInterpolators

UIToolkitHandler=org.pushingpixels.trident.swt.SWTToolkitHandler
PropertyInterpolatorSource=org.pushingpixels.trident.swt.SWTPropertyInterpolators

UIToolkitHandler=org.pushingpixels.trident.android.AndroidToolkitHandler
PropertyInterpolatorSource=org.pushingpixels.trident.android.AndroidPropertyInterpolators

PropertyInterpolatorSource=org.pushingpixels.trident.interpolator.CorePropertyInterpolators

這應該解決它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM