Skip to content

Commit

Permalink
MATP-1102 Complete refactoring on WindowManagerService
Browse files Browse the repository at this point in the history
  • Loading branch information
colinduplantis committed Mar 20, 2023
1 parent f26c6a7 commit 415285e
Show file tree
Hide file tree
Showing 2 changed files with 552 additions and 889 deletions.
28 changes: 24 additions & 4 deletions photon/src/main/java/org/marketcetera/ui/PhotonApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import java.awt.Taskbar.Feature;
import java.awt.Toolkit;
import java.io.IOException;
import java.util.Properties;

import org.marketcetera.ui.events.LoginEvent;
import org.marketcetera.ui.events.LogoutEvent;
import org.marketcetera.ui.service.DisplayLayoutService;
import org.marketcetera.ui.service.PhotonNotificationService;
import org.marketcetera.ui.service.SessionUser;
import org.marketcetera.ui.service.StyleService;
import org.marketcetera.ui.service.WebMessageService;
import org.marketcetera.ui.service.WindowManagerService;
import org.marketcetera.ui.view.ApplicationMenu;
import org.marketcetera.util.log.SLF4JLoggerProxy;
import org.springframework.context.ApplicationContext;
Expand Down Expand Up @@ -60,8 +61,8 @@ public void init()
super.init();
applicationContext = new AnnotationConfigApplicationContext("org.marketcetera","com.marketcetera");
webMessageService = applicationContext.getBean(WebMessageService.class);
windowManagerService = applicationContext.getBean(WindowManagerService.class);
styleService = applicationContext.getBean(StyleService.class);
displayLayoutService = applicationContext.getBean(DisplayLayoutService.class);
webMessageService.register(this);
}
/* (non-Javadoc)
Expand All @@ -74,7 +75,6 @@ public void start(Stage inPrimaryStage)
SLF4JLoggerProxy.info(this,
"Starting main stage");
primaryStage = inPrimaryStage;
windowManagerService.initializeMainStage(primaryStage);
root = new VBox();
menuLayout = new VBox();
workspace = new Pane();
Expand Down Expand Up @@ -260,6 +260,23 @@ public static void main(String[] args)
{
launch();
}
private Properties displayProperties;
/**
* base key for {@see UserAttributeType} display layout properties
*/
private static final String propId = PhotonApp.class.getSimpleName();
/**
* workspace width key name
*/
private static final String workspaceWidthProp = propId + "_workspaceWidth";
/**
* workspace height key name
*/
private static final String workspaceHeightProp = propId + "_workspaceHeight";
/**
* workspace layout key name
*/
private static final String mainWorkspaceLayoutKey = propId + "_workspaceDisplayLayout";
/**
* footer holder for the server connection status image
*/
Expand All @@ -285,7 +302,6 @@ public static void main(String[] args)
* web message service value
*/
private WebMessageService webMessageService;
private WindowManagerService windowManagerService;
private VBox menuLayout;
private ApplicationContext applicationContext;
private VBox root;
Expand All @@ -296,4 +312,8 @@ public static void main(String[] args)
private ToolBar statusToolBar;
private ToolBar footerToolBar;
private PhotonNotificationService notificationService;
/**
* provides access to display layout services
*/
private DisplayLayoutService displayLayoutService;
}
Loading

0 comments on commit 415285e

Please sign in to comment.