如何在 IntelliJ 中使用 Griffon Swingx 插件?
How to use Griffon Swingx plugin with IntelliJ?
我已经使用 ItelliJ 设置了一个 Griffon 项目并尝试在视图中使用 SwingX 组件,但我无法让它工作。我的 griffon-app/conf/BuildConfig.groovy
看起来像这样:
griffon.project.dependency.resolution = {
inherits("global") { }
log "warn"
repositories {
griffonHome()
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-swingx-plugin:1.1.0'
}
}
我的观点是这样的:
package data.viewer
import java.awt.*
application(title: 'data-viewer',
pack: true,
location: [0,0],
locationByPlatform: true,
iconImage: imageIcon('/griffon-icon-48x48.png').image,
iconImages: [imageIcon('/griffon-icon-48x48.png').image,
imageIcon('/griffon-icon-32x32.png').image,
imageIcon('/griffon-icon-16x16.png').image])
{
panel(){
boxLayout(axis: BoxLayout.Y_AXIS)
jxbutton(text: "Time map")
panel(){
panel(){
label(icon: imageIcon('/europe.jpg'))
}
panel(layout: new GridLayout(10, 1)){
button(text: "Indicatieur1")
}
}
}
}
但我仍然收到错误消息:
sept. 06, 2015 4:01:10 PM groovy.util.FactoryBuilderSupport createNode
AVERTISSEMENT: Could not find match for name 'jxbutton'
groovy.lang.MissingMethodException: No signature of method: java.lang.Object.jxbutton() is applicable for argument types: (java.util.LinkedHashMap, null) values: [[text:Time map], null]
谁能告诉我我在想什么?
bintray/jcenter 提供的 Griffon 插件与 Griffon 1.x 不兼容。这些插件仅适用于 Griffon 2.x (http://griffon-framework.org/)
安装 Griffon 插件 1.x 需要您使用 Griffon Artifact Portal,例如 http://artifacts.griffon-framework.org/plugin/swingx-builder/installation
我已经使用 ItelliJ 设置了一个 Griffon 项目并尝试在视图中使用 SwingX 组件,但我无法让它工作。我的 griffon-app/conf/BuildConfig.groovy
看起来像这样:
griffon.project.dependency.resolution = {
inherits("global") { }
log "warn"
repositories {
griffonHome()
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-swingx-plugin:1.1.0'
}
}
我的观点是这样的:
package data.viewer
import java.awt.*
application(title: 'data-viewer',
pack: true,
location: [0,0],
locationByPlatform: true,
iconImage: imageIcon('/griffon-icon-48x48.png').image,
iconImages: [imageIcon('/griffon-icon-48x48.png').image,
imageIcon('/griffon-icon-32x32.png').image,
imageIcon('/griffon-icon-16x16.png').image])
{
panel(){
boxLayout(axis: BoxLayout.Y_AXIS)
jxbutton(text: "Time map")
panel(){
panel(){
label(icon: imageIcon('/europe.jpg'))
}
panel(layout: new GridLayout(10, 1)){
button(text: "Indicatieur1")
}
}
}
}
但我仍然收到错误消息:
sept. 06, 2015 4:01:10 PM groovy.util.FactoryBuilderSupport createNode
AVERTISSEMENT: Could not find match for name 'jxbutton'
groovy.lang.MissingMethodException: No signature of method: java.lang.Object.jxbutton() is applicable for argument types: (java.util.LinkedHashMap, null) values: [[text:Time map], null]
谁能告诉我我在想什么?
bintray/jcenter 提供的 Griffon 插件与 Griffon 1.x 不兼容。这些插件仅适用于 Griffon 2.x (http://griffon-framework.org/)
安装 Griffon 插件 1.x 需要您使用 Griffon Artifact Portal,例如 http://artifacts.griffon-framework.org/plugin/swingx-builder/installation