Hey all,
I am having trouble figuring out how to use
the org.apache.pivot.wtkx.Bindable interface.
Let's say I create a class that extends a container that then reads in a
WTKX file, eg:
MyPanel.java:
public class MyPanel extends Border implements Bindable {
public MyPanel() throws Exception {
WTKXSerializer wtkxSerializer = new WTKXSerializer();
Component content = (Component) wtkxSerializer.readObject(this,
"my-panel.wtkx");
setContent(content);
}
}
Then I can reference this file from the main window very easily using WTKX:
<TabPane>
<tabs>
<me:MyPanel />
</tabs>
</TabPane>
In this situation, Bindable.bind() doesn't get called. My panel class is
constructed but then I have to manually call bind on it. Is there a better
way to get both modularization (being able to use separate wtkx files and
separate panel classes) and also use the Bindable interface?