Ideally, you shouldn't have to duplicate any code - you would just extend TerraFileBrowserSheetSkin and add your content to the existing table pane. Unfortunately, TerraFileBrowserSheetSkin doesn't currently provide access to that, so you'll need to modify it. But if you commit that change before 2.0.1 is released then you wouldn't need to ship your app with the modified version.
On Sep 26, 2011, at 6:50 PM, Roger and Beth Whitcomb wrote: > Do you think I would have to duplicate all the TerraFileBrowserSheetSkin.java > code or simply enough to load a custom BXML file? > > On 9/26/11 2:37 PM, Greg Brown wrote: >> You are correct that simply adding the field to the sheet won't work. The >> skin, which is responsible for laying out the control, won't know what to do >> with it and will ignore it. >> >> You may be able to do this by defining a custom skin, though. I don't >> remember exactly how TerraFileBrowserSheet lays out its content at the >> moment, but it should be fairly obvious from the code (it is probably a >> TablePane). If so, you might be able to add a new row/cell to hold your list >> button. >> >> G >> >> On Sep 26, 2011, at 5:26 PM, Roger and Beth Whitcomb wrote: >> >>> I need to be able to specify a character set encoding when opening a file, >>> so I was thinking I would put a ListButton with some of the choices at the >>> bottom of a FileBrowserSheet. But, it doesn't look like the simple thing >>> of just adding the ListButton component to the FileBrowserSheet object >>> (with Sheet.add(xxx)) is going to work. So, would I have to basically >>> implement my own component, subclassing FileBrowser in order to do this? >>> Or am I missing something obvious? >>> >>> Thanks, >>> Roger Whitcomb >> >>
