2010-11-17 57 views
3

我剛剛開始使用Google的(現在免費的)WindowBuilder(之前的實例化)創建SWT/JFace應用程序。使用SWT/JFace與WindowBuilder進行數據綁定的資源

我發現數據綁定部分很難,儘管它應該讓我更容易。

例如,我不能將按鈕的啓用屬性綁定到(我自己定義的)布爾函數。

是否有關於使用WindowBuilder GUI和/或數據綁定原理的任何資源(演示,文本,教程,示例)?

google pageinstantiations page找到的信息沒有幫助我足夠。

+0

我試着添加一個WindowBuilder標籤,但不能這樣做,因爲我沒有1500個代表。 – Roalt 2010-11-17 14:15:34

+0

@Boris Pavlovic:謝謝! – Roalt 2010-11-17 14:51:17

回答

1

對於它的價值:

bindingContext.bindValue(
    new ComputedValue() { 
     public Object calculate() { 
     // calculate the enablement using the value of other, previously 
     // created observables. 
     } 
    }, 
    WidgetProperties.enabled().observe(theButton) 
); 

Eclipse新聞組是一個偉大的地方要問這些問題。試試eclipse.platform.jface newsgroup