Polish whitespace

Run "Reformat code" and "Optimize Imports" from within IDEA, cleaning up
trailing whitespace and other issues.
This commit is contained in:
Chris Beams 2014-11-09 22:13:17 +01:00
parent dfbe6973e7
commit 017ebb3f38
No known key found for this signature in database
GPG key ID: 3D214F8F5BC5ED73
9 changed files with 72 additions and 68 deletions

View file

@ -93,7 +93,9 @@ public class AppModule extends BitsquareModule {
return new TradeModule(properties); return new TradeModule(properties);
} }
protected OfferModule offerModule() { return new TomP2POfferModule(properties); } protected OfferModule offerModule() {
return new TomP2POfferModule(properties);
}
@Override @Override
protected void doClose(Injector injector) { protected void doClose(Injector injector) {

View file

@ -26,17 +26,17 @@ lower gradient color on tab: dddddd
-bs-error-red: #dd0000; -bs-error-red: #dd0000;
-fx-accent: #0f87c3; -fx-accent: #0f87c3;
-fx-default-button: derive(-fx-accent,95%); -fx-default-button: derive(-fx-accent, 95%);
-fx-focus-color: -fx-accent; -fx-focus-color: -fx-accent;
-fx-faint-focus-color: #0f87c322; -fx-faint-focus-color: #0f87c322;
-fx-selection-bar: derive(-fx-accent,50%); -fx-selection-bar: derive(-fx-accent, 50%);
} }
/* Splash */ /* Splash */
#splash { #splash {
-fx-background-color: #ffffff; -fx-background-color: #ffffff;
} }
#splash-error-state-msg { #splash-error-state-msg {
-fx-text-fill: -bs-error-red; -fx-text-fill: -bs-error-red;
} }
@ -55,7 +55,6 @@ lower gradient color on tab: dddddd
-fx-font-size: 18; -fx-font-size: 18;
} }
/* Main navigation */ /* Main navigation */
#nav-button { #nav-button {
-fx-cursor: hand; -fx-cursor: hand;
@ -81,11 +80,13 @@ lower gradient color on tab: dddddd
-fx-alignment: center; -fx-alignment: center;
-fx-background-color: #dddddd; -fx-background-color: #dddddd;
} }
#nav-alert-label { #nav-alert-label {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 11; -fx-font-size: 11;
-fx-text-fill: white; -fx-text-fill: white;
} }
.text-field:readonly { .text-field:readonly {
-fx-text-fill: #000000; -fx-text-fill: #000000;
-fx-background-color: #FAFAFA; -fx-background-color: #FAFAFA;
@ -115,7 +116,6 @@ lower gradient color on tab: dddddd
-fx-text-fill: black; -fx-text-fill: black;
} }
/******************************************************************************* /*******************************************************************************
* * * *
* Tooltip * * Tooltip *
@ -129,11 +129,10 @@ lower gradient color on tab: dddddd
-fx-background-radius: 6px; -fx-background-radius: 6px;
-fx-background-insets: 0; -fx-background-insets: 0;
-fx-padding: 0.667em 0.75em 0.667em 0.75em; /* 10px */ -fx-padding: 0.667em 0.75em 0.667em 0.75em; /* 10px */
-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.5) , 10, 0.0 , 0 , 3 ); -fx-effect: dropshadow(three-pass-box, rgba(0, 0, 0, 0.5), 10, 0.0, 0, 3);
-fx-font-size: 0.85em; -fx-font-size: 0.85em;
} }
/* Same style like non editable textfield. But textfield spans a whole column in a grid, so we use generally /* Same style like non editable textfield. But textfield spans a whole column in a grid, so we use generally
textfield */ textfield */
#label-with-background { #label-with-background {
@ -146,6 +145,7 @@ textfield */
-fx-cursor: hand; -fx-cursor: hand;
-fx-text-fill: -fx-accent; -fx-text-fill: -fx-accent;
} }
#address-text-field:hover { #address-text-field:hover {
-fx-text-fill: black; -fx-text-fill: black;
} }
@ -211,8 +211,6 @@ textfield */
-fx-fill: black; -fx-fill: black;
} }
#form-header-text { #form-header-text {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 14; -fx-font-size: 14;
@ -277,26 +275,24 @@ textfield */
-fx-text-fill: red; -fx-text-fill: red;
} }
/* Account */ /* Account */
#content-pane-top { #content-pane-top {
-fx-background-color: -fx-background-color: #cfcfcf,
#cfcfcf,
linear-gradient(#cfcfcf 0%, #b5b5b5 100%), linear-gradient(#cfcfcf 0%, #b5b5b5 100%),
linear-gradient(#d3d3d3 0%, -bs-bg-grey 100%); linear-gradient(#d3d3d3 0%, -bs-bg-grey 100%);
-fx-background-insets: 0 0 0 0,0,1; -fx-background-insets: 0 0 0 0, 0, 1;
} }
#info-icon-label { #info-icon-label {
-fx-font-size:16; -fx-font-size: 16;
-fx-text-fill: #333000; -fx-text-fill: #333000;
} }
/* Create offer */ /* Create offer */
#direction-icon-label { #direction-icon-label {
-fx-font-weight:bold; -fx-font-weight: bold;
-fx-font-size:16; -fx-font-size: 16;
-fx-text-fill: -bs-grey; -fx-text-fill: -bs-grey;
} }
@ -328,18 +324,19 @@ textfield */
-fx-background-color: #f4f4f4; -fx-background-color: #f4f4f4;
} }
/* Account setup */ /* Account setup */
#wizard-title-deactivated { #wizard-title-deactivated {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 16; -fx-font-size: 16;
-fx-text-fill: #999999; -fx-text-fill: #999999;
} }
#wizard-title-active { #wizard-title-active {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 16; -fx-font-size: 16;
-fx-text-fill: #333333; -fx-text-fill: #333333;
} }
#wizard-title-completed { #wizard-title-completed {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 16; -fx-font-size: 16;
@ -349,9 +346,11 @@ textfield */
#wizard-sub-title-deactivated { #wizard-sub-title-deactivated {
-fx-text-fill: #999999; -fx-text-fill: #999999;
} }
#wizard-sub-title-active { #wizard-sub-title-active {
-fx-text-fill: #333333; -fx-text-fill: #333333;
} }
#wizard-sub-title-completed { #wizard-sub-title-completed {
-fx-text-fill: #333333; -fx-text-fill: #333333;
} }
@ -366,6 +365,7 @@ textfield */
-fx-background-insets: 0 0 -1 0, 0, 1, 2; -fx-background-insets: 0 0 -1 0, 0, 1, 2;
-fx-background-radius: 3px, 3px, 2px, 1px; -fx-background-radius: 3px, 3px, 2px, 1px;
} }
#wizard-item-background-active { #wizard-item-background-active {
-fx-body-color: linear-gradient(to bottom, #f1f6f7, #e7f5f9); -fx-body-color: linear-gradient(to bottom, #f1f6f7, #e7f5f9);
-fx-outer-border: linear-gradient(to bottom, #b5e1ef, #6aa4b6); -fx-outer-border: linear-gradient(to bottom, #b5e1ef, #6aa4b6);
@ -388,19 +388,19 @@ textfield */
-fx-background-radius: 3px, 3px, 2px, 1px; -fx-background-radius: 3px, 3px, 2px, 1px;
} }
/* Account settings */ /* Account settings */
#wizard-title-disabled { #wizard-title-disabled {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 16; -fx-font-size: 16;
-fx-text-fill: #999999; -fx-text-fill: #999999;
} }
#wizard-title-active { #wizard-title-active {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 16; -fx-font-size: 16;
-fx-text-fill: #333333; -fx-text-fill: #333333;
} }
#wizard-title-selected { #wizard-title-selected {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 16; -fx-font-size: 16;
@ -440,7 +440,6 @@ textfield */
-fx-background-radius: 3px, 3px, 2px, 1px; -fx-background-radius: 3px, 3px, 2px, 1px;
} }
/* TitledGroupBg */ /* TitledGroupBg */
#titled-group-bg-label { #titled-group-bg-label {
-fx-font-weight: bold; -fx-font-weight: bold;
@ -448,12 +447,14 @@ textfield */
-fx-text-fill: -bs-grey; -fx-text-fill: -bs-grey;
-fx-background-color: #f4f4f4; -fx-background-color: #f4f4f4;
} }
#titled-group-bg-label-active { #titled-group-bg-label-active {
-fx-font-weight: bold; -fx-font-weight: bold;
-fx-font-size: 14; -fx-font-size: 14;
-fx-text-fill: -fx-accent; -fx-text-fill: -fx-accent;
-fx-background-color: #f4f4f4; -fx-background-color: #f4f4f4;
} }
#titled-group-bg { #titled-group-bg {
-fx-body-color: linear-gradient(to bottom, #f4f4f4, #F0F0F0); -fx-body-color: linear-gradient(to bottom, #f4f4f4, #F0F0F0);
-fx-outer-border: linear-gradient(to bottom, #dddddd, #ccc); -fx-outer-border: linear-gradient(to bottom, #dddddd, #ccc);
@ -464,6 +465,7 @@ textfield */
-fx-background-insets: 0 0 -1 0, 0, 1, 2; -fx-background-insets: 0 0 -1 0, 0, 1, 2;
-fx-background-radius: 3px, 3px, 2px, 1px; -fx-background-radius: 3px, 3px, 2px, 1px;
} }
#titled-group-bg-active { #titled-group-bg-active {
-fx-body-color: linear-gradient(to bottom, #f4f4f4, #F0F0F0); -fx-body-color: linear-gradient(to bottom, #f4f4f4, #F0F0F0);
-fx-outer-border: linear-gradient(to bottom, #9bbdc9, #57acc9); -fx-outer-border: linear-gradient(to bottom, #9bbdc9, #57acc9);
@ -475,8 +477,6 @@ textfield */
-fx-background-radius: 3px, 3px, 2px, 1px; -fx-background-radius: 3px, 3px, 2px, 1px;
} }
/* TitledSeparator */ /* TitledSeparator */
#titled-separator:horizontal .line { #titled-separator:horizontal .line {
-fx-border-color: transparent #f4f4f4 transparent #f4f4f4; -fx-border-color: transparent #f4f4f4 transparent #f4f4f4;

View file

@ -16,6 +16,7 @@
#image-alert-round { #image-alert-round {
-fx-image: url("../../../images/alert_round.png"); -fx-image: url("../../../images/alert_round.png");
} }
#image-remove { #image-remove {
-fx-image: url("../../../images/remove.png"); -fx-image: url("../../../images/remove.png");
} }
@ -44,12 +45,11 @@
-fx-image: url("../../../images/sell_large.png"); -fx-image: url("../../../images/sell_large.png");
} }
/* navigation buttons */ /* navigation buttons */
#image-nav-home { #image-nav-home {
-fx-image: url("../../../images/nav/home.png"); -fx-image: url("../../../images/nav/home.png");
} }
#image-nav-home-active { #image-nav-home-active {
-fx-image: url("../../../images/nav/home_active.png"); -fx-image: url("../../../images/nav/home_active.png");
} }
@ -57,6 +57,7 @@
#image-nav-buy { #image-nav-buy {
-fx-image: url("../../../images/nav/buy.png"); -fx-image: url("../../../images/nav/buy.png");
} }
#image-nav-buy-active { #image-nav-buy-active {
-fx-image: url("../../../images/nav/buy_active.png"); -fx-image: url("../../../images/nav/buy_active.png");
} }
@ -64,6 +65,7 @@
#image-nav-sell { #image-nav-sell {
-fx-image: url("../../../images/nav/sell.png"); -fx-image: url("../../../images/nav/sell.png");
} }
#image-nav-sell-active { #image-nav-sell-active {
-fx-image: url("../../../images/nav/sell_active.png"); -fx-image: url("../../../images/nav/sell_active.png");
} }
@ -71,6 +73,7 @@
#image-nav-portfolio { #image-nav-portfolio {
-fx-image: url("../../../images/nav/portfolio.png"); -fx-image: url("../../../images/nav/portfolio.png");
} }
#image-nav-portfolio-active { #image-nav-portfolio-active {
-fx-image: url("../../../images/nav/portfolio_active.png"); -fx-image: url("../../../images/nav/portfolio_active.png");
} }
@ -78,6 +81,7 @@
#image-nav-funds { #image-nav-funds {
-fx-image: url("../../../images/nav/funds.png"); -fx-image: url("../../../images/nav/funds.png");
} }
#image-nav-funds-active { #image-nav-funds-active {
-fx-image: url("../../../images/nav/funds_active.png"); -fx-image: url("../../../images/nav/funds_active.png");
} }
@ -85,6 +89,7 @@
#image-nav-msg { #image-nav-msg {
-fx-image: url("../../../images/nav/msg.png"); -fx-image: url("../../../images/nav/msg.png");
} }
#image-nav-msg-active { #image-nav-msg-active {
-fx-image: url("../../../images/nav/msg_active.png"); -fx-image: url("../../../images/nav/msg_active.png");
} }
@ -92,6 +97,7 @@
#image-nav-settings { #image-nav-settings {
-fx-image: url("../../../images/nav/settings.png"); -fx-image: url("../../../images/nav/settings.png");
} }
#image-nav-settings-active { #image-nav-settings-active {
-fx-image: url("../../../images/nav/settings_active.png"); -fx-image: url("../../../images/nav/settings_active.png");
} }
@ -99,11 +105,11 @@
#image-nav-account { #image-nav-account {
-fx-image: url("../../../images/nav/account.png"); -fx-image: url("../../../images/nav/account.png");
} }
#image-nav-account-active { #image-nav-account-active {
-fx-image: url("../../../images/nav/account_active.png"); -fx-image: url("../../../images/nav/account_active.png");
} }
/* account*/ /* account*/
#image-tick { #image-tick {
-fx-image: url("../../../images/tick.png"); -fx-image: url("../../../images/tick.png");

View file

@ -31,7 +31,6 @@ import net.sourceforge.argparse4j.inf.Namespace;
public abstract class MessageModule extends BitsquareModule { public abstract class MessageModule extends BitsquareModule {
private final Namespace argumentsNamespace; private final Namespace argumentsNamespace;
protected MessageModule(Properties properties, Namespace argumentsNamespace) { protected MessageModule(Properties properties, Namespace argumentsNamespace) {

View file

@ -94,7 +94,8 @@ public class UtilsDHT2 {
public static Message createDummyMessage(Number160 idSender, String inetSender, int tcpPortSendor, public static Message createDummyMessage(Number160 idSender, String inetSender, int tcpPortSendor,
int udpPortSender, Number160 idRecipien, String inetRecipient, int udpPortSender, Number160 idRecipien, String inetRecipient,
int tcpPortRecipient, int tcpPortRecipient,
int udpPortRecipient, byte command, Type type, boolean firewallUDP, boolean firewallTCP) int udpPortRecipient, byte command, Type type, boolean firewallUDP,
boolean firewallTCP)
throws UnknownHostException { throws UnknownHostException {
Message message = new Message(); Message message = new Message();
PeerAddress n1 = createAddress(idSender, inetSender, tcpPortSendor, udpPortSender, firewallUDP, PeerAddress n1 = createAddress(idSender, inetSender, tcpPortSendor, udpPortSender, firewallUDP,
@ -122,15 +123,11 @@ public class UtilsDHT2 {
* Creates peers for testing. The first peer (peer[0]) will be used as the master. This means that shutting down * 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 * peer[0] will shut down all other peers
* *
* @param nrOfPeers * @param nrOfPeers The number of peers to create including the master
* The number of peers to create including the master * @param rnd The random object to create random peer IDs
* @param rnd * @param port The port where the master peer will listen to
* 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] * @return All the peers, with the master peer at position 0 -> peer[0]
* @throws Exception * @throws Exception If the creation of nodes fail.
* If the creation of nodes fail.
*/ */
public static PeerDHT[] createNodes(int nrOfPeers, Random rnd, int port, AutomaticFuture automaticFuture, public static PeerDHT[] createNodes(int nrOfPeers, Random rnd, int port, AutomaticFuture automaticFuture,
boolean maintenance) throws Exception { boolean maintenance) throws Exception {
@ -163,7 +160,8 @@ public class UtilsDHT2 {
PeerMap peerMap = new PeerMap(new PeerMapConfiguration(peerId)); PeerMap peerMap = new PeerMap(new PeerMapConfiguration(peerId));
Peer peer = new PeerBuilder(peerId) Peer peer = new PeerBuilder(peerId)
.masterPeer(master) .masterPeer(master)
.enableMaintenance(maintenance).enableMaintenance(maintenance).peerMap(peerMap).bindings(bindings).start().addAutomaticFuture(automaticFuture); .enableMaintenance(maintenance).enableMaintenance(maintenance).peerMap(peerMap).bindings
(bindings).start().addAutomaticFuture(automaticFuture);
peers[i] = new PeerBuilderDHT(peer).start(); peers[i] = new PeerBuilderDHT(peer).start();
} }
else { else {
@ -211,8 +209,7 @@ public class UtilsDHT2 {
* Perfect routing, where each neighbor has contacted each other. This means that for small number of peers, every * Perfect routing, where each neighbor has contacted each other. This means that for small number of peers, every
* peer knows every other peer. * peer knows every other peer.
* *
* @param peers * @param peers The peers taking part in the p2p network.
* The peers taking part in the p2p network.
*/ */
public static void perfectRouting(PeerDHT... peers) { public static void perfectRouting(PeerDHT... peers) {
for (int i = 0; i < peers.length; i++) { for (int i = 0; i < peers.length; i++) {