Rename CachedView => ActivatableView

This commit is contained in:
Chris Beams 2014-11-22 16:07:49 +01:00
parent 71e2010a87
commit a7fe05de00
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73
26 changed files with 53 additions and 53 deletions

View File

@ -30,14 +30,14 @@ import static com.google.common.base.Preconditions.checkNotNull;
* If caching is used for loader we use the CachedViewController for turning the controller into sleep mode if not
* active and awake it at reactivation.
*/
public abstract class CachedView<M extends Activatable> extends View<M> implements Activatable {
private static final Logger log = LoggerFactory.getLogger(CachedView.class);
public abstract class ActivatableView<M extends Activatable> extends View<M> implements Activatable {
private static final Logger log = LoggerFactory.getLogger(ActivatableView.class);
public CachedView(M model) {
public ActivatableView(M model) {
super(checkNotNull(model, "Model must not be null"));
}
public CachedView() {
public ActivatableView() {
this((M) Activatable.NOOP_INSTANCE);
}

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.account;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.View;
import io.bitsquare.gui.ViewLoader;
@ -36,7 +36,7 @@ import javafx.scene.control.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AccountView extends CachedView {
public class AccountView extends ActivatableView {
private static final Logger log = LoggerFactory.getLogger(AccountView.class);

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.account.arbitrator;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.ViewLoader;
import io.bitsquare.gui.main.account.arbitrator.registration.ArbitratorRegistrationView;
@ -31,7 +31,7 @@ import javafx.stage.Modality;
import javafx.stage.Stage;
// TODO Arbitration is very basic yet
public class ArbitratorSettingsView extends CachedView {
public class ArbitratorSettingsView extends ActivatableView {
private final ViewLoader viewLoader;
private final Navigation navigation;

View File

@ -19,7 +19,7 @@ package io.bitsquare.gui.main.account.arbitrator.browser;
import io.bitsquare.account.AccountSettings;
import io.bitsquare.arbitrator.Arbitrator;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.View;
import io.bitsquare.gui.ViewLoader;
@ -44,7 +44,7 @@ import javafx.scene.layout.*;
import javafx.stage.Stage;
// TODO Arbitration is very basic yet
public class ArbitratorBrowserView extends CachedView implements ArbitratorListener {
public class ArbitratorBrowserView extends ActivatableView implements ArbitratorListener {
private final ViewLoader viewLoader;
private final AccountSettings accountSettings;

View File

@ -18,7 +18,7 @@
package io.bitsquare.gui.main.account.arbitrator.profile;
import io.bitsquare.arbitrator.Arbitrator;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.util.BSFormatter;
import io.bitsquare.persistence.Persistence;
import io.bitsquare.settings.Preferences;
@ -29,7 +29,7 @@ import javafx.fxml.FXML;
import javafx.scene.control.*;
// TODO Arbitration is very basic yet
public class ArbitratorProfileView extends CachedView {
public class ArbitratorProfileView extends ActivatableView {
private final Preferences preferences;

View File

@ -20,7 +20,7 @@ package io.bitsquare.gui.main.account.arbitrator.registration;
import io.bitsquare.arbitrator.Arbitrator;
import io.bitsquare.arbitrator.Reputation;
import io.bitsquare.btc.WalletService;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator;
import io.bitsquare.gui.util.BSFormatter;
import io.bitsquare.locale.BSResources;
@ -61,7 +61,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// TODO Arbitration is very basic yet
public class ArbitratorRegistrationView extends CachedView {
public class ArbitratorRegistrationView extends ActivatableView {
private static final Logger log = LoggerFactory.getLogger(ArbitratorRegistrationView.class);
private final Persistence persistence;

View File

@ -19,7 +19,7 @@ package io.bitsquare.gui.main.account.content.fiat;
import io.bitsquare.bank.BankAccount;
import io.bitsquare.bank.BankAccountType;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.OverlayManager;
import io.bitsquare.gui.components.InputTextField;
import io.bitsquare.gui.components.Popups;
@ -56,7 +56,7 @@ import org.slf4j.LoggerFactory;
import static javafx.beans.binding.Bindings.createBooleanBinding;
public class FiatAccountView extends CachedView<FiatAccountPM> implements ContextAware {
public class FiatAccountView extends ActivatableView<FiatAccountPM> implements ContextAware {
private static final Logger log = LoggerFactory.getLogger(FiatAccountView.class);

View File

@ -18,7 +18,7 @@
package io.bitsquare.gui.main.account.content.irc;
import io.bitsquare.bank.BankAccountType;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.components.InputTextField;
import io.bitsquare.gui.components.Popups;
import io.bitsquare.gui.main.account.MultiStepNavigation;
@ -47,7 +47,7 @@ import org.slf4j.LoggerFactory;
/*
Just temporary for giving the user a possibility to test the app via simulating the bank transfer in a IRC chat.
*/
public class IrcAccountView extends CachedView<IrcAccountPM> implements ContextAware {
public class IrcAccountView extends ActivatableView<IrcAccountPM> implements ContextAware {
private static final Logger log = LoggerFactory.getLogger(IrcAccountView.class);

View File

@ -18,7 +18,7 @@
package io.bitsquare.gui.main.account.content.restrictions;
import io.bitsquare.arbitrator.Arbitrator;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.ViewLoader;
import io.bitsquare.gui.main.account.MultiStepNavigation;
@ -50,7 +50,7 @@ import javafx.util.StringConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class RestrictionsView extends CachedView<RestrictionsPM> implements ContextAware {
public class RestrictionsView extends ActivatableView<RestrictionsPM> implements ContextAware {
private static final Logger log = LoggerFactory.getLogger(RestrictionsView.class);

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.account.settings;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.View;
import io.bitsquare.gui.ViewLoader;
@ -43,7 +43,7 @@ import de.jensd.fx.fontawesome.AwesomeIcon;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AccountSettingsView extends CachedView {
public class AccountSettingsView extends ActivatableView {
private static final Logger log = LoggerFactory.getLogger(AccountSettingsView.class);

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.funds;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.View;
import io.bitsquare.gui.ViewLoader;
@ -33,7 +33,7 @@ import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.*;
public class FundsView extends CachedView {
public class FundsView extends ActivatableView {
private Navigation.Listener navigationListener;
private ChangeListener<Tab> tabChangeListener;

View File

@ -18,7 +18,7 @@
package io.bitsquare.gui.main.funds.transactions;
import io.bitsquare.btc.WalletService;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.components.Popups;
import io.bitsquare.gui.util.BSFormatter;
@ -42,7 +42,7 @@ import javafx.util.Callback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TransactionsView extends CachedView {
public class TransactionsView extends ActivatableView {
private static final Logger log = LoggerFactory.getLogger(TransactionsView.class);
private final WalletService walletService;

View File

@ -22,7 +22,7 @@ import io.bitsquare.btc.FeePolicy;
import io.bitsquare.btc.Restrictions;
import io.bitsquare.btc.WalletService;
import io.bitsquare.btc.listeners.BalanceListener;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.components.Popups;
import io.bitsquare.gui.util.BSFormatter;
import io.bitsquare.util.Utilities;
@ -59,7 +59,7 @@ import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class WithdrawalView extends CachedView {
public class WithdrawalView extends ActivatableView {
private static final Logger log = LoggerFactory.getLogger(WithdrawalView.class);

View File

@ -17,14 +17,14 @@
package io.bitsquare.gui.main.home;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// home is just hosting the arbiters buttons yet, but that's just for dev, not clear yet what will be in home,
// probably overview, event history, news, charts,... -> low prio
public class HomeView extends CachedView {
public class HomeView extends ActivatableView {
private static final Logger log = LoggerFactory.getLogger(HomeView.class);

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.msg;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import javax.inject.Inject;
@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
// will be probably only used for arbitration communication, will be renamed and the icon changed
public class MsgView extends CachedView {
public class MsgView extends ActivatableView {
private static final Logger log = LoggerFactory.getLogger(MsgView.class);

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.portfolio;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.View;
import io.bitsquare.gui.ViewLoader;
@ -34,7 +34,7 @@ import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.*;
public class PortfolioView extends CachedView {
public class PortfolioView extends ActivatableView {
private Tab currentTab;
private Navigation.Listener navigationListener;

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.portfolio.closed;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.components.Popups;
import java.net.URL;
@ -34,7 +34,7 @@ import javafx.util.Callback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ClosedTradesView extends CachedView<ClosedTradesPM> {
public class ClosedTradesView extends ActivatableView<ClosedTradesPM> {
private static final Logger log = LoggerFactory.getLogger(ClosedTradesView.class);
@FXML TableColumn<ClosedTradesListItem, ClosedTradesListItem> priceColumn, amountColumn, volumeColumn,

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.portfolio.offer;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.components.Popups;
import io.bitsquare.util.Utilities;
@ -36,7 +36,7 @@ import javafx.util.Callback;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class OffersView extends CachedView<OffersPM> {
public class OffersView extends ActivatableView<OffersPM> {
private static final Logger log = LoggerFactory.getLogger(OffersView.class);
@FXML TableColumn<OfferListItem, OfferListItem> priceColumn, amountColumn, volumeColumn,

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.portfolio.pending;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.components.InfoDisplay;
import io.bitsquare.gui.components.InputTextField;
@ -58,7 +58,7 @@ import javafx.util.StringConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PendingTradesView extends CachedView<PendingTradesPM> {
public class PendingTradesView extends ActivatableView<PendingTradesPM> {
private static final Logger log = LoggerFactory.getLogger(PendingTradesView.class);

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.settings;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.View;
import io.bitsquare.gui.ViewLoader;
@ -34,7 +34,7 @@ import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.*;
public class SettingsView extends CachedView {
public class SettingsView extends ActivatableView {
private final ViewLoader viewLoader;
private final Navigation navigation;

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.settings.application;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import java.net.URL;
@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
/**
* This UI is not cached as it is normally only needed once.
*/
public class PreferencesView extends CachedView<PreferencesPM> {
public class PreferencesView extends ActivatableView<PreferencesPM> {
private static final Logger log = LoggerFactory.getLogger(PreferencesView.class);

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.trade;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.ViewLoader;
import io.bitsquare.gui.components.InputTextField;
@ -44,7 +44,7 @@ import javafx.scene.control.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TradeView extends CachedView implements TradeNavigator {
public class TradeView extends ActivatableView implements TradeNavigator {
private static final Logger log = LoggerFactory.getLogger(TradeView.class);
private OfferBookView offerBookViewCB;

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.trade.createoffer;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.CloseListener;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.OverlayManager;
@ -73,7 +73,7 @@ import static javafx.beans.binding.Bindings.createStringBinding;
// TODO Implement other positioning method in InoutTextField to display it over the field instead of right side
// priceAmountHBox is too large after redesign as to be used as layoutReference.
public class CreateOfferView extends CachedView<CreateOfferPM> {
public class CreateOfferView extends ActivatableView<CreateOfferPM> {
private static final Logger log = LoggerFactory.getLogger(CreateOfferView.class);

View File

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.trade.offerbook;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.OverlayManager;
import io.bitsquare.gui.components.InputTextField;
@ -62,7 +62,7 @@ import static javafx.beans.binding.Bindings.createStringBinding;
* TODO: The advanced filters are not impl. yet
* The restrictions handling is open from the concept and is only implemented for countries yet.
*/
public class OfferBookView extends CachedView<OfferBookPM> {
public class OfferBookView extends ActivatableView<OfferBookPM> {
private static final Logger log = LoggerFactory.getLogger(OfferBookView.class);
private final Navigation navigation;

View File

@ -18,7 +18,7 @@
package io.bitsquare.gui.main.trade.takeoffer;
import io.bitsquare.gui.CachedView;
import io.bitsquare.gui.ActivatableView;
import io.bitsquare.gui.CloseListener;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.OverlayManager;
@ -69,7 +69,7 @@ import org.controlsfx.dialog.Dialog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class TakeOfferView extends CachedView<TakeOfferPM> {
public class TakeOfferView extends ActivatableView<TakeOfferPM> {
private static final Logger log = LoggerFactory.getLogger(TakeOfferView.class);
private final Navigation navigation;

View File

@ -42,7 +42,7 @@
<logger name="io.bitsquare.gui.ActivatableWithDelegate" level="WARN"/>
<logger name="io.bitsquare.gui.ViewController" level="WARN"/>
<logger name="io.bitsquare.gui.View" level="WARN"/>
<logger name="io.bitsquare.gui.CachedView" level="WARN"/>
<logger name="io.bitsquare.gui.ActivatableView" level="WARN"/>
<logger name="io.bitsquare.gui.util.Profiler" level="WARN"/>
<logger name="io.bitsquare.persistence.Persistence" level="WARN"/>
<logger name="io.bitsquare.locale.BSResources" level="OFF"/>