如何在IntelliJ中使用Griffon Swingx插件?

时间:2015-09-06 14:02:55

标签: intellij-idea groovy griffon

我使用ItelliJ设置了一个Griffon项目并尝试在视图中使用SwingX组件,但我无法使其工作。我的compile-time constant看起来像这样:

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")
            }
        }
    }
}

有人可以告诉我我在想什么吗?

1 个答案:

答案 0 :(得分:1)

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