Commit Graph

1196 Commits

Author SHA1 Message Date
Manfred Karrer
75a41ee7bc Fix problem caching of OrderBook, but not Buy/Sell views 2014-11-26 22:51:58 +01:00
Manfred Karrer
0d05fcb1f5 Add popup at create sell offer (#293) 2014-11-26 21:55:11 +01:00
Manfred Karrer
5f8f7446e3 Remove ChildView 2014-11-26 21:35:47 +01:00
Manfred Karrer
3b75cc2fd0 Add null checks 2014-11-26 21:10:01 +01:00
Manfred Karrer
33682694ed Change timeout 2014-11-26 21:09:07 +01:00
Manfred Karrer
d562384f73 Fix null check 2014-11-26 21:00:44 +01:00
Chris Beams
58335f036e
Merge branch 'cbeams'
Overview of major changes:

 - Introduce top-level `viewfx` package for general-purpose MVVM-style
   infrastructure classes. Note that this package naming will likely
   change, especially if and when we extract it to a physically-separate
   library.

 - Introduce View and Model class hierarchies that capture the various
   lifecycle and model management concerns throughout the existing
   Bitsquare application (see `viewfx.view` and `viewfx.model` packages)

 - Introduce @FxmlView and FxmlViewLoader to support declarative,
   convention-over-configuration support for FXML-based views.
   Eventually, this approach will allow for seamless mixing of FXML- and
   non-FXML based view implementations within the same application.

 - Introduce a type-safe approach to intra-view navigation: eliminate
   the Navigation.Item enum in favor of navigating directly from one
   view to another using *View class literals. This change is closely
   tied to the @FxmlView approach described above.

Many additional smaller changes are included as well; see individual
commits for details.

* cbeams: (75 commits)
  Rename viewfx.view.support.guice.{Guice=>Injector}ViewFactory
  Use instanceof checks on views instead of class equality
  Add CachingViewLoaderTests
  Revert "Remove System#exit call from BitsquareApp#stop"
  Change signature of ViewLoader#load to accept Class
  Complete implementation and testing of @FxmlView support
  Remove System#exit call from BitsquareApp#stop
  fix checkArgument
  Use irc instead of fiat classes
  Remove hardcoded path from ViewLoaderTests
  Fix conditional logic in AccountView#activate
  Polish AccountSettingsView
  Introduce @FxmlView, replace Navigation.Item
  Begin refactoring Navigation
  Rename enum gui.{Navigation#Item => FxmlView}
  Introduce viewfx.view.support.CachingViewLoader
  Extract ViewLoader interface and introduce FxmlViewLoader
  Fix broken tests and app exceptions due to ViewLoader changes
  Bind ViewFactory interface to GuiceViewFactory impl
  Move i.b.gui.ViewLoader.java => viewfx.view.support.ViewLoader
  ...
2014-11-26 20:02:18 +01:00
Chris Beams
39ee637eda
Rename viewfx.view.support.guice.{Guice=>Injector}ViewFactory 2014-11-25 22:12:36 +01:00
Chris Beams
e887be742d
Use instanceof checks on views instead of class equality 2014-11-25 22:12:35 +01:00
Chris Beams
979fc8aca8
Add CachingViewLoaderTests 2014-11-25 22:12:35 +01:00
Chris Beams
98505246b1
Revert "Remove System#exit call from BitsquareApp#stop"
This reverts commit 78d3da0c4e17ce356905c3b745d9773eb458988e.

Because while eliminating the call to System#exit does mean that
JavaFX's LauncherImpl can properly report errors and stack traces, it
also means that Bitsquare never shuts down (probably due to non-daemon
threads). When System#exit is removed (or replaced with Platform#exit),
closing the Bitsquare window (or clicking Exit from the system tray menu)
results in the application no longer being able to function at the UI
level (because the JavaFX toolkit has essentially been shut down), but
the process does not exit either.

So in the meantime, this change is being reverted, and we just have to
deal with not getting stack traces at the command line when uncaught
exceptions bubble up through the #start method (specifically, exceptions
that occur before the UncaughtExceptionHandler has had a chance to be
set).

A solution to this could be to provide a custom subclass of JavaFX's own
Application class that implements a template #start / #doStart methods
trying and catching anything that is raised from #doStart and printing
the stack trace on its own.
2014-11-25 22:12:34 +01:00
Chris Beams
9041ff3d82
Change signature of ViewLoader#load to accept Class 2014-11-25 22:12:34 +01:00
Chris Beams
4ebc0c0e41
Complete implementation and testing of @FxmlView support 2014-11-25 22:12:33 +01:00
Chris Beams
fe667bc1b2
Remove System#exit call from BitsquareApp#stop
Calling System#exit short-circuits normal error reporting, meaning that
when an exception is called within the scope of executing the
Application's #start method, the message

    Exception in Application start method

is printed to the console, but without a stack trace. Removing the
System#exit call allows JavaFX's LauncherImpl to continue processing the
exception, ultimately printing out the stack trace as expected.
2014-11-25 22:12:33 +01:00
Manfred Karrer
380e8baf58
fix checkArgument 2014-11-25 22:12:32 +01:00
Manfred Karrer
ed83cdbe49
Use irc instead of fiat classes 2014-11-25 22:12:32 +01:00
Chris Beams
63b7e254d7
Remove hardcoded path from ViewLoaderTests 2014-11-25 22:12:32 +01:00
Chris Beams
50046b6adc
Fix conditional logic in AccountView#activate 2014-11-25 22:12:31 +01:00
Chris Beams
fac64807f6
Polish AccountSettingsView 2014-11-25 22:12:31 +01:00
Chris Beams
70d9577e32
Introduce @FxmlView, replace Navigation.Item 2014-11-25 22:12:30 +01:00
Chris Beams
5a5bfd0826
Begin refactoring Navigation 2014-11-25 22:12:30 +01:00
Chris Beams
6de4e63973
Rename enum gui.{Navigation#Item => FxmlView} 2014-11-25 22:12:30 +01:00
Chris Beams
444948f3ca
Introduce viewfx.view.support.CachingViewLoader
... and move view.fxml package to view.support.fxml
2014-11-25 22:12:29 +01:00
Chris Beams
a2c98d9ea3
Extract ViewLoader interface and introduce FxmlViewLoader 2014-11-25 22:12:29 +01:00
Chris Beams
2705e80ef1
Fix broken tests and app exceptions due to ViewLoader changes 2014-11-25 22:12:28 +01:00
Chris Beams
87fb4390c4
Bind ViewFactory interface to GuiceViewFactory impl
This change fixes a test that was breaking in the previous commit.
2014-11-25 22:12:28 +01:00
Chris Beams
e8afdf5e22
Move i.b.gui.ViewLoader.java => viewfx.view.support.ViewLoader 2014-11-25 22:12:27 +01:00
Chris Beams
fcaded1c33
Use ViewFactory interface in favor of GuiceViewFactory impl 2014-11-25 22:12:27 +01:00
Chris Beams
5a75a1aa10
Rename gui.GuiceControllerFactory => viewfx...GuiceViewFactory 2014-11-25 22:12:27 +01:00
Chris Beams
318bfc5fb0
Refactor ViewLoader 2014-11-25 22:12:26 +01:00
Chris Beams
d120dcad06
Rename {mightypork...DesktopApi=>i.b.util.DesktopUtil} 2014-11-25 22:11:57 +01:00
Chris Beams
6495ccd5db
Introduce viewfx subpackages 2014-11-25 22:09:49 +01:00
Chris Beams
b890f37216
Introduce top-level viewfx package
Move general-purpose ui infrastructure to this new package, leaving
what's in io.bitsquare.gui truly specific to Bitsquare.
2014-11-25 22:08:50 +01:00
Chris Beams
1390ce21a8
Reduce visibility of view classes to package-private 2014-11-25 22:08:31 +01:00
Chris Beams
68a1140a6d
Polish whitespace and field ordering in view classes 2014-11-25 22:08:31 +01:00
Chris Beams
349f7dbc51
Expect Node vs. Parent as first View generic param 2014-11-25 22:08:30 +01:00
Chris Beams
604d1c128e
Specify view root node type with generic parameter 2014-11-25 22:08:30 +01:00
Chris Beams
9d484e3f27
Remove section comments from view classes 2014-11-25 22:08:29 +01:00
Chris Beams
0e0cbde27f
Remove unused Logger fields
... note that *View classes now all inherit a protected Logger instance,
so redeclaring in each class is no longer necessary.
2014-11-25 22:08:29 +01:00
Chris Beams
a392d78fc2
Rename NetworkSettingsViewCB => NetworkSettingsView 2014-11-25 22:08:28 +01:00
Chris Beams
4eb1b3994e
Eliminate *CB suffixes on View variable names 2014-11-25 22:08:28 +01:00
Chris Beams
00dce517ee
Rename remaining *Pm.java files => *ViewModel.java 2014-11-25 22:08:27 +01:00
Chris Beams
312b846769
Rename BasicView => AbstractView 2014-11-25 22:08:27 +01:00
Chris Beams
1e59f9bf63
Rename ChildOf => ChildView 2014-11-25 22:08:27 +01:00
Chris Beams
961ec9b317
Rename View => BasicView and extract View interface 2014-11-25 22:08:26 +01:00
Chris Beams
55036b04c6
Rename AccountSetup{View => Wizard} 2014-11-25 22:08:26 +01:00
Chris Beams
693e95391a
Rename Wizard.Step#useSettingsContext => hideWizardNavigation 2014-11-25 22:08:10 +01:00
Chris Beams
d4eb252973
Remove parent field from base View, introduce Wizard
- Replace MultiStepNavigation and ContextAware with Wizard and Wizard.Step
 - Introduce ChildOf interface
 - Eliminate TradeNavigator in favor of depending directly on TradeView
2014-11-25 22:08:09 +01:00
Chris Beams
4ae9868ee5
Move View#TITLE_KEY to MainView 2014-11-25 22:08:08 +01:00
Chris Beams
d02ddd6946
Remove notion of 'childController' from View hierarchy 2014-11-25 22:08:01 +01:00