From fce7b0a6b0dfbea140eadaba7faa0be6d511fcb9 Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Thu, 7 Dec 2017 11:41:45 +0100 Subject: [PATCH 1/3] Update wrong package path --- doc/ui-development-notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ui-development-notes.md b/doc/ui-development-notes.md index b92c86b6f7..5034cc58b6 100644 --- a/doc/ui-development-notes.md +++ b/doc/ui-development-notes.md @@ -11,7 +11,7 @@ That interpretation is also confirmed by the Java FX reference: "A controller is The described pattern is only applied yet to that package: -io.bisq.gui.trade.createoffer; +io.bisq.gui.main.offer.createoffer; For prototyping the UI we stick first with a more rapid development style approach. @@ -95,4 +95,4 @@ Does not know the PM and View/CB [Presentation Model](http://martinfowler.com/eaaDev/PresentationModel.html) [Model View ViewModel - MVVM](http://msdn.microsoft.com/en-us/magazine/dd419663.aspx) [Java FX FXML controllers] -(http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#controllers) \ No newline at end of file +(http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#controllers) From dcf91619d428cbbcc544f501b96174ced6ebc70c Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Thu, 7 Dec 2017 11:58:41 +0100 Subject: [PATCH 2/3] Fix markdown formatting --- doc/ui-development-notes.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/ui-development-notes.md b/doc/ui-development-notes.md index b92c86b6f7..099c056b39 100644 --- a/doc/ui-development-notes.md +++ b/doc/ui-development-notes.md @@ -15,13 +15,13 @@ io.bisq.gui.trade.createoffer; For prototyping the UI we stick first with a more rapid development style approach. -###Elements +### Elements * View * CodeBehind (CB) * Presentation Model (PM) * Model -#####Overview: +##### Overview: * View/CB is responsible for the visual representation. No logic. No state. * Presentation model holds the view/CB state. * Presentation model handles view specific logic. @@ -29,12 +29,12 @@ For prototyping the UI we stick first with a more rapid development style approa * Model is the domain specific representation of the view. It holds domain data and handles domain logic. -###View +### View Typically FXML is used. It knows the CodeBehind (fx:controller) -#####Responsibility: +##### Responsibility: * Defines visible parts of the UI * Define UI element properties * Layout @@ -42,7 +42,7 @@ It knows the CodeBehind (fx:controller) * Event handler definition -###CodeBehind (CB) +### CodeBehind (CB) It is conceptually part of the view layer. It adds functionality which cannot be expressed in the declarative FXML format. It is the JavaFX controller associated with the FXML view, but we don't use the term controller as it has too much @@ -51,7 +51,7 @@ setup with the FXML view is done by the framework. It knows the presentation model (via Guice injection) but not the model. -#####Responsibility: +##### Responsibility: * Setup binding for updates from PM to view elements (also bidirectional for used for input data). * Those binding are only simple bindings to plain presenter properties, no logical bindings. * Listens to UI events (Actions) from UI controls and calls method in presentation model. @@ -62,13 +62,13 @@ It knows the presentation model (via Guice injection) but not the model. * Has **no logic** and **no state**! -###Presentation model (PM) +### Presentation model (PM) It is the abstraction/presentation of the view. Can be used for unit testing. It knows the model (via Guice injection) but it does not know the CodeBehind (View) -#####Responsibility: +##### Responsibility: * Holds the state of the view/CB * Formats domain data to the needed representation for the view/CB. * Receive user input via method calls from CodeBehind. @@ -76,7 +76,7 @@ It knows the model (via Guice injection) but it does not know the CodeBehind (Vi * Listen to updates from model via bindings. -###Data model +### Data model Represents the domain scope which is handled by the view. Is interface to application domain objects. We use Guice for dependency injection of the application domain objects. @@ -84,7 +84,7 @@ Can be used for unit testing. Does not know the PM and View/CB -#####Responsibility: +##### Responsibility: * Holds domain data for that view * Apply domain business logic * Interacts with application domain objects @@ -95,4 +95,4 @@ Does not know the PM and View/CB [Presentation Model](http://martinfowler.com/eaaDev/PresentationModel.html) [Model View ViewModel - MVVM](http://msdn.microsoft.com/en-us/magazine/dd419663.aspx) [Java FX FXML controllers] -(http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#controllers) \ No newline at end of file +(http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#controllers) From 7b25a1b9043cb9a400516844b7b171f0805a71c3 Mon Sep 17 00:00:00 2001 From: "Dmitry Ulanov (aka dulanov)" Date: Thu, 7 Dec 2017 17:38:24 +0100 Subject: [PATCH 3/3] Absent of market column custom comparator in `OfferBookView` Related to #588. --- .../java/io/bisq/gui/main/offer/offerbook/OfferBookView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java index e6d3634aa2..4b47b23a6f 100644 --- a/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java +++ b/gui/src/main/java/io/bisq/gui/main/offer/offerbook/OfferBookView.java @@ -173,6 +173,11 @@ public class OfferBookView extends ActivatableViewAndModel { + String str1 = formatter.getCurrencyPair(o1.getOffer().getCurrencyCode()); + String str2 = formatter.getCurrencyPair(o2.getOffer().getCurrencyCode()); + return str1 != null && str2 != null ? str1.compareTo(str2) : 0; + }); priceColumn.setComparator((o1, o2) -> { Price price1 = o1.getOffer().getPrice(); Price price2 = o2.getOffer().getPrice();