Add some docs

This commit is contained in:
2026-06-23 21:31:32 +02:00
parent 83e5133227
commit 15bfd6c608
25 changed files with 83 additions and 3 deletions

View File

@@ -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 {

View File

@@ -1,7 +1,14 @@
package app;
/**
* Provides some endpoints to browse between views
* @author Laurent Crema
*/
public interface INavigator {
/**
* Displays Fourier view
*/
void showFourier();
}

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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);
}