From 1955250ae8ecfb1a0da5cd17265eedef71773732 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 26 Aug 2014 17:36:59 +0200 Subject: [PATCH] Apply formatting to strip trailing whitespace --- src/main/java/io/bitsquare/SeedNode.java | 2 +- src/main/java/io/bitsquare/di/GuiceFXMLLoader.java | 2 +- .../gui/components/ValidatingTextField.java | 2 +- .../confidence/ConfidenceProgressIndicator.java | 12 ++++++------ .../trade/createoffer/CreateOfferCodeBehind.java | 11 +++++------ .../gui/trade/createoffer/CreateOfferModel.java | 2 +- .../trade/createoffer/CreateOfferPresenter.java | 14 +++++++------- .../java/io/bitsquare/gui/util/BtcValidator.java | 2 +- .../java/io/bitsquare/gui/util/FiatValidator.java | 2 +- .../io/bitsquare/gui/util/NumberValidator.java | 2 +- src/main/java/io/bitsquare/msg/MessageFacade.java | 2 +- .../offerer/ProtocolForOffererAsBuyer.java | 4 ++-- 12 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/main/java/io/bitsquare/SeedNode.java b/src/main/java/io/bitsquare/SeedNode.java index 2ed67d65a6..16f2ff4797 100644 --- a/src/main/java/io/bitsquare/SeedNode.java +++ b/src/main/java/io/bitsquare/SeedNode.java @@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory; /** * Well known node which is reachable for all peers for bootstrapping. * There will be several SeedNodes running on several servers. - *

+ *

* TODO: Alternative bootstrap methods will follow later (save locally list of known nodes reported form other peers...) */ public class SeedNode extends Thread { diff --git a/src/main/java/io/bitsquare/di/GuiceFXMLLoader.java b/src/main/java/io/bitsquare/di/GuiceFXMLLoader.java index 8344952bb2..ff40d7af19 100644 --- a/src/main/java/io/bitsquare/di/GuiceFXMLLoader.java +++ b/src/main/java/io/bitsquare/di/GuiceFXMLLoader.java @@ -103,7 +103,7 @@ public class GuiceFXMLLoader { * A JavaFX controller factory for constructing controllers via Guice DI. To * install this in the {@link javafx.fxml.FXMLLoader}, pass it as a parameter to * {@link javafx.fxml.FXMLLoader#setControllerFactory(javafx.util.Callback)}. - *

+ *

* Once set, make sure you do not use the static methods on * {@link javafx.fxml.FXMLLoader} when creating your JavaFX node. */ diff --git a/src/main/java/io/bitsquare/gui/components/ValidatingTextField.java b/src/main/java/io/bitsquare/gui/components/ValidatingTextField.java index 8851376ede..bd48d0c436 100644 --- a/src/main/java/io/bitsquare/gui/components/ValidatingTextField.java +++ b/src/main/java/io/bitsquare/gui/components/ValidatingTextField.java @@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory; * TextField with validation support. Validation is executed on the Validator object. * In case of a invalid result we display a error message with a PopOver. * The position is derived from the textField or if set from the errorPopupLayoutReference object. - *

+ *

* That class implements just what we need for the moment. It is not intended as a general purpose library class. */ public class ValidatingTextField extends TextField { diff --git a/src/main/java/io/bitsquare/gui/components/confidence/ConfidenceProgressIndicator.java b/src/main/java/io/bitsquare/gui/components/confidence/ConfidenceProgressIndicator.java index 78ff21dfcf..2ee2c3d916 100644 --- a/src/main/java/io/bitsquare/gui/components/confidence/ConfidenceProgressIndicator.java +++ b/src/main/java/io/bitsquare/gui/components/confidence/ConfidenceProgressIndicator.java @@ -43,22 +43,22 @@ import javafx.scene.control.*; *

* ProgressIndicator sets focusTraversable to false. *

- *

- *

+ *

+ *

* This first example creates a ProgressIndicator with an indeterminate value : *


  * import javafx.scene.control.ProgressIndicator;
  * ProgressIndicator p1 = new ProgressIndicator();
  * 
- *

- *

+ *

+ *

* This next example creates a ProgressIndicator which is 25% complete : *


  * import javafx.scene.control.ProgressIndicator;
  * ProgressIndicator p2 = new ProgressIndicator();
  * p2.setProgress(0.25F);
  * 
- *

+ *

* Implementation of ProgressIndicator According to JavaFX UI Control API Specification * * @since JavaFX 2.0 @@ -81,7 +81,7 @@ public class ConfidenceProgressIndicator extends Control { **************************************************************************/ /** * Initialize the style class to 'progress-indicator'. - *

+ *

* This is the selector class from which CSS can be used to style * this control. */ diff --git a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferCodeBehind.java b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferCodeBehind.java index bded89622c..5202ee5ffe 100644 --- a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferCodeBehind.java +++ b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferCodeBehind.java @@ -41,20 +41,20 @@ import org.slf4j.LoggerFactory; /** * Code behind (FXML Controller is part of View, not a classical controller from MVC): - *

+ *

* Creates Presenter and passes Model from DI to Presenter. Does not hold a reference to Model - *

+ *

* - Setup binding from Presenter to View elements (also bidirectional - Inputs). Binding are only to presenters * properties, not logical bindings or cross-view element bindings. * - Listen to UI events (Action) from View and call method in Presenter. * - Is entry node for hierarchical view graphs. Passes method calls to Presenter. Calls methods on sub views. * - Handle lifecycle and self removal from scene graph. * - Non declarative (dynamic) view definitions (if it gets larger, then user a ViewBuilder) - *

+ *

* View: * - Mostly declared in FXML. Dynamic parts are declared in Controller. If more view elements need to be defined in * code then use ViewBuilder. - *

+ *

* Optional ViewBuilder: * - Replacement for FXML view definitions. */ @@ -211,7 +211,7 @@ public class CreateOfferCodeBehind extends CachedViewController { transactionIdTextField.visibleProperty().bind(viewModel.isOfferPlacedScreen); */ - // TODO + // TODO /* placeOfferButton.disableProperty().bind(amountTextField.isValidProperty() .and(minAmountTextField.isValidProperty()) .and(volumeTextField.isValidProperty()) @@ -294,4 +294,3 @@ public class CreateOfferCodeBehind extends CachedViewController { }*/ } - \ No newline at end of file diff --git a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferModel.java b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferModel.java index 63b9f2b3d9..1515a81b90 100644 --- a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferModel.java +++ b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferModel.java @@ -55,7 +55,7 @@ import static com.google.common.base.Preconditions.checkArgument; * Model: * Does not know the Presenter and View (CodeBehind) * Use Guice for DI - *

+ *

* - Holds domain data * - Use Properties for bindable data */ diff --git a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferPresenter.java b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferPresenter.java index 3e34ce1265..ccd16d2fee 100644 --- a/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferPresenter.java +++ b/src/main/java/io/bitsquare/gui/trade/createoffer/CreateOfferPresenter.java @@ -43,11 +43,11 @@ import static javafx.beans.binding.Bindings.createStringBinding; /** * Presenter: * Knows Model, does not know the View (CodeBehind) - *

+ *

* - Holds data and state of the View (formatted) - * - Receive view input from Controller. Validates input, apply business logic, format to Presenter properties and + * - Receive view input from Controller. Validates input, apply business logic, format to Presenter properties and * convert input to Model. - * - Listen to updates from Model, apply business logic and format it to Presenter properties. Model update handling + * - Listen to updates from Model, apply business logic and format it to Presenter properties. Model update handling * can be done via Binding. */ class CreateOfferPresenter { @@ -102,7 +102,7 @@ class CreateOfferPresenter { collateralLabel.bind(Bindings.createStringBinding(() -> "Collateral (" + BSFormatter.formatCollateralPercent (model.collateralAsLong.get()) + "):", model.collateralAsLong)); - bankAccountType.bind(Bindings.createStringBinding(() -> Localisation.get(model.bankAccountType.get()), + bankAccountType.bind(Bindings.createStringBinding(() -> Localisation.get(model.bankAccountType.get()), model.bankAccountType)); bankAccountCurrency.bind(model.bankAccountCurrency); bankAccountCounty.bind(model.bankAccountCounty); @@ -166,7 +166,7 @@ class CreateOfferPresenter { placeOfferButtonVisible.set(true); } - + /* { isOfferPlacedScreen.set(true); @@ -185,7 +185,7 @@ class CreateOfferPresenter { } /////////////////////////////////////////////////////////////////////////////////////////// - // + // /////////////////////////////////////////////////////////////////////////////////////////// private boolean inputValid() { @@ -249,7 +249,7 @@ class CreateOfferPresenter { if (model.collateralAsCoin != null) { model.totalToPayAsCoin.set(model.collateralAsCoin.add(model.totalFeesAsCoin)); - totalToPay.bind(createStringBinding(() -> formatBtcWithCode(model.totalToPayAsCoin.get()), + totalToPay.bind(createStringBinding(() -> formatBtcWithCode(model.totalToPayAsCoin.get()), model.totalToPayAsCoin)); } } diff --git a/src/main/java/io/bitsquare/gui/util/BtcValidator.java b/src/main/java/io/bitsquare/gui/util/BtcValidator.java index 2d836cb871..75dc8bebbb 100644 --- a/src/main/java/io/bitsquare/gui/util/BtcValidator.java +++ b/src/main/java/io/bitsquare/gui/util/BtcValidator.java @@ -26,7 +26,7 @@ import org.slf4j.LoggerFactory; /** * BtcValidator for validating BTC values. - *

+ *

* That class implements just what we need for the moment. It is not intended as a general purpose library class. */ public class BtcValidator extends NumberValidator { diff --git a/src/main/java/io/bitsquare/gui/util/FiatValidator.java b/src/main/java/io/bitsquare/gui/util/FiatValidator.java index cd0c1a01de..8e44838c14 100644 --- a/src/main/java/io/bitsquare/gui/util/FiatValidator.java +++ b/src/main/java/io/bitsquare/gui/util/FiatValidator.java @@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory; /** * FiatNumberValidator for validating fiat values. - *

+ *

* That class implements just what we need for the moment. It is not intended as a general purpose library class. */ public class FiatValidator extends NumberValidator { diff --git a/src/main/java/io/bitsquare/gui/util/NumberValidator.java b/src/main/java/io/bitsquare/gui/util/NumberValidator.java index e5597ddd1b..d8f671c1dd 100644 --- a/src/main/java/io/bitsquare/gui/util/NumberValidator.java +++ b/src/main/java/io/bitsquare/gui/util/NumberValidator.java @@ -25,7 +25,7 @@ import org.slf4j.LoggerFactory; * Localisation not supported at the moment * The decimal mark can be either "." or ",". Thousand separators are not supported yet, * but might be added alter with Local support. - *

+ *

* That class implements just what we need for the moment. It is not intended as a general purpose library class. */ public abstract class NumberValidator { diff --git a/src/main/java/io/bitsquare/msg/MessageFacade.java b/src/main/java/io/bitsquare/msg/MessageFacade.java index 4d0de8f905..28e23a5653 100644 --- a/src/main/java/io/bitsquare/msg/MessageFacade.java +++ b/src/main/java/io/bitsquare/msg/MessageFacade.java @@ -67,7 +67,7 @@ import org.slf4j.LoggerFactory; * It is the translating domain specific functionality to the messaging layer. * The TomP2P library codebase shall not be used outside that facade. * That way we limit the dependency of the TomP2P library only to that class (and it's sub components). - *

+ *

* TODO: improve callbacks that Platform.runLater is not necessary. We call usually that methods form teh UI thread. */ public class MessageFacade implements MessageBroker { diff --git a/src/main/java/io/bitsquare/trade/protocol/offerer/ProtocolForOffererAsBuyer.java b/src/main/java/io/bitsquare/trade/protocol/offerer/ProtocolForOffererAsBuyer.java index 4a97445417..e1ea294982 100644 --- a/src/main/java/io/bitsquare/trade/protocol/offerer/ProtocolForOffererAsBuyer.java +++ b/src/main/java/io/bitsquare/trade/protocol/offerer/ProtocolForOffererAsBuyer.java @@ -50,9 +50,9 @@ import static io.bitsquare.util.Validator.*; /** * Responsible for the correct execution of the sequence of tasks, message passing to the peer and message processing * from the peer. - *

+ *

* This class handles the role of the offerer as the Bitcoin buyer. - *

+ *

* It uses sub tasks to not pollute the main class too much with all the async result/fault handling. * Any data from incoming messages need to be validated before further processing. */