Add some docs
This commit is contained in:
@@ -17,6 +17,7 @@ import ui.interfaces.IMainView;
|
||||
import ui.interfaces.INavBar;
|
||||
|
||||
/**
|
||||
* Gathers some configurations in order to set the dependency injection container up
|
||||
* @author Laurent Crema
|
||||
*/
|
||||
public class AppModule extends AbstractModule {
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
package app;
|
||||
|
||||
/**
|
||||
* Provides some endpoints to browse between views
|
||||
* @author Laurent Crema
|
||||
*/
|
||||
public interface INavigator {
|
||||
|
||||
/**
|
||||
* Displays Fourier view
|
||||
*/
|
||||
void showFourier();
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,11 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import ui.implementation.views.DoubleMatrix;
|
||||
|
||||
/**
|
||||
* Concrete implement of the INavigator interface.
|
||||
* Implements abstract endpoints to displays views in a Swing way
|
||||
* @author Laurent Crema
|
||||
*/
|
||||
public class SwingNavigator implements INavigator {
|
||||
|
||||
private final Provider<DoubleMatrix> doubleMatrixProvider;
|
||||
|
||||
@@ -8,6 +8,9 @@ import domain.events.ImageChangedEvent;
|
||||
import domain.events.ModeChangedEvent;
|
||||
import domain.image.Image;
|
||||
|
||||
/**
|
||||
* Represents the global state of the app
|
||||
*/
|
||||
@Singleton
|
||||
public class AppState extends State {
|
||||
|
||||
|
||||
@@ -2,6 +2,12 @@ package app.state;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
|
||||
/**
|
||||
* Represents any states that could ever exist.
|
||||
* In order to notify the caller about any change made to internal properties of a children state, the caller
|
||||
* must register itself
|
||||
* @author Laurent Crema
|
||||
*/
|
||||
public abstract class State {
|
||||
|
||||
protected EventBus eventBus;
|
||||
@@ -10,6 +16,10 @@ public abstract class State {
|
||||
this.eventBus = eventBus;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the caller so it can be notifed from changes within the state
|
||||
* @param obj the caller itself
|
||||
*/
|
||||
public void register(Object obj) {
|
||||
eventBus.register(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user