Reputation: 12523
I'm working on a Desktop JavaFX 2 application. We're using FXML, an MVC architecture to build a tabbed UI. Now I'm struggling to find an elegant way for this scenario:
Would it be suitable to implement a class similar to GWT's com.google.gwt.user.client.History
, handling all navigation request. First I'd have to register the main view. Or am I overseeing a JavaFX mechanism?
Upvotes: 1
Views: 894
Reputation: 159536
I implemented a tabbed web browser with history management which sounds a bit similar to your situation. The code is a bit of a mess, but you could look through it if you like to see if there is anything worthwhile there which is applicable to your situation.
For the next release (2.2) of JavaFX there will be a generic pagination control (anybody can register at that link to view the issue) which will probably help encapsulate some of the functionality you require as it mentions TabPane like functionality.
There has also been some discussion of JavaFX history functionality on the open-jfx development mailing list.
The jfx-flow project was created to enable weblike interfaces (e.g. views with history navigation) on JavaFX. Not sure if it's completely developed for your use case, but you could take a look at that too.
Upvotes: 1