This commit is contained in:
Manfred Karrer 2015-03-14 09:43:10 +01:00
parent 871db17edf
commit 1b883cf386
62 changed files with 1125 additions and 575 deletions

View file

@ -45,22 +45,22 @@ import javafx.scene.control.*;
* <p>
* ProgressIndicator sets focusTraversable to false.
* </p>
* <p>
* <p>
* <p/>
* <p/>
* This first example creates a ProgressIndicator with an indeterminate value :
* <pre><code>
* import javafx.scene.control.ProgressIndicator;
* ProgressIndicator p1 = new ProgressIndicator();
* </code></pre>
* <p>
* <p>
* <p/>
* <p/>
* This next example creates a ProgressIndicator which is 25% complete :
* <pre><code>
* import javafx.scene.control.ProgressIndicator;
* ProgressIndicator p2 = new ProgressIndicator();
* p2.setProgress(0.25F);
* </code></pre>
* <p>
* <p/>
* Implementation of ProgressIndicator According to JavaFX UI Control API Specification
*
* @since JavaFX 2.0
@ -83,7 +83,7 @@ public class ConfidenceProgressIndicator extends Control {
**************************************************************************/
/**
* Initialize the style class to 'progress-indicator'.
* <p>
* <p/>
* This is the selector class from which CSS can be used to style
* this control.
*/

View file

@ -126,7 +126,6 @@ class IrcAccountViewModel extends ActivatableWithDataModel<IrcAccountDataModel>
}
private InputValidator.ValidationResult validateInput() {
InputValidator.ValidationResult result = nickNameValidator.validate(dataModel.nickName.get());
if (dataModel.currency.get() == null)

View file

@ -50,5 +50,4 @@ class PreferencesViewModel extends ActivatableWithDataModel<PreferencesDataModel
}
}

View file

@ -264,7 +264,6 @@ class CreateOfferDataModel implements Activatable, DataModel {
}
private void updateBalance(@NotNull Coin balance) {
isWalletFunded.set(totalToPayAsCoin.get() != null && balance.compareTo(totalToPayAsCoin.get()) >= 0);
}

View file

@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
/**
* Central point for formatting and input parsing.
* <p>
* <p/>
* Note that we never use for text input values any coin or currency symbol or code.
* BtcFormat does not support
*/

View file

@ -26,7 +26,7 @@ import javax.inject.Inject;
/**
* BtcValidator for validating BTC values.
* <p>
* <p/>
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
*/
public final class BtcAddressValidator extends InputValidator {

View file

@ -25,7 +25,7 @@ import java.math.BigDecimal;
/**
* BtcValidator for validating BTC values.
* <p>
* <p/>
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
*/
public final class BtcValidator extends NumberValidator {

View file

@ -25,7 +25,7 @@ import javax.inject.Inject;
/**
* FiatNumberValidator for validating fiat values.
* <p>
* <p/>
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
*/
public final class FiatValidator extends NumberValidator {

View file

@ -21,7 +21,7 @@ import io.bitsquare.locale.BSResources;
/**
* Base class for other specialized validators.
* <p>
* <p/>
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
*/
public class InputValidator {

View file

@ -24,7 +24,7 @@ import io.bitsquare.locale.BSResources;
* 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.
* <p>
* <p/>
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
*/
public abstract class NumberValidator extends InputValidator {

View file

@ -25,7 +25,7 @@ import java.math.BigDecimal;
/**
* BtcValidator for validating BTC values.
* <p>
* <p/>
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
*/
public final class OptionalBtcValidator extends NumberValidator {

View file

@ -25,7 +25,7 @@ import javax.inject.Inject;
/**
* FiatNumberValidator for validating fiat values.
* <p>
* <p/>
* That class implements just what we need for the moment. It is not intended as a general purpose library class.
*/
public final class OptionalFiatValidator extends NumberValidator {

File diff suppressed because it is too large Load diff

View file

@ -255,7 +255,8 @@ public class Offer implements Serializable {
checkNotNull(getMinAmount(), "MinAmount is null");
checkNotNull(getPrice(), "Price is null");
checkArgument(getMinAmount().compareTo(Restrictions.MIN_TRADE_AMOUNT) >= 0, "MinAmount is less then " + Restrictions.MIN_TRADE_AMOUNT.toFriendlyString());
checkArgument(getMinAmount().compareTo(Restrictions.MIN_TRADE_AMOUNT) >= 0, "MinAmount is less then " + Restrictions.MIN_TRADE_AMOUNT
.toFriendlyString());
checkArgument(getAmount().compareTo(Restrictions.MAX_TRADE_AMOUNT) <= 0, "Amount is larger then " + Restrictions.MAX_TRADE_AMOUNT.toFriendlyString());
checkArgument(getAmount().compareTo(getMinAmount()) >= 0, "MinAmount is larger then Amount");

View file

@ -41,7 +41,9 @@ public class AddOfferToRemoteOfferBook extends Task<PlaceOfferModel> {
(message, throwable) -> {
failed(throwable);
});
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -46,7 +46,9 @@ public class CreateOfferFeeTx extends Task<PlaceOfferModel> {
} catch (Throwable t) {
failed(t);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -40,7 +40,9 @@ public class ValidateOffer extends Task<PlaceOfferModel> {
} catch (Exception e) {
failed(e);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -60,7 +60,9 @@ public class CreateDepositTx extends Task<BuyerAsOffererModel> {
} catch (InsufficientMoneyException e) {
failed(e);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -52,7 +52,9 @@ public class ProcessPayoutTxPublishedMessage extends Task<BuyerAsOffererModel> {
} catch (Throwable t) {
failed(t);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -55,7 +55,9 @@ public class ProcessRequestOffererPublishDepositTxMessage extends Task<BuyerAsOf
} catch (Throwable t) {
failed(t);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -42,7 +42,9 @@ public class ProcessRequestTakeOfferMessage extends Task<BuyerAsOffererModel> {
} catch (Throwable t) {
failed(t);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -51,7 +51,9 @@ public class ProcessTakeOfferFeePayedMessage extends Task<BuyerAsOffererModel> {
} catch (Throwable t) {
failed(t);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -55,7 +55,9 @@ public class SendBankTransferInitedMessage extends Task<BuyerAsOffererModel> {
failed("Sending BankTransferInitedMessage failed.");
}
});
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -52,7 +52,9 @@ public class SendDepositTxIdToTaker extends Task<BuyerAsOffererModel> {
failed("Sending DepositTxPublishedMessage failed.");
}
});
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -55,7 +55,9 @@ public class SendTakerDepositPaymentRequest extends Task<BuyerAsOffererModel> {
failed("RequestTakerDepositPaymentMessage did not arrive at peer");
}
});
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -54,7 +54,9 @@ public class SetupListenerForBlockChainConfirmation extends Task<BuyerAsOffererM
});
complete();
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -66,7 +66,9 @@ public class SignAndPublishDepositTx extends Task<BuyerAsOffererModel> {
} catch (Exception e) {
failed(e);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -61,7 +61,9 @@ public class SignPayoutTx extends Task<BuyerAsOffererModel> {
} catch (Exception e) {
failed(e);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -56,7 +56,9 @@ public class VerifyAndSignContract extends Task<BuyerAsOffererModel> {
trade.setTakerContractSignature(signature);
complete();
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -41,6 +41,7 @@ public class VerifyTakeOfferFeePayment extends Task<BuyerAsOffererModel> {
complete();
}
@Override
protected void rollBackOnFault() {
}

View file

@ -46,7 +46,9 @@ public class VerifyTakerAccount extends Task<BuyerAsOffererModel> {
else {
failed("Account registration validation for peer failed.");
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -55,7 +55,9 @@ public class CreateAndSignContract extends Task<SellerAsTakerModel> {
trade.setTakerContractSignature(signature);
complete();
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -55,7 +55,9 @@ public class PayDeposit extends Task<SellerAsTakerModel> {
} catch (InsufficientMoneyException e) {
failed(e);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -52,7 +52,9 @@ public class ProcessBankTransferInitedMessage extends Task<SellerAsTakerModel> {
} catch (Throwable t) {
failed(t);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -46,7 +46,9 @@ public class ProcessDepositTxPublishedMessage extends Task<SellerAsTakerModel> {
} catch (Throwable t) {
failed(t);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -50,7 +50,9 @@ public class ProcessTakerDepositPaymentRequestMessage extends Task<SellerAsTaker
} catch (Throwable t) {
failed(t);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -48,7 +48,9 @@ public class SendPayoutTxToOfferer extends Task<SellerAsTakerModel> {
failed("Sending PayoutTxPublishedMessage failed.");
}
});
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -67,6 +67,7 @@ public class SendSignedTakerDepositTxAsHex extends Task<SellerAsTakerModel> {
}
});
}
@Override
protected void rollBackOnFault() {
}

View file

@ -71,7 +71,9 @@ public class SignAndPublishPayoutTx extends Task<SellerAsTakerModel> {
} catch (AddressFormatException e) {
failed(e);
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -42,7 +42,9 @@ public class TakerCommitDepositTx extends Task<SellerAsTakerModel> {
model.getTrade().setState(Trade.State.DEPOSIT_PUBLISHED);
complete();
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -39,7 +39,9 @@ public class VerifyOfferFeePayment extends Task<SellerAsTakerModel> {
resultHandler.handleResult();
}*/
complete();
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -44,7 +44,9 @@ public class VerifyOffererAccount extends Task<SellerAsTakerModel> {
else {
failed("Account registration validation for peer faultHandler.onFault.");
}
} @Override
}
@Override
protected void rollBackOnFault() {
}
}

View file

@ -180,8 +180,8 @@ public class Utilities {
/**
* Empty and delete a folder (and subfolders).
* @param folder
* folder to empty
*
* @param folder folder to empty
*/
public static void removeDirectory(final File folder) {
// check if folder file is a real folder

View file

@ -24,7 +24,7 @@ public interface Activatable {
void deactivate();
Activatable NOOP_INSTANCE = new Activatable() {;
Activatable NOOP_INSTANCE = new Activatable() {
@Override
public void activate() {
}

View file

@ -73,9 +73,9 @@ import static org.junit.Assert.*;
/**
* Test bootstrapping, DHT operations like put/get/add/remove and sendDirect in both LAN and WAN environment
* Test scenarios in direct connection, auto port forwarding or relay mode.
* <p>
* <p/>
* To start a bootstrap node code use the {@link io.bitsquare.app.bootstrap.BootstrapNode} class.
* <p>
* <p/>
* To configure your test environment edit the static fields for id, IP and port.
* In the configure method and the connectionType you can define your test scenario.
*/

View file

@ -120,15 +120,11 @@ public class UtilsDHT2 {
* Creates peers for testing. The first peer (peer[0]) will be used as the master. This means that shutting down
* peer[0] will shut down all other peers
*
* @param nrOfPeers
* The number of peers to create including the master
* @param rnd
* The random object to create random peer IDs
* @param port
* The port where the master peer will listen to
* @param nrOfPeers The number of peers to create including the master
* @param rnd The random object to create random peer IDs
* @param port The port where the master peer will listen to
* @return All the peers, with the master peer at position 0 -> peer[0]
* @throws Exception
* If the creation of nodes fail.
* @throws Exception If the creation of nodes fail.
*/
public static PeerDHT[] createNodes(int nrOfPeers, Random rnd, int port, AutomaticFuture automaticFuture,
boolean maintenance) throws Exception {
@ -210,8 +206,7 @@ public class UtilsDHT2 {
* Perfect routing, where each neighbor has contacted each other. This means that for small number of peers, every
* peer knows every other peer.
*
* @param peers
* The peers taking part in the p2p network.
* @param peers The peers taking part in the p2p network.
*/
public static void perfectRouting(PeerDHT... peers) {
for (int i = 0; i < peers.length; i++) {

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.bitsquare</groupId>