현재 Griffon 0.9.5와 FlamingoBuilder으로 애플리케이션을 만들려고합니다.Griffon에서 FlamingoBuilder로 리본을 만드는 방법은 무엇입니까?
은 내가 'org.jvnet.flamingo.ribbon.JRibbonFrame'
에 Application.groovy에 frameClass
의 값을 변경하고 응용 프로그램 창에 리본을 추가하기 위해 몇 가지를 시도했습니다.
첫 번째 시도는 노드 ribbonBand
개가 중첩 된 ribbonTask
노드를 만드는 것이 었습니다. 응용 프로그램은 시작되지만 단추는 표시되지 않습니다. 내가 명시 적으로 RibbonTask
을 만들고 addTask
를 호출 내 두 번째 시도에서
application(title: 'test01',
preferredSize: [320, 240],
pack: true,
locationByPlatform: true,
iconImage: imageIcon('/griffon-icon-48x48.png').image,
{
ribbonTask(title: 'Start') {
ribbonBand(id: 'fooBarBand', title: 'FooBar', image: imageIcon('/griffon-icon-48x48.png').image) {
commandButton(id: 'fooButton', text: 'Foo', image: imageIcon('/griffon-icon-48x48.png').image)
commandButton(id: 'barButton', text: 'Bar', image: imageIcon('/griffon-icon-48x48.png').image)
}
}
// add content here
label('Content Goes Here') // delete me
}
)
. 단추가 표시됩니다. 그러나 이것이 실제로 그리폰 (Griffon) 방식 일지는 확실하지 않습니다.
질문 : 리본을 만드는 더 좋은 방법이 있습니까?
application(title: 'test01',
preferredSize: [320, 240],
pack: true,
locationByPlatform: true,
iconImage: imageIcon('/griffon-icon-48x48.png').image,
{
ribbonBand(id: 'fooBarBand', title: 'FooBar', image: imageIcon('/griffon-icon-48x48.png').image) {
commandButton(id: 'fooButton', text: 'Foo', image: imageIcon('/griffon-icon-48x48.png').image)
commandButton(id: 'barButton', text: 'Bar', image: imageIcon('/griffon-icon-48x48.png').image)
}
current.ribbon.addTask new RibbonTask('Start', fooBarBand)
// add content here
label('Content Goes Here') // delete me
}
)
나는 다음 코드와
ribbonApplicationMenu
을 추가하는 시도 :
ribbonApplicationMenu(id: 'appMenu') {
ribbonApplicationMenuEntryPrimary(id: 'quitMenuEntry', text: 'Quit',
entryKind: JCommandButton.CommandButtonKind.ACTION_ONLY,
image: imageIcon('/griffon-icon-48x48.png').image)
}
그러나, 그것은 작동하지 않습니다.
java.lang.RuntimeException가이 : groovy.lang.MissingPropertyException : 'ribbonApplicationMenuEntryPrimary'이유로 구성 요소를 만들 수 없습니다 나는 다음과 같은 런타임 예외를 얻을 그러한 특성 : 텍스트를 클래스 : griffon.builder를 .flamingo.factory.RibbonApplicationMenuEntryPrimaryFactory
거기text
속성입니다 내가 텍스트 속성을 제거 할 때text
속성을 설정해야하기 때문에 내가 예외를 얻을
documentation of FlamingoBuilder 상태. 나는 약간의 상실감이있다. 이 코드 스 니펫의 문제점은 무엇입니까?
설명해 주셔서 감사합니다. [Insubstancial 7.1]에서 Flamingo를 지원할 계획입니까 (http://insubstantial.posterous.com/insubstantial-71-release)? 나는 이미 FlamingoBuilder를 포크로 만들고 그 일을 직접 해보았 다. –
맞습니다. 공작 (Insubstancial 출신)이가는 길입니다. FlamingoBuilder는 https://github.com/griffon/flamingobuilder에서 요청됩니다. 요청을 환영합니다 .-) – aalmiray